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

2024-05-06 Thread Zequan Wu via lldb-commits
@@ -1667,13 +1791,40 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc, } if (dwarf->GetUniqueDWARFASTTypeMap().Find( -unique_typename, die, unique_decl, attrs.byte_size.value_or(-1), -*unique_ast_entry_up)) { +u

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

2024-05-06 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/90663 >From 4e83099b593e66f12dc21be5fbac5279e03e Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 30 Apr 2024 16:23:11 -0400 Subject: [PATCH 1/6] [lldb][DWARF] Delay struct/class/union definition DIE searching

[Lldb-commits] [lldb] [lldb-dap] Don't fail when SBProcess::GetMemoryRegionInfo returns error. (PR #87649)

2024-05-06 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/87649 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2024-05-03 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/90663 >From 4e83099b593e66f12dc21be5fbac5279e03e Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 30 Apr 2024 16:23:11 -0400 Subject: [PATCH 1/5] [lldb][DWARF] Delay struct/class/union definition DIE searching

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

2024-05-03 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > > > > > Is any of it testable? > > > > > > > > > > > > Good question. Though this is mostly meant to be "NFC" (with very large > > > > quotes), I can imagine us doing something like forcing the parsing of a > > > > specific type (`type lookup ` ?), and then checking that the

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

2024-05-03 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > > > Is any of it testable? > > > > > > Good question. Though this is mostly meant to be "NFC" (with very large > > quotes), I can imagine us doing something like forcing the parsing of a > > specific type (`type lookup ` ?), and then checking that the > > module ast (`image

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

2024-05-03 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/90663 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2024-05-03 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/90663 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2024-05-03 Thread Zequan Wu via lldb-commits
@@ -1664,13 +1793,40 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc, } if (dwarf->GetUniqueDWARFASTTypeMap().Find( -unique_typename, die, unique_decl, attrs.byte_size.value_or(-1), -*unique_ast_entry_up)) { +u

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

2024-05-03 Thread Zequan Wu via lldb-commits
@@ -1921,38 +1970,33 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc, GetClangASTImporter().SetRecordLayout(record_decl, layout); } } -} else if (clang_type_was_created) { - // Start the definition if the class is not obje

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

2024-05-03 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu commented: > Though this is mostly meant to be "NFC" (with very large quotes) Yeah, this is mostly "NFC". A noticeable difference is we now set the type created from declaration with `TypeSystemClang::SetHasExternalStorage` without knowing if there's a definition or

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

2024-05-03 Thread Zequan Wu via lldb-commits
@@ -108,6 +108,9 @@ class DWARFASTParserClang : public lldb_private::plugin::dwarf::DWARFASTParser { lldb_private::ConstString GetDIEClassTemplateParams( const lldb_private::plugin::dwarf::DWARFDIE &die) override; ZequanWu wrote: Done. https://github.

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

2024-05-03 Thread Zequan Wu via lldb-commits
@@ -1921,38 +1970,33 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc, GetClangASTImporter().SetRecordLayout(record_decl, layout); } } -} else if (clang_type_was_created) { - // Start the definition if the class is not obje

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

2024-05-03 Thread Zequan Wu via lldb-commits
@@ -60,6 +60,12 @@ class DWARFASTParser { virtual ConstString GetDIEClassTemplateParams(const DWARFDIE &die) = 0; + // Return true if we found the definition DIE for it. is_forward_declaration + // is set to true if the parameter die is a declaration. + virtual bool + F

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

2024-05-03 Thread Zequan Wu via lldb-commits
@@ -1632,6 +1669,96 @@ DWARFASTParserClang::GetCPlusPlusQualifiedName(const DWARFDIE &die) { return qualified_name; } ZequanWu wrote: Yes, it does more than finding the DIE. Updated to return `Type*` and renamed to `FindDefinitionTypeForDIE`. https://git

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

2024-05-03 Thread Zequan Wu via lldb-commits
@@ -16,60 +16,65 @@ using namespace lldb_private::plugin::dwarf; bool UniqueDWARFASTTypeList::Find(const DWARFDIE &die, const lldb_private::Declaration &decl, const int32_t byte_size, +

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

2024-05-03 Thread Zequan Wu via lldb-commits
@@ -1632,6 +1669,96 @@ DWARFASTParserClang::GetCPlusPlusQualifiedName(const DWARFDIE &die) { return qualified_name; } +bool DWARFASTParserClang::FindDefinitionDIE(const DWARFDIE &die, +bool &is_forward_declaration) { -

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

2024-05-03 Thread Zequan Wu via lldb-commits
@@ -249,11 +270,10 @@ static void ForcefullyCompleteType(CompilerType type) { /// This function serves a similar purpose as RequireCompleteType above, but it /// avoids completing the type if it is not immediately necessary. It only /// ensures we _can_ complete the type later.

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

2024-05-03 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/90663 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2024-05-03 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/90663 >From 4e83099b593e66f12dc21be5fbac5279e03e Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 30 Apr 2024 16:23:11 -0400 Subject: [PATCH 1/4] [lldb][DWARF] Delay struct/class/union definition DIE searching

[Lldb-commits] [lldb] ee63f28 - [lldb-dap] Minor cleanup.

2024-05-02 Thread Zequan Wu via lldb-commits
Author: Zequan Wu Date: 2024-05-02T14:22:03-04:00 New Revision: ee63f287e013ab3424372034d4d5a95512ab5b6b URL: https://github.com/llvm/llvm-project/commit/ee63f287e013ab3424372034d4d5a95512ab5b6b DIFF: https://github.com/llvm/llvm-project/commit/ee63f287e013ab3424372034d4d5a95512ab5b6b.diff LOG

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

2024-05-02 Thread Zequan Wu via lldb-commits
@@ -1631,13 +1631,19 @@ bool SymbolFileDWARF::CompleteType(CompilerType &compiler_type) { return true; } - DWARFDIE dwarf_die = GetDIE(die_it->getSecond()); + DWARFDIE dwarf_die = FindDefinitionDIE(GetDIE(die_it->getSecond())); if (dwarf_die) { // Once we star

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

2024-05-02 Thread Zequan Wu via lldb-commits
@@ -1654,6 +1660,99 @@ bool SymbolFileDWARF::CompleteType(CompilerType &compiler_type) { return false; } +DWARFDIE SymbolFileDWARF::FindDefinitionDIE(const DWARFDIE &die) { + auto def_die_it = GetDeclarationDIEToDefinitionDIE().find(die.GetDIE()); + if (def_die_it != GetD

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

2024-05-02 Thread Zequan Wu via lldb-commits
@@ -533,9 +540,16 @@ class SymbolFileDWARF : public SymbolFileCommon { NameToOffsetMap m_function_scope_qualified_name_map; std::unique_ptr m_ranges; UniqueDWARFASTTypeMap m_unique_ast_type_map; + // A map from DIE to lldb_private::Type. For record type, the key might be

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

2024-05-02 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/90663 >From 4e83099b593e66f12dc21be5fbac5279e03e Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 30 Apr 2024 16:23:11 -0400 Subject: [PATCH 1/3] [lldb][DWARF] Delay struct/class/union definition DIE searching

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

2024-05-02 Thread Zequan Wu via lldb-commits
@@ -1654,6 +1660,99 @@ bool SymbolFileDWARF::CompleteType(CompilerType &compiler_type) { return false; } +DWARFDIE SymbolFileDWARF::FindDefinitionDIE(const DWARFDIE &die) { + auto def_die_it = GetDeclarationDIEToDefinitionDIE().find(die.GetDIE()); + if (def_die_it != GetD

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

2024-05-01 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > Hmm - but the byte size wouldn't be known from only a declaration, right? so > how'd that key work between a declaration and a definition? For declaration and definition DIEs, we just look at the name. Byte size and declaration locations are only used as extra info to differe

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

2024-05-01 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > does this cause multiple (an open ended amount?) of declarations for a type > to be created if the type declarations from multiple CUs are encountered > separately? Or still only one due to the extra map? This only creates one even if type declarations are from different CUs.

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

2024-05-01 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/90663 >From 4e83099b593e66f12dc21be5fbac5279e03e Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 30 Apr 2024 16:23:11 -0400 Subject: [PATCH 1/2] [lldb][DWARF] Delay struct/class/union definition DIE searching

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

2024-04-30 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu ready_for_review https://github.com/llvm/llvm-project/pull/90663 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2024-04-30 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/90663 This is the implementation for https://discourse.llvm.org/t/rfc-delay-definition-die-searching-when-parse-a-declaration-die-for-record-type/78526. Motivation Currently, lldb eagerly searches for definition

[Lldb-commits] [lldb] [lldb][DWARF] Remove m_forward_decl_die_to_compiler_type as it never actually being used. (PR #89427)

2024-04-22 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/89427 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARF] Remove m_forward_decl_die_to_compiler_type as it never actually being used. (PR #89427)

2024-04-19 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/89427 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARF] Remove m_forward_decl_die_to_compiler_type as it never actually being used. (PR #89427)

2024-04-19 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/89427 This removes `m_forward_decl_die_to_compiler_type` which is a map from `const DWARFDebugInfoEntry *` to `lldb::opaque_compiler_type_t`. This map is currently used in `DWARFASTParserClang::ParseEnum` and `DWARF

[Lldb-commits] [lldb] d3993ac - [lldb][test] Correctly fix break at _dl_debug_state test on arm.

2024-04-18 Thread Zequan Wu via lldb-commits
Author: Zequan Wu Date: 2024-04-18T11:13:17-04:00 New Revision: d3993ac1890731d2b24543646961c95680788207 URL: https://github.com/llvm/llvm-project/commit/d3993ac1890731d2b24543646961c95680788207 DIFF: https://github.com/llvm/llvm-project/commit/d3993ac1890731d2b24543646961c95680788207.diff LOG

[Lldb-commits] [lldb] a1e7c83 - [lldb] Disable break at _dl_debug_state test on arm

2024-04-18 Thread Zequan Wu via lldb-commits
Author: Zequan Wu Date: 2024-04-18T10:40:35-04:00 New Revision: a1e7c83af11ee111994ec19029494e6e9ea97dbd URL: https://github.com/llvm/llvm-project/commit/a1e7c83af11ee111994ec19029494e6e9ea97dbd DIFF: https://github.com/llvm/llvm-project/commit/a1e7c83af11ee111994ec19029494e6e9ea97dbd.diff LOG

[Lldb-commits] [lldb] [lldb-dap] Don't fail when SBProcess::GetMemoryRegionInfo returns error. (PR #87649)

2024-04-18 Thread Zequan Wu via lldb-commits
ZequanWu wrote: Ping. https://github.com/llvm/llvm-project/pull/87649 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-17 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/88792 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-17 Thread Zequan Wu via lldb-commits
@@ -572,9 +572,14 @@ ModuleSP DynamicLoaderPOSIXDYLD::LoadInterpreterModule() { ModuleSpec module_spec(file, target.GetArchitecture()); if (ModuleSP module_sp = target.GetOrCreateModule(module_spec, -true /* notify */)) {

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-17 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/88792 >From 26528cd679478448edf446e0e82e5f207ffd6113 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Mon, 15 Apr 2024 16:30:38 -0400 Subject: [PATCH 1/5] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_stat

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-17 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > So, could the fix be as simple as passing notify=false in the first call ? Yeah, absolutely. Updated. https://github.com/llvm/llvm-project/pull/88792 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cg

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-17 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/88792 >From 26528cd679478448edf446e0e82e5f207ffd6113 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Mon, 15 Apr 2024 16:30:38 -0400 Subject: [PATCH 1/4] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_stat

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-17 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > Can you check where does the second event get sent from? Is it by any chance > when we go through > [this](https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp#L460) > place ? The first event is sent when crea

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-16 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > > > why not just call ModulesDidLoad and delegate this (and possibly other > > > binary-just-loaded) behaviors to it? > > > > > > That's what I did first, but it breaks the test > > `TestModuleLoadedNotifys.ModuleLoadedNotifysTestCase.test_launch_notifications` > > because

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-16 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/88792 >From 26528cd679478448edf446e0e82e5f207ffd6113 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Mon, 15 Apr 2024 16:30:38 -0400 Subject: [PATCH 1/3] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_stat

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-16 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/88792 >From 26528cd679478448edf446e0e82e5f207ffd6113 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Mon, 15 Apr 2024 16:30:38 -0400 Subject: [PATCH 1/2] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_stat

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-16 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > I'm missing why the _dl_debug_state breakpoint is special here, such that it > requires a force load of the section info? How does that happen? Jason's comment explains it well. It's because ld.so's loading is special here. Normal binaries are loaded via `DynamicLoaderPOSIXDY

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-16 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > why not just call ModulesDidLoad and delegate this (and possibly other > binary-just-loaded) behaviors to it? That's what I did first, but it breaks the test `TestModuleLoadedNotifys.ModuleLoadedNotifysTestCase.test_launch_notifications` because of extra broadcaster event. S

[Lldb-commits] [lldb] [lldb][DynamicLoader] Fix lldb unable to stop at _dl_debug_state if user set it before the process launched. (PR #88792)

2024-04-15 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/88792 If user sets a breakpoint at `_dl_debug_state` before the process launched, the breakpoint is not resolved yet. When lldb loads dynamic loader module, it's created with `Target::GetOrCreateModule` which notifie

[Lldb-commits] [lldb] [lldb][Dwarf] Add missing timer when parsing .debug_abbrev. (PR #86568)

2024-03-27 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/86568 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][Dwarf] Add missing timer when parsing .debug_abbrev. (PR #86568)

2024-03-26 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/86568 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][Dwarf] Add missing timer when parsing .debug_abbrev. (PR #86568)

2024-03-26 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/86568 ___ 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 dwarf parse time for line table and .debug_abbrev. (PR #86568)

2024-03-26 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/86568 >From 19dd9a13c21d70b42b9d68aed6fb0b5a5e494685 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Mon, 25 Mar 2024 15:49:42 -0400 Subject: [PATCH 1/2] [lldb][Dwarf] Fix dwarf parse time for line table and .debug_ab

[Lldb-commits] [lldb] [lldb][Dwarf] Fix dwarf parse time for line table and .debug_abbrev. (PR #86568)

2024-03-25 Thread Zequan Wu via lldb-commits
@@ -1228,10 +1231,9 @@ bool SymbolFileDWARF::ParseLineTable(CompileUnit &comp_unit) { if (offset == DW_INVALID_OFFSET) return false; - ElapsedTime elapsed(m_parse_time); ZequanWu wrote: My understanding is m_parse_time is the time spent only on parsin

[Lldb-commits] [lldb] [lldb][Dwarf] Fix dwarf parse time for line table and .debug_abbrev. (PR #86568)

2024-03-25 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/86568 `ParseLineTable` not only parses .debug_line but also constructs `LineTable`. This moves `m_parse_time` into the the function body of `ParseLLVMLineTable` to more accurately reflect parsing time on .debug_line.

[Lldb-commits] [lldb] [lldb-dap] Deduplicate watchpoints starting at the same address on SetDataBreakpointsRequest. (PR #83192)

2024-02-28 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/83192 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Deduplicate watchpoints starting at the same address on SetDataBreakpointsRequest. (PR #83192)

2024-02-27 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/83192 If a SetDataBreakpointsRequest contains a list data breakpoints which have duplicate starting addresses, the current behaviour is returning `{verified: true}` to both watchpoints with duplicated starting addres

[Lldb-commits] [lldb] [lldb][dap] Avoid concurrent `HandleCommand` calls (PR #83162)

2024-02-27 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu approved this pull request. https://github.com/llvm/llvm-project/pull/83162 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-22 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/81680 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Re-land [lldb-dap] Add support for data breakpoint. (PR #81909)

2024-02-22 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/81909 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Re-land [lldb-dap] Add support for data breakpoint. (PR #81909)

2024-02-22 Thread Zequan Wu via lldb-commits
ZequanWu wrote: Ping. https://github.com/llvm/llvm-project/pull/81909 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Re-land [lldb-dap] Add support for data breakpoint. (PR #81909)

2024-02-15 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/81909 >From d95a420ef100d0e73f8ff829926fc3f3d0708386 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Thu, 15 Feb 2024 14:29:18 -0500 Subject: [PATCH 1/2] [lldb-dap] Add support for data breakpoint. This implements fun

[Lldb-commits] [lldb] Re-land [lldb-dap] Add support for data breakpoint. (PR #81909)

2024-02-15 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/81909 >From d95a420ef100d0e73f8ff829926fc3f3d0708386 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Thu, 15 Feb 2024 14:29:18 -0500 Subject: [PATCH] [lldb-dap] Add support for data breakpoint. This implements functio

[Lldb-commits] [lldb] Re-land [lldb-dap] Add support for data breakpoint. (PR #81909)

2024-02-15 Thread Zequan Wu via lldb-commits
ZequanWu wrote: DAP adds a new request `DataAddressBreakpointInfo` at https://github.com/microsoft/debug-adapter-protocol/pull/461 with the following format to allow setting watchpoints at given address and size: ``` interface DataAddressBreakpointInfoRequest extends Request { command: 'Data

[Lldb-commits] [lldb] Re-land [lldb-dap] Add support for data breakpoint. (PR #81909)

2024-02-15 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/81909 This implements functionality to handle DataBreakpointInfo request and SetDataBreakpoints request. Previous commit https://github.com/llvm/llvm-project/commit/8c56e78ec531f0e2460213c20fff869b6b7add99 was reve

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-14 Thread Zequan Wu via lldb-commits
ZequanWu wrote: >From logs, looks like setting breakpoint with size being 1 byte failed on arm, >and works with size being 4 bytes. https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists

[Lldb-commits] [lldb] [llvm] Revert "[lldb-dap] Add support for data breakpoint. (#81541)" (PR #81812)

2024-02-14 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu approved this pull request. Thanks for reporting. https://github.com/llvm/llvm-project/pull/81812 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-14 Thread Zequan Wu via lldb-commits
@@ -2757,13 +2769,18 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { body.try_emplace("description", error_cstr && error_cstr[0] ? std::string(error_cstr) : "evalu

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-14 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/81680 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-14 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu commented: In terms of interpreting `name` as `${number of bytes}@${expression}`, it's made-up. And I just noticed that someone already filed an issue about this: https://github.com/microsoft/debug-adapter-protocol/issues/455. Should we revert the change inside the

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-14 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/81680 >From f9c509c519c9937d2e2de5098c4241e936187527 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 13 Feb 2024 17:41:26 -0500 Subject: [PATCH 1/2] [lldb-dap] Followup fixs for data breakpoints --- lldb/tools/l

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -561,6 +561,46 @@ void EventThreadFunction() { } } +lldb::SBValue FindVariable(uint64_t variablesReference, llvm::StringRef name) { + lldb::SBValue variable; + if (lldb::SBValueList *top_scope = GetTopLevelScope(variablesReference)) { +bool is_duplicated_variable_na

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2697,58 +2737,41 @@ void request_dataBreakpointInfo(const llvm::json::Object &request) { GetUnsigned(arguments, "variablesReference", 0); llvm::StringRef name = GetString(arguments, "name"); lldb::SBFrame frame = g_dap.GetLLDBFrame(*arguments); - bool is_duplica

[Lldb-commits] [lldb] [lldb-dap] Followup fixs for data breakpoints (PR #81680)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/81680 Followup fixes to resolve comments in https://github.com/llvm/llvm-project/pull/81541 >From f9c509c519c9937d2e2de5098c4241e936187527 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 13 Feb 2024 17:41:26 -05

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
ZequanWu wrote: I updated to add support for setting data breakpoint with expression. If `variablesReference` is 0 or not provided, interpret `name` as `${number of bytes}@${expression}` to set data breakpoint at the given expression because the spec https://microsoft.github.io/debug-adapter-

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2591,6 +2594,248 @@ void request_setFunctionBreakpoints(const llvm::json::Object &request) { g_dap.SendJSON(llvm::json::Value(std::move(response))); } +// "DataBreakpointInfoRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" }, { +// "type": "object", +/

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -2591,6 +2594,248 @@ void request_setFunctionBreakpoints(const llvm::json::Object &request) { g_dap.SendJSON(llvm::json::Value(std::move(response))); } +// "DataBreakpointInfoRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" }, { +// "type": "object", +/

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/81541 >From a2d28693da09a569b49bc39a4743e302b2479d87 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 13 Feb 2024 11:55:33 -0500 Subject: [PATCH 1/2] [lldb-dap] Add support for data breakpoint. This implements fun

[Lldb-commits] [lldb] [llvm] [lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [WIP][lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
@@ -895,6 +906,32 @@ def request_setFunctionBreakpoints(self, names, condition=None, hitCondition=Non } return self.send_recv(command_dict) +def request_dataBreakpointInfo(self, variablesReference, name): +args_dict = {"variablesReference": variabl

[Lldb-commits] [lldb] [llvm] [WIP][lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > just ping me when this PR is rebased Rebased. https://github.com/llvm/llvm-project/pull/81541 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [WIP][lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/81541 >From a2d28693da09a569b49bc39a4743e302b2479d87 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 13 Feb 2024 11:55:33 -0500 Subject: [PATCH] [lldb-dap] Add support for data breakpoint. This implements functio

[Lldb-commits] [lldb] [llvm] [lldb-dap][NFC] Add Breakpoint struct to share common logic. (PR #80753)

2024-02-13 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/80753 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [WIP][lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-13 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > This looks great overall! Could you split this PR into two? One with the > refactoring and another one with the new features? That would make reviewing > easier Yes, I already split it out: https://github.com/llvm/llvm-project/pull/80753 is the refactor pr. I'll rebase this

[Lldb-commits] [lldb] [llvm] [lldb-dap][NFC] Add Breakpoint struct to share common logic. (PR #80753)

2024-02-12 Thread Zequan Wu via lldb-commits
ZequanWu wrote: I uploaded https://github.com/llvm/llvm-project/pull/81541 as reference for reviewers to understand the motivation of this patch. https://github.com/llvm/llvm-project/pull/80753 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [llvm] [WIP][lldb-dap] Add support for data breakpoint. (PR #81541)

2024-02-12 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/81541 This implements functionality to handle `DataBreakpointInfo` request and `SetDataBreakpoints` request. It doesn't handle the case when `name` is an expression, see Todo comment for details. This is based on t

[Lldb-commits] [lldb] [llvm] [lldb-dap][NFC] Add Breakpoint struct to share common logic. (PR #80753)

2024-02-07 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/80753 >From c4b767909a9ffc2a3015dc9021e4c265da0d877d Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Mon, 5 Feb 2024 17:26:48 -0500 Subject: [PATCH 1/3] [lldb-dap][NFC] Add Breakpoint struct to share common logic. --

[Lldb-commits] [lldb] [llvm] [lldb-dap][NFC] Add Breakpoint struct to share common logic. (PR #80753)

2024-02-06 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/80753 >From c4b767909a9ffc2a3015dc9021e4c265da0d877d Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Mon, 5 Feb 2024 17:26:48 -0500 Subject: [PATCH 1/2] [lldb-dap][NFC] Add Breakpoint struct to share common logic. --

[Lldb-commits] [llvm] [lldb] [lldb-dap][NFC] Add Breakpoint struct to share common logic. (PR #80753)

2024-02-05 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/80753 This adds a layer between `SounceBreakpoint`/`FunctionBreakpoint` and `BreakpointBase` to have better separation and encapsulation so we are not directly operating on `SBBreakpoint`. I basically moved the `SB

[Lldb-commits] [lldb] [lldb][Format] Fix missing inlined function names in frame formatting. (PR #78494)

2024-01-18 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/78494 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][Format] Fix missing inlined function names in frame formatting. (PR #78494)

2024-01-18 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/78494 >From dbd04f25ccb37a18b316078df7817a603f007396 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Wed, 17 Jan 2024 14:22:01 -0500 Subject: [PATCH 1/3] [lldb][Format] Fix missing inlined function names in frame form

[Lldb-commits] [lldb] [lldb][Format] Fix missing inlined function names in frame formatting. (PR #78494)

2024-01-17 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/78494 This fixes missing inlined function names when formatting frame and the `Block` in `SymbolContext` is a lexical block (e.g. `DW_TAG_lexical_block` in Dwarf). >From dbd04f25ccb37a18b316078df7817a603f007396 Mon S

[Lldb-commits] [lldb] [llvm] [lldb] Add LLDB_BUG_REPORT_URL macro to allow a different URL for lldb bug reporting. (PR #78210)

2024-01-16 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/78210 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb] Add LLDB_BUG_REPORT_URL macro to allow a different URL for lldb bug reporting. (PR #78210)

2024-01-15 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/78210 This allows release teams to customize the bug report url for lldb. It also removes unnecessary constructions of `llvm::PrettyStackTraceProgram` as it's already constructed inside `llvm::InitLLVM`. >From 69623

[Lldb-commits] [lldb] 4004f65 - [LLDB][NativePDB] Fix use-after-free error detected by asan.

2024-01-04 Thread Zequan Wu via lldb-commits
Author: Zequan Wu Date: 2024-01-04T12:32:40-05:00 New Revision: 4004f655ceb9623608ba0471aa7037c142956e31 URL: https://github.com/llvm/llvm-project/commit/4004f655ceb9623608ba0471aa7037c142956e31 DIFF: https://github.com/llvm/llvm-project/commit/4004f655ceb9623608ba0471aa7037c142956e31.diff LOG

<    1   2   3   4   >