mirror of
https://github.com/libretro/mgba.git
synced 2024-11-25 00:50:15 +00:00
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
|
||||
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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user