clayborg wrote:
I was thinking about DIE -> name stuff, and was wondering if we would benefit
from a cache of DIE offset to `DW_AT_name` and DIE offset to
`DW_AT_linkage_name`. Not sure how many times we might lookup DIE names
multiple times.
https://github.com/llvm/llvm-project/pull/78486
__
https://github.com/felipepiovezan closed
https://github.com/llvm/llvm-project/pull/78486
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
felipepiovezan wrote:
> Now this is safe and all my issues are gone. Thanks for improving.
Thanks for spotting the issue with the first implementation!
https://github.com/llvm/llvm-project/pull/78486
___
lldb-commits mailing list
lldb-commits@lists.l
https://github.com/clayborg approved this pull request.
Now this is safe and all my issues are gone. Thanks for improving.
https://github.com/llvm/llvm-project/pull/78486
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/
felipepiovezan wrote:
Make comments more grep-able.
https://github.com/llvm/llvm-project/pull/78486
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/felipepiovezan updated
https://github.com/llvm/llvm-project/pull/78486
>From b0a33481162e24a7106cbd554b33ddb098df7612 Mon Sep 17 00:00:00 2001
From: Felipe de Azevedo Piovezan
Date: Thu, 7 Dec 2023 11:26:52 -0800
Subject: [PATCH 1/5] [lldb][DWARFUnit] Implement PeekDIEName qu
https://github.com/adrian-prantl approved this pull request.
https://github.com/llvm/llvm-project/pull/78486
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/adrian-prantl edited
https://github.com/llvm/llvm-project/pull/78486
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -663,6 +663,30 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) {
return DWARFDIE(); // Not found
}
+llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) {
+ DWARFDebugInfoEntry die;
+ if (!die.Extract(GetData(), this, &die_offset))
+return llvm::StringRef();
felipepiovezan wrote:
@clayborg with your feedback, I think I was able to solve the issue _and_
reuse existing code.
Please have a look at the latest commit!
https://github.com/llvm/llvm-project/pull/78486
___
lldb-commits mailing list
lldb-commits@l
https://github.com/felipepiovezan updated
https://github.com/llvm/llvm-project/pull/78486
>From b0a33481162e24a7106cbd554b33ddb098df7612 Mon Sep 17 00:00:00 2001
From: Felipe de Azevedo Piovezan
Date: Thu, 7 Dec 2023 11:26:52 -0800
Subject: [PATCH 1/4] [lldb][DWARFUnit] Implement PeekDIEName qu
@@ -663,6 +663,14 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) {
return DWARFDIE(); // Not found
}
+llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) {
+ const DWARFDataExtractor &data = GetData();
+ DWARFDebugInfoEntry die;
+ if (!die.Extract(data, this, &di
@@ -663,6 +663,14 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) {
return DWARFDIE(); // Not found
}
+llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) {
+ const DWARFDataExtractor &data = GetData();
+ DWARFDebugInfoEntry die;
+ if (!die.Extract(data, this, &di
@@ -663,6 +663,14 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) {
return DWARFDIE(); // Not found
}
+llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) {
+ const DWARFDataExtractor &data = GetData();
+ DWARFDebugInfoEntry die;
+ if (!die.Extract(data, this, &di
https://github.com/felipepiovezan updated
https://github.com/llvm/llvm-project/pull/78486
>From b0a33481162e24a7106cbd554b33ddb098df7612 Mon Sep 17 00:00:00 2001
From: Felipe de Azevedo Piovezan
Date: Thu, 7 Dec 2023 11:26:52 -0800
Subject: [PATCH 1/3] [lldb][DWARFUnit] Implement PeekDIEName qu
felipepiovezan wrote:
Added tests for AT_specification and AT_abstract origin.
@clayborg I didn't change the implementation because IIUC the "parsed DIE" is
merely a structure with computed parent/child/sibling relationship, we don't
build any data structures for the attributes themselves.
I
https://github.com/felipepiovezan updated
https://github.com/llvm/llvm-project/pull/78486
>From b0a33481162e24a7106cbd554b33ddb098df7612 Mon Sep 17 00:00:00 2001
From: Felipe de Azevedo Piovezan
Date: Thu, 7 Dec 2023 11:26:52 -0800
Subject: [PATCH 1/2] [lldb][DWARFUnit] Implement PeekDIEName qu
@@ -663,6 +663,14 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) {
return DWARFDIE(); // Not found
}
+llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) {
+ const DWARFDataExtractor &data = GetData();
+ DWARFDebugInfoEntry die;
+ if (!die.Extract(data, this, &di
@@ -663,6 +663,14 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) {
return DWARFDIE(); // Not found
}
+llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) {
+ const DWARFDataExtractor &data = GetData();
+ DWARFDebugInfoEntry die;
+ if (!die.Extract(data, this, &di
@@ -104,3 +105,61 @@ TEST(DWARFDIETest, ChildIteration) {
DWARFDIE no_children_die(unit, die_child0);
EXPECT_TRUE(no_children_die.children().empty());
}
+
+TEST(DWARFDIETest, PeekName) {
+ const char *yamldata = R"(
+--- !ELF
+FileHeader:
clayborg wrote:
@@ -663,6 +663,14 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) {
return DWARFDIE(); // Not found
}
+llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) {
+ const DWARFDataExtractor &data = GetData();
+ DWARFDebugInfoEntry die;
+ if (!die.Extract(data, this, &di
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 2d5cc1c9b3c8b8b7cd0ed9dec79489940161d73a
b0a33481162e24a7106cbd554b33ddb098df7612 --
https://github.com/felipepiovezan updated
https://github.com/llvm/llvm-project/pull/78486
>From b0a33481162e24a7106cbd554b33ddb098df7612 Mon Sep 17 00:00:00 2001
From: Felipe de Azevedo Piovezan
Date: Thu, 7 Dec 2023 11:26:52 -0800
Subject: [PATCH] [lldb][DWARFUnit] Implement PeekDIEName query
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Felipe de Azevedo Piovezan (felipepiovezan)
Changes
This allows us to query the AT_Name of a DIE without parsing the entire CU.
Part of the ongoing effort to support IDX_Parent in accelerator tables [1].
[1]:
https://discourse.llvm.org/t/
https://github.com/felipepiovezan created
https://github.com/llvm/llvm-project/pull/78486
This allows us to query the AT_Name of a DIE without parsing the entire CU.
Part of the ongoing effort to support IDX_Parent in accelerator tables [1].
[1]:
https://discourse.llvm.org/t/rfc-improve-dwarf
25 matches
Mail list logo