further elimination of entity-based code; more simplification/moving to cfg; begin sketching out expanded eval-viz block tree, such that each block can have its own table topology (will be useful to collapse/simplify/expand the capabilities of watch views)

This commit is contained in:
Ryan Fleury
2025-01-22 09:22:06 -08:00
parent 84fd1e9d3f
commit 16a717d684
10 changed files with 327 additions and 2432 deletions
@@ -667,11 +667,31 @@ ev_resolved_from_expr(Arena *arena, E_Expr *expr, EV_ViewRuleList *view_rules)
return expr;
}
////////////////////////////////
//~ rjf: Column List Building
internal EV_Col *
ev_col_list_push(Arena *arena, EV_ColList *list)
{
EV_Col *col = push_array(arena, EV_Col, 1);
SLLQueuePush(list->first, list->last, col);
list->count += 1;
return col;
}
internal EV_Col *
ev_col_list_push_new(Arena *arena, EV_ColList *list, String8 key)
{
EV_Col *col = ev_col_list_push(arena, list);
col->key = push_str8_copy(arena, key);
return col;
}
////////////////////////////////
//~ rjf: Block Building
internal EV_BlockTree
ev_block_tree_from_expr(Arena *arena, EV_View *view, String8 filter, String8 string, E_Expr *expr, EV_ViewRuleList *view_rules)
ev_block_tree_from_expr(Arena *arena, EV_View *view, String8 filter, String8 string, E_Expr *expr, EV_ViewRuleList *view_rules, EV_ColList *cols)
{
ProfBeginFunction();
EV_BlockTree tree = {&ev_nil_block};
@@ -691,6 +711,7 @@ ev_block_tree_from_expr(Arena *arena, EV_View *view, String8 filter, String8 str
tree.root = push_array(arena, EV_Block, 1);
MemoryCopyStruct(tree.root, &ev_nil_block);
tree.root->key = ev_key_root();
tree.root->cols = *cols;
tree.root->string = string;
tree.root->expr = ev_resolved_from_expr(arena, expr, top_level_view_rules);
tree.root->view_rules = top_level_view_rules;
@@ -758,6 +779,7 @@ ev_block_tree_from_expr(Arena *arena, EV_View *view, String8 filter, String8 str
expansion_block->parent = t->parent_block;
expansion_block->key = key;
expansion_block->split_relative_idx = t->split_relative_idx;
expansion_block->cols = *cols;
expansion_block->expr = t->expr;
expansion_block->view_rules = t->view_rules;
expansion_block->expand_view_rule_info = expand_view_rule_info;
@@ -885,7 +907,7 @@ ev_block_tree_from_expr(Arena *arena, EV_View *view, String8 filter, String8 str
}
internal EV_BlockTree
ev_block_tree_from_string(Arena *arena, EV_View *view, String8 filter, String8 string, EV_ViewRuleList *view_rules)
ev_block_tree_from_string(Arena *arena, EV_View *view, String8 filter, String8 string, EV_ViewRuleList *view_rules, EV_ColList *cols)
{
ProfBeginFunction();
EV_BlockTree tree = {0};
@@ -896,7 +918,7 @@ ev_block_tree_from_string(Arena *arena, EV_View *view, String8 filter, String8 s
EV_ViewRuleList *fastpath_view_rules = ev_view_rule_list_from_expr_fastpaths(arena, string);
EV_ViewRuleList *all_view_rules = ev_view_rule_list_copy(arena, view_rules);
ev_view_rule_list_concat_in_place(all_view_rules, &fastpath_view_rules);
tree = ev_block_tree_from_expr(arena, view, filter, string, parse.expr, all_view_rules);
tree = ev_block_tree_from_expr(arena, view, filter, string, parse.expr, all_view_rules, cols);
}
scratch_end(scratch);
ProfEnd();
@@ -187,6 +187,24 @@ struct EV_ViewRuleInfoTable
U64 slots_count;
};
////////////////////////////////
//~ rjf: Columns
typedef struct EV_Col EV_Col;
struct EV_Col
{
EV_Col *next;
String8 key;
};
typedef struct EV_ColList EV_ColList;
struct EV_ColList
{
EV_Col *first;
EV_Col *last;
U64 count;
};
////////////////////////////////
//~ rjf: Blocks
@@ -206,6 +224,9 @@ struct EV_Block
// rjf: split index, relative to parent's space
U64 split_relative_idx;
// rjf: columns
EV_ColList cols;
// rjf: expression / visualization info
String8 string;
E_Expr *expr;
@@ -351,7 +372,7 @@ global read_only EV_ViewRuleInfo ev_nil_view_rule_info =
thread_static EV_ViewRuleInfoTable *ev_view_rule_info_table = 0;
global read_only EV_ViewRuleList ev_nil_view_rule_list = {0};
thread_static EV_AutoViewRuleTable *ev_auto_view_rule_table = 0;
global read_only EV_Block ev_nil_block = {&ev_nil_block, &ev_nil_block, &ev_nil_block, &ev_nil_block, &ev_nil_block, {0}, 0, {0}, &e_expr_nil, &ev_nil_view_rule_list, &ev_nil_view_rule_info};
global read_only EV_Block ev_nil_block = {&ev_nil_block, &ev_nil_block, &ev_nil_block, &ev_nil_block, &ev_nil_block, {0}, 0, {0}, {0}, &e_expr_nil, &ev_nil_view_rule_list, &ev_nil_view_rule_info};
////////////////////////////////
//~ rjf: Key Functions
@@ -415,11 +436,17 @@ internal void ev_view_rule_list_concat_in_place(EV_ViewRuleList *dst, EV_ViewRul
internal E_Expr *ev_resolved_from_expr(Arena *arena, E_Expr *expr, EV_ViewRuleList *view_rules);
////////////////////////////////
//~ rjf: Column List Building
internal EV_Col *ev_col_list_push(Arena *arena, EV_ColList *list);
internal EV_Col *ev_col_list_push_new(Arena *arena, EV_ColList *list, String8 key);
////////////////////////////////
//~ rjf: Block Building
internal EV_BlockTree ev_block_tree_from_expr(Arena *arena, EV_View *view, String8 filter, String8 string, E_Expr *expr, EV_ViewRuleList *view_rules);
internal EV_BlockTree ev_block_tree_from_string(Arena *arena, EV_View *view, String8 filter, String8 string, EV_ViewRuleList *view_rules);
internal EV_BlockTree ev_block_tree_from_expr(Arena *arena, EV_View *view, String8 filter, String8 string, E_Expr *expr, EV_ViewRuleList *view_rules, EV_ColList *cols);
internal EV_BlockTree ev_block_tree_from_string(Arena *arena, EV_View *view, String8 filter, String8 string, EV_ViewRuleList *view_rules, EV_ColList *cols);
internal U64 ev_depth_from_block(EV_Block *block);
////////////////////////////////
+3 -2
View File
@@ -715,9 +715,10 @@ os_w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
// of the top hit area so manually checking that.
F32 dpi = w32_GetDpiForWindow_func ? (F32)w32_GetDpiForWindow_func(hwnd) : 96.f;
S32 frame_y = w32_GetSystemMetricsForDpi_func ? w32_GetSystemMetricsForDpi_func(SM_CYFRAME, dpi) : GetSystemMetrics(SM_CYFRAME);
S32 padding = w32_GetSystemMetricsForDpi_func ? w32_GetSystemMetricsForDpi_func(SM_CXPADDEDBORDER, dpi) : GetSystemMetrics(SM_CXPADDEDBORDER);
// NOTE(rjf): it seems incorrect to apply this padding here...
// S32 padding = w32_GetSystemMetricsForDpi_func ? w32_GetSystemMetricsForDpi_func(SM_CXPADDEDBORDER, dpi) : GetSystemMetrics(SM_CXPADDEDBORDER);
B32 is_over_top_resize = pos_client.y >= 0 && pos_client.y < frame_y + padding;
B32 is_over_top_resize = pos_client.y >= 0 && pos_client.y < frame_y; // + padding;
B32 is_over_title_bar = pos_client.y >= 0 && pos_client.y < window->custom_border_title_thickness;
//- rjf: check against title bar client areas
+4 -10
View File
@@ -54,12 +54,12 @@ RD_VocabularyInfo rd_vocabulary_info_table[39] =
{str8_lit_comp("stdout_path"), str8_lit_comp("stdout_paths"), str8_lit_comp("Standard Output Path"), str8_lit_comp("Standard Output Paths"), RD_IconKind_Null},
{str8_lit_comp("stderr_path"), str8_lit_comp("stderr_paths"), str8_lit_comp("Standard Error Path"), str8_lit_comp("Standard Error Paths"), RD_IconKind_Null},
{str8_lit_comp("stdin_path"), str8_lit_comp("stdin_paths"), str8_lit_comp("Standard Input Path"), str8_lit_comp("Standard Input Paths"), RD_IconKind_Null},
{str8_lit_comp("window"), str8_lit_comp("windows"), str8_lit_comp("Window"), str8_lit_comp("Windows"), RD_IconKind_Null},
{str8_lit_comp("window"), str8_lit_comp("windows"), str8_lit_comp("Window"), str8_lit_comp("Windows"), RD_IconKind_Window},
{str8_lit_comp("panel"), str8_lit_comp("panels"), str8_lit_comp("Panel"), str8_lit_comp("Panels"), RD_IconKind_Null},
{str8_lit_comp("view"), str8_lit_comp("views"), str8_lit_comp("View"), str8_lit_comp("Views"), RD_IconKind_Null},
{str8_lit_comp("tab"), str8_lit_comp("tabs"), str8_lit_comp("Tab"), str8_lit_comp("Tabs"), RD_IconKind_Null},
{str8_lit_comp("recent_project"), str8_lit_comp("recent_projects"), str8_lit_comp("Recent Project"), str8_lit_comp("Recent Projects"), RD_IconKind_Null},
{str8_lit_comp("recent_file"), str8_lit_comp("recent_files"), str8_lit_comp("Recent File"), str8_lit_comp("Recent Files"), RD_IconKind_Null},
{str8_lit_comp("recent_project"), str8_lit_comp("recent_projects"), str8_lit_comp("Recent Project"), str8_lit_comp("Recent Projects"), RD_IconKind_Briefcase},
{str8_lit_comp("recent_file"), str8_lit_comp("recent_files"), str8_lit_comp("Recent File"), str8_lit_comp("Recent Files"), RD_IconKind_FileOutline},
{str8_lit_comp("src"), str8_lit_comp("srcs"), str8_lit_comp("Source"), str8_lit_comp("Sources"), RD_IconKind_Null},
{str8_lit_comp("dst"), str8_lit_comp("dsts"), str8_lit_comp("Destination"), str8_lit_comp("Destinations"), RD_IconKind_Null},
{str8_lit_comp("conversion_task"), str8_lit_comp("conversion_tasks"), str8_lit_comp("Conversion Task"), str8_lit_comp("Conversion Tasks"), RD_IconKind_Null},
@@ -863,7 +863,7 @@ EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(types),
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(procedures),
};
RD_ViewRuleInfo rd_view_rule_kind_info_table[35] =
RD_ViewRuleInfo rd_view_rule_kind_info_table[29] =
{
{{0}, {0}, {0}, {0}, RD_IconKind_Null, 0, EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(null)},
{str8_lit_comp("empty"), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), RD_IconKind_Null, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(empty)},
@@ -871,12 +871,6 @@ RD_ViewRuleInfo rd_view_rule_kind_info_table[35] =
{str8_lit_comp("exception_filters"), str8_lit_comp("An interface which controls whether or not the debugger will halt attached processes upon encountering specific exception codes for the first time."), str8_lit_comp("Exception Filters"), str8_lit_comp(""), RD_IconKind_Gear, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(exception_filters)},
{str8_lit_comp("settings"), str8_lit_comp("An interface to modify general settings for the debugger's appearance and behavior."), str8_lit_comp("Settings"), str8_lit_comp(""), RD_IconKind_Gear, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(settings)},
{str8_lit_comp("pending_file"), str8_lit_comp(""), str8_lit_comp("Pending File"), str8_lit_comp(""), RD_IconKind_FileOutline, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(pending_file)},
{str8_lit_comp("commands"), str8_lit_comp(""), str8_lit_comp("Commands"), str8_lit_comp(""), RD_IconKind_List, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(commands)},
{str8_lit_comp("file_system"), str8_lit_comp(""), str8_lit_comp("File System"), str8_lit_comp(""), RD_IconKind_FileOutline, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(file_system)},
{str8_lit_comp("system_processes"), str8_lit_comp(""), str8_lit_comp("System Processes"), str8_lit_comp(""), RD_IconKind_Null, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(system_processes)},
{str8_lit_comp("entity_lister"), str8_lit_comp(""), str8_lit_comp("Entities"), str8_lit_comp(""), RD_IconKind_Null, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(entity_lister)},
{str8_lit_comp("ctrl_entity_lister"), str8_lit_comp(""), str8_lit_comp("Control Entities"), str8_lit_comp(""), RD_IconKind_Null, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(ctrl_entity_lister)},
{str8_lit_comp("symbol_lister"), str8_lit_comp(""), str8_lit_comp("Symbols"), str8_lit_comp(""), RD_IconKind_Null, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(symbol_lister)},
{str8_lit_comp("watch"), str8_lit_comp("The familiar 'watch window' debugger interface. Allows the inputting of a number of expressions. Each expression in the table is evaluated within the context of the selected thread's selected call stack frame. If applicable (depending on visualization rules and the expression's type), these expressions may be hierarchically expanded, which displays children as more rows in the table. The values of these expressions may also be edited, and if possible, can be used to write to registers or memory in attached processes. Also contains a new *view rule* column, not found in other major debuggers, which allows per-row specification of various visualization rules. These view rules may be used to visualize and inspect the evaluation of expressions in a variety of ways. To learn more, read the 'View Rules' section."), str8_lit_comp("Watch"), str8_lit_comp(""), RD_IconKind_Binoculars, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*1|RD_ViewRuleInfoFlag_FilterIsCode*1|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*1|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(watch)},
{str8_lit_comp("locals"), str8_lit_comp("Nearly identical to `Watch`, but automatically filled with local variables found within the selected call stack frame of the selected thread, according to the associated debug info. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table."), str8_lit_comp("Locals"), str8_lit_comp(""), RD_IconKind_Binoculars, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*1|RD_ViewRuleInfoFlag_FilterIsCode*1|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*1|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(locals)},
{str8_lit_comp("registers"), str8_lit_comp("Nearly identical to `Watch`, but automatically filled with all register names according to the selected thread's architecture. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table."), str8_lit_comp("Registers"), str8_lit_comp(""), RD_IconKind_Binoculars, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*1|RD_ViewRuleInfoFlag_FilterIsCode*1|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*1|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(registers)},
+9 -21
View File
@@ -252,14 +252,14 @@ RD_CmdKind_ToggleWatchExpressionAtMouse,
RD_CmdKind_SetColumns,
RD_CmdKind_ToggleAddressVisibility,
RD_CmdKind_ToggleCodeBytesVisibility,
RD_CmdKind_EnableEntity,
RD_CmdKind_DisableEntity,
RD_CmdKind_SelectEntity,
RD_CmdKind_RemoveEntity,
RD_CmdKind_NameEntity,
RD_CmdKind_ConditionEntity,
RD_CmdKind_DuplicateEntity,
RD_CmdKind_RelocateEntity,
RD_CmdKind_EnableCfg,
RD_CmdKind_DisableCfg,
RD_CmdKind_SelectCfg,
RD_CmdKind_RemoveCfg,
RD_CmdKind_NameCfg,
RD_CmdKind_ConditionCfg,
RD_CmdKind_DuplicateCfg,
RD_CmdKind_RelocateCfg,
RD_CmdKind_AddBreakpoint,
RD_CmdKind_AddAddressBreakpoint,
RD_CmdKind_AddFunctionBreakpoint,
@@ -395,12 +395,6 @@ RD_ViewRuleKind_GettingStarted,
RD_ViewRuleKind_ExceptionFilters,
RD_ViewRuleKind_Settings,
RD_ViewRuleKind_PendingFile,
RD_ViewRuleKind_Commands,
RD_ViewRuleKind_FileSystem,
RD_ViewRuleKind_SystemProcesses,
RD_ViewRuleKind_EntityLister,
RD_ViewRuleKind_CtrlEntityLister,
RD_ViewRuleKind_SymbolLister,
RD_ViewRuleKind_Watch,
RD_ViewRuleKind_Locals,
RD_ViewRuleKind_Registers,
@@ -757,12 +751,6 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(getting_started);
RD_VIEW_RULE_UI_FUNCTION_DEF(exception_filters);
RD_VIEW_RULE_UI_FUNCTION_DEF(settings);
RD_VIEW_RULE_UI_FUNCTION_DEF(pending_file);
RD_VIEW_RULE_UI_FUNCTION_DEF(commands);
RD_VIEW_RULE_UI_FUNCTION_DEF(file_system);
RD_VIEW_RULE_UI_FUNCTION_DEF(system_processes);
RD_VIEW_RULE_UI_FUNCTION_DEF(entity_lister);
RD_VIEW_RULE_UI_FUNCTION_DEF(ctrl_entity_lister);
RD_VIEW_RULE_UI_FUNCTION_DEF(symbol_lister);
RD_VIEW_RULE_UI_FUNCTION_DEF(watch);
RD_VIEW_RULE_UI_FUNCTION_DEF(locals);
RD_VIEW_RULE_UI_FUNCTION_DEF(registers);
@@ -809,7 +797,7 @@ extern EV_ViewRuleExprExpandInfoHookFunctionType * rd_collection_expr_expand_inf
extern EV_ViewRuleExprExpandRangeInfoHookFunctionType * rd_collection_expr_expand_range_info_hook_function_table[18];
extern EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_id_from_num_hook_function_table[18];
extern EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_num_from_id_hook_function_table[18];
extern RD_ViewRuleInfo rd_view_rule_kind_info_table[35];
extern RD_ViewRuleInfo rd_view_rule_kind_info_table[29];
extern RD_IconKind rd_entity_kind_icon_kind_table[27];
extern String8 rd_theme_preset_display_string_table[9];
extern String8 rd_theme_preset_code_string_table[9];
+12 -20
View File
@@ -72,12 +72,12 @@ RD_VocabularyMap:
{stdout_path _ "Standard Output Path" _ Null }
{stderr_path _ "Standard Error Path" _ Null }
{stdin_path _ "Standard Input Path" _ Null }
{window _ "Window" _ Null }
{window _ "Window" _ Window }
{panel _ "Panel" _ Null }
{view _ "View" _ Null }
{tab _ "Tab" _ Null }
{recent_project _ "Recent Project" _ Null }
{recent_file _ "Recent File" _ Null }
{recent_project _ "Recent Project" _ Briefcase }
{recent_file _ "Recent File" _ FileOutline }
{src _ "Source" _ Null }
{dst _ "Destination" _ Null }
{conversion_task _ "Conversion Task" _ Null }
@@ -478,15 +478,15 @@ RD_CmdTable: // | | | |
{ToggleAddressVisibility 1 1 Null null Nil Null 0 0 0 0 0 0 Thumbnails "toggle_address_visibility" "Toggle Address Visibility" "Toggles the visibility of addresses in a disassembly view." "" "$disasm," }
{ToggleCodeBytesVisibility 1 1 Null null Nil Null 0 0 0 0 0 0 Thumbnails "toggle_code_bytes_visibility""Toggle Code Bytes Visibility" "Toggles the visibility of machine code bytes in a disassembly view." "" "$disasm," }
//- rjf: general entity operations
{EnableEntity 0 0 Null null Nil Null 0 0 0 0 0 0 Null "enable_entity" "Enable Entity" "Enables an entity." "" "" }
{DisableEntity 0 0 Null null Nil Null 0 0 0 0 0 0 Null "disable_entity" "Disable Entity" "Disables an entity." "" "" }
{SelectEntity 0 0 Null null Nil Null 0 0 0 0 0 0 CheckHollow "select_entity" "Select Entity" "Selects an entity, disabling all others of the same kind." "" "" }
{RemoveEntity 0 0 Null null Nil Null 0 0 0 0 0 0 Trash "remove_entity" "Remove Entity" "Removes an entity." "" "" }
{NameEntity 0 0 Null null Nil Null 0 0 0 0 0 0 Null "name_entity" "Name Entity" "Equips an entity with a name." "" "" }
{ConditionEntity 0 0 Null null Nil Null 0 0 0 0 0 0 Null "condition_entity" "Condition Entity" "Equips an entity with a condition string." "" "" }
{DuplicateEntity 0 0 Null null Nil Null 0 0 0 0 0 0 Null "duplicate_entity" "Duplicate Entity" "Duplicates an entity." "" "" }
{RelocateEntity 0 0 Null null Nil Null 0 0 0 0 0 0 Null "relocate_entity" "Relocate Entity" "Relocates an entity." "" "" }
//- rjf: general config operations
{EnableCfg 0 0 Null null Nil Null 0 0 0 0 0 0 Null "enable_entity" "Enable Entity" "Enables an entity." "" "" }
{DisableCfg 0 0 Null null Nil Null 0 0 0 0 0 0 Null "disable_entity" "Disable Entity" "Disables an entity." "" "" }
{SelectCfg 0 0 Null null Nil Null 0 0 0 0 0 0 CheckHollow "select_entity" "Select Entity" "Selects an entity, disabling all others of the same kind." "" "" }
{RemoveCfg 0 0 Null null Nil Null 0 0 0 0 0 0 Trash "remove_entity" "Remove Entity" "Removes an entity." "" "" }
{NameCfg 0 0 Null null Nil Null 0 0 0 0 0 0 Null "name_entity" "Name Entity" "Equips an entity with a name." "" "" }
{ConditionCfg 0 0 Null null Nil Null 0 0 0 0 0 0 Null "condition_entity" "Condition Entity" "Equips an entity with a condition string." "" "" }
{DuplicateCfg 0 0 Null null Nil Null 0 0 0 0 0 0 Null "duplicate_entity" "Duplicate Entity" "Duplicates an entity." "" "" }
{RelocateCfg 0 0 Null null Nil Null 0 0 0 0 0 0 Null "relocate_entity" "Relocate Entity" "Relocates an entity." "" "" }
//- rjf: breakpoints
{AddBreakpoint 1 1 Null null Nil Null 0 0 0 0 0 0 CircleFilled "add_breakpoint" "Add Breakpoint" "Places a breakpoint at a given location (file path and line number, address, or symbol name)." "" "" }
@@ -980,14 +980,6 @@ RD_ViewRuleTable:
//- rjf: temporary view for loading files - must analyze file before picking viewer
{ PendingFile pending_file "Pending File" "" FileOutline 0 0 0 0 0 0 0 "" }
//- rjf: query listers
{ Commands commands "Commands" "" List 0 0 0 0 0 0 0 "" }
{ FileSystem file_system "File System" "" FileOutline 0 0 0 0 0 0 0 "" }
{ SystemProcesses system_processes "System Processes" "" Null 0 0 0 0 0 0 0 "" }
{ EntityLister entity_lister "Entities" "" Null 0 0 0 0 0 0 0 "" }
{ CtrlEntityLister ctrl_entity_lister "Control Entities" "" Null 0 0 0 0 0 0 0 "" }
{ SymbolLister symbol_lister "Symbols" "" Null 0 0 0 0 0 0 0 "" }
//- rjf: watch or watch-style tables
{ Watch watch "Watch" "" Binoculars 1 1 1 0 0 0 1 "The familiar 'watch window' debugger interface. Allows the inputting of a number of expressions. Each expression in the table is evaluated within the context of the selected thread's selected call stack frame. If applicable (depending on visualization rules and the expression's type), these expressions may be hierarchically expanded, which displays children as more rows in the table. The values of these expressions may also be edited, and if possible, can be used to write to registers or memory in attached processes. Also contains a new *view rule* column, not found in other major debuggers, which allows per-row specification of various visualization rules. These view rules may be used to visualize and inspect the evaluation of expressions in a variety of ways. To learn more, read the 'View Rules' section." }
{ Locals locals "Locals" "" Binoculars 1 1 1 0 0 0 1 "Nearly identical to `Watch`, but automatically filled with local variables found within the selected call stack frame of the selected thread, according to the associated debug info. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
+216 -550
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1138,6 +1138,7 @@ internal void rd_name_release(String8 string);
internal RD_Cfg *rd_cfg_alloc(void);
internal void rd_cfg_release(RD_Cfg *cfg);
internal void rd_cfg_release_all_children(RD_Cfg *cfg);
internal RD_Handle rd_handle_from_cfg(RD_Cfg *cfg);
internal RD_Cfg *rd_cfg_from_handle(RD_Handle handle);
internal RD_Cfg *rd_cfg_new(RD_Cfg *parent, String8 string);
@@ -1218,7 +1219,6 @@ internal RD_Entity *rd_entity_from_name_and_kind(String8 string, RD_EntityKind k
////////////////////////////////
//~ rjf: Frontend Entity Info Extraction
internal D_Target rd_d_target_from_entity(RD_Entity *entity);
internal DR_FancyStringList rd_title_fstrs_from_entity(Arena *arena, RD_Entity *entity, Vec4F32 secondary_color, F32 size);
////////////////////////////////
+10 -1806
View File
File diff suppressed because it is too large Load Diff
+17 -16
View File
@@ -1016,13 +1016,13 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
// rjf: shift+click => enable breakpoint
if(ui_clicked(bp_sig) && bp_sig.event_flags & OS_Modifier_Shift)
{
rd_cmd(bp_is_disabled ? RD_CmdKind_EnableEntity : RD_CmdKind_DisableEntity, .cfg = rd_handle_from_cfg(bp));
rd_cmd(bp_is_disabled ? RD_CmdKind_EnableCfg : RD_CmdKind_DisableCfg, .cfg = rd_handle_from_cfg(bp));
}
// rjf: click => remove breakpoint
if(ui_clicked(bp_sig) && bp_sig.event_flags == 0)
{
rd_cmd(RD_CmdKind_RemoveEntity, .cfg = rd_handle_from_cfg(bp));
rd_cmd(RD_CmdKind_RemoveCfg, .cfg = rd_handle_from_cfg(bp));
}
// rjf: drag start
@@ -1077,7 +1077,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
// rjf: click => remove pin
if(ui_clicked(pin_sig))
{
rd_cmd(RD_CmdKind_RemoveEntity, .cfg = rd_handle_from_cfg(pin));
rd_cmd(RD_CmdKind_RemoveCfg, .cfg = rd_handle_from_cfg(pin));
}
// rjf: drag start
@@ -1403,7 +1403,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
UI_Signal catchall_margin_container_sig = ui_signal_from_box(catchall_margin_container_box);
UI_Signal text_container_sig = ui_signal_from_box(text_container_box);
B32 line_drag_drop = 0;
RD_Entity *line_drag_entity = &rd_nil_entity;
RD_Cfg *line_drag_cfg = &rd_nil_cfg;
CTRL_Entity *line_drag_ctrl_entity = &ctrl_entity_nil;
Vec4F32 line_drag_drop_color = rd_rgba_from_theme_color(RD_ThemeColor_DropSiteOverlay);
{
@@ -1479,17 +1479,18 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
if(rd_drag_is_active() && contains_2f32(clipped_top_container_rect, ui_mouse()))
{
CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_state->drag_drop_regs->thread);
RD_Entity *entity = rd_entity_from_handle(rd_state->drag_drop_regs->entity);
if(rd_state->drag_drop_regs_slot == RD_RegSlot_Entity &&
(entity->kind == RD_EntityKind_WatchPin ||
entity->kind == RD_EntityKind_Breakpoint))
RD_Cfg *cfg = rd_cfg_from_handle(rd_state->drag_drop_regs->cfg);
if(rd_state->drag_drop_regs_slot == RD_RegSlot_Cfg &&
(str8_match(cfg->string, str8_lit("breakpoint"), 0) ||
str8_match(cfg->string, str8_lit("watch_pin"), 0)))
{
line_drag_drop = 1;
line_drag_entity = entity;
if(entity->flags & RD_EntityFlag_HasColor)
line_drag_cfg = cfg;
line_drag_drop_color = rd_rgba_from_cfg(cfg);
line_drag_drop_color.w *= 0.5f;
if(line_drag_drop_color.w == 0)
{
line_drag_drop_color = rd_rgba_from_entity(entity);
line_drag_drop_color.w *= 0.5f;
line_drag_drop_color = rd_rgba_from_theme_color(RD_ThemeColor_DropSiteOverlay);
}
}
if(rd_state->drag_drop_regs_slot == RD_RegSlot_Thread)
@@ -1503,14 +1504,14 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
//- rjf: drop target is dropped -> process
{
if(!rd_entity_is_nil(line_drag_entity) && rd_drag_drop() && contains_1s64(params->line_num_range, mouse_pt.line))
if(line_drag_cfg != &rd_nil_cfg && rd_drag_drop() && contains_1s64(params->line_num_range, mouse_pt.line))
{
RD_Entity *dropped_entity = line_drag_entity;
RD_Cfg *dropped_cfg = line_drag_cfg;
S64 line_num = mouse_pt.line;
U64 line_idx = line_num - params->line_num_range.min;
U64 line_vaddr = params->line_vaddrs[line_idx];
rd_cmd(RD_CmdKind_RelocateEntity,
.entity = rd_handle_from_entity(dropped_entity),
rd_cmd(RD_CmdKind_RelocateCfg,
.cfg = rd_handle_from_cfg(dropped_cfg),
.file_path = line_vaddr == 0 ? rd_regs()->file_path : str8_zero(),
.cursor = line_vaddr == 0 ? txt_pt(line_num, 1) : txt_pt(0, 0),
.vaddr = line_vaddr);