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

2024-06-06 Thread Pavel Labath via lldb-commits
@@ -2345,11 +2345,6 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; - ParsedDWARFTypeAttributes attrs(die); labath wrote: In case anyone's wondering, Putting this check back in would prevent the crash from

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

2024-06-04 Thread David Blaikie via lldb-commits
dwblaikie wrote: > > > You can repro this by running ./bin/lldb-dotest -p > > > TestConstStaticIntegralMember.py --dwarf-version 5 > > > Could you take a look @ZequanWu ? > > > > > > It should be fixed by the following diff. We just need to skip the > > declaration DIEs that are

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

2024-06-04 Thread Michael Buch via lldb-commits
Michael137 wrote: > (Zequan is OOO for three weeks, I can take over this (tomorrow) if needed.) Ah no worries! I can put up the patch later today then to unblock the CI https://github.com/llvm/llvm-project/pull/92328 ___ lldb-commits mailing list

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

2024-06-04 Thread Pavel Labath via lldb-commits
labath wrote: (Zequan is OOO for three weeks, I can take over this (tomorrow) if needed.) https://github.com/llvm/llvm-project/pull/92328 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

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

2024-06-04 Thread Michael Buch via lldb-commits
Michael137 wrote: > > Should we allow such entries in the index? And does this warrant rephrasing > > in the DWARF spec? > > It's fine to have those as _nameless_ entries (which we don't emit today), > but the entries that are reaching "process entry" have a name by definition. > That if

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

2024-06-04 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: >Should we allow such entries in the index? And does this warrant rephrasing in >the DWARF spec? It's fine to have those as _nameless_ entries (which we don't emit today), but the entries that are reaching "process entry" are not nameless by definition. That if

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

2024-06-04 Thread Michael Buch via lldb-commits
Michael137 wrote: > > You can repro this by running ./bin/lldb-dotest -p > > TestConstStaticIntegralMember.py --dwarf-version 5 > > Could you take a look @ZequanWu ? > > It should be fixed by the following diff. We just need to skip the > declaration DIEs that are struct/class/union. This

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

2024-06-03 Thread Zequan Wu via lldb-commits
ZequanWu wrote: > You can repro this by running ./bin/lldb-dotest -p > TestConstStaticIntegralMember.py --dwarf-version 5 > > Could you take a look @ZequanWu ? It should be fixed by the following. We just need to skip the declaration DIEs that are struct/class/union. This failure you see is

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

2024-06-03 Thread Michael Buch via lldb-commits
Michael137 wrote: Sorry for the late ping, but the LLDB matrix bot failure has gone unnoticed for a bit. This patch caused following test to fail for DWARFv5: ``` FAIL: test_inline_static_members_dsym (TestConstStaticIntegralMember.TestCase)

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

2024-05-30 Thread Zequan Wu via lldb-commits
ZequanWu wrote: For this specific case, we could fix it by making `DW_TAG_structure_type` equals to `DW_TAG_class_type` in the `UniqueDWARFASTTypeList::Find`. There's few things I noticed with this: 1. If `DW_TAG_structure_type` and `DW_TAG_class_type` are interchangeable, then this

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

2024-05-30 Thread Michael Buch via lldb-commits
Michael137 wrote: Huh this is an interesting one. So it looks like we first parse and insert `struct Inner` into `UniqueDWARFASTTypeMap` as a forward declaration. Then when we search the debug-map for the definition of `Inner`, we find it declared as `class Inner` (note, *class* vs.

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

2024-05-29 Thread Michael Buch via lldb-commits
Michael137 wrote: Unfortunately this breaks `TestCPPAccelerator.py` on the macOS buildbots: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/4788/execution/node/97/log/ ``` Ran command: "log enable dwarf lookups

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

2024-05-28 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu closed 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-28 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu 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-28 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/92328 >From d6de8d9a8bc709b5c4761e9a05f9befede938734 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Wed, 15 May 2024 13:58:42 -0400 Subject: [PATCH 1/4] Reapply [lldb][DWARF] Delay struct/class/union definition DIE

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

2024-05-28 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 71fbbb69d63c461f391cbabf1e32cd9977c4ce68 a2442a2211e75d19db99a24c22961bdfe7c80e07 --

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

2024-05-28 Thread Zequan Wu via lldb-commits
ZequanWu wrote: I removed the checking for DW_AT_declaration attributes when completing type from a DIE and applied https://github.com/llvm/llvm-project/pull/91808 to here to ensure we always have a definition DIE at that point. 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-28 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/92328 >From d6de8d9a8bc709b5c4761e9a05f9befede938734 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Wed, 15 May 2024 13:58:42 -0400 Subject: [PATCH 1/3] Reapply [lldb][DWARF] Delay struct/class/union definition DIE

[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] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-21 Thread Zequan Wu via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); ZequanWu wrote: > The reason why this crash does not happen when attempting to complete a type >

[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] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

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

[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] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-17 Thread Zequan Wu via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); ZequanWu wrote: > How exactly do we get here in that case? >From

[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] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-16 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu 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-16 Thread Zequan Wu via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); ZequanWu wrote: The parsing happens every time when constructing this object, which makes it a

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

2024-05-16 Thread Zequan Wu via lldb-commits
@@ -321,6 +326,10 @@ class SymbolFileDWARFDebugMap : public SymbolFileCommon { std::vector m_func_indexes; // Sorted by address std::vector m_glob_indexes; std::map>, OSOInfoSP> m_oso_map; + // A map from CompilerType to the struct/class/union/enum DIE (might be a +

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

2024-05-16 Thread Zequan Wu via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); ZequanWu wrote: This extra check was added in https://github.com/llvm/llvm-project/pull/91799 to

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

2024-05-16 Thread Michael Buch via lldb-commits
https://github.com/Michael137 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-16 Thread Michael Buch via lldb-commits
@@ -321,6 +326,10 @@ class SymbolFileDWARFDebugMap : public SymbolFileCommon { std::vector m_func_indexes; // Sorted by address std::vector m_glob_indexes; std::map>, OSOInfoSP> m_oso_map; + // A map from CompilerType to the struct/class/union/enum DIE (might be a +

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

2024-05-16 Thread Michael Buch via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE , if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); Michael137 wrote: I've been wondering how expensive constructing this object is. On a brief

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

2024-05-16 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu 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-15 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Zequan Wu (ZequanWu) Changes This reapplies https://github.com/llvm/llvm-project/commit/9a7262c2601874e5aa64c5db19746770212d4b44 and https://github.com/llvm/llvm-project/commit/a7eff59f78f08f8ef0487dfe2a136fb311af4fd0 with a fix. It

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

2024-05-15 Thread Zequan Wu via lldb-commits
ZequanWu wrote: The second commit is the fix. 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-15 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/92328 This reapplies https://github.com/llvm/llvm-project/commit/9a7262c2601874e5aa64c5db19746770212d4b44 and https://github.com/llvm/llvm-project/commit/a7eff59f78f08f8ef0487dfe2a136fb311af4fd0 with a fix. It