diff --git a/include/mgba/core/core.h b/include/mgba/core/core.h index 59d9e429a..607a15a4e 100644 --- a/include/mgba/core/core.h +++ b/include/mgba/core/core.h @@ -196,8 +196,10 @@ void* mCoreGetMemoryBlock(struct mCore* core, uint32_t start, size_t* size); #ifdef USE_ELF struct ELF; bool mCoreLoadELF(struct mCore* core, struct ELF* elf); +#ifdef USE_DEBUGGERS void mCoreLoadELFSymbols(struct mDebuggerSymbols* symbols, struct ELF*); #endif +#endif CXX_GUARD_END diff --git a/src/core/core.c b/src/core/core.c index 39dbec636..343e11ce8 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -344,6 +344,7 @@ bool mCoreLoadELF(struct mCore* core, struct ELF* elf) { return true; } +#ifdef USE_DEBUGGERS void mCoreLoadELFSymbols(struct mDebuggerSymbols* symbols, struct ELF* elf) { size_t symIndex = ELFFindSection(elf, ".symtab"); size_t names = ELFFindSection(elf, ".strtab"); @@ -363,5 +364,5 @@ void mCoreLoadELFSymbols(struct mDebuggerSymbols* symbols, struct ELF* elf) { mDebuggerSymbolAdd(symbols, name, syms[i].st_value, -1); } } - +#endif #endif diff --git a/src/gba/core.c b/src/gba/core.c index 8c307ceff..0abd5ec6e 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -716,7 +716,9 @@ static void _GBACoreLoadSymbols(struct mCore* core, struct VFile* vf) { } struct ELF* elf = ELFOpen(vf); if (elf) { +#ifdef USE_DEBUGGERS mCoreLoadELFSymbols(core->symbolTable, elf); +#endif ELFClose(elf); } if (closeAfter) { diff --git a/src/platform/python/engine.c b/src/platform/python/engine.c index 6222039a0..e6b2c0cf6 100644 --- a/src/platform/python/engine.c +++ b/src/platform/python/engine.c @@ -83,10 +83,12 @@ bool mPythonScriptEngineLoadScript(struct mScriptEngine* se, const char* name, s void mPythonScriptEngineRun(struct mScriptEngine* se) { struct mPythonScriptEngine* engine = (struct mPythonScriptEngine*) se; +#ifdef USE_DEBUGGERS struct mDebugger* debugger = mScriptBridgeGetDebugger(engine->sb); if (debugger) { mPythonSetDebugger(debugger); } +#endif mPythonRunPending(); }