thermosphere: some gdb/debug refactor
This commit is contained in:
@@ -7,11 +7,32 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "gdb.h"
|
||||
#include "../gdb.h"
|
||||
#include "../core_ctx.h"
|
||||
|
||||
typedef enum DebugEventType {
|
||||
DBGEVENT_DEBUGGER_BREAK = 0,
|
||||
DBGEVENT_EXCEPTION,
|
||||
DBGEVENT_CORE_ON,
|
||||
DBGEVENT_CORE_OFF,
|
||||
DBGEVENT_EXIT,
|
||||
DBGEVENT_OUTPUT_STRING,
|
||||
} DebugEventType;
|
||||
|
||||
typedef struct OutputStringDebugEventInfo {
|
||||
uintptr_t address;
|
||||
size_t size;
|
||||
} OutputStringDebugEventInfo;
|
||||
|
||||
typedef struct DebugEventInfo {
|
||||
DebugEventType type;
|
||||
u32 coreId;
|
||||
ExceptionStackFrame *frame;
|
||||
union {
|
||||
OutputStringDebugEventInfo outputString;
|
||||
};
|
||||
} DebugEventInfo;
|
||||
|
||||
GDB_DECLARE_VERBOSE_HANDLER(Run);
|
||||
GDB_DECLARE_HANDLER(Restart);
|
||||
GDB_DECLARE_VERBOSE_HANDLER(Attach);
|
||||
GDB_DECLARE_HANDLER(Detach);
|
||||
GDB_DECLARE_HANDLER(Kill);
|
||||
GDB_DECLARE_HANDLER(Break);
|
||||
@@ -20,7 +41,6 @@ GDB_DECLARE_VERBOSE_HANDLER(Continue);
|
||||
GDB_DECLARE_HANDLER(GetStopReason);
|
||||
|
||||
void GDB_ContinueExecution(GDBContext *ctx);
|
||||
void GDB_PreprocessDebugEvent(GDBContext *ctx, DebugEventInfo *info);
|
||||
int GDB_SendStopReply(GDBContext *ctx, const DebugEventInfo *info);
|
||||
int GDB_HandleDebugEvents(GDBContext *ctx);
|
||||
void GDB_BreakProcessAndSinkDebugEvents(GDBContext *ctx, DebugFlags flags);
|
||||
|
||||
Reference in New Issue
Block a user