[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a subscriber: lhames. labath added a comment. A more light-weight approach to this would be to store the `ErrorInfo` object from the `Error` and copy that when needed. Something like: class IntelPTInstruction { std::unique_ptr m_error; // Technically, this should be a vector,

[Lldb-commits] [PATCH] D87173: Ignores functions that have a range starting outside of a code section

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added inline comments. Comment at: lldb/test/Shell/SymbolFile/DWARF/function-entries-invalid-addresses.yaml:5-12 +image lookup -F main +# RUN: %lldb %t/test.obj -b -o "settings set interpreter.stop-command-source-on-error false" -s %t/check

[Lldb-commits] [PATCH] D87172: Check if debug line sequences are starting after the first code segment

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:503-505 + if (section_list) { +InitializeFirstCodeAddress(*section_list); + } aadsm wrote: > labath wrote: > > clayborg wrote: > > > remove braces > > or even

[Lldb-commits] [PATCH] D87868: [RFC] When calling the process mmap try to call all found instead of just the first one

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. It would be good to have a test for the ObjectFileELF part at least. I'm thinking of something similar to what we have in `test/Shell/ObjectFile/PECOFF/symbol.yaml` for COFF... Comment at: lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:2218

[Lldb-commits] [PATCH] D90490: [intel-pt][trace] Implement a "get supported trace type" packet

2020-11-02 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/docs/lldb-gdb-remote.txt:245 +// +// See lldb-enumerations for the list of available TraceType's. +// Saying `lldb-enumerations.h` might save someone some grepping time, also saying that it should be in deci

[Lldb-commits] [PATCH] D90464: [nfc] [lldb] Refactor out DWARFUnit::ContainsDIERef

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Are you planning to use this anywhere else? Could we maybe keep this function inside NameToDIE? There's no such thing as a DIERef in llvm (and I doubt there will be), so it'd be nice to keep this in code which is not destined to be merged some day... Repository: rG L

[Lldb-commits] [PATCH] D90464: [nfc] [lldb] Refactor out DWARFUnit::ContainsDIERef

2020-11-02 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil planned changes to this revision. jankratochvil added a comment. I wrote it originally as the function was used at more places. But it no longer is so I just found it as some code cleanup. OK, I will try to update it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[Lldb-commits] [PATCH] D90490: [intel-pt][trace] Implement a "get supported trace type" packet

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/docs/lldb-gdb-remote.txt:245 +// +// See lldb-enumerations for the list of available TraceType's. +// DavidSpickett wrote: > Saying `lldb-enumerations.h` might save someone some grepping time, also > saying that it

[Lldb-commits] [PATCH] D88483: Add possibility to get module from SBType

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. The `num_compile_units==3` assumption is also fragile, as files like crtbegin/end, etc. can come with debug info too (ran into that downstream). Changed the assertion to `>=3` in fd06f6441. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[Lldb-commits] [PATCH] D90598: [lldb/DWARF] Fix implementation of DW_OP_convert

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. labath added reviewers: JDevlieghere, aprantl, dblaikie. Herald added a project: LLDB. labath requested review of this revision. According to the standard the DW_OP_convert operand is an offset relative to the current compilation unit, not to the start of the debug_in

[Lldb-commits] [PATCH] D90598: [lldb/DWARF] Fix implementation of DW_OP_convert

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Judging by http://lists.llvm.org/pipermail/llvm-dev/2020-October/145990.html, dsymutil has a similar bug... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90598/new/ https://reviews.llvm.org/D90598 _

[Lldb-commits] [PATCH] D90598: [lldb/DWARF] Fix implementation of DW_OP_convert

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 302269. labath added a comment. Add (test) changes I accidentally left out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90598/new/ https://reviews.llvm.org/D90598 Files: lldb/source/Expression/DWARFExpressi

[Lldb-commits] [lldb] e3645fd - [lldb/test] Fix a fragile assumption in TestTypeGetModule

2020-11-02 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2020-11-02T15:42:14+01:00 New Revision: e3645fdff4639d2ac93e1869a7cd0be8ef24b6f2 URL: https://github.com/llvm/llvm-project/commit/e3645fdff4639d2ac93e1869a7cd0be8ef24b6f2 DIFF: https://github.com/llvm/llvm-project/commit/e3645fdff4639d2ac93e1869a7cd0be8ef24b6f2.diff

[Lldb-commits] [PATCH] D88483: Add possibility to get module from SBType

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In e3645fdff , that is (the first has is a local commit I forgot to push). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88483/new/ https://reviews.llvm.

[Lldb-commits] [lldb] 1695c84 - [lldb] Generalize an deflake gdb-remote *client* tests

2020-11-02 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2020-11-02T16:34:25+01:00 New Revision: 1695c8420a1c43ff6f4ff442ce5fa0cdd2f6e78f URL: https://github.com/llvm/llvm-project/commit/1695c8420a1c43ff6f4ff442ce5fa0cdd2f6e78f DIFF: https://github.com/llvm/llvm-project/commit/1695c8420a1c43ff6f4ff442ce5fa0cdd2f6e78f.diff

[Lldb-commits] [PATCH] D90464: [nfc] [lldb] Refactor out DWARFUnit::ContainsDIERef

2020-11-02 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 302281. jankratochvil added a comment. It is no longer too much pretty, feel free to drop it if you think so. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90464/new/ https://reviews.llvm.org/D90464 File

[Lldb-commits] [PATCH] D90464: [nfc] [lldb] Refactor out DWARFUnit::ContainsDIERef

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. If the DWZ stuff makes this more complicated then it may be worth it. Otherwise, let's just drop it. Comment at: lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h:53-54 + +private: + static bool DWARFUnitContainsDIERef(const DWARFUnit &unit, DIERef die_

[Lldb-commits] [PATCH] D90464: [nfc] [lldb] Refactor out DWARFUnit::ContainsDIERef

2020-11-02 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil abandoned this revision. jankratochvil added a comment. DWZ is no longer using this. OK, dropped. Thanks for the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90464/new/ https://reviews.llvm.org/D90464 ___

[Lldb-commits] [PATCH] D90620: [lldb] [Process/FreeBSDRemote] Remove GetSharedLibraryInfoAddress override

2020-11-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision. mgorny added reviewers: krytarowski, labath, emaste. mgorny requested review of this revision. Remove the NetBSD-specific override of GetSharedLibraryInfoAddress(), restoring the generic implementation from NativeProcessELF. https://reviews.llvm.org/D90620 Files:

[Lldb-commits] [PATCH] D90557: [LLDB/Lua] call lua_close() on Lua dtor

2020-11-02 Thread Pedro Tammela via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4d7d6f276c6d: [LLDB/Lua] call lua_close() on Lua dtor (authored by tammela). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[Lldb-commits] [lldb] 4d7d6f2 - [LLDB/Lua] call lua_close() on Lua dtor

2020-11-02 Thread Pedro Tammela via lldb-commits
Author: Pedro Tammela Date: 2020-11-02T16:52:30Z New Revision: 4d7d6f276c6df9e0a4cc3d9fccfaf84face62311 URL: https://github.com/llvm/llvm-project/commit/4d7d6f276c6df9e0a4cc3d9fccfaf84face62311 DIFF: https://github.com/llvm/llvm-project/commit/4d7d6f276c6df9e0a4cc3d9fccfaf84face62311.diff LOG:

[Lldb-commits] [PATCH] D90598: [lldb/DWARF] Fix implementation of DW_OP_convert

2020-11-02 Thread David Blaikie via Phabricator via lldb-commits
dblaikie added a comment. In D90598#2368020 , @labath wrote: > Judging by http://lists.llvm.org/pipermail/llvm-dev/2020-October/145990.html, > dsymutil has a similar bug... That's my understanding. It means I'm not sure (though I'm not the expert here -

[Lldb-commits] [PATCH] D86292: [LLDB][RISCV] Add RISC-V ArchSpec and rv32/rv64 variant detection

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This looks fine. Comment at: lldb/test/Shell/ObjectFile/ELF/riscv64-arch.yaml:1 +# RUN: yaml2obj %s > %t +# RUN: lldb-test object-file %t | FileCheck %s Consider using yaml2obj's `--docnum` functionality to

[Lldb-commits] [PATCH] D86292: [LLDB][RISCV] Add RISC-V ArchSpec and rv32/rv64 variant detection

2020-11-02 Thread Luís Marques via Phabricator via lldb-commits
luismarques updated this revision to Diff 302190. luismarques retitled this revision from "[LLDB][RISCV] Distinguish between riscv32 and riscv64 based on ELF class" to "[LLDB][RISCV] Add RISC-V ArchSpec and rv32/rv64 variant detection". luismarques edited the summary of this revision. luismarques

[Lldb-commits] [PATCH] D62732: [RISCV] Add SystemV ABI

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Two months isn't that long, actually. Let's first see if there's anything else in this patch that we *can* test. It seems like we should be able to test the remainder of the ObjectFileELF changes if we extended lldb-test to dump the architecture flags too. Can you try s

[Lldb-commits] [PATCH] D62732: [RISCV] Add SystemV ABI

2020-11-02 Thread Luís Marques via Phabricator via lldb-commits
luismarques updated this revision to Diff 302182. luismarques added a comment. Herald added subscribers: frasercrmck, NickHung. - Use MCBasedABI - Remove ArchSpec core bits, to be moved to D86292 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D62732: [RISCV] Add SystemV ABI

2020-11-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.h:9 + +#ifndef liblldb_ABISysV_riscv_h_ +#define liblldb_ABISysV_riscv_h_ We use a different format for header guards these days. Repository: rG LLVM Github Monorepo CHANGE

[Lldb-commits] [PATCH] D62732: [RISCV] Add SystemV ABI

2020-11-02 Thread Luís Marques via Phabricator via lldb-commits
luismarques added a comment. In D62732#2306055 , @labath wrote: > I'm not sure what's the state of risc-v hardware these days and how much > resources do you have available, but if it's at all possible, I'd definitely > recommend adding the lldb-server b

[Lldb-commits] [PATCH] D89283: [trace][intel-pt] Implement the basic decoding functionality

2020-11-02 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 302354. wallace added a comment. Followed the suggestion by @labath. The code definitely looks better. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89283/new/ https://reviews.llvm.org/D89283 Files: lldb/inc

[Lldb-commits] [PATCH] D90556: [LLDB][NFC] treat Lua error codes in a more explicit manner

2020-11-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90556/new/ https://reviews.llvm.org/D90556 _

[Lldb-commits] [PATCH] D90598: [lldb/DWARF] Fix implementation of DW_OP_convert

2020-11-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D90598#2368826 , @dblaikie wrote: > In D90598#2368020 , @labath wrote: > >> Judging by >> http://lists.llvm.org/pipermail/llvm-dev/2020-October/145990.html, dsymutil >> has a simil

[Lldb-commits] [PATCH] D90490: [intel-pt][trace] Implement a "get supported trace type" packet

2020-11-02 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 302402. wallace edited the summary of this revision. wallace added a comment. Thanks for the feedback! Some changes: - I'm no longer showing the A in the documentation, as @labath pointed out that I was not using it, and, in fact, there's no need to use

[Lldb-commits] [PATCH] D90490: [intel-pt][trace] Implement a "get supported trace type" packet

2020-11-02 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. So I know Intel had gone and done some tracing support in an external kind of way before. This patch is preparing to use this functionality by asking for the supported trace type

[Lldb-commits] [PATCH] D90650: [lldb] [Plugins/FreeBSDRemote] Disable GetMemoryRegionInfo()

2020-11-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision. mgorny added reviewers: krytarowski, emaste, labath. Herald added a subscriber: arichardson. mgorny requested review of this revision. Disable GetMemoryRegionInfo() in order to unbreak expression parsing. For some reason, the presence of non-stub function causes LLDB

[Lldb-commits] [PATCH] D88581: [lldb] Symlink the Clang resource directory to the LLDB build directory in standalone builds

2020-11-02 Thread Marko Novakovic via Phabricator via lldb-commits
mnovakovic added inline comments. Comment at: lldb/source/API/CMakeLists.txt:210 + if(NOT LLDB_BUILD_FRAMEWORK) +set(LLDB_CLANG_RESOURCE_DIR_PARENT "$/clang") +file(MAKE_DIRECTORY "${LLDB_CLANG_RESOURCE_DIR_PARENT}") JDevlieghere wrote: > Can you check

[Lldb-commits] [PATCH] D88581: [lldb] Symlink the Clang resource directory to the LLDB build directory in standalone builds

2020-11-02 Thread Marko Novakovic via Phabricator via lldb-commits
mnovakovic added inline comments. Comment at: lldb/source/API/CMakeLists.txt:210 + if(NOT LLDB_BUILD_FRAMEWORK) +set(LLDB_CLANG_RESOURCE_DIR_PARENT "$/clang") +file(MAKE_DIRECTORY "${LLDB_CLANG_RESOURCE_DIR_PARENT}") mnovakovic wrote: > JDevlieghere wro

[Lldb-commits] [PATCH] D90490: [intel-pt][trace] Implement a "get supported trace type" packet

2020-11-02 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 302439. wallace added a comment. After a sync up with Greg, I've followed his recommedations and did the following changes: - Kept the packet as a simple packet returning one single trace type. However, now the response is a json object {"pluginName": , "de

[Lldb-commits] [PATCH] D90490: [intel-pt][trace] Implement a "get supported trace type" packet

2020-11-02 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 302442. wallace added a comment. nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90490/new/ https://reviews.llvm.org/D90490 Files: lldb/docs/lldb-gdb-remote.txt lldb/include/lldb/Host/common/NativeProces

[Lldb-commits] [PATCH] D78807: Fix gendered documentation

2020-11-02 Thread Ronan Keryell via Phabricator via lldb-commits
keryell added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/google-objc-global-variable-declaration.rst:47 The check will give a warning message but will not be able to suggest a fix. The -user need to fix it on his own. +user needs to fix it on their o

[Lldb-commits] [lldb] fb6d1c0 - [crashlog] Fix and simplify the way we import lldb

2020-11-02 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2020-11-02T18:59:48-08:00 New Revision: fb6d1c020c1dcf4ab6e4529a4456f75f86c2379a URL: https://github.com/llvm/llvm-project/commit/fb6d1c020c1dcf4ab6e4529a4456f75f86c2379a DIFF: https://github.com/llvm/llvm-project/commit/fb6d1c020c1dcf4ab6e4529a4456f75f86c2379a.d

[Lldb-commits] [lldb] 6c9f3fe - [crashlog] Turn crash log parsing modes into a Python 'enum' (NFC)

2020-11-02 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2020-11-02T19:42:34-08:00 New Revision: 6c9f3fe908a70a646e619a1355df451c06f6c3a1 URL: https://github.com/llvm/llvm-project/commit/6c9f3fe908a70a646e619a1355df451c06f6c3a1 DIFF: https://github.com/llvm/llvm-project/commit/6c9f3fe908a70a646e619a1355df451c06f6c3a1.d

[Lldb-commits] [lldb] 66009a1 - [crashlog] Remove commented out code (NFC)

2020-11-02 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2020-11-02T19:46:53-08:00 New Revision: 66009a19e5ae20660efe4a70dce839a90b306dcf URL: https://github.com/llvm/llvm-project/commit/66009a19e5ae20660efe4a70dce839a90b306dcf DIFF: https://github.com/llvm/llvm-project/commit/66009a19e5ae20660efe4a70dce839a90b306dcf.d

[Lldb-commits] [PATCH] D90490: [intel-pt][trace] Implement a "get supported trace type" packet

2020-11-02 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. See inlined comments. Just some questions on wether we are going to reuse the other existing "tTrace*" packets, or if we are going to make new ones. Comment at: lldb/docs/lldb-gdb-remote.txt:249 +//"pluginName": +//"description": +// }

[Lldb-commits] [PATCH] D90664: [crashlog] Move crash log parsing into its own class

2020-11-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added a reviewer: aprantl. JDevlieghere requested review of this revision. Move crash log parsing out of the CrashLog class and into its own class. https://reviews.llvm.org/D90664 Files: lldb/examples/python/crashlog.py lldb/test/Shell/Script

[Lldb-commits] [PATCH] D90665: [crashlog] Modularize parser

2020-11-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added reviewers: aprantl, kastiglione, clayborg. JDevlieghere requested review of this revision. Instead of parsing the crashlog in one big loop, use methods that correspond to the different parsing modes. https://reviews.llvm.org/D90665 Files:

[Lldb-commits] [PATCH] D90664: [crashlog] Move crash log parsing into its own class

2020-11-02 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. Looks good, just fix typo I mentioned in inlined comments. Comment at: lldb/examples/python/crashlog.py:707 +try: +crash_log_paser = CrashLogParser(cr

[Lldb-commits] [PATCH] D90664: [crashlog] Move crash log parsing into its own class

2020-11-02 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/examples/python/crashlog.py:708 +crash_log_paser = CrashLogParser(crash_log_file, options.verbose) +crash_log = crash_log_parser.parse() +except Exception as e: clayborg wrote: > or

[Lldb-commits] [PATCH] D88581: [lldb] Symlink the Clang resource directory to the LLDB build directory in standalone builds

2020-11-02 Thread Marko Novakovic via Phabricator via lldb-commits
mnovakovic added inline comments. Comment at: lldb/source/API/CMakeLists.txt:210 + if(NOT LLDB_BUILD_FRAMEWORK) +set(LLDB_CLANG_RESOURCE_DIR_PARENT "$/clang") +file(MAKE_DIRECTORY "${LLDB_CLANG_RESOURCE_DIR_PARENT}") mnovakovic wrote: > mnovakovic wrote

[Lldb-commits] [PATCH] D90490: [intel-pt][trace] Implement a "get supported trace type" packet

2020-11-02 Thread walter erquinigo via Phabricator via lldb-commits
wallace marked an inline comment as done. wallace added inline comments. Comment at: lldb/docs/lldb-gdb-remote.txt:249 +//"pluginName": +//"description": +// } clayborg wrote: > Can't IntelPT exist on a machine but not be enabled? If so I would suggest

[Lldb-commits] [PATCH] D90490: [intel-pt][trace] Implement a "get supported trace type" packet

2020-11-02 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 302468. wallace added a comment. - Renamed the packet to jLLDBTraceSupportedType following Greg's suggestion - Also, marked the old trace packets as deprecated, to discourage their usage. I doubt anyone is using them, as in March I discovered that the externa