|
87 | 87 | #include <cctype>
|
88 | 88 | #include <cstring>
|
89 | 89 |
|
90 |
| -//#define ENABLE_DEBUG_PRINTF // COMMENT OUT THIS LINE PRIOR TO CHECKIN |
| 90 | +// #define ENABLE_DEBUG_PRINTF // COMMENT OUT THIS LINE PRIOR TO CHECKIN |
91 | 91 |
|
92 | 92 | #ifdef ENABLE_DEBUG_PRINTF
|
93 | 93 | #include <cstdio>
|
@@ -129,6 +129,11 @@ class PluginProperties : public Properties {
|
129 | 129 | bool IgnoreFileIndexes() const {
|
130 | 130 | return GetPropertyAtIndexAs<bool>(ePropertyIgnoreIndexes, false);
|
131 | 131 | }
|
| 132 | + |
| 133 | + bool EmitUnsupportedDWFormValueWarning() const { |
| 134 | + return GetPropertyAtIndexAs<bool>( |
| 135 | + ePropertyEmitUnsupportedDWFormValueWarning, true); |
| 136 | + } |
132 | 137 | };
|
133 | 138 |
|
134 | 139 | } // namespace
|
@@ -624,12 +629,14 @@ uint32_t SymbolFileDWARF::CalculateAbilities() {
|
624 | 629 | llvm::DWARFDebugAbbrev *abbrev = DebugAbbrev();
|
625 | 630 | std::set<dw_form_t> unsupported_forms = GetUnsupportedForms(abbrev);
|
626 | 631 | if (!unsupported_forms.empty()) {
|
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()); |
| 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 | + } |
633 | 640 | return 0;
|
634 | 641 | }
|
635 | 642 |
|
@@ -1770,16 +1777,17 @@ SymbolFileDWARF *SymbolFileDWARF::GetDIERefSymbolFile(const DIERef &die_ref) {
|
1770 | 1777 | return this;
|
1771 | 1778 |
|
1772 | 1779 | if (file_index) {
|
1773 |
| - // We have a SymbolFileDWARFDebugMap, so let it find the right file |
| 1780 | + // We have a SymbolFileDWARFDebugMap, so let it find the right file |
1774 | 1781 | if (SymbolFileDWARFDebugMap *debug_map = GetDebugMapSymfile())
|
1775 | 1782 | return debug_map->GetSymbolFileByOSOIndex(*file_index);
|
1776 |
| - |
| 1783 | + |
1777 | 1784 | // Handle the .dwp file case correctly
|
1778 | 1785 | if (*file_index == DIERef::k_file_index_mask)
|
1779 | 1786 | return GetDwpSymbolFile().get(); // DWP case
|
1780 | 1787 |
|
1781 | 1788 | // Handle the .dwo file case correctly
|
1782 |
| - return DebugInfo().GetUnitAtIndex(*die_ref.file_index()) |
| 1789 | + return DebugInfo() |
| 1790 | + .GetUnitAtIndex(*die_ref.file_index()) |
1783 | 1791 | ->GetDwoSymbolFile(); // DWO case
|
1784 | 1792 | }
|
1785 | 1793 | return this;
|
@@ -3621,7 +3629,7 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc,
|
3621 | 3629 | lldb::addr_t location_DW_OP_addr = LLDB_INVALID_ADDRESS;
|
3622 | 3630 | if (!location_is_const_value_data) {
|
3623 | 3631 | bool op_error = false;
|
3624 |
| - const DWARFExpression* location = location_list.GetAlwaysValidExpr(); |
| 3632 | + const DWARFExpression *location = location_list.GetAlwaysValidExpr(); |
3625 | 3633 | if (location)
|
3626 | 3634 | location_DW_OP_addr =
|
3627 | 3635 | location->GetLocation_DW_OP_addr(location_form.GetUnit(), op_error);
|
|
0 commit comments