Skip to content
This repository was archived by the owner on Oct 1, 2023. It is now read-only.

Commit bac3d9d

Browse files
author
astrelsky
committed
Prevent error for compiler specs without __stdcall
1 parent 6cca357 commit bac3d9d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/main/java/ghidra/app/plugin/prototype/GccRttiAnalyzer.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,15 @@ private void findAndCreatePureVirtualFunction() throws Exception {
216216
if (pureVirtual == null) {
217217
return;
218218
}
219-
String cc = GenericCallingConvention.stdcall.getDeclarationName();
220219
pureVirtual.setName(PURE_VIRTUAL_FUNCTION_NAME, SourceType.IMPORTED);
221220
pureVirtual.setNoReturn(true);
222221
pureVirtual.setReturnType(VoidDataType.dataType, SourceType.IMPORTED);
223-
pureVirtual.setCallingConvention(cc);
222+
try {
223+
String cc = GenericCallingConvention.stdcall.getDeclarationName();
224+
pureVirtual.setCallingConvention(cc);
225+
} catch (Exception e) {
226+
// compiler spec doesn't have __stdcall
227+
}
224228
}
225229

226230
private void createVtable(GnuVtable vtable) throws Exception {

0 commit comments

Comments
 (0)