From d60859b21e02c320fdd851b31b787f646e11b882 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 9 Apr 2013 14:09:42 +0000 Subject: DWARF parser: Fix DWARF-2/3 incompatibility: size of DW_FORM_ref_addr is the same as DW_FORM_addr in DWARF2, and is 4/8 bytes on 32/64-bit DWARF starting from DWARF3. Adding a test for this is a huge pain - generating and uploading pre-built binary with DWARF3 debug info is way too ugly, and writing fine-grained unittests for DebugInfo is impossible, as it doesn't expose any headers in include/llvm. That said, I'm going to choose the second approach and submit the patch exposing DebugInfo headers for review soon enough. llvm-svn: 179095 --- llvm/lib/DebugInfo/DWARFCompileUnit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/DebugInfo/DWARFCompileUnit.cpp') diff --git a/llvm/lib/DebugInfo/DWARFCompileUnit.cpp b/llvm/lib/DebugInfo/DWARFCompileUnit.cpp index e3e4ccd7d9e..1f2b40fbbe0 100644 --- a/llvm/lib/DebugInfo/DWARFCompileUnit.cpp +++ b/llvm/lib/DebugInfo/DWARFCompileUnit.cpp @@ -165,7 +165,7 @@ size_t DWARFCompileUnit::extractDIEsIfNeeded(bool cu_die_only) { // we were told to parse const uint8_t *fixed_form_sizes = - DWARFFormValue::getFixedFormSizesForAddressSize(getAddressByteSize()); + DWARFFormValue::getFixedFormSizes(getAddressByteSize(), getVersion()); while (offset < next_cu_offset && die.extractFast(this, fixed_form_sizes, &offset)) { -- cgit v1.2.3