frontend ui/editor & data funnelling for hardware data breakpoints

This commit is contained in:
Ryan Fleury
2025-04-11 17:03:36 -07:00
parent 64187e75eb
commit e621d13669
8 changed files with 59 additions and 3 deletions
+2
View File
@@ -385,6 +385,7 @@ ctrl_serialized_string_from_msg_list(Arena *arena, CTRL_MsgList *msgs)
{
CTRL_UserBreakpoint *bp = &n->v;
str8_serial_push_struct(scratch.arena, &msgs_srlzed, &bp->kind);
str8_serial_push_struct(scratch.arena, &msgs_srlzed, &bp->flags);
str8_serial_push_struct(scratch.arena, &msgs_srlzed, &bp->string.size);
str8_serial_push_data(scratch.arena, &msgs_srlzed, bp->string.str, bp->string.size);
str8_serial_push_struct(scratch.arena, &msgs_srlzed, &bp->pt);
@@ -506,6 +507,7 @@ ctrl_msg_list_from_serialized_string(Arena *arena, String8 string)
msg->user_bps.count += 1;
CTRL_UserBreakpoint *bp = &n->v;
read_off += str8_deserial_read_struct(string, read_off, &bp->kind);
read_off += str8_deserial_read_struct(string, read_off, &bp->flags);
read_off += str8_deserial_read_struct(string, read_off, &bp->string.size);
bp->string.str = push_array_no_zero(arena, U8, bp->string.size);
read_off += str8_deserial_read(string, read_off, bp->string.str, bp->string.size, 1);
+9
View File
@@ -259,6 +259,14 @@ struct CTRL_Spoof
////////////////////////////////
//~ rjf: User Breakpoint Types
typedef U32 CTRL_UserBreakpointFlags;
enum
{
CTRL_UserBreakpointFlag_BreakOnWrite = (1<<0),
CTRL_UserBreakpointFlag_BreakOnRead = (1<<1),
CTRL_UserBreakpointFlag_BreakOnExecute = (1<<2),
};
typedef enum CTRL_UserBreakpointKind
{
CTRL_UserBreakpointKind_Null,
@@ -272,6 +280,7 @@ typedef struct CTRL_UserBreakpoint CTRL_UserBreakpoint;
struct CTRL_UserBreakpoint
{
CTRL_UserBreakpointKind kind;
CTRL_UserBreakpointFlags flags;
String8 string;
TxtPt pt;
U64 u64;