From 7d8b02928214a6f3abf7a79adc11a2eb215eaec7 Mon Sep 17 00:00:00 2001 From: Adam Higerd Date: Fri, 12 Jul 2024 19:15:45 -0500 Subject: [PATCH] Don't try to load non-.sym files as ARMIPS symbols --- src/gba/core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gba/core.c b/src/gba/core.c index 8569ea3da..08d20f3e7 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -1130,8 +1130,12 @@ static void _GBACoreLoadSymbols(struct mCore* core, struct VFile* vf) { } #endif if (!vf && core->dirs.base) { - closeAfter = true; vf = mDirectorySetOpenSuffix(&core->dirs, core->dirs.base, ".sym", O_RDONLY); + if (vf) { + mDebuggerLoadARMIPSSymbols(core->symbolTable, vf); + vf->close(vf); + return; + } } #endif if (!vf && gba->mbVf) { @@ -1156,11 +1160,8 @@ static void _GBACoreLoadSymbols(struct mCore* core, struct VFile* vf) { mCoreLoadELFSymbols(core->symbolTable, elf); #endif ELFClose(elf); - } else -#endif - { - mDebuggerLoadARMIPSSymbols(core->symbolTable, vf); } +#endif if (closeAfter) { vf->close(vf); } else {