[Lldb-commits] [PATCH] D62547: (lldb-vscode) Evaluate expressions as LLDB commands when in REPL mode.

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I don't know much about vscode or DAP, but this guessing of which kind of a command the user meant to type sounds like a bad idea to me. Having this specified explicitly (via backticks or whatever) feels like a better approach... Repository: rLLDB LLDB CHANGES SINCE

[Lldb-commits] [PATCH] D62570: [WIP] Use LLVM's debug line parser in LLDB

2019-05-28 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added reviewers: labath, aprantl, clayborg, grimar, friss. Herald added subscribers: llvm-commits, jdoerfert, abidh, mgorny. Herald added projects: LLDB, LLVM. The line number table header was substantially revised in DWARF 5, which is not supporte

[Lldb-commits] [PATCH] D62562: [Target] Introduce Process::GetLanguageRuntimes

2019-05-28 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: source/Target/Thread.cpp:2216 + GetProcess()->GetLanguageRuntimes(); + for (LanguageRuntime *runtime : language_runtimes) { +if (!runtime) if ` for (LanguageRuntime *runtime : GetProcess()->GetLanguageRunt

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-05-28 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. > However, now that I think about it, that is nonsense, because there is no way > for us to say to the user that "we failed to read some initial bytes, but > this is the memory contents after that". So just using process_vm_readv, and > finishing up with ptrace sounds fin

[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] [lldb] r361915 - build: only search for the needed python type

2019-05-28 Thread Saleem Abdulrasool via lldb-commits
Author: compnerd Date: Tue May 28 19:26:29 2019 New Revision: 361915 URL: http://llvm.org/viewvc/llvm-project?rev=361915&view=rev Log: build: only search for the needed python type Windows has different types of runtime libraries which are ABI incompatible with one another. This requires that th

[Lldb-commits] [PATCH] D62562: [Target] Introduce Process::GetLanguageRuntimes

2019-05-28 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: JDevlieghere, davide, jingham. Currently there's not really a good way to iterate over the language runtimes a process has. This is sometimes desirable (as seen in my change to Thread). Additionally, there's not really a good reason to iterat

[Lldb-commits] [PATCH] D62221: [lldb-server][LLGS] Support 'g' packets

2019-05-28 Thread Guilherme Andrade via Phabricator via lldb-commits
guiandrade updated this revision to Diff 201790. guiandrade added a comment. Remove redundant cast from GDBRemoteCommunicationServerLLGS::Handle_g and add annotation to TestGdbRemoteGPacket::g_returns_correct_data so it gets skipped if the running architecture isn't x86_64 Repository: rG LL

[Lldb-commits] [PATCH] D61833: Fix IPv6 support on lldb-server platform

2019-05-28 Thread António Afonso via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB361898: Fix IPv6 support on lldb-server platform (authored by aadsm, committed by ). Changed prior to commit: https://reviews.llvm.org/D61833?vs=200562&id=201784#toc Repository: rLLDB LLDB CHANGE

[Lldb-commits] [PATCH] D62547: (lldb-vscode) Evaluate expressions as LLDB commands when in REPL mode.

2019-05-28 Thread Nathan Lanza via Phabricator via lldb-commits
lanza added a comment. Any reason why the backtick method is insufficient? I don't like the idea of the behavior of typing `q` or `c` being dependent upon the frame you're in. On a similar note, I'm arguing for a better command prompt implementation in the DAP & VSCode. I'm trying to get a pty

[Lldb-commits] [lldb] r361886 - [SymbolFileDWARF] Remove unused member (NFC)

2019-05-28 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere Date: Tue May 28 15:33:30 2019 New Revision: 361886 URL: http://llvm.org/viewvc/llvm-project?rev=361886&view=rev Log: [SymbolFileDWARF] Remove unused member (NFC) Removes the unused debug line instance. Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF

[Lldb-commits] [PATCH] D62547: (lldb-vscode) Evaluate expressions as LLDB commands when in REPL mode.

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. one major issue that still needs to be resolved is we don't know which thread is currently selected in the IDE UI. You can make an example program that has two threads, each with different variables that are available, and then type "foo" where "foo" is a variable that

[Lldb-commits] [PATCH] D62547: (lldb-vscode) Evaluate expressions as LLDB commands when in REPL mode.

2019-05-28 Thread Ivan Hernandez via Phabricator via lldb-commits
ivanhernandez13 created this revision. ivanhernandez13 added a reviewer: clayborg. ivanhernandez13 added a project: LLDB. Herald added a subscriber: lldb-commits. lldb-vscode can receive 'evaluate' requests in multiple modes, one of which is 'repl' which indicates the expression to evaluate was t

[Lldb-commits] [PATCH] D62472: [CMake] LLDB.framework tools handling

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/tools/darwin-debug/CMakeLists.txt:6 +if(LLDB_BUILD_FRAMEWORK) + lldb_add_to_framework(darwin-debug) +endif() We need it for launching in a terminal on macOS. So it actually is needed for "process launch --tty" on

[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] D62472: [CMake] LLDB.framework tools handling

2019-05-28 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere accepted this revision. JDevlieghere added inline comments. This revision is now accepted and ready to land. Comment at: lldb/tools/argdumper/CMakeLists.txt:9 +if(LLDB_BUILD_FRAMEWORK) + lldb_add_to_framework(lldb-argdumper) +endif() friss wrote: >

[Lldb-commits] [PATCH] D62472: [CMake] LLDB.framework tools handling

2019-05-28 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. This is a much nicer solution. Thanks for doing this. Comment at: lldb/tools/debugserver/source/CMakeLists.txt:268 + if(LLDB_BUILD_FRAMEWORK) +lldb_add_to_framework(lldb-argdumper) + endif() This should be `debugserver`. Reposit

[Lldb-commits] [PATCH] D62472: [CMake] LLDB.framework tools handling

2019-05-28 Thread Stefan Gränitz via Phabricator via lldb-commits
sgraenitz added a comment. Thanks for having a look. I'd to focus on the mechanism here and keep the contents of the framework bundle unchanged. Happy to discuss this in separate reviews like D62474 . Comment at: lldb/tools/darwin-debug/CMakeL

[Lldb-commits] [PATCH] D62472: [CMake] LLDB.framework tools handling

2019-05-28 Thread Stefan Gränitz via Phabricator via lldb-commits
sgraenitz updated this revision to Diff 201726. sgraenitz marked an inline comment as done. sgraenitz added a comment. Fix copy/paste mistake for darwin-debug Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62472/new/ https://reviews.llvm.org/D62472

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-28 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D62500#1518815 , @labath wrote: > Definitely go for the option of refactoring the DYLD AuxVector class to make > it usable from lldb-server. +1 > It doesn't look like it should be that complicated even. Instead of passi

[Lldb-commits] [PATCH] D62472: [CMake] LLDB.framework tools handling

2019-05-28 Thread Frederic Riss via Phabricator via lldb-commits
friss added inline comments. Comment at: lldb/tools/argdumper/CMakeLists.txt:9 +if(LLDB_BUILD_FRAMEWORK) + lldb_add_to_framework(lldb-argdumper) +endif() JDevlieghere wrote: > Why do we need this in the framework? Is it only there for testing? It is definitely u

[Lldb-commits] [PATCH] D62472: [CMake] LLDB.framework tools handling

2019-05-28 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/tools/argdumper/CMakeLists.txt:9 +if(LLDB_BUILD_FRAMEWORK) + lldb_add_to_framework(lldb-argdumper) +endif() Why do we need this in the framework? Is it only there for testing? Comment at: ll

[Lldb-commits] [PATCH] D62425: [DWARFExpression] Remove ctor that takes just a compile unit.

2019-05-28 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL361849: [DWARFExpression] Remove ctor that takes just a compile unit. (authored by JDevlieghere, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to com

[Lldb-commits] [lldb] r361849 - [DWARFExpression] Remove ctor that takes just a compile unit.

2019-05-28 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere Date: Tue May 28 10:34:05 2019 New Revision: 361849 URL: http://llvm.org/viewvc/llvm-project?rev=361849&view=rev Log: [DWARFExpression] Remove ctor that takes just a compile unit. Like many of our DWARF classes, the DWARFExpression can be initialized in several ways. One such

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/source/Plugins/Process/Utility/ELFAuxVector.cpp:18 + lldb::offset_t saved_offset = *offset_ptr; + *value = data.GetMaxU64(offset_ptr, data.GetAddressByteSize()); + return *offset_ptr != saved_offset; aadsm wrote

[Lldb-commits] [PATCH] D62425: [DWARFExpression] Remove ctor that takes just a compile unit.

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. lgtm. Pavel, you good? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62425/new/ https://reviews.llvm.org/D62425 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[Lldb-commits] [PATCH] D62302: DWARF: Fix address range support in mixed 4+5 scenario

2019-05-28 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:372 +return std::move(*expected_ranges); + unit.GetSymbolFileDWARF()->GetObjectFile()->GetModule()->ReportError( + "{0x%8.8x}: DIE has DW_AT_ranges(0x%" PRIx64 ") att

[Lldb-commits] [PATCH] D62425: [DWARFExpression] Remove ctor that takes just a compile unit.

2019-05-28 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 201687. JDevlieghere added a comment. Address CR feedback CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62425/new/ https://reviews.llvm.org/D62425 Files: lldb/include/lldb/Expression/DWARFExpression.h lldb/source/Expression/DWARFExpression

[Lldb-commits] [PATCH] D62477: DWARFASTParserClang: Move attribute parsing into a single function

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Minor nit where we are storing name a ConstString but mangled name as "const char *". Fix if needed. Would be good to verify performance doesn't regress from this somehow. Maybe having a large DWARF file with many types and accessing each type and making sure it is co

[Lldb-commits] [PATCH] D57830: Add functionality to trace a function within lldb

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. For this to actually work we need to: - Disable skipping function prologues using "settings set target.skip-prologue false", set a breakpoint at the function we want to trace and

[Lldb-commits] [PATCH] D62425: [DWARFExpression] Remove ctor that takes just a compile unit.

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:508-509 uint32_t block_length = form_value.Unsigned(); - frame_base->SetOpcodeData(module, debug_info_data, block_offset, -

[Lldb-commits] [PATCH] D62425: [DWARFExpression] Remove ctor that takes just a compile unit.

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/include/lldb/Expression/DWARFExpression.h:311-312 lldb::addr_t m_loclist_slide; ///< A value used to slide the location list -///offsets so that +/// offsets so tha

[Lldb-commits] [PATCH] D62505: Fix multiple module loaded with the same UUID

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D62505#1519166 , @aadsm wrote: > Interesting, I did miss that comment when I checked that class. This is > something @clayborg was concerned with when I discussed this solution with > him. The main reason I was not keen in havi

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-28 Thread António Afonso via Phabricator via lldb-commits
aadsm marked 2 inline comments as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/Utility/ELFAuxVector.cpp:18 + lldb::offset_t saved_offset = *offset_ptr; + *value = data.GetMaxU64(offset_ptr, data.GetAddressByteSize()); + return *offset_ptr != saved

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. I like this being in a Utility class like it is coded, but we should fix the POSIX DYLD plug-in to use this common code as part of this patch. Comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62500/new/ https://rev

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added inline comments. Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:2091-2093 +DataExtractor auxv_data(buffer_or_error.get()->getBufferStart(), +buffer_or_error.get()->ge

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D62503#1519179 , @aadsm wrote: > Regarding changing the ReadMemory, yes, I was going to submit another patch > with it. I was going to do it in a different way though, where I would read > as much as possible with the process_v

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-05-28 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Regarding changing the ReadMemory, yes, I was going to submit another patch with it. I was going to do it in a different way though, where I would read as much as possible with the process_vm_readv (fwiw, this function does not fail when it tries to read cross page, it wi

[Lldb-commits] [PATCH] D62505: Fix multiple module loaded with the same UUID

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D62505#1518833 , @labath wrote: > I agree we need to support a module being loaded multiple times, but I'm not > sure if this is the right way to achieve that. I mean, if two files are > exactly the same, then it should be fi

[Lldb-commits] [PATCH] D62505: Fix multiple module loaded with the same UUID

2019-05-28 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Interesting, I did miss that comment when I checked that class. This is something @clayborg was concerned with when I discussed this solution with him. The main reason I was not keen in having multiple load addresses for a section is because that would change the GetLoadA

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D62503#1518839 , @labath wrote: > It sounds like these improved reads would be beneficial for all kinds of > reads, and not just for reading c strings. Could this chunking logic be > implemented directly in ReadMemory? We s

[Lldb-commits] [PATCH] D62517: Revert "D11003: Tolerate DWARF compile unit without filename."

2019-05-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. As long as we put an empty FileSpec at the start of the support list we are ok. All file indexes are 1 based. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62517/new/ https://rev

[Lldb-commits] [PATCH] D62517: Revert "D11003: Tolerate DWARF compile unit without filename."

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. labath added reviewers: clayborg, tberghammer, dsrbecky. Herald added a subscriber: aprantl. This code is modifying a support file list after it has been created. This makes it hard to share the file list between type units and compile units in DWARF. It's not a total

[Lldb-commits] [lldb] r361799 - [CMake] Folder structure for generated Xcode project to cover more targets

2019-05-28 Thread Stefan Granitz via lldb-commits
Author: stefan.graenitz Date: Tue May 28 02:29:05 2019 New Revision: 361799 URL: http://llvm.org/viewvc/llvm-project?rev=361799&view=rev Log: [CMake] Folder structure for generated Xcode project to cover more targets Modified: lldb/trunk/CMakeLists.txt lldb/trunk/cmake/modules/AddLLDB.cma

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. It sounds like these improved reads would be beneficial for all kinds of reads, and not just for reading c strings. Could this chunking logic be implemented directly in ReadMemory? That would also allow you to test this by sending `m` which are deliberately chosen to cr

[Lldb-commits] [PATCH] D62505: Fix multiple module loaded with the same UUID

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a reviewer: jingham. labath added a subscriber: jingham. labath added a comment. I agree we need to support a module being loaded multiple times, but I'm not sure if this is the right way to achieve that. I mean, if two files are exactly the same, then it should be fine (and even pr

[Lldb-commits] [PATCH] D62501: Implement GetSharedLibraryInfoAddress

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Looks relatively straight-forward, but I'll wait with the full review of this and subsequent patches until we sort out the first two patches in this series. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62501/new/ https://r

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath requested changes to this revision. labath added a reviewer: JDevlieghere. labath added a subscriber: JDevlieghere. labath added a comment. This revision now requires changes to proceed. Definitely go for the option of refactoring the DYLD AuxVector class to make it usable from lldb-server

[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] D62221: [lldb-server][LLGS] Support 'g' packets

2019-05-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a subscriber: omjavaid. labath added a comment. I have a couple of comments inline, but overall I think this looks pretty good now. It would be interesting to also test reading %ymm registers, as those are stored in a funny way in the cpu context (and so we are most likely to get t