all repos — mgba @ 3443c141692ccd12240b2f69b6d7b14083f8d149

mGBA Game Boy Advance Emulator

Core: Fix some linking issues when debuggers are disabled
Vicki Pfau vi@endrift.com
Fri, 09 Mar 2018 22:30:04 -0800
commit

3443c141692ccd12240b2f69b6d7b14083f8d149

parent

253ca1d1b806962487fcf892d5d03442f512f27d

4 files changed, 8 insertions(+), 1 deletions(-)

jump to
M include/mgba/core/core.hinclude/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.csrc/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.csrc/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.csrc/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(); }