thermosphere: actually report the debug events

This commit is contained in:
TuxSH 2020-01-31 23:54:42 +00:00
parent 6499d36722
commit 46954a5359
3 changed files with 8 additions and 5 deletions

View file

@ -169,7 +169,12 @@ void handleLowerElSyncException(ExceptionStackFrame *frame)
case Exception_SoftwareStepLowerEl: case Exception_SoftwareStepLowerEl:
handleSingleStep(frame, esr); handleSingleStep(frame, esr);
break; break;
case Exception_BreakpointLowerEl:
case Exception_WatchpointLowerEl:
case Exception_SoftwareBreakpointA64:
case Exception_SoftwareBreakpointA32:
debugManagerReportEvent(DBGEVENT_EXCEPTION);
break;
default: default:
DEBUG("Lower EL sync exception, EC = 0x%02llx IL=%llu ISS=0x%06llx\n", (u64)esr.ec, esr.il, esr.iss); DEBUG("Lower EL sync exception, EC = 0x%02llx IL=%llu ISS=0x%06llx\n", (u64)esr.ec, esr.il, esr.iss);
dumpStackFrame(frame, false); dumpStackFrame(frame, false);

View file

@ -88,8 +88,6 @@ static int GDB_ProcessPacket(GDBContext *ctx, size_t len)
{ {
int ret; int ret;
u32 oldFlags = ctx->flags;
ENSURE(ctx->state != GDB_STATE_DISCONNECTED); ENSURE(ctx->state != GDB_STATE_DISCONNECTED);
// Handle the packet... // Handle the packet...

View file

@ -17,7 +17,7 @@
#include "single_step.h" #include "single_step.h"
#include "core_ctx.h" #include "core_ctx.h"
#include "sysreg.h" #include "sysreg.h"
#include "debug_log.h" #include "debug_manager.h"
SingleStepState singleStepGetNextState(ExceptionStackFrame *frame) SingleStepState singleStepGetNextState(ExceptionStackFrame *frame)
{ {
@ -71,7 +71,7 @@ void handleSingleStep(ExceptionStackFrame *frame, ExceptionSyndromeRegister esr)
} else { } else {
// Disable single-step // Disable single-step
singleStepSetNextState(frame, SingleStepState_Inactive); singleStepSetNextState(frame, SingleStepState_Inactive);
// TODO report exception to gdb debugManagerReportEvent(DBGEVENT_EXCEPTION);
} }
DEBUG("Single-step exeception ELR = 0x%016llx, ISV = %u, EX = %u\n", frame->elr_el2, (esr.iss >> 24) & 1, (esr.iss >> 6) & 1); DEBUG("Single-step exeception ELR = 0x%016llx, ISV = %u, EX = %u\n", frame->elr_el2, (esr.iss >> 24) & 1, (esr.iss >> 6) & 1);