[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-14 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: > Most of the patch is very clean, but I'm bothered by the > `getForeignTUSkeletonCUOffset` function, how it opens up with a mostly > redundant (the callers checks this already) call to > `getForeignTUTypeSignature`, and then proceeds with a reimplementation of >

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-11 Thread Alexander Yermolovich via lldb-commits
@@ -657,6 +657,42 @@ std::optional DWARFDebugNames::Entry::getLocalTUOffset() const { return NameIdx->getLocalTUOffset(*Index); } +std::optional +DWARFDebugNames::Entry::getForeignTUTypeSignature() const { + std::optional Index = getLocalTUIndex(); + const uint32_t

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-10 Thread Alexander Yermolovich via lldb-commits
@@ -657,6 +657,42 @@ std::optional DWARFDebugNames::Entry::getLocalTUOffset() const { return NameIdx->getLocalTUOffset(*Index); } +std::optional +DWARFDebugNames::Entry::getForeignTUTypeSignature() const { + std::optional Index = getLocalTUIndex(); + const uint32_t

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-07 Thread Alexander Yermolovich via lldb-commits
@@ -657,6 +657,42 @@ std::optional DWARFDebugNames::Entry::getLocalTUOffset() const { return NameIdx->getLocalTUOffset(*Index); } +std::optional +DWARFDebugNames::Entry::getForeignTUTypeSignature() const { + std::optional Index = getLocalTUIndex(); + const uint32_t

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

2024-05-30 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: > > @felipepiovezan I have another question. For the same example. I see: > > You are right. The fact that they have the same relative offset tells me that > some part of the code is failing to account for TUs. I just checked the > printing code in the hope that it was a

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

2024-05-30 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: > One easy question would be: do you/your users use -fdebug-types-section? If > so, that'd probably explain what you were seeing & you could add some test > coverage for that wherever you like (in lldb, presumably, maybe in bolt too). > But if you/they don't, then it's unclear

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

2024-05-30 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: Still would be nice to have a small repro to make sure clang, and BOLT, now does the right thing. https://github.com/llvm/llvm-project/pull/91808 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

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

2024-05-29 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: I have another question. For the same example. I see: ``` Name 4 { Hash: 0x2F94396D String: 0x0049 "_Z9get_statev" Entry @ 0x112 { Abbrev: 0x2 Tag: DW_TAG_subprogram DW_IDX_die_offset: 0x0023 DW_IDX_parent: } ...

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

2024-05-29 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: > > I have a follow up question. > > It sounds like you've answered it yourself. :) > > With this kind of debug info, lldb would think this refers to a global entity > and return it for queries like `::InnerState`. Without that entry, lldb will > (correctly) look up the

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

2024-05-28 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: I have a follow up question. For case talked about here earlier: "namespace A { namespace B { struct State { class InnerState{}; }; } } A::B::State::InnerState get_state() { return A::B::State::InnerState(); }" After David fix clang generates: ``` Name 3 { Hash:

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

2024-05-23 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: OK, thanks for detailed explanation. Will re-read few more time to fully process it. :) I'll change BOLT behavior to reflect the new clang behavior. If there is a forward delcaration (skeleton die), the parent chain won't skip it, but instead won't emit parent for it's

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

2024-05-23 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: > > Since clang no longer emits entry for: > > But what does the `debug_info` section look like? In particular, what is the > _parent_ of the class DIE? If the parent of `InnerState` is not some kind of > entry for `State` (either a declaration or a definition), IMO Clang is

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

2024-05-23 Thread Alexander Yermolovich via lldb-commits
ayermolo 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 > >

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

2024-05-22 Thread Alexander Yermolovich via lldb-commits
ayermolo 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 } ``` Since

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

2024-05-13 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: What is "nameless index entry"? I don't quite understand from the spec. https://github.com/llvm/llvm-project/pull/91808 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [clang] [lldb] Revert "NFC: Make clang resource headers an interface library (#88317)" (PR #89266)

2024-04-20 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: Fixed our internal foobar yesterday. Can close this. https://github.com/llvm/llvm-project/pull/89266 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] Revert "NFC: Make clang resource headers an interface library (#88317)" (PR #89266)

2024-04-18 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: Thanks. It's failing internally in our automatic multi stage build. Trying to dig into it as part of my oncall. :) https://github.com/llvm/llvm-project/pull/89266 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-04-16 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: @clayborg Figured I reply here to your comment: https://github.com/llvm/llvm-project/pull/88092#issuecomment-2059961175 This was regarding merging .debug_names in linker (although types are not implemented yet there), but FYI BOLT output is similar. All the CUs are in one

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-04-12 Thread Alexander Yermolovich via lldb-commits
@@ -273,6 +301,44 @@ void DebugNamesDWARFIndex::GetFullyQualifiedType( if (!isType(entry.tag())) continue; + +DWARFTypeUnit *foreign_tu = GetForeignTypeUnit(entry); +if (foreign_tu) { + // If this entry represents a foreign type unit, we need to verify

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-04-12 Thread Alexander Yermolovich via lldb-commits
@@ -273,6 +301,44 @@ void DebugNamesDWARFIndex::GetFullyQualifiedType( if (!isType(entry.tag())) continue; + +DWARFTypeUnit *foreign_tu = GetForeignTypeUnit(entry); +if (foreign_tu) { + // If this entry represents a foreign type unit, we need to verify

[Lldb-commits] [lldb] Fix DWARF locations when we have large .dwp files. (PR #87164)

2024-03-31 Thread Alexander Yermolovich via lldb-commits
https://github.com/ayermolo approved this pull request. thx https://github.com/llvm/llvm-project/pull/87164 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-16 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: Just my 2 cents as a "random dude who works on DWARF". The interoperability of various gnu extensions and DWARF spec is not well defined. Which leads to situations like this. If binary is A then DWP is A.dwp no direct link between binary and dwp file. If binary has gnulink than

[Lldb-commits] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-07 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: > > Will this now work with .dwp files not having UUID? > > No. If binairies have UUIDs (GNU build IDs), they need to match right now. > That is larger fix that involves adding a "enum UUIDFlavor" to the UUIDs so > we can ensure we aren't comparing two different things. > >

[Lldb-commits] [lldb] Add more ways to find the .dwp file. (PR #81067)

2024-02-07 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: Will this now work with .dwp files not having UUID? https://github.com/llvm/llvm-project/pull/81067 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lld] [mlir] [flang] [clang-tools-extra] [libunwind] [clang] [openmp] [libcxx] [compiler-rt] [llvm] [libc] [pstl] [ELF] Don't resolve relocations referencing SHN_ABS to tombstone

2024-01-24 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: Hmm, interesting. Thanks for the fix. https://github.com/llvm/llvm-project/pull/79238 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Allow lldb to load .dwp files with large .debug_info or .debug_types. (PR #73736)

2023-11-29 Thread Alexander Yermolovich via lldb-commits
https://github.com/ayermolo approved this pull request. Thanks for fixing places I missed. https://github.com/llvm/llvm-project/pull/73736 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [llvm] [lldb] Add support for parsing type unit entries in .debug_names. (PR #72952)

2023-11-28 Thread Alexander Yermolovich via lldb-commits
ayermolo wrote: What happens when Linker tombstones the tu local entry to -1, or will that be in a separate patch after LLD changes land? https://github.com/llvm/llvm-project/pull/72952 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [clang] [lldb] [llvm] [BOLT][DWARF] Fix handling of DWARF5 DWP (PR #72729)

2023-11-17 Thread Alexander Yermolovich via lldb-commits
https://github.com/ayermolo created https://github.com/llvm/llvm-project/pull/72729 Fixed handling of DWP as input. Before BOLT crashed. Now it will write out correct CU, and all the TUs. Potential future improvement is to scan all the TUs used in this CU, and only include those. >From

[Lldb-commits] [lldb] [LLVM][DWARF] Add support for monolithic types in .debug_names (PR #70512)

2023-10-27 Thread Alexander Yermolovich via lldb-commits
https://github.com/ayermolo closed https://github.com/llvm/llvm-project/pull/70512 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLVM][DWARF] Add support for monolithic types in .debug_names (PR #70512)

2023-10-27 Thread Alexander Yermolovich via lldb-commits
https://github.com/ayermolo updated https://github.com/llvm/llvm-project/pull/70512 >From 1c6a604df93b833c3bb9c7d34f4f27415592dbe5 Mon Sep 17 00:00:00 2001 From: Alexander Yermolovich Date: Thu, 5 Oct 2023 12:39:02 -0700 Subject: [PATCH] [LLVM][DWARF] Add support for monolithic types in

[Lldb-commits] [lldb] d557384 - [LLDB] Fix for D139955 Summary:

2023-03-23 Thread Alexander Yermolovich via lldb-commits
Author: Alexander Yermolovich Date: 2023-03-23T14:03:42-07:00 New Revision: d557384b43d32700ed09b08564a4f7823061d999 URL: https://github.com/llvm/llvm-project/commit/d557384b43d32700ed09b08564a4f7823061d999 DIFF:

[Lldb-commits] [lldb] 34a8e6e - [LLDB] Enable 64 bit debug/type offset

2023-02-22 Thread Alexander Yermolovich via lldb-commits
Author: Alexander Yermolovich Date: 2023-02-22T11:34:00-08:00 New Revision: 34a8e6eee666fe1e67b8b689abe5e4e95bf6b166 URL: https://github.com/llvm/llvm-project/commit/34a8e6eee666fe1e67b8b689abe5e4e95bf6b166 DIFF:

[Lldb-commits] [lldb] 8116fc5 - Revert "[LLDB] Enable 64 bit debug/type offset"

2023-02-16 Thread Alexander Yermolovich via lldb-commits
Author: Alexander Yermolovich Date: 2023-02-16T17:20:27-08:00 New Revision: 8116fc592c5eef88584033ec4f3539f405dee0e0 URL: https://github.com/llvm/llvm-project/commit/8116fc592c5eef88584033ec4f3539f405dee0e0 DIFF:

[Lldb-commits] [lldb] 2062e90 - [LLDB] Enable 64 bit debug/type offset

2023-02-16 Thread Alexander Yermolovich via lldb-commits
Author: Alexander Yermolovich Date: 2023-02-16T14:46:13-08:00 New Revision: 2062e90aa531e8445e5dc0e16222c0f246af1bf4 URL: https://github.com/llvm/llvm-project/commit/2062e90aa531e8445e5dc0e16222c0f246af1bf4 DIFF:

[Lldb-commits] [lldb] 620b3d9 - Revert "[LLDB] Enable 64 bit debug/type offset"

2023-02-13 Thread Alexander Yermolovich via lldb-commits
Author: Alexander Yermolovich Date: 2023-02-13T14:08:40-08:00 New Revision: 620b3d9ba3343d7bc5bab2340174a20952fcd00f URL: https://github.com/llvm/llvm-project/commit/620b3d9ba3343d7bc5bab2340174a20952fcd00f DIFF:

[Lldb-commits] [lldb] f36fe00 - [LLDB] Enable 64 bit debug/type offset

2023-02-13 Thread Alexander Yermolovich via lldb-commits
Author: Alexander Yermolovich Date: 2023-02-13T13:08:01-08:00 New Revision: f36fe009c0fc1d655bfc6168730bedfa1b36e622 URL: https://github.com/llvm/llvm-project/commit/f36fe009c0fc1d655bfc6168730bedfa1b36e622 DIFF:

[Lldb-commits] [lldb] 4e7da80 - [fix] Change formatting to use llvm::formatv Summary:

2023-01-12 Thread Alexander Yermolovich via lldb-commits
Author: Alexander Yermolovich Date: 2023-01-12T11:18:29-08:00 New Revision: 4e7da8000e2771907609c3fe149dd4b96cfe0b08 URL: https://github.com/llvm/llvm-project/commit/4e7da8000e2771907609c3fe149dd4b96cfe0b08 DIFF:

[Lldb-commits] [lldb] 7fc7934 - [llvm][dwwarf] Change CU/TU index to 64-bit

2023-01-11 Thread Alexander Yermolovich via lldb-commits
Author: Alexander Yermolovich Date: 2023-01-11T15:07:11-08:00 New Revision: 7fc79340234f3acd354c52bd8bf2cf44f38fc4be URL: https://github.com/llvm/llvm-project/commit/7fc79340234f3acd354c52bd8bf2cf44f38fc4be DIFF:

[Lldb-commits] [lldb] e262b8f - [LLDB] Change formatting to use llvm::formatv

2023-01-09 Thread Alexander Yermolovich via lldb-commits
Author: Alexander Yermolovich Date: 2023-01-09T11:29:43-08:00 New Revision: e262b8f48af9fdca8380f2f079e50291956aad71 URL: https://github.com/llvm/llvm-project/commit/e262b8f48af9fdca8380f2f079e50291956aad71 DIFF:

[Lldb-commits] [lldb] 130167e - [LLDB] Handle DIE with DW_AT_low_pc and empty ranges

2022-06-22 Thread Alexander Yermolovich via lldb-commits
Author: Alexander Yermolovich Date: 2022-06-22T10:54:25-07:00 New Revision: 130167ed1effa36aa56c83c4293e732e5163d993 URL: https://github.com/llvm/llvm-project/commit/130167ed1effa36aa56c83c4293e732e5163d993 DIFF: