Skip to content

Commit 40792ac

Browse files
committed
[GR-31552] Added terminating abbrev record to list of abbreviations #3429.
PullRequest: graal/8997
2 parents 6eee91e + 505933a commit 40792ac

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

substratevm/src/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/DwarfAbbrevSectionImpl.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,9 @@ public int writeAbbrevs(DebugContext context, byte[] buffer, int p) {
728728
}
729729

730730
pos = writeParameterDeclarationAbbrevs(context, buffer, pos);
731+
732+
/* write a null abbrev to terminate the sequence */
733+
pos = writeNullAbbrev(context, buffer, pos);
731734
return pos;
732735
}
733736

@@ -1313,6 +1316,12 @@ private int writeParameterDeclarationAbbrev(@SuppressWarnings("unused") DebugCon
13131316
return pos;
13141317
}
13151318

1319+
private int writeNullAbbrev(@SuppressWarnings("unused") DebugContext context, byte[] buffer, int p) {
1320+
int pos = p;
1321+
pos = writeAbbrevCode(DwarfDebugInfo.DW_ABBREV_CODE_null, buffer, pos);
1322+
return pos;
1323+
}
1324+
13161325
/**
13171326
* The debug_abbrev section depends on debug_aranges section.
13181327
*/

0 commit comments

Comments
 (0)