Core: Only attempt to open symbol file if basedir exists

This commit is contained in:
Vicki Pfau 2023-05-27 10:53:13 -07:00
parent a7d63cde54
commit 4b7223c3ff
2 changed files with 3 additions and 3 deletions

View File

@ -1084,7 +1084,7 @@ static void _GBCoreDetachDebugger(struct mCore* core) {
static void _GBCoreLoadSymbols(struct mCore* core, struct VFile* vf) {
core->symbolTable = mDebuggerSymbolTableCreate();
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
if (!vf) {
if (!vf && core->dirs.base) {
vf = mDirectorySetOpenSuffix(&core->dirs, core->dirs.base, ".sym", O_RDONLY);
}
#endif

View File

@ -1149,12 +1149,12 @@ static void _GBACoreLoadSymbols(struct mCore* core, struct VFile* vf) {
core->symbolTable = mDebuggerSymbolTableCreate();
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
#ifdef USE_ELF
if (!vf) {
if (!vf && core->dirs.base) {
closeAfter = true;
vf = mDirectorySetOpenSuffix(&core->dirs, core->dirs.base, ".elf", O_RDONLY);
}
#endif
if (!vf) {
if (!vf && core->dirs.base) {
closeAfter = true;
vf = mDirectorySetOpenSuffix(&core->dirs, core->dirs.base, ".sym", O_RDONLY);
}