mirror of
https://github.com/NationalSecurityAgency/ghidra
synced 2024-08-25 03:56:41 +00:00
Merge remote-tracking branch
'origin/GP-0_dev747368_fix_dwarf5_unitheader_npe_and_implicit_value' (Closes #6312)
This commit is contained in:
commit
43c6f6897a
|
@ -316,10 +316,11 @@ public class DWARFProgram implements Closeable {
|
|||
|
||||
DWARFUnitHeader unitHeader =
|
||||
DWARFUnitHeader.read(this, debugInfoBR, debugAbbrBR, compUnits.size(), monitor);
|
||||
if (unitHeader != null) {
|
||||
debugInfoBR.setPointerIndex(unitHeader.getEndOffset());
|
||||
if (unitHeader == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
debugInfoBR.setPointerIndex(unitHeader.getEndOffset());
|
||||
if (unitHeader instanceof DWARFCompilationUnit cu) {
|
||||
compUnits.add(cu);
|
||||
importSummary.dwarfVers.add((int) cu.getDWARFVersion());
|
||||
|
|
|
@ -69,8 +69,9 @@ public class DWARFAttributeDef<E extends Enum<E>> {
|
|||
E e = mapper.apply(attributeId);
|
||||
|
||||
// NOTE: implicit value is a space saving hack built into DWARF. It adds an extra
|
||||
// field in the attributespec that needs to be read.
|
||||
long implicitValue = form == DWARFForm.DW_FORM_indirect // read leb128 if present
|
||||
// field in the attributespec that needs to be read now in the .debug_abbr. This is
|
||||
// different than DW_FORM_indirect, which is read from the DIE in .debug_info
|
||||
long implicitValue = form == DWARFForm.DW_FORM_implicit_const // read leb128 if present
|
||||
? reader.readNext(LEB128::signed)
|
||||
: 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue