summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFFormValue.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-06-19 21:37:13 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-06-19 21:37:13 +0000
commit18e73508c4e21a2ce8c2bbd22baf35e86d33279c (patch)
tree0cab8c7f0068cca0c74f4c82ff7a5a564e4639cc /llvm/lib/DebugInfo/DWARFFormValue.cpp
parenta3cd35024929af630d4cc4a039da219723de261e (diff)
downloadbcm5719-llvm-18e73508c4e21a2ce8c2bbd22baf35e86d33279c.tar.gz
bcm5719-llvm-18e73508c4e21a2ce8c2bbd22baf35e86d33279c.zip
llvm-dwarfdump: Add support for dumping the .debug_loc section
This is a basic implementation - we still don't have any support (that I know of) for dumping DWARF expressions in a meaningful way, so the location information itself is just printed as a sequence of bytes as we do elsewhere. llvm-svn: 184361
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFFormValue.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARFFormValue.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARFFormValue.cpp
index 5f06f43d81c..1a1cf2452cd 100644
--- a/llvm/lib/DebugInfo/DWARFFormValue.cpp
+++ b/llvm/lib/DebugInfo/DWARFFormValue.cpp
@@ -126,9 +126,13 @@ DWARFFormValue::extractValue(DataExtractor data, uint32_t *offset_ptr,
Value.uval = data.getU16(offset_ptr);
break;
case DW_FORM_data4:
- case DW_FORM_ref4:
+ case DW_FORM_ref4: {
+ RelocAddrMap::const_iterator AI = cu->getRelocMap()->find(*offset_ptr);
Value.uval = data.getU32(offset_ptr);
+ if (AI != cu->getRelocMap()->end())
+ Value.uval += AI->second.second;
break;
+ }
case DW_FORM_data8:
case DW_FORM_ref8:
Value.uval = data.getU64(offset_ptr);
OpenPOWER on IntegriCloud