mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
Add support for separating strings for the split debug info DWARF5
proposal. This leaves the strings in the skeleton die as strp, but in all dwo files they're accessed now via DW_FORM_GNU_str_index. Add support for dumping these sections and modify the fission-cu.ll testcase to have the correct strings and form. Fix a small bug in the fixed form sizes routine that involved out of array accesses for the table and add a FIXME in the extractFast routine to fix this up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include "DWARFContext.h"
|
||||
#include "DWARFDebugAbbrev.h"
|
||||
#include "DWARFFormValue.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/Dwarf.h"
|
||||
#include "llvm/Support/Format.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
@ -113,9 +114,14 @@ bool DWARFDebugInfoEntryMinimal::extractFast(const DWARFCompileUnit *cu,
|
||||
uint32_t i;
|
||||
uint16_t form;
|
||||
for (i=0; i<numAttributes; ++i) {
|
||||
|
||||
form = AbbrevDecl->getFormByIndex(i);
|
||||
|
||||
const uint8_t fixed_skip_size = fixed_form_sizes[form];
|
||||
// FIXME: Currently we're checking if this is less than the last
|
||||
// entry in the fixed_form_sizes table, but this should be changed
|
||||
// to use dynamic dispatch.
|
||||
const uint8_t fixed_skip_size = (form < DW_FORM_ref_sig8) ?
|
||||
fixed_form_sizes[form] : 0;
|
||||
if (fixed_skip_size)
|
||||
offset += fixed_skip_size;
|
||||
else {
|
||||
@ -187,6 +193,8 @@ bool DWARFDebugInfoEntryMinimal::extractFast(const DWARFCompileUnit *cu,
|
||||
case DW_FORM_sdata:
|
||||
case DW_FORM_udata:
|
||||
case DW_FORM_ref_udata:
|
||||
case DW_FORM_GNU_str_index:
|
||||
case DW_FORM_GNU_addr_index:
|
||||
debug_info_data.getULEB128(&offset);
|
||||
break;
|
||||
|
||||
@ -207,7 +215,6 @@ bool DWARFDebugInfoEntryMinimal::extractFast(const DWARFCompileUnit *cu,
|
||||
return false;
|
||||
}
|
||||
offset += form_size;
|
||||
|
||||
} while (form_is_indirect);
|
||||
}
|
||||
}
|
||||
@ -327,6 +334,8 @@ DWARFDebugInfoEntryMinimal::extract(const DWARFCompileUnit *cu,
|
||||
case DW_FORM_sdata:
|
||||
case DW_FORM_udata:
|
||||
case DW_FORM_ref_udata:
|
||||
case DW_FORM_GNU_str_index:
|
||||
case DW_FORM_GNU_addr_index:
|
||||
debug_info_data.getULEB128(&offset);
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user