Skip to content

Commit 637d66a

Browse files
committed
fix index key duplication when a stub and the method it is derived from both get included with -O0
1 parent f250499 commit 637d66a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ private int writeMethodDeclarations(DebugContext context, ClassEntry classEntry,
664664

665665
private int writeMethodDeclaration(DebugContext context, ClassEntry classEntry, Range range, byte[] buffer, int p) {
666666
int pos = p;
667-
String methodKey = range.getFullMethodNameWithParamsAndReturnType();
667+
String methodKey = range.getSymbolName();
668668
setMethodDeclarationIndex(classEntry, methodKey, pos);
669669
int modifiers = range.getModifiers();
670670
boolean isStatic = Modifier.isStatic(modifiers);
@@ -1128,7 +1128,7 @@ private int writeMethodLocation(DebugContext context, ClassEntry classEntry, Ran
11281128
*/
11291129
log(context, " [0x%08x] external true", pos);
11301130
pos = writeFlag(DW_FLAG_true, buffer, pos);
1131-
String methodKey = range.getFullMethodNameWithParamsAndReturnType();
1131+
String methodKey = range.getSymbolName();
11321132
int methodSpecOffset = getMethodDeclarationIndex(classEntry, methodKey);
11331133
log(context, " [0x%08x] specification 0x%x (%s)", pos, methodSpecOffset, methodKey);
11341134
pos = writeAttrRefAddr(methodSpecOffset, buffer, pos);

0 commit comments

Comments
 (0)