[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-06-10 Thread António Afonso via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362982: Create a generic handler for Xfer packets (authored by aadsm, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-06-05 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 203235. aadsm marked an inline comment as done. aadsm added a comment. Address final 2 comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62499/new/ https://reviews.llvm.org/D62499 Files: lldb/include/lldb

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-06-03 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. Looks good to me now. Thanks for your patience. Comment at: lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationServerTest.cpp:1-2 +//===-- GDBRemoteGDBRemoteCommunicati

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-06-03 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 202852. aadsm marked 2 inline comments as done. aadsm added a comment. Move test to a better place, address other comments related to tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62499/new/ https://review

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-06-03 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Thanks for writing the test, I have a bunch of more comments on the test itself, but hopefully this will be the last iteration. :) Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2766 // Grab the auxv data.

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-06-02 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/unittests/tools/lldb-server/tests/CommunicationServerTest.cpp:40-42 +for (size_t i = 0; i < dst_len; i++) { + packet.append(1, *(static_cast(dst) + i)); +} Is ther

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-06-02 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 202640. aadsm marked an inline comment as done. aadsm added a comment. Herald added a subscriber: mgorny. Address comments and add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62499/new/ https://reviews.ll

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2766 // Grab the auxv data. auto buffer_or_error = m_debugged_process_up->GetAuxvData(); if (!buffer_or_err

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2770 LLDB_LOG(log, "no auxv data retrieved: {0}", ec.message()); - return SendErrorResponse(ec.value()); +

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2770 LLDB_LOG(log, "no auxv data retrieved: {0}", ec.message()); - return SendErrorResponse(ec.value()); +

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp:125 + [&](std::unique_ptr e) { +result = SendErrorResponse(std::move(e)); + }); aadsm wrote: > labath wrote: > > I'm a bit confuse

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked 4 inline comments as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp:125 + [&](std::unique_ptr e) { +result = SendErrorResponse(std::move(e)); + }); labath wrot

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Thanks for the update. The actual code looks mostly good, but I have some comments on the error handling infrastructure. I am sorry that this is taking a bit long, but I am trying to make sure it's not unnecessarily overcomplicated (in the past we've generally not paid m

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-30 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 202323. aadsm added a comment. - Introduce better error handling by creating 2 new error classes, one for generic packet errors that contain a number and another for unimplemented features. - The logic for reading the xfer object was moved into its own functio

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D62499#1520654 , @labath wrote: > In D62499#1520610 , @krytarowski > wrote: > > > > One time just before it's loaded (so lldb can check which modules are > > > loaded) and another r

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-29 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D62499#1520610 , @krytarowski wrote: > > One time just before it's loaded (so lldb can check which modules are > > loaded) and another right after it's loaded (so lldb can check again which > > ones are loaded and calculate the

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. > One time just before it's loaded (so lldb can check which modules are loaded) > and another right after it's loaded (so lldb can check again which ones are > loaded and calculate the difference). There is on NetBSD and on a selection of other OSs: `_rtld_debug_sta

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-29 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2738 + if (!memory_buffer_sp) { +if (xfer_object == "auxv") { +// *BSD impls should be able to do this too. aadsm wrote: > xiaobai wrote: >

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-28 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2738 + if (!memory_buffer_sp) { +if (xfer_object == "auxv") { +// *BSD impls should be able to do this too. -

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-28 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. Thanks for doing this work! I'd love to see a faster LLDB. :) Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2697-2717 + std::string xfer_object; + if (packet.GetStringBeforeChar(xfer_object, ':') == 0) +r

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Thank you for working on this. This can speed up the handling of shared library loading by a lot. Also, thank you for splitting the work up into logical pieces. Please find my comments inline. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemo

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-27 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: clayborg, xiaobai. Herald added subscribers: lldb-commits, krytarowski. Herald added a project: LLDB. aadsm edited the summary of this revision. aadsm edited the summary of this revision. This is the first of a few patches I have to improve the p