mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 21:38:40 +00:00
frontend ui/editor & data funnelling for hardware data breakpoints
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
//- GENERATED CODE
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
RD_VocabInfo rd_vocab_info_table[307] =
|
||||
RD_VocabInfo rd_vocab_info_table[311] =
|
||||
{
|
||||
{str8_lit_comp("auto_view_rule"), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rule"), str8_lit_comp("Auto View Rules"), RD_IconKind_Binoculars},
|
||||
{str8_lit_comp("file_path_map"), str8_lit_comp("file_path_maps"), str8_lit_comp("File Path Map"), str8_lit_comp("File Path Maps"), RD_IconKind_FileOutline},
|
||||
@@ -99,6 +99,10 @@ RD_VocabInfo rd_vocab_info_table[307] =
|
||||
{str8_lit_comp("num_columns"), str8_lit_comp(""), str8_lit_comp("Number of Columns"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("bitmap"), str8_lit_comp("bitmaps"), str8_lit_comp("Bitmap"), str8_lit_comp("Bitmaps"), RD_IconKind_Bitmap},
|
||||
{str8_lit_comp("geo3d"), str8_lit_comp(""), str8_lit_comp("Geometry (3D)"), str8_lit_comp(""), RD_IconKind_Cube},
|
||||
{str8_lit_comp("address_range_size"), str8_lit_comp("address_range_sizes"), str8_lit_comp("Address Range Size"), str8_lit_comp("Address Range Sizes"), RD_IconKind_Null},
|
||||
{str8_lit_comp("break_on_read"), str8_lit_comp(""), str8_lit_comp("Break On Read"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("break_on_write"), str8_lit_comp(""), str8_lit_comp("Break On Write"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("break_on_execute"), str8_lit_comp(""), str8_lit_comp("Break On Execution"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("launch_and_run"), str8_lit_comp(""), str8_lit_comp("Launch and Run"), str8_lit_comp(""), RD_IconKind_Play},
|
||||
{str8_lit_comp("launch_and_step_into"), str8_lit_comp(""), str8_lit_comp("Launch and Step Into"), str8_lit_comp(""), RD_IconKind_PlayStepForward},
|
||||
{str8_lit_comp("kill"), str8_lit_comp(""), str8_lit_comp("Kill"), str8_lit_comp(""), RD_IconKind_X},
|
||||
@@ -323,7 +327,7 @@ RD_NameSchemaInfo rd_name_schema_info_table[16] =
|
||||
{str8_lit_comp("memory"), str8_lit_comp("x:\n{\n 'size': code_string,\n @default(16) 'num_columns': @range[1, 64] u64,\n}\n")},
|
||||
{str8_lit_comp("bitmap"), str8_lit_comp("x:\n{\n 'w': code_string,\n 'h': code_string,\n 'fmt': tex2dformat,\n}\n")},
|
||||
{str8_lit_comp("target"), str8_lit_comp("@commands(enable_cfg, launch_and_run, launch_and_step_into, remove_cfg)\n@collection_commands(add_target)\nx:\n{\n 'label': code_string,\n 'executable': path,\n 'arguments': string,\n 'working_directory': path,\n 'entry_point': code_string,\n 'stdout_path': path,\n 'stderr_path': path,\n 'stdin_path': path,\n 'environment': query,\n 'debug_subprocesses': bool,\n @no_expand @default(0) 'enabled': bool,\n}\n")},
|
||||
{str8_lit_comp("breakpoint"), str8_lit_comp("@commands(enable_cfg, remove_cfg)\n@collection_commands(toggle_breakpoint, add_breakpoint, add_address_breakpoint)\nx:\n{\n 'label': code_string,\n 'condition': code_string,\n 'source_location': path_pt,\n 'address_location': code_string,\n 'hit_count': u64,\n @no_expand @default(1) 'enabled': bool,\n}\n")},
|
||||
{str8_lit_comp("breakpoint"), str8_lit_comp("@commands(enable_cfg, remove_cfg)\n@collection_commands(toggle_breakpoint, add_breakpoint, add_address_breakpoint)\nx:\n{\n 'label': code_string,\n 'condition': code_string,\n 'source_location': path_pt,\n 'address_location': code_string,\n 'hit_count': u64,\n 'address_range_size': @or(1, 2, 4, 8) u64,\n 'break_on_write': bool,\n 'break_on_read': bool,\n 'break_on_execute': bool,\n @no_expand @default(1) 'enabled': bool,\n}\n")},
|
||||
{str8_lit_comp("watch_pin"), str8_lit_comp("@commands(remove_cfg)\n@collection_commands(add_watch_pin)\nx:\n{\n 'expression': code_string,\n 'view_rule': code_string,\n 'source_location': path_pt,\n 'address_location': code_string,\n}\n")},
|
||||
{str8_lit_comp("file_path_map"), str8_lit_comp("@collection_commands(add_file_path_map) @commands(remove_cfg) x:{'source':path, 'dest':path}")},
|
||||
{str8_lit_comp("auto_view_rule"), str8_lit_comp("@collection_commands(add_auto_view_rule) @commands(remove_cfg) x:{'type':code_string, 'view_rule':code_string}")},
|
||||
|
||||
@@ -644,7 +644,7 @@ RD_Query query;
|
||||
.os_event = rd_regs()->os_event,\
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
extern RD_VocabInfo rd_vocab_info_table[307];
|
||||
extern RD_VocabInfo rd_vocab_info_table[311];
|
||||
extern RD_NameSchemaInfo rd_name_schema_info_table[16];
|
||||
extern Rng1U64 rd_reg_slot_range_table[42];
|
||||
extern String8 rd_binding_version_remap_old_name_table[8];
|
||||
|
||||
@@ -112,6 +112,10 @@ RD_VocabTable:
|
||||
{num_columns "" "Number of Columns" "" Null }
|
||||
{bitmap _ "Bitmap" _ Bitmap }
|
||||
{geo3d "" "Geometry (3D)" "" Cube }
|
||||
{address_range_size _ "Address Range Size" _ Null }
|
||||
{break_on_read "" "Break On Read" "" Null }
|
||||
{break_on_write "" "Break On Write" "" Null }
|
||||
{break_on_execute "" "Break On Execution" "" Null }
|
||||
}
|
||||
|
||||
@struct RD_VocabInfo:
|
||||
@@ -249,6 +253,10 @@ RD_VocabTable:
|
||||
'source_location': path_pt,
|
||||
'address_location': code_string,
|
||||
'hit_count': u64,
|
||||
'address_range_size': @or(1, 2, 4, 8) u64,
|
||||
'break_on_write': bool,
|
||||
'break_on_read': bool,
|
||||
'break_on_execute': bool,
|
||||
@no_expand @default(1) 'enabled': bool,
|
||||
}
|
||||
```,
|
||||
|
||||
@@ -15778,8 +15778,24 @@ Z(getting_started)
|
||||
continue;
|
||||
}
|
||||
|
||||
//- rjf: compute breakpoint flags
|
||||
D_BreakpointFlags flags = 0;
|
||||
if(str8_match(rd_cfg_child_from_string(src_bp, str8_lit("break_on_write"))->first->string, str8_lit("1"), 0))
|
||||
{
|
||||
flags |= D_BreakpointFlag_BreakOnWrite;
|
||||
}
|
||||
if(str8_match(rd_cfg_child_from_string(src_bp, str8_lit("break_on_read"))->first->string, str8_lit("1"), 0))
|
||||
{
|
||||
flags |= D_BreakpointFlag_BreakOnRead;
|
||||
}
|
||||
if(str8_match(rd_cfg_child_from_string(src_bp, str8_lit("break_on_execute"))->first->string, str8_lit("1"), 0))
|
||||
{
|
||||
flags |= D_BreakpointFlag_BreakOnExecute;
|
||||
}
|
||||
|
||||
//- rjf: fill breakpoint
|
||||
D_Breakpoint *dst_bp = &breakpoints.v[idx];
|
||||
dst_bp->flags = flags;
|
||||
dst_bp->file_path = src_bp_loc.file_path;
|
||||
dst_bp->pt = src_bp_loc.pt;
|
||||
dst_bp->vaddr_expr = src_bp_loc.expr;
|
||||
|
||||
Reference in New Issue
Block a user