[Lldb-commits] [lldb] [lldb] Fixed PlatformPOSIX::DoLoadImage() in case of the Windows host (PR #93345)

2024-05-27 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/93345 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fixed PlatformPOSIX::DoLoadImage() in case of the Windows host (PR #93345)

2024-05-27 Thread Pavel Labath via lldb-commits
@@ -678,8 +678,8 @@ uint32_t PlatformPOSIX::DoLoadImage(lldb_private::Process *process, loaded_image->Clear(); std::string path; labath wrote: ```suggestion std::string path = remote_file.GetPath(false); ``` Might as well fold the assignment into

[Lldb-commits] [lldb] [lldb] Fixed PlatformPOSIX::DoLoadImage() in case of the Windows host (PR #93345)

2024-05-27 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. > BTW, it would be great to be able to pass the style or triple to SBFileSpec. > Currently it is impossible to create a posix SBFileSpec on the Windows host. This is definitely not intentional. Feel free to create a PR to add it.

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
labath wrote: Thanks for your patience. https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -271,6 +275,14 @@ Status ProcessElfCore::DoLoadCore() { return error; } +void ProcessElfCore::UpdateBuildIdForNTFileEntries() { + if (!m_nt_file_entries.empty()) { labath wrote: No need to explicitly check for emptyness. The loop will naturally do

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -573,7 +585,6 @@ llvm::Expected> ProcessElfCore::parseSegment(const DataExtractor ) { lldb::offset_t offset = 0; std::vector result; - labath wrote: I know why this came to be, but it'd be nice to revert it so the final patch does not contain a

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); labath wrote: SG https://github.com/llvm/llvm-project/pull/92328

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/92328 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/92328 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove DWARFDebugInfo DIERef footguns (PR #92894)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -195,17 +195,17 @@ void DebugNamesDWARFIndex::GetCompleteObjCClass( if (!ref) continue; -DWARFUnit *cu = m_debug_info.GetUnit(*ref); -if (!cu || !cu->Supports_DW_AT_APPLE_objc_complete_type()) { - incomplete_types.push_back(*ref); - continue; -

[Lldb-commits] [lldb] [lldb/DWARF] Bypass the compres^Wconstruction of DIERefs in debug_names (PR #93296)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -183,27 +181,22 @@ void DebugNamesDWARFIndex::GetCompleteObjCClass( llvm::function_ref callback) { // Keep a list of incomplete types as fallback for when we don't find the // complete type. - DIEArray incomplete_types; + std::vector incomplete_types;

[Lldb-commits] [lldb] [lldb/DWARF] Bypass the compres^Wconstruction of DIERefs in debug_names (PR #93296)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/93296 DebugNamesDWARFIndex was jumping through hoops to construct a DIERef from an index entry only to jump through them back a short while later to construct a DWARFDIE. This used to be necessary as the index lookup

[Lldb-commits] [lldb] [lldb/DWARF] Refactor DWARFDIE::Get{Decl, TypeLookup}Context (PR #93291)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/93291 After a bug (the bug is that the functions don't handle DW_AT_signature, aka type units) led me to one of these similar-but-different functions, I started to realize that most of the differences between these

[Lldb-commits] [lldb] [lldb-dap] Send terminated event only once (PR #93172)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/93172 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -983,6 +994,67 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +UUID ProcessElfCore::FindBuidIdInCoreMemory(lldb::addr_t address) { + UUID invalid_uuid; + const uint32_t addr_size = GetAddressByteSize(); + const size_t elf_header_size =

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Very close. Just a couple of details. BTW, I believe the recommended workflow for working with pull requests is to put your new changes as additional commits on top and then squash them all together after merging. The GitHub UI just works better that way.

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -983,6 +994,67 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +UUID ProcessElfCore::FindBuidIdInCoreMemory(lldb::addr_t address) { + UUID invalid_uuid; + const uint32_t addr_size = GetAddressByteSize(); + const size_t elf_header_size =

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-24 Thread Pavel Labath via lldb-commits
@@ -983,6 +994,67 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +UUID ProcessElfCore::FindBuidIdInCoreMemory(lldb::addr_t address) { + UUID invalid_uuid; + const uint32_t addr_size = GetAddressByteSize(); + const size_t elf_header_size =

[Lldb-commits] [lldb] [lldb-dap] Automatically skip lldb-dap tests for remote platforms (PR #93169)

2024-05-24 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/93169 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Send terminated event only once (PR #93172)

2024-05-23 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/93172 This is a regression from #91591. Turns out std::mutex does not prevent code from running twice. :facepalm: >From 26611411308c9a916bc3ffdac0f38e95f8aa8c89 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu,

[Lldb-commits] [lldb] [lldb-dap] Automatically skip lldb-dap tests for remote platforms (PR #93169)

2024-05-23 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/93169 >From 7f3ed4661375ca61f4ac0fedafb57c628eca3bd0 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 23 May 2024 10:56:48 + Subject: [PATCH] [lldb-dap] Automatically skip lldb-dap tests for remote platforms

[Lldb-commits] [lldb] [lldb-dap] Automatically skip lldb-dap tests for remote platforms (PR #93169)

2024-05-23 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/93169 The don't currently work (and they're also not particularly useful, since all of the remote stuff happens inside lldb). This saves us from annotating tests one by one. >From

[Lldb-commits] [lldb] [lldb] Fixed the TestDAP_repl_mode_detection test in case of a remote target (PR #93165)

2024-05-23 Thread Pavel Labath via lldb-commits
https://github.com/labath requested changes to this pull request. I'm knee-deep in lldb-dap right now. Lemme just send you a PR to skip all tests at once. https://github.com/llvm/llvm-project/pull/93165 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb/DWARF] Make sure bad abbreviation codes do not crash lldb (PR #93006)

2024-05-23 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/93006 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/DWARF] Make sure bad abbreviation codes do not crash lldb (PR #93006)

2024-05-23 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/93006 >From 03ab6febc0f40d0f39f533a5b4fd7c33a6728ae1 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 21 May 2024 15:31:23 + Subject: [PATCH 1/2] [lldb/DWARF] Make sure bad abbreviation codes do not crash

[Lldb-commits] [lldb] [lldb/DWARF] Make sure bad abbreviation codes do not crash lldb (PR #93006)

2024-05-23 Thread Pavel Labath via lldb-commits
labath wrote: > We have to back out the PeekDieName() patch locally at Meta because it was > crashing us due to this assertion due to .debug_names tables having incorrect > values for type units. Only one type unit will appear in the final file and > type units can have differing contents for

[Lldb-commits] [lldb] [lldb/DWARF] Make sure bad abbreviation codes do not crash lldb (PR #93006)

2024-05-23 Thread Pavel Labath via lldb-commits
@@ -44,10 +45,20 @@ bool DWARFDebugInfoEntry::Extract(const DWARFDataExtractor , const DWARFUnit *cu, lldb::offset_t *offset_ptr) { m_offset = *offset_ptr; + auto report_error = [&](const char *fmt, const

[Lldb-commits] [lldb] [lldb] Remove DWARFDebugInfo DIERef footguns (PR #92894)

2024-05-23 Thread Pavel Labath via lldb-commits
@@ -195,17 +195,17 @@ void DebugNamesDWARFIndex::GetCompleteObjCClass( if (!ref) continue; -DWARFUnit *cu = m_debug_info.GetUnit(*ref); -if (!cu || !cu->Supports_DW_AT_APPLE_objc_complete_type()) { - incomplete_types.push_back(*ref); - continue; -

[Lldb-commits] [lldb] [lldb][Windows] Fixed the TestBreakpointCommand test (PR #93122)

2024-05-23 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Nice find. https://github.com/llvm/llvm-project/pull/93122 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fixed the TestExitDuringExpression test in case of a remote target (PR #93119)

2024-05-23 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/93119 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-23 Thread Pavel Labath via lldb-commits
labath wrote: > Using example above, with a fix by @dwblaikie > > I see: > > ``` > Hash: 0xE0CDC6A2 > String: 0x0018 "InnerState" > Entry @ 0x10b { > Abbrev: 0x3 > Tag: DW_TAG_class_type > DW_IDX_type_unit: 0x01 > DW_IDX_die_offset: 0x0030 >

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread Pavel Labath via lldb-commits
@@ -271,6 +282,17 @@ Status ProcessElfCore::DoLoadCore() { return error; } +void ProcessElfCore::UpdateBuildIdForNTFileEntries() { + if (!m_nt_file_entries.empty()) { labath wrote: Makes sense. I though something like this might be the case.

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread Pavel Labath via lldb-commits
@@ -983,6 +1001,66 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +return

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread Pavel Labath via lldb-commits
@@ -983,6 +1001,66 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +return

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-23 Thread Pavel Labath via lldb-commits
@@ -271,6 +276,17 @@ Status ProcessElfCore::DoLoadCore() { return error; } +void ProcessElfCore::UpdateBuildIdForNTFileEntries() { + if (!m_nt_file_entries.empty()) { +for (NT_FILE_Entry : m_nt_file_entries) { + std::optional uuid = labath wrote:

[Lldb-commits] [lldb] [lldb-dap] Fix a race during shutdown (PR #91591)

2024-05-22 Thread Pavel Labath via lldb-commits
labath wrote: Ah yes, of course, I've kept the mutex thinking that its sufficient to make it run only once, but of course that's only true if the critical section actually contains a "run once" check. I'll create a patch for that tomorrow. Feel free to revert in the mean time if this is

[Lldb-commits] [lldb] [lldb/DWARF] Make sure bad abbreviation codes do not crash lldb (PR #93006)

2024-05-22 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/93006 We currently cannot represent abbreviation codes with more than 16 bits, and we were lldb-asserting if we ever ran into one. While I haven't seen any real DWARF with these kinds of abbreviations, it is possible

[Lldb-commits] [lldb] Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (PR #92503)

2024-05-22 Thread Pavel Labath via lldb-commits
labath wrote: I'm not quite sure what you have in mind, but I can tell you what's been going through my mind in the context of the `m_all_registers_available` check in `lldb/source/Target/RegisterContextUnwind.cpp` . The way I see it, this check (at least the part about the RA register(*)) is

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-21 Thread Pavel Labath via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); labath wrote: > > Why don't those cases lead to a crash? For example, what would happen if > >

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-21 Thread Pavel Labath via lldb-commits
labath wrote: > > I was not able to produce a DW_IDX_parent_entries referring to any kind of > > class type > > When I compile the following with `clang++ test.cpp -c -gdwarf-5 -O0 -o - | > dwarfdump --debug-names -`, I get the right parent chain. Is this not true > when you try it? I do

[Lldb-commits] [lldb] [lldb] Remove DWARFDebugInfo DIERef footguns (PR #92894)

2024-05-21 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/92894 DWARFDebugInfo doesn't know how to resolve the "file_index" component of a DIERef. This patch removes GetUnit (in favor of existing GetUnitContainingDIEOffset) and changes GetDIE to take only the components it

[Lldb-commits] [lldb] 45a5d8d - [lldb] Clean up unused includes in DebugNamesDWARFIndex

2024-05-21 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-05-21T10:48:39Z New Revision: 45a5d8d6dba6156c24825b3a04378e999f8af82d URL: https://github.com/llvm/llvm-project/commit/45a5d8d6dba6156c24825b3a04378e999f8af82d DIFF: https://github.com/llvm/llvm-project/commit/45a5d8d6dba6156c24825b3a04378e999f8af82d.diff LOG:

[Lldb-commits] [lldb] [lldb/dwarf] Fix DW_IDX_parent processing for split dwarf (PR #92745)

2024-05-21 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/92745 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/dwarf] Fix DW_IDX_parent processing for split dwarf (PR #92745)

2024-05-21 Thread Pavel Labath via lldb-commits
@@ -9,7 +9,7 @@ #include "Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h" #include "Plugins/SymbolFile/DWARF/DWARFDebugInfo.h" #include "Plugins/SymbolFile/DWARF/DWARFDeclContext.h" -#include "Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h" +#include

[Lldb-commits] [lldb] [lldb/dwarf] Fix DW_IDX_parent processing for split dwarf (PR #92745)

2024-05-21 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/92745 >From ae72d530c723a8d0fb2eac38224e8cf74cc43e70 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 20 May 2024 12:30:46 + Subject: [PATCH 1/2] [lldb/dwarf] Fix DW_IDX_parent processing for split dwarf

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-21 Thread Pavel Labath via lldb-commits
labath wrote: > What is "nameless index entry"? I don't quite understand from the spec. ``` It is possible that an indexed debugging information entry has a parent that is not indexed (for example, if its parent does not have a name attribute). In such a case, a parent attribute may point to a

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-21 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/91808 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-21 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: I think #77696 is justification enough to add this check, but I don't think we should be implicating DW_IDX_parent_entries until we know how those came about. Both me and David have tried to produce entries like you describe and failed (in fact I was not

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-21 Thread Pavel Labath via lldb-commits
@@ -83,6 +83,10 @@ bool DebugNamesDWARFIndex::ProcessEntry( DWARFDIE die = dwarf.GetDIE(*ref); if (!die) return true; + // Watch out for forward declarations that appear in the .debug_names tables + // only due to being there for a DW_IDX_parent.

[Lldb-commits] [lldb] SBDebugger: define callback_token_t for win32 (PR #92870)

2024-05-21 Thread Pavel Labath via lldb-commits
labath wrote: Moving the typedef out of platform-specific code would be a better, as this is not in any way platform-specific. I just pushed something along those lines. https://github.com/llvm/llvm-project/pull/92870 ___ lldb-commits mailing list

[Lldb-commits] [lldb] a098bea - [lldb] Move callback_token_t out of #ifdef windows

2024-05-21 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-05-21T09:37:38Z New Revision: a098beaff7670e5986b790b6ba93999fa21c6b48 URL: https://github.com/llvm/llvm-project/commit/a098beaff7670e5986b790b6ba93999fa21c6b48 DIFF: https://github.com/llvm/llvm-project/commit/a098beaff7670e5986b790b6ba93999fa21c6b48.diff LOG:

[Lldb-commits] [lldb] Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (PR #92503)

2024-05-21 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/92503 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (PR #92503)

2024-05-21 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/92503 >From 47858edddfbccf989213d61f3761fcdb04814839 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 17 May 2024 06:34:08 + Subject: [PATCH 1/2] Reapply "[lldb/aarch64] Fix unwinding when signal interrupts

[Lldb-commits] [lldb] Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (PR #92503)

2024-05-21 Thread Pavel Labath via lldb-commits
labath wrote: > Yes, originally lldb's unwinder was recursive for any register propagation > and it was easy to hit the problem of lldb blowing out its own stack on a > recursive inferior that had crashed. I changed most of the propagation to a > loop to solve this (years and years ago) but

[Lldb-commits] [lldb] [lldb-dap] Don't send expanded descriptions for "hover" expressions (PR #92726)

2024-05-21 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/92726 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/dwarf] Fix DW_IDX_parent processing for split dwarf (PR #92745)

2024-05-20 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/92745 >From ae72d530c723a8d0fb2eac38224e8cf74cc43e70 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 20 May 2024 12:30:46 + Subject: [PATCH] [lldb/dwarf] Fix DW_IDX_parent processing for split dwarf

[Lldb-commits] [lldb] [lldb/dwarf] Fix DW_IDX_parent processing for split dwarf (PR #92745)

2024-05-20 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/92745 DWARFDebugInfo only knows how to resolve references in its own file, but in split dwarf, the index entries will refer to DIEs in the separate (DWO) file. To resolve the DIERef correctly we'd either need to go

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-05-20 Thread Pavel Labath via lldb-commits
labath wrote: > I attached to clang and printed an expression. That resulted in 16801 calls > to `Progress::Increment`, all of which I'm guessing translate to event > broadcasts. I collected some timing numbers: Thanks for doing this. What do these numbers include? Is it just the operation

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-20 Thread Pavel Labath via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); labath wrote: > > How exactly do we get here in that case? > > From [#90663 >

[Lldb-commits] [lldb] [lldb-dap] Don't send expanded descriptions for "hover" expressions (PR #92726)

2024-05-20 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/92726 VSCode will automatically ask for the children (in structured form) so there's no point in sending the textual representation. This can make displaying hover popups for complex variables with complicated data

[Lldb-commits] [lldb] [lldb][Windows] Fixed LibcxxChronoTimePointSecondsSummaryProvider() (PR #92701)

2024-05-20 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/92701 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (PR #92413)

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Thanks. https://github.com/llvm/llvm-project/pull/92413 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -271,6 +282,17 @@ Status ProcessElfCore::DoLoadCore() { return error; } +void ProcessElfCore::UpdateBuildIdForNTFileEntries() { + if (!m_nt_file_entries.empty()) { labath wrote: Any specific reason doing this as a separate pass (and not from inside

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -158,6 +165,16 @@ class ProcessElfCore : public lldb_private::PostMortemProcess { // Returns number of thread contexts stored in the core file uint32_t GetNumThreadContexts(); + // Populate gnu uuid for each NT_FILE entry + void UpdateBuildIdForNTFileEntries(); + +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -406,6 +406,36 @@ class Process : public std::enable_shared_from_this, lldb::StateType state); } Notifications; + class ProcessMemoryIterator { labath wrote: AFAICT, this isn't necessary anymore. If you think it's

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: This looks much better, though, after looking at this closer, I don't think it's necessary to reimplement the elf parsing code. We already have all the necessary data structures for parsing notes in the core file itself, and it looks like it would be

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) +

[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/92492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-05-17 Thread Pavel Labath via lldb-commits
labath wrote: Thanks for checking this out. > I just checked and I'm not seeing the hover's in the same format as they were > when I made the pull request. The expression context should still have the > expanded forms though for example: >

[Lldb-commits] [lldb] [lldb-dap] Correctly detect alias commands with arguments in repl (PR #92137)

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/92137 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); labath wrote: > Probably not, the `DWARFAttributes` object is large, 336 bytes. I think that

[Lldb-commits] [lldb] [lldb] Fixed the DAP tests in case of a remote target (PR #92416)

2024-05-17 Thread Pavel Labath via lldb-commits
labath wrote: Are *all* lldb-dap tests not compatible with running remotely? If so, then instead of annotating them individually, we could tag them all with some "dap" category (if they're not already) and then automatically skip that category when running remotely.

[Lldb-commits] [lldb] [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (PR #92413)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -52,6 +52,9 @@ def test_attach_with_vAttachWait(self): server = self.connect_to_debug_monitor() self.do_handshake() +if self._run_args: +self._run_args[0] = lldbutil.install_to_target(self, self._run_args[0]) labath

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,146 @@ +""" +Test lldb-dap "port" configuration to "attach" request +""" + + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbplatformutil +import

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -96,6 +96,7 @@ #define LLDB_INVALID_QUEUE_ID 0 #define LLDB_INVALID_CPU_ID UINT32_MAX #define LLDB_INVALID_WATCHPOINT_RESOURCE_ID UINT32_MAX +#define LLDB_INVALID_PORT_NUMBER 0 labath wrote: Port numbers aren't an lldb invention, so I don't think we should

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath requested changes to this pull request. FWIW, I think this feature would be more useful and easier to implement if there was just a single setting called "connection url" or something, which accepted all of the usual lldb connection urls (unix-abstract-connect://,

[Lldb-commits] [lldb] [lldb-dap] Added "port" property to vscode "attach" command. (PR #91570)

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/91570 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] b27eb0a - [lldb] Avoid modifying the source tree in TestCompletion.py

2024-05-17 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-05-17T07:33:26Z New Revision: b27eb0ae8280675fc8fb249d39f1ccafa3ee2187 URL: https://github.com/llvm/llvm-project/commit/b27eb0ae8280675fc8fb249d39f1ccafa3ee2187 DIFF: https://github.com/llvm/llvm-project/commit/b27eb0ae8280675fc8fb249d39f1ccafa3ee2187.diff LOG:

[Lldb-commits] [lldb] [lldb] Fixed the TestCompletion test running on a remote target (PR #92281)

2024-05-17 Thread Pavel Labath via lldb-commits
@@ -107,9 +107,20 @@ def test_process_unload(self): self, "// Break here", lldb.SBFileSpec("main.cpp") ) err = lldb.SBError() -self.process().LoadImage( -lldb.SBFileSpec(self.getBuildArtifact("libshared.so")), err -) +

[Lldb-commits] [lldb] [lldb/aarch64] Fix unwinding when signal interrupts a leaf function (PR #91321)

2024-05-17 Thread Pavel Labath via lldb-commits
labath wrote: So, it took some effort, but I managed to reproduce the problem and figure out what's going on. You can find my analysis on https://github.com/llvm/llvm-project/pull/92503 https://github.com/llvm/llvm-project/pull/91321 ___

[Lldb-commits] [lldb] Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (PR #92503)

2024-05-17 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/92503 …unction (#91321)" This reapplies fd1bd53ba5a06f344698a55578f6a5d79c457e30, which was reverted due to a test failure on aarch64/windows. The failure was caused by a combination of several factors: - clang

[Lldb-commits] [lldb] [lldb] Fixed an invalid error message in the DAP disconnect response (PR #92345)

2024-05-16 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/92345 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fixed an invalid error message in the DAP disconnect response (PR #92345)

2024-05-16 Thread Pavel Labath via lldb-commits
@@ -977,7 +977,7 @@ void request_disconnect(const llvm::json::Object ) { g_dap.debugger.SetAsync(false); lldb::SBError error = terminateDebuggee ? process.Kill() : process.Detach(); if (!error.Success()) - response.try_emplace("error", error.GetCString()); +

[Lldb-commits] [lldb] [lldb][Windows] Disable the TestGdbRemoteLibrariesSvr4Support test for Windows host (PR #92341)

2024-05-16 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/92341 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][Windows] Fixed the TestIOHandlerResizeNoEditline test (PR #92286)

2024-05-16 Thread Pavel Labath via lldb-commits
labath wrote: This probably means you can also remove the skipIfWindows decorator, as the test doesn't actually do anything target-specific. (It also feels a bit like this is working around something -- I don't see why not closing a file should cause anything to crash -- but that's probably

[Lldb-commits] [lldb] [lldb] Move TestBase.runCmd() to the Base class (PR #92252)

2024-05-16 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/92252 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-05-15 Thread Pavel Labath via lldb-commits
labath wrote: Thanks for checking this out. I'll try to whip something up tomorrow. https://github.com/llvm/llvm-project/pull/77026 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][Windows] Fixed the test gdb_remote_client/TestGDBRemotePlatformFile (PR #92088)

2024-05-15 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Sounds good. Looking forward to it. https://github.com/llvm/llvm-project/pull/92088 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb][Windows] Fixed the test gdb_remote_client/TestGDBRemotePlatformFile (PR #92088)

2024-05-15 Thread Pavel Labath via lldb-commits
labath wrote: > The problem is here > lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp, line > 3235 inside GDBRemoteCommunicationClient::GetFilePermissions() > > ``` > file_permissions = mode & (S_IRWXU | S_IRWXG | S_IRWXO); > ``` Okay, so I think this is the bug. The

[Lldb-commits] [lldb] [lldb][Windows] Fixed tests TestPty and TestPtyServer (PR #92090)

2024-05-15 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/92090 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][Windows] Fixed tests TestPty and TestPtyServer (PR #92090)

2024-05-15 Thread Pavel Labath via lldb-commits
labath wrote: > @skipIfRemote is too much. These tests are still usable for Linux->Linux and > such. I don't really care about this, but I'll note that while these tests will run in a remote configuration, they will not actually test any meaningful property of the remote setup. They create

[Lldb-commits] [lldb] f090801 - [lldb] Disable unaligned-pc-sigbus.test on arm(32)

2024-05-15 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-05-15T09:18:42Z New Revision: f090801a9651cf4f0d05cc361a2a1b14805b62bf URL: https://github.com/llvm/llvm-project/commit/f090801a9651cf4f0d05cc361a2a1b14805b62bf DIFF: https://github.com/llvm/llvm-project/commit/f090801a9651cf4f0d05cc361a2a1b14805b62bf.diff LOG:

[Lldb-commits] [lldb] [lldb/aarch64] Allow unaligned PC addresses below a trap handler (PR #92093)

2024-05-15 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/92093 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

  1   2   3   4   5   6   7   8   9   10   >