shafik created this revision.
shafik added reviewers: aprantl, jingham, labath, JDevlieghere.
This is just an enforcement of the DWARF requirement that a `DW_TAG_subprogram`
should have a `DW_AT_name`.
This came up when updating how we generating some debug info and one of the
possible change caused several LLDB tests to fail. This was ultimately due to
subprograms being generated without names but the immediate symptom did not
point to that.
https://reviews.llvm.org/D73921
Files:
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -828,6 +828,11 @@
SymbolFileDWARF *dwarf = die.GetDWARF();
const dw_tag_t tag = die.Tag();
+ if (tag == DW_TAG_subprogram && !attrs.name) {
+ LLDB_LOGF(log, "Parsing a Subprogram that has no name");
+ assert(false && "Subprograms require a name");
+ }
+
bool is_variadic = false;
bool is_static = false;
bool has_template_params = false;
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -828,6 +828,11 @@
SymbolFileDWARF *dwarf = die.GetDWARF();
const dw_tag_t tag = die.Tag();
+ if (tag == DW_TAG_subprogram && !attrs.name) {
+ LLDB_LOGF(log, "Parsing a Subprogram that has no name");
+ assert(false && "Subprograms require a name");
+ }
+
bool is_variadic = false;
bool is_static = false;
bool has_template_params = false;
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits