Core: Fix some linking issues when debuggers are disabled
Vicki Pfau vi@endrift.com
Fri, 09 Mar 2018 22:30:04 -0800
4 files changed,
8 insertions(+),
1 deletions(-)
M
include/mgba/core/core.h
→
include/mgba/core/core.h
@@ -196,7 +196,9 @@
#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
M
src/core/core.c
→
src/core/core.c
@@ -344,6 +344,7 @@ }
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 @@ }
mDebuggerSymbolAdd(symbols, name, syms[i].st_value, -1); } } - +#endif #endif
M
src/gba/core.c
→
src/gba/core.c
@@ -716,7 +716,9 @@ return;
} struct ELF* elf = ELFOpen(vf); if (elf) { +#ifdef USE_DEBUGGERS mCoreLoadELFSymbols(core->symbolTable, elf); +#endif ELFClose(elf); } if (closeAfter) {
M
src/platform/python/engine.c
→
src/platform/python/engine.c
@@ -83,10 +83,12 @@
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(); }