Skip to content

Commit 5500e21

Browse files
Revert "[LLDB][DWARF] Add an option to silence unsupported DW_FORM warnings" (#106765)
Reverts #106609
1 parent 5af4ba2 commit 5500e21

File tree

2 files changed

+11
-23
lines changed

2 files changed

+11
-23
lines changed

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
#include <cctype>
8888
#include <cstring>
8989

90-
// #define ENABLE_DEBUG_PRINTF // COMMENT OUT THIS LINE PRIOR TO CHECKIN
90+
//#define ENABLE_DEBUG_PRINTF // COMMENT OUT THIS LINE PRIOR TO CHECKIN
9191

9292
#ifdef ENABLE_DEBUG_PRINTF
9393
#include <cstdio>
@@ -129,11 +129,6 @@ class PluginProperties : public Properties {
129129
bool IgnoreFileIndexes() const {
130130
return GetPropertyAtIndexAs<bool>(ePropertyIgnoreIndexes, false);
131131
}
132-
133-
bool EmitUnsupportedDWFormValueWarning() const {
134-
return GetPropertyAtIndexAs<bool>(
135-
ePropertyEmitUnsupportedDWFormValueWarning, true);
136-
}
137132
};
138133

139134
} // namespace
@@ -629,14 +624,12 @@ uint32_t SymbolFileDWARF::CalculateAbilities() {
629624
llvm::DWARFDebugAbbrev *abbrev = DebugAbbrev();
630625
std::set<dw_form_t> unsupported_forms = GetUnsupportedForms(abbrev);
631626
if (!unsupported_forms.empty()) {
632-
if (GetGlobalPluginProperties().EmitUnsupportedDWFormValueWarning()) {
633-
StreamString error;
634-
error.Printf("unsupported DW_FORM value%s:",
635-
unsupported_forms.size() > 1 ? "s" : "");
636-
for (auto form : unsupported_forms)
637-
error.Printf(" %#x", form);
638-
m_objfile_sp->GetModule()->ReportWarning("{0}", error.GetString());
639-
}
627+
StreamString error;
628+
error.Printf("unsupported DW_FORM value%s:",
629+
unsupported_forms.size() > 1 ? "s" : "");
630+
for (auto form : unsupported_forms)
631+
error.Printf(" %#x", form);
632+
m_objfile_sp->GetModule()->ReportWarning("{0}", error.GetString());
640633
return 0;
641634
}
642635

@@ -1777,17 +1770,16 @@ SymbolFileDWARF *SymbolFileDWARF::GetDIERefSymbolFile(const DIERef &die_ref) {
17771770
return this;
17781771

17791772
if (file_index) {
1780-
// We have a SymbolFileDWARFDebugMap, so let it find the right file
1773+
// We have a SymbolFileDWARFDebugMap, so let it find the right file
17811774
if (SymbolFileDWARFDebugMap *debug_map = GetDebugMapSymfile())
17821775
return debug_map->GetSymbolFileByOSOIndex(*file_index);
1783-
1776+
17841777
// Handle the .dwp file case correctly
17851778
if (*file_index == DIERef::k_file_index_mask)
17861779
return GetDwpSymbolFile().get(); // DWP case
17871780

17881781
// Handle the .dwo file case correctly
1789-
return DebugInfo()
1790-
.GetUnitAtIndex(*die_ref.file_index())
1782+
return DebugInfo().GetUnitAtIndex(*die_ref.file_index())
17911783
->GetDwoSymbolFile(); // DWO case
17921784
}
17931785
return this;
@@ -3629,7 +3621,7 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc,
36293621
lldb::addr_t location_DW_OP_addr = LLDB_INVALID_ADDRESS;
36303622
if (!location_is_const_value_data) {
36313623
bool op_error = false;
3632-
const DWARFExpression *location = location_list.GetAlwaysValidExpr();
3624+
const DWARFExpression* location = location_list.GetAlwaysValidExpr();
36333625
if (location)
36343626
location_DW_OP_addr =
36353627
location->GetLocation_DW_OP_addr(location_form.GetUnit(), op_error);

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFProperties.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,4 @@ let Definition = "symbolfiledwarf" in {
55
Global,
66
DefaultFalse,
77
Desc<"Ignore indexes present in the object files and always index DWARF manually.">;
8-
def EmitUnsupportedDWFormValueWarning: Property<"emit-unsupported-dwform-value", "Boolean">,
9-
Global,
10-
DefaultTrue,
11-
Desc<"Emit warnings about unsupported DW_Form values.">;
128
}

0 commit comments

Comments
 (0)