[Lldb-commits] [PATCH] D122523: [lldb] Fix building standalone LLDB on Windows.

2022-03-25 Thread Mehdi Chinoune
MehdiChinoune created this revision. MehdiChinoune added reviewers: LLDB, thakis. MehdiChinoune added projects: LLDB, LLVM. Herald added subscribers: JDevlieghere, mgorny. Herald added a project: All. MehdiChinoune requested review of this revision. Herald added subscribers: llvm-commits, lldb-comm

[Lldb-commits] [PATCH] D110172: [lldb/win] Default to native PDB reader when building with LLVM_ENABLE_DIA_SDK=NO

2022-03-25 Thread Mehdi Chinoune
MehdiChinoune added a comment. Herald added a project: All. This commit make building standalone LLDB impossible on Windows. `llvm/Config/config.h` file is only generated at build-time and not get installed with llvm. Please Fix it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 418376. zrthxn added a comment. Clean up and finalize Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122293/new/ https://reviews.llvm.org/D122293 Files: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp l

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn marked an inline comment as done. zrthxn added a comment. Test program info, (llvm-project/lldb/test/API/commands/trace/intelpt-trace/a.out) (lldb) thread trace dump info Trace technology: intel-pt thread #1: tid = 3842849 Raw trace size: 4 KiB Total number of instruction

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn marked 13 inline comments as done. zrthxn added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:25 IntelPTError::IntelPTError(int libipt_error_code, lldb::addr_t address) : m_libipt_error_code(libipt_error_code), m_address(address) {

[Lldb-commits] [PATCH] D122254: [trace][intelpt] Introduce instruction Ids

2022-03-25 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 418361. wallace marked 2 inline comments as done. wallace added a comment. Some updates: - Modified `thread trace dump instructions` to accept one single thread instead of many. The reason is that, with the new --id argument, traversing multiple threads doe

[Lldb-commits] [lldb] 3427edd - Adopt new dyld SPIs to introspect the shared cache.

2022-03-25 Thread Jonas Devlieghere via lldb-commits
Author: Fred Riss Date: 2022-03-25T18:02:15-07:00 New Revision: 3427eddd9aabcb1505ffe16adfcba7d6e8b28bf8 URL: https://github.com/llvm/llvm-project/commit/3427eddd9aabcb1505ffe16adfcba7d6e8b28bf8 DIFF: https://github.com/llvm/llvm-project/commit/3427eddd9aabcb1505ffe16adfcba7d6e8b28bf8.diff LOG

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.cpp:77 bool TraceCursorIntelPT::IsError() { return m_decoded_thread_sp->GetInstructions()[m_pos].IsError(); } jj10306 wrote: > zrthxn wrote: > > jj10306 wrote: >

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:25 IntelPTError::IntelPTError(int libipt_error_code, lldb::addr_t address) : m_libipt_error_code(libipt_error_code), m_address(address) { assert(libipt_error_code < 0); --

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Jakob Johnson via Phabricator via lldb-commits
jj10306 added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.cpp:77 bool TraceCursorIntelPT::IsError() { return m_decoded_thread_sp->GetInstructions()[m_pos].IsError(); } zrthxn wrote: > jj10306 wrote: > > nit: should we u

[Lldb-commits] [PATCH] D122429: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

2022-03-25 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG150db43e412e: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D12

[Lldb-commits] [PATCH] D122426: [lldb/Utility] Make `StructuredData::Dictionary::GetKeys` return an `Array`

2022-03-25 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG29f363611dd4: [lldb/Utility] Make StructuredData::Dictionary::GetKeys return an Array (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122426

[Lldb-commits] [PATCH] D122422: [lldb/crashlog] Parse thread fields and pass it to crashlog scripted process

2022-03-25 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG12301d616fbc: [lldb/crashlog] Parse thread fields and pass it to crashlog scripted process (authored by mib). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[Lldb-commits] [lldb] 29f3636 - [lldb/Utility] Make StructuredData::Dictionary::GetKeys return an Array

2022-03-25 Thread Med Ismail Bennani via lldb-commits
Author: Med Ismail Bennani Date: 2022-03-25T14:59:50-07:00 New Revision: 29f363611dd4b9b898230cde60bacf71f9581343 URL: https://github.com/llvm/llvm-project/commit/29f363611dd4b9b898230cde60bacf71f9581343 DIFF: https://github.com/llvm/llvm-project/commit/29f363611dd4b9b898230cde60bacf71f9581343.

[Lldb-commits] [lldb] 150db43 - [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

2022-03-25 Thread Med Ismail Bennani via lldb-commits
Author: Med Ismail Bennani Date: 2022-03-25T14:59:50-07:00 New Revision: 150db43e412efba0f95ebde81aabd93e7535b909 URL: https://github.com/llvm/llvm-project/commit/150db43e412efba0f95ebde81aabd93e7535b909 DIFF: https://github.com/llvm/llvm-project/commit/150db43e412efba0f95ebde81aabd93e7535b909.

[Lldb-commits] [lldb] 12301d6 - [lldb/crashlog] Parse thread fields and pass it to crashlog scripted process

2022-03-25 Thread Med Ismail Bennani via lldb-commits
Author: Med Ismail Bennani Date: 2022-03-25T14:59:50-07:00 New Revision: 12301d616fbcd3bbc78664221256404123a0935f URL: https://github.com/llvm/llvm-project/commit/12301d616fbcd3bbc78664221256404123a0935f DIFF: https://github.com/llvm/llvm-project/commit/12301d616fbcd3bbc78664221256404123a0935f.

[Lldb-commits] [PATCH] D122429: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

2022-03-25 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. LGMT Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:321-342 + auto sort_keys = [&sorted_threads, +&thread_info_sp](Stru

[Lldb-commits] [PATCH] D122429: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

2022-03-25 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:321-342 + auto sort_keys = [&sorted_threads, +&thread_info_sp](StructuredData::Object *item) -> bool { +if (!item) + return false; + +llvm::StringRef

[Lldb-commits] [PATCH] D122429: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

2022-03-25 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:321-342 + auto sort_keys = [&sorted_threads, +&thread_info_sp](StructuredData::Object *item) -> bool { +if (!item) + return false; + +llvm::StringRef

[Lldb-commits] [PATCH] D122429: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

2022-03-25 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:321-342 + auto sort_keys = [&sorted_threads, +&thread_info_sp](StructuredData::Object *item) -> bool { +if (!item) + return false; + +llvm::S

[Lldb-commits] [PATCH] D122426: [lldb/Utility] Make `StructuredData::Dictionary::GetKeys` return an `Array`

2022-03-25 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. Makes sense. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122426/new/ https://reviews.llvm.org/D122426 __

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 418327. zrthxn added a comment. Updated tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122293/new/ https://reviews.llvm.org/D122293 Files: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp lldb/sour

[Lldb-commits] [PATCH] D122429: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

2022-03-25 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 418325. mib added a comment. Implement @JDevlieghere suggestions: - Use a `std::map` to sort the thread info dictionary while preventing potential overflow CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122429/new/ https://reviews.llvm.org/D122429 Fil

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.cpp:77 bool TraceCursorIntelPT::IsError() { return m_decoded_thread_sp->GetInstructions()[m_pos].IsError(); } jj10306 wrote: > nit: should we update this to use t

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Jakob Johnson via Phabricator via lldb-commits
jj10306 added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:41 m_pt_insn.iclass = ptic_error; + m_is_error = true; } Is this boolean necessary? In the case of an error, the other two fields also indicate an error so this

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 418309. zrthxn added a comment. Added average memory per instruction Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122293/new/ https://reviews.llvm.org/D122293 Files: lldb/source/Plugins/Trace/intel-pt/Decode

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 418306. zrthxn added a comment. Finalize diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122293/new/ https://reviews.llvm.org/D122293 Files: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp lldb/sour

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 418299. zrthxn added a comment. Incoporate more feedback, Only parameter pack isnt done yet Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122293/new/ https://reviews.llvm.org/D122293 Files: lldb/source/Plugin

[Lldb-commits] [PATCH] D122429: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

2022-03-25 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:320 + + std::vector sorted_keys(keys->GetSize()); + auto sort_keys = [&sorted_keys](StructuredData::Object *item) -> bool { JDevlieghere wrote: > mib wrote: > > JDev

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn marked 15 inline comments as done. zrthxn added a comment. Before refactor thread #1: tid = 37275 Raw trace size: 4 KiB Total number of instructions: 21 Total approximate memory usage: 5.38 KiB After refactor (lldb) thread trace dump info Trace technology: intel-pt

[Lldb-commits] [lldb] 8f7db76 - [lldb] Conditionalize target_link_libraries on the target

2022-03-25 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2022-03-25T09:50:34-07:00 New Revision: 8f7db763ef7f30ec952bdb00adb6f99f980cb427 URL: https://github.com/llvm/llvm-project/commit/8f7db763ef7f30ec952bdb00adb6f99f980cb427 DIFF: https://github.com/llvm/llvm-project/commit/8f7db763ef7f30ec952bdb00adb6f99f980cb427.d

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread walter erquinigo via Phabricator via lldb-commits
wallace requested changes to this revision. wallace added a comment. This revision now requires changes to proceed. much closer! I'm glad you are starting to understand the patterns we use for this kind of code Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:1

[Lldb-commits] [PATCH] D122429: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

2022-03-25 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:320 + + std::vector sorted_keys(keys->GetSize()); + auto sort_keys = [&sorted_keys](StructuredData::Object *item) -> bool { mib wrote: > JDevlieghere wrote:

[Lldb-commits] [lldb] 61efe14 - [lldb] Add a fuzzer for target creation

2022-03-25 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2022-03-25T09:34:00-07:00 New Revision: 61efe14e21b2c47a848f6d7500ed05af17c64a9a URL: https://github.com/llvm/llvm-project/commit/61efe14e21b2c47a848f6d7500ed05af17c64a9a DIFF: https://github.com/llvm/llvm-project/commit/61efe14e21b2c47a848f6d7500ed05af17c64a9a.d

[Lldb-commits] [PATCH] D122429: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

2022-03-25 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:320 + + std::vector sorted_keys(keys->GetSize()); + auto sort_keys = [&sorted_keys](StructuredData::Object *item) -> bool { JDevlieghere wrote: > Won't this overflow

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 418249. zrthxn added a comment. Refactor to use more templates and param packs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122293/new/ https://reviews.llvm.org/D122293 Files: lldb/source/Plugins/Trace/intel

[Lldb-commits] [PATCH] D122461: [lldb] Add a fuzzer for target create

2022-03-25 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere marked an inline comment as done. JDevlieghere added inline comments. Comment at: lldb/tools/lldb-fuzzer/lldb-fuzzer-target.cpp:24 +extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) { + auto file = TempFile::Create(data, size); + if (!file)

[Lldb-commits] [PATCH] D122411: [lldb][AArch64] Fix corefile memory reads when there are non-address bits

2022-03-25 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 418246. DavidSpickett added a comment. - Corefile down to 24k with some tweaking of coredump_filter - Add some prints so when you generate the corefile you know what addresses to test I also found another bug testing this where memory read works but pr

[Lldb-commits] [PATCH] D122486: [lldb] Fix building for mingw after changes to sigtstp_handler

2022-03-25 Thread Martin Storsjö via Phabricator via lldb-commits
mstorsjo updated this revision to Diff 418244. mstorsjo added a comment. Changed the existing ifdef around the signals that were omitted in the MSVC build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122486/new/ https://reviews.llvm.org/D122486

[Lldb-commits] [PATCH] D122486: [lldb] Fix building for mingw after changes to sigtstp_handler

2022-03-25 Thread Martin Storsjö via Phabricator via lldb-commits
mstorsjo added a comment. > Alternatively the ifdef condition could be changed from !_MSC_VER to !_WIN32 > - I'm unsure whether the other ones that are hooked up in mingw builds but > not in MSVC builds actually ever make a difference in mingw builds. On second thought, maybe it'd be best to ju

[Lldb-commits] [PATCH] D122486: [lldb] Fix building for mingw after changes to sigtstp_handler

2022-03-25 Thread Martin Storsjö via Phabricator via lldb-commits
mstorsjo created this revision. mstorsjo added a reviewer: labath. Herald added a project: All. mstorsjo requested review of this revision. Herald added a project: LLDB. Some signal handlers are set up within an !_MSC_VER condition, i.e. omitted in MSVC builds but included in mingw builds. Previou

[Lldb-commits] [PATCH] D122411: [lldb][AArch64] Fix corefile memory reads when there are non-address bits

2022-03-25 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked an inline comment as done. DavidSpickett added a comment. > Can we make the core file smaller? Yes we can. I need to find a good way to do that, my first instinct was to strip segments from it but perhaps I'm barking up the wrong tree there. Is there a usual way to make a

[Lldb-commits] [PATCH] D122411: [lldb][AArch64] Fix corefile memory reads when there are non-address bits

2022-03-25 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 418221. DavidSpickett added a comment. - Don't require pointer auth hardware for the corefile test. - Remove the program file since all we need to do is read memory from the corefile. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D122411: [lldb][AArch64] Fix corefile memory reads when there are non-address bits

2022-03-25 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Can we make the core file smaller? Since it's essentially static data, do you really need all the mmap, debug info and everything? Could you just take an address that is known to be in the core file (smallest you can make), and then do a `memory read 0xwhatever` ? ===

[Lldb-commits] [PATCH] D122461: [lldb] Add a fuzzer for target create

2022-03-25 Thread Pavel Labath via Phabricator via lldb-commits
labath added subscribers: cmtice, labath. labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. I like this. Comment at: lldb/tools/lldb-fuzzer/lldb-fuzzer-target.cpp:24 +extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 418154. zrthxn added a comment. Resolved many runtime errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122293/new/ https://reviews.llvm.org/D122293 Files: lldb/source/Plugins/Trace/intel-pt/DecodedThread.