diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 6b16f0f6276..3d196040ca6 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -5553,10 +5553,19 @@ SymbolFileDWARF::ParseVariableDIE scope = eValueTypeVariableArgument; else { + bool op_error = false; // Check if the location has a DW_OP_addr with any address value... addr_t location_has_op_addr = false; if (!location_is_const_value_data) - location_has_op_addr = location.LocationContains_DW_OP_addr (); + { + location_has_op_addr = location.LocationContains_DW_OP_addr (LLDB_INVALID_ADDRESS, op_error); + if (op_error) + { + StreamString strm; + location.DumpLocationForAddress (&strm, eDescriptionLevelFull, 0, 0, NULL); + ReportError ("0x%8.8x: %s has an invalid location: %s", die->GetOffset(), DW_TAG_value_to_name(die->Tag()), strm.GetString().c_str()); + } + } if (location_has_op_addr) { @@ -5584,7 +5593,7 @@ SymbolFileDWARF::ParseVariableDIE // location for the variable, and set the variable's // symbol context scope to be that of the main executable // so the file address will resolve correctly. - if (location.LocationContains_DW_OP_addr (0)) + if (location.LocationContains_DW_OP_addr (0, op_error)) { // we have a possible uninitialized extern global |