gdb: fix handling of bkpt instructions
This commit is contained in:
parent
87fa35ccfd
commit
cb4a23a2ba
@ -460,8 +460,8 @@ int GDB_SendStopReply(GDBContext *ctx, const DebugEventInfo *info)
|
||||
switch(exc.type)
|
||||
{
|
||||
case EXCEVENT_UNDEFINED_INSTRUCTION:
|
||||
case EXCEVENT_PREFETCH_ABORT: // doesn't include hardware breakpoints
|
||||
case EXCEVENT_DATA_ABORT: // doesn't include hardware watchpoints
|
||||
case EXCEVENT_PREFETCH_ABORT:
|
||||
case EXCEVENT_DATA_ABORT:
|
||||
case EXCEVENT_UNALIGNED_DATA_ACCESS:
|
||||
case EXCEVENT_UNDEFINED_SYSCALL:
|
||||
{
|
||||
@ -491,9 +491,11 @@ int GDB_SendStopReply(GDBContext *ctx, const DebugEventInfo *info)
|
||||
|
||||
case STOPPOINT_BREAKPOINT:
|
||||
{
|
||||
// /!\ Not actually implemented (and will never be)
|
||||
// Note: this includes both "bkpt" and hw breakpoints, but we never use the latter...
|
||||
// However, since our GDB executable only knows about svc 0xFF as sw breakpoint for the 3DS ABI,
|
||||
// we can use swbreak as reason (it'll dismiss the bkpt instruction and try to auto-step over it).
|
||||
GDB_ParseCommonThreadInfo(buffer, ctx, SIGTRAP);
|
||||
return GDB_SendFormattedPacket(ctx, "%shwbreak:;", buffer);
|
||||
return GDB_SendFormattedPacket(ctx, "%s", buffer);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user