Stack trace: fix release build failure

This commit is contained in:
Adam Higerd 2020-07-27 22:38:15 -05:00
parent fb267a32ff
commit bb1fd9e575
1 changed files with 12 additions and 12 deletions

View File

@ -142,18 +142,6 @@ static void _handleDeath(int sig) {
printf("No debugger attached!\n");
}
static bool CLIDebuggerCheckTraceMode(struct CLIDebugger* debugger, bool requireEnabled) {
struct mDebuggerPlatform* platform = debugger->d.platform;
if (!platform->getStackTraceMode) {
debugger->backend->printf(debugger->backend, "Stack tracing is not supported by this platform.\n");
return false;
} else if (requireEnabled && platform->getStackTraceMode(platform) == STACK_TRACE_DISABLED) {
debugger->backend->printf(debugger->backend, "Stack tracing is not enabled.\n");
return false;
}
return true;
}
static void _breakInto(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
UNUSED(debugger);
UNUSED(dv);
@ -172,6 +160,18 @@ static void _breakInto(struct CLIDebugger* debugger, struct CLIDebugVector* dv)
}
#endif
static bool CLIDebuggerCheckTraceMode(struct CLIDebugger* debugger, bool requireEnabled) {
struct mDebuggerPlatform* platform = debugger->d.platform;
if (!platform->getStackTraceMode) {
debugger->backend->printf(debugger->backend, "Stack tracing is not supported by this platform.\n");
return false;
} else if (requireEnabled && platform->getStackTraceMode(platform) == STACK_TRACE_DISABLED) {
debugger->backend->printf(debugger->backend, "Stack tracing is not enabled.\n");
return false;
}
return true;
}
static void _continue(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
UNUSED(dv);
debugger->d.state = debugger->traceRemaining != 0 ? DEBUGGER_CALLBACK : DEBUGGER_RUNNING;