mirror of https://github.com/mgba-emu/mgba.git
Core: Fix some linking issues when debuggers are disabled
This commit is contained in:
parent
253ca1d1b8
commit
3443c14169
|
@ -196,8 +196,10 @@ void* mCoreGetMemoryBlock(struct mCore* core, uint32_t start, size_t* size);
|
||||||
#ifdef USE_ELF
|
#ifdef USE_ELF
|
||||||
struct ELF;
|
struct ELF;
|
||||||
bool mCoreLoadELF(struct mCore* core, struct ELF* elf);
|
bool mCoreLoadELF(struct mCore* core, struct ELF* elf);
|
||||||
|
#ifdef USE_DEBUGGERS
|
||||||
void mCoreLoadELFSymbols(struct mDebuggerSymbols* symbols, struct ELF*);
|
void mCoreLoadELFSymbols(struct mDebuggerSymbols* symbols, struct ELF*);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
CXX_GUARD_END
|
CXX_GUARD_END
|
||||||
|
|
||||||
|
|
|
@ -344,6 +344,7 @@ bool mCoreLoadELF(struct mCore* core, struct ELF* elf) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_DEBUGGERS
|
||||||
void mCoreLoadELFSymbols(struct mDebuggerSymbols* symbols, struct ELF* elf) {
|
void mCoreLoadELFSymbols(struct mDebuggerSymbols* symbols, struct ELF* elf) {
|
||||||
size_t symIndex = ELFFindSection(elf, ".symtab");
|
size_t symIndex = ELFFindSection(elf, ".symtab");
|
||||||
size_t names = ELFFindSection(elf, ".strtab");
|
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);
|
mDebuggerSymbolAdd(symbols, name, syms[i].st_value, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -716,7 +716,9 @@ static void _GBACoreLoadSymbols(struct mCore* core, struct VFile* vf) {
|
||||||
}
|
}
|
||||||
struct ELF* elf = ELFOpen(vf);
|
struct ELF* elf = ELFOpen(vf);
|
||||||
if (elf) {
|
if (elf) {
|
||||||
|
#ifdef USE_DEBUGGERS
|
||||||
mCoreLoadELFSymbols(core->symbolTable, elf);
|
mCoreLoadELFSymbols(core->symbolTable, elf);
|
||||||
|
#endif
|
||||||
ELFClose(elf);
|
ELFClose(elf);
|
||||||
}
|
}
|
||||||
if (closeAfter) {
|
if (closeAfter) {
|
||||||
|
|
|
@ -83,10 +83,12 @@ bool mPythonScriptEngineLoadScript(struct mScriptEngine* se, const char* name, s
|
||||||
void mPythonScriptEngineRun(struct mScriptEngine* se) {
|
void mPythonScriptEngineRun(struct mScriptEngine* se) {
|
||||||
struct mPythonScriptEngine* engine = (struct mPythonScriptEngine*) se;
|
struct mPythonScriptEngine* engine = (struct mPythonScriptEngine*) se;
|
||||||
|
|
||||||
|
#ifdef USE_DEBUGGERS
|
||||||
struct mDebugger* debugger = mScriptBridgeGetDebugger(engine->sb);
|
struct mDebugger* debugger = mScriptBridgeGetDebugger(engine->sb);
|
||||||
if (debugger) {
|
if (debugger) {
|
||||||
mPythonSetDebugger(debugger);
|
mPythonSetDebugger(debugger);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
mPythonRunPending();
|
mPythonRunPending();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue