mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-18 04:00:12 -08:00
update memory range parameter extraction in visualizers, to be based on cfg tree
This commit is contained in:
1 parent
630394750e
commit
f7757cd163
4 files changed
+42
-16
No files matched your search
@@ -403,7 +403,7 @@ RD_NameSchemaInfo rd_name_schema_info_table[23] =
|
||||
{str8_lit_comp("project"), str8_lit_comp("x:\n{\n @default(2) @display_name('Project Tab Width') 'tab_width': @range[1, 32] u64,\n @default(1) @display_name(\"Break On Win32 Control-C Exceptions\") @description(\"Code: 0x40010005\")\n win32_ctrl_c: bool;\n @default(1) @display_name(\"Break On Win32 Control-Break Exceptions\") @description(\"Code: 0x40010008\")\n win32_ctrl_break: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Originate Error Exceptions\") @description(\"Code: 0x40080201\")\n win32_win_rt_originate_error: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Transform Error Exceptions\") @description(\"Code: 0x40080202\")\n win32_win_rt_transform_error: bool;\n @default(0) @display_name(\"Break On Win32 RPC Call Cancelled Exceptions\") @description(\"Code: 0x0000071a\")\n win32_rpc_call_cancelled: bool;\n @default(0) @display_name(\"Break On Win32 Data Type Misalignment Exceptions\") @description(\"Code: 0x80000002\")\n win32_datatype_misalignment: bool;\n @default(1) @display_name(\"Break On Win32 Access Violation Exceptions\") @description(\"Code: 0xc0000005\")\n win32_access_violation: bool;\n @default(0) @display_name(\"Break On Win32 In Page Error Exceptions\") @description(\"Code: 0xc0000006\")\n win32_in_page_error: bool;\n @default(1) @display_name(\"Break On Win32 Invalid Handle Specified Exceptions\") @description(\"Code: 0xc0000008\")\n win32_invalid_handle: bool;\n @default(0) @display_name(\"Break On Win32 Not Enough Quota Exceptions\") @description(\"Code: 0xc0000017\")\n win32_not_enough_quota: bool;\n @default(0) @display_name(\"Break On Win32 Illegal Instruction Exceptions\") @description(\"Code: 0xc000001d\")\n win32_illegal_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Cannot Continue From Exception Exceptions\") @description(\"Code: 0xc0000025\")\n win32_cannot_continue_exception: bool;\n @default(0) @display_name(\"Break On Win32 Invalid Exception Disposition Returned By Handler Exceptions\") @description(\"Code: 0xc0000026\")\n win32_invalid_exception_disposition: bool;\n @default(0) @display_name(\"Break On Win32 Array Bounds Exceeded Exceptions\") @description(\"Code: 0xc000008c\")\n win32_array_bounds_exceeded: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Denormal Operand Exceptions\") @description(\"Code: 0xc000008d\")\n win32_floating_point_denormal_operand: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Division By Zero Exceptions\") @description(\"Code: 0xc000008e\")\n win32_floating_point_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Inexact Result Exceptions\") @description(\"Code: 0xc000008f\")\n win32_floating_point_inexact_result: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Invalid Operation Exceptions\") @description(\"Code: 0xc0000090\")\n win32_floating_point_invalid_operation: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Overflow Exceptions\") @description(\"Code: 0xc0000091\")\n win32_floating_point_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Stack Check Exceptions\") @description(\"Code: 0xc0000092\")\n win32_floating_point_stack_check: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Underflow Exceptions\") @description(\"Code: 0xc0000093\")\n win32_floating_point_underflow: bool;\n @default(0) @display_name(\"Break On Win32 Integer Division By Zero Exceptions\") @description(\"Code: 0xc0000094\")\n win32_integer_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Integer Overflow Exceptions\") @description(\"Code: 0xc0000095\")\n win32_integer_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Privileged Instruction Exceptions\") @description(\"Code: 0xc0000096\")\n win32_privileged_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Stack Overflow Exceptions\") @description(\"Code: 0xc00000fd\")\n win32_stack_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Unable To Locate DLL Exceptions\") @description(\"Code: 0xc0000135\")\n win32_unable_to_locate_dll: bool;\n @default(0) @display_name(\"Break On Win32 Ordinal Not Found Exceptions\") @description(\"Code: 0xc0000138\")\n win32_ordinal_not_found: bool;\n @default(0) @display_name(\"Break On Win32 Entry Point Not Found Exceptions\") @description(\"Code: 0xc0000139\")\n win32_entry_point_not_found: bool;\n @default(0) @display_name(\"Break On Win32 DLL Initialization Failed Exceptions\") @description(\"Code: 0xc0000142\")\n win32_dll_initialization_failed: bool;\n @default(0) @display_name(\"Break On Win32 Floating Point SSE Multiple Faults Exceptions\") @description(\"Code: 0xc00002b4\")\n win32_floating_point_sse_multiple_faults: bool;\n @default(0) @display_name(\"Break On Win32 Floating Point SSE Multiple Traps Exceptions\") @description(\"Code: 0xc00002b5\")\n win32_floating_point_sse_Line truncated
|
||||
{str8_lit_comp("theme_color"), str8_lit_comp("@collection_commands(add_theme_color, fork_loaded_theme_colors, save_theme_colors)\n@row_commands(remove_cfg)\nx:\n{\n @display_name('Tags') tags: string,\n @display_name('Value') value: @color @hex u32,\n}\n")},
|
||||
{str8_lit_comp("window"), str8_lit_comp("x:\n{\n //- rjf: text rasterization settings\n @default(1) @display_name('Smooth UI Text') @description(\"Controls whether or not UI text is fully anti-aliased, for a smoother appearance.\")\n 'smooth_ui_text': bool,\n @default(1) @display_name('Hint UI Text') @description(\"Controls whether or not UI text is hinted, for better text readability at small sizes.\")\n 'hint_ui_text': bool,\n @default(0) @display_name('Smooth Code Text') @description(\"Controls whether or not code text is fully anti-aliased, for a smoother appearance.\")\n 'smooth_code_text': bool,\n @default(1) @display_name('Hint Code Text') @description(\"Controls whether or not code text is hinted, for better text readability at small sizes.\")\n 'hint_code_text': bool,\n @default(11) @display_name('Window Font Size') @description(\"Controls the window's default font size. Does not apply to tabs with their own font size set.\")\n 'font_size': @range[6, 72] u64,\n\n //- rjf: size settings\n @default(3.f) @display_name('Window Row Height') @description(\"Controls the window's default row height, in multiples of the font size. Does not apply to tabs with their own row height set.\")\n 'row_height': @range[1.75f, 5.f] f32,\n @default(3.f) @description(\"Controls the height of tabs, in multiples of the font size.\")\n 'tab_height': @range[1.75f, 5.f] f32,\n}\n")},
|
||||
{str8_lit_comp("tab"), str8_lit_comp("@expand_commands(duplicate_tab, close_tab)\nx:\n{\n @default(11) @display_name('Tab Font Size') @description(\"Controls the tab's font size.\")\n 'font_size': @range[6, 72] u64,\n}\n")},
|
||||
{str8_lit_comp("tab"), str8_lit_comp("@row_commands(duplicate_tab, close_tab)\nx:\n{\n @default(11) @display_name('Tab Font Size') @description(\"Controls the tab's font size.\")\n 'font_size': @range[6, 72] u64,\n}\n")},
|
||||
{str8_lit_comp("watch"), str8_lit_comp("@inherit(tab) x:\n{\n @default(3.f) @display_name('Tab Row Height') @description(\"Controls the tab's row height, in multiples of the font size.\")\n 'row_height': @range[1.75f, 5.f] f32,\n 'label': code_string,\n @description(\"The root expression which is evaluated to produce the watch window.\")\n 'expression': code_string,\n @no_expand 'watches': query,\n}\n")},
|
||||
{str8_lit_comp("text"), str8_lit_comp("@inherit(tab) x:\n{\n @description(\"An expression to describe data which should be viewed as text or code.\")\n 'expression': code_string,\n @description(\"The language that the text should be interpreted as being within. Used for syntax highlighting and other parsing features.\")\n 'lang': code_string,\n @default(1) @description(\"Controls whether or not line numbers are shown.\")\n 'show_line_numbers':bool,\n @default(0) @display_name('Transient') @description(\"Controls whether or not this tab will be automatically replaced by the debugger when it snaps to new source code locations.\")\n 'auto': bool,\n}\n")},
|
||||
{str8_lit_comp("disasm"), str8_lit_comp("@inherit(tab) x:\n{\n @description(\"An expression to describe the base address or offset of the disassembly.\")\n 'expression': code_string,\n 'arch': code_string,\n 'syntax': code_string,\n 'size': code_string,\n @default(1) @description(\"Controls whether or not addresses are shown in the disassembly text.\")\n 'show_addresses': bool,\n @default(0) @description(\"Controls whether or not code bytes are shown in the disassembly text.\")\n 'show_code_bytes': bool,\n @default(1) @description(\"Controls whether or not source lines, corresponding to disassembly instruction ranges, are shown in the disassembly text.\")\n 'show_source_lines': bool,\n @default(1) @description(\"Controls whether or not disassembly text is decorated with symbol names.\")\n 'show_symbol_names': bool,\n @default(1) @description(\"Controls whether or not line numbers are shown.\")\n 'show_line_numbers': bool,\n}\n")},
|
||||
|
||||
@@ -409,7 +409,7 @@ RD_VocabTable:
|
||||
{
|
||||
tab,
|
||||
```
|
||||
@expand_commands(duplicate_tab, close_tab)
|
||||
@row_commands(duplicate_tab, close_tab)
|
||||
x:
|
||||
{
|
||||
@default(11) @display_name('Tab Font Size') @description("Controls the tab's font size.")
|
||||
|
||||
+15
-12
@@ -13337,24 +13337,27 @@ rd_frame(void)
|
||||
RD_Cfg *tab = rd_cfg_from_id(rd_regs()->tab);
|
||||
RD_PanelTree panel_tree = rd_panel_tree_from_cfg(scratch.arena, tab);
|
||||
RD_PanelNode *panel = rd_panel_node_from_tree_cfg(panel_tree.root, tab->parent);
|
||||
B32 found_selected = 0;
|
||||
RD_Cfg *next_selected_tab = &rd_nil_cfg;
|
||||
for(RD_CfgNode *n = panel->tabs.first; n != 0; n = n->next)
|
||||
if(panel->selected_tab == tab)
|
||||
{
|
||||
if(n->v == panel->selected_tab)
|
||||
B32 found_selected = 0;
|
||||
RD_Cfg *next_selected_tab = &rd_nil_cfg;
|
||||
for(RD_CfgNode *n = panel->tabs.first; n != 0; n = n->next)
|
||||
{
|
||||
found_selected = 1;
|
||||
}
|
||||
else if(!rd_cfg_is_project_filtered(n->v))
|
||||
{
|
||||
next_selected_tab = n->v;
|
||||
if(found_selected)
|
||||
if(n->v == panel->selected_tab)
|
||||
{
|
||||
break;
|
||||
found_selected = 1;
|
||||
}
|
||||
else if(!rd_cfg_is_project_filtered(n->v))
|
||||
{
|
||||
next_selected_tab = n->v;
|
||||
if(found_selected)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
rd_cmd(RD_CmdKind_FocusTab, .tab = next_selected_tab->id);
|
||||
}
|
||||
rd_cmd(RD_CmdKind_FocusTab, .tab = next_selected_tab->id);
|
||||
rd_cfg_release(tab);
|
||||
}break;
|
||||
case RD_CmdKind_MoveView:
|
||||
|
||||
@@ -1906,7 +1906,13 @@ RD_VIEW_UI_FUNCTION_DEF(text)
|
||||
if(rd_regs()->cursor.column == 0) { rd_regs()->cursor.column = 1; }
|
||||
if(rd_regs()->mark.line == 0) { rd_regs()->mark.line = 1; }
|
||||
if(rd_regs()->mark.column == 0) { rd_regs()->mark.column = 1; }
|
||||
Rng1U64 range = e_range_from_eval(eval);
|
||||
U64 base_offset = e_base_offset_from_eval(eval);
|
||||
U64 size = rd_view_cfg_value_from_string(str8_lit("size")).u64;
|
||||
if(size == 0)
|
||||
{
|
||||
size = e_type_byte_size_from_key(e_type_key_unwrap(eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative));
|
||||
}
|
||||
Rng1U64 range = r1u64(base_offset, base_offset+size);
|
||||
rd_regs()->text_key = rd_key_from_eval_space_range(eval.space, range, 1);
|
||||
String8 lang = rd_view_cfg_from_string(str8_lit("lang"))->first->string;
|
||||
if(lang.size == 0)
|
||||
@@ -2174,7 +2180,13 @@ RD_VIEW_UI_FUNCTION_DEF(disasm)
|
||||
{
|
||||
space = auto_space;
|
||||
}
|
||||
Rng1U64 range = e_range_from_eval(eval);
|
||||
U64 base_offset = e_base_offset_from_eval(eval);
|
||||
U64 size = rd_view_cfg_value_from_string(str8_lit("size")).u64;
|
||||
if(size == 0)
|
||||
{
|
||||
size = KB(16);
|
||||
}
|
||||
Rng1U64 range = r1u64(base_offset, base_offset+size);
|
||||
Arch arch = rd_arch_from_eval(eval);
|
||||
CTRL_Entity *space_entity = rd_ctrl_entity_from_eval_space(space);
|
||||
CTRL_Entity *dasm_module = &ctrl_entity_nil;
|
||||
@@ -2211,6 +2223,10 @@ RD_VIEW_UI_FUNCTION_DEF(disasm)
|
||||
{
|
||||
style_flags |= DASM_StyleFlag_SymbolNames;
|
||||
}
|
||||
if(str8_match(rd_setting_from_name(str8_lit("syntax")), str8_lit("att"), 0))
|
||||
{
|
||||
syntax = DASM_Syntax_ATT;
|
||||
}
|
||||
}
|
||||
U128 dasm_key = rd_key_from_eval_space_range(space, range, 0);
|
||||
U128 dasm_data_hash = {0};
|
||||
@@ -2343,6 +2359,13 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
|
||||
//- rjf: unpack parameterization info
|
||||
//
|
||||
Rng1U64 space_range = e_range_from_eval(eval);
|
||||
U64 base_offset = e_base_offset_from_eval(eval);
|
||||
U64 size = rd_view_cfg_value_from_string(str8_lit("size")).u64;
|
||||
if(size == 0)
|
||||
{
|
||||
size = e_type_byte_size_from_key(e_type_key_unwrap(eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative));
|
||||
}
|
||||
space_range = r1u64(base_offset, base_offset+size);
|
||||
if(eval.space.kind == 0)
|
||||
{
|
||||
eval.space = rd_eval_space_from_ctrl_entity(ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->process), RD_EvalSpaceKind_CtrlEntity);
|
||||
|
||||
Reference in new issue
Block a user