old config code elimination

This commit is contained in:
Ryan Fleury
2025-01-22 14:23:39 -08:00
parent 443fee10ec
commit 9a54ae50c1
6 changed files with 413 additions and 1192 deletions
+2 -14
View File
@@ -28,14 +28,6 @@ RD_CmdKind_Null,
RD_CmdKind_Null,
};
RD_CmdKind rd_cfg_src_apply_cmd_kind_table[4] =
{
RD_CmdKind_ApplyUserData,
RD_CmdKind_ApplyProjectData,
RD_CmdKind_Null,
RD_CmdKind_Null,
};
RD_VocabularyInfo rd_vocabulary_info_table[41] =
{
{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},
@@ -289,7 +281,7 @@ Rng1U64 rd_reg_slot_range_table[40] =
{OffsetOf(RD_Regs, os_event), OffsetOf(RD_Regs, os_event) + sizeof(OS_Event *)},
};
RD_CmdKindInfo rd_cmd_kind_info_table[216] =
RD_CmdKindInfo rd_cmd_kind_info_table[213] =
{
{0},
{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp(""), str8_lit_comp("Launch and Run"), RD_IconKind_Play, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Target, CTRL_EntityKind_Null}},
@@ -385,8 +377,6 @@ RD_CmdKindInfo rd_cmd_kind_info_table[216] =
{ str8_lit_comp("open_user"), str8_lit_comp("Opens a user file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("load,user,project,layout"), str8_lit_comp(""), str8_lit_comp("Open User"), RD_IconKind_Person, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("open_project"), str8_lit_comp("Opens a project file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("project,project,session"), str8_lit_comp(""), str8_lit_comp("Open Project"), RD_IconKind_Briefcase, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("open_recent_project"), str8_lit_comp("Opens a recently used project file."), str8_lit_comp("project,project,session"), str8_lit_comp(""), str8_lit_comp("Open Recent Project"), RD_IconKind_Briefcase, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_RecentProject, CTRL_EntityKind_Null}},
{ str8_lit_comp("apply_user_data"), str8_lit_comp("Applies user data from the active user file."), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("Apply User Data"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("apply_project_data"), str8_lit_comp("Applies project data from the active project file."), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("Apply Project Data"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("write_user_data"), str8_lit_comp("Writes user data to the active user file."), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("Write User Data"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("write_project_data"), str8_lit_comp("Writes project data to the active project file."), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("Write Project Data"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("edit"), str8_lit_comp("Edits the current selection."), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("Edit"), RD_IconKind_Pencil, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
@@ -497,7 +487,6 @@ RD_CmdKindInfo rd_cmd_kind_info_table[216] =
{ str8_lit_comp("disasm"), str8_lit_comp("Opens the disassembly view."), str8_lit_comp("disasm"), str8_lit_comp(""), str8_lit_comp("Disassembly"), RD_IconKind_Glasses, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("output"), str8_lit_comp("Opens an output view."), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("Output"), RD_IconKind_List, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("memory"), str8_lit_comp("Opens a memory view."), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("Memory"), RD_IconKind_Grid, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("exception_filters"), str8_lit_comp("Opens the exception filters view."), str8_lit_comp("exceptions,filters"), str8_lit_comp(""), str8_lit_comp("Exception Filters"), RD_IconKind_Gear, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("settings"), str8_lit_comp("Opens the settings view."), str8_lit_comp("theme,color,scheme,options"), str8_lit_comp(""), str8_lit_comp("Settings"), RD_IconKind_Gear, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("pick_file"), str8_lit_comp("Opens the file browser to pick a file."), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("Pick File"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("pick_folder"), str8_lit_comp("Opens the file browser to pick a folder."), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("Pick Folder"), RD_IconKind_FolderOpenFilled, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*1)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
@@ -874,12 +863,11 @@ 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[29] =
RD_ViewRuleInfo rd_view_rule_kind_info_table[28] =
{
{{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)},
{str8_lit_comp("getting_started"), str8_lit_comp(""), str8_lit_comp("Getting Started"), str8_lit_comp(""), RD_IconKind_QuestionMark, (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(getting_started)},
{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("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)},
+1 -7
View File
@@ -188,8 +188,6 @@ RD_CmdKind_SetFileReplacementPath,
RD_CmdKind_OpenUser,
RD_CmdKind_OpenProject,
RD_CmdKind_OpenRecentProject,
RD_CmdKind_ApplyUserData,
RD_CmdKind_ApplyProjectData,
RD_CmdKind_WriteUserData,
RD_CmdKind_WriteProjectData,
RD_CmdKind_Edit,
@@ -300,7 +298,6 @@ RD_CmdKind_PendingFile,
RD_CmdKind_Disassembly,
RD_CmdKind_Output,
RD_CmdKind_Memory,
RD_CmdKind_ExceptionFilters,
RD_CmdKind_Settings,
RD_CmdKind_PickFile,
RD_CmdKind_PickFolder,
@@ -392,7 +389,6 @@ typedef enum RD_ViewRuleKind
RD_ViewRuleKind_Null,
RD_ViewRuleKind_Empty,
RD_ViewRuleKind_GettingStarted,
RD_ViewRuleKind_ExceptionFilters,
RD_ViewRuleKind_Settings,
RD_ViewRuleKind_PendingFile,
RD_ViewRuleKind_Watch,
@@ -755,7 +751,6 @@ EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(color_rgba);
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(geo3d);
RD_VIEW_RULE_UI_FUNCTION_DEF(empty);
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(watch);
@@ -785,7 +780,6 @@ C_LINKAGE_BEGIN
extern String8 rd_cfg_src_string_table[4];
extern RD_CmdKind rd_cfg_src_load_cmd_kind_table[4];
extern RD_CmdKind rd_cfg_src_write_cmd_kind_table[4];
extern RD_CmdKind rd_cfg_src_apply_cmd_kind_table[4];
extern RD_VocabularyInfo rd_vocabulary_info_table[41];
extern RD_CfgNameSchemaPair rd_cfg_name_schema_pair_table[5];
extern String8 d_entity_kind_display_string_table[27];
@@ -805,7 +799,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[29];
extern RD_ViewRuleInfo rd_view_rule_kind_info_table[28];
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];
-11
View File
@@ -43,11 +43,6 @@ RD_CfgSrcTable:
@expand(RD_CfgSrcTable a) `RD_CmdKind_$(a.write_cmd)`,
}
@data(RD_CmdKind) rd_cfg_src_apply_cmd_kind_table:
{
@expand(RD_CfgSrcTable a) `RD_CmdKind_$(a.apply_cmd)`;
}
////////////////////////////////
//~ rjf: Vocabulary Maps
@@ -419,10 +414,6 @@ RD_CmdTable: // | | | |
{OpenProject 1 1 FilePath null Nil Null 1 0 0 0 0 1 Briefcase "open_project" "Open Project" "Opens a project file path, immediately loading it, and begins autosaving to it." "project,project,session" "" }
{OpenRecentProject 1 1 Entity null RecentProject Null 0 0 0 0 0 1 Briefcase "open_recent_project" "Open Recent Project" "Opens a recently used project file." "project,project,session" "" }
//- rjf: loading/applying stateful config changes
{ApplyUserData 0 0 Null null Nil Null 0 0 0 0 0 0 Null "apply_user_data" "Apply User Data" "Applies user data from the active user file." "" "" }
{ApplyProjectData 0 0 Null null Nil Null 0 0 0 0 0 0 Null "apply_project_data" "Apply Project Data" "Applies project data from the active project file." "" "" }
//- rjf: writing config changes
{WriteUserData 0 1 Null null Nil Null 0 0 0 0 0 0 Null "write_user_data" "Write User Data" "Writes user data to the active user file." "" "" }
{WriteProjectData 0 1 Null null Nil Null 0 0 0 0 0 0 Null "write_project_data" "Write Project Data" "Writes project data to the active project file." "" "" }
@@ -568,7 +559,6 @@ RD_CmdTable: // | | | |
{Disassembly 1 1 Null null Nil Null 0 0 0 0 0 0 Glasses "disasm" "Disassembly" "Opens the disassembly view." "disasm" "" }
{Output 1 1 Null null Nil Null 0 0 0 0 0 0 List "output" "Output" "Opens an output view." "" "" }
{Memory 1 1 Null null Nil Null 0 0 0 0 0 0 Grid "memory" "Memory" "Opens a memory view." "" "" }
{ExceptionFilters 1 1 Null null Nil Null 0 0 0 0 0 0 Gear "exception_filters" "Exception Filters" "Opens the exception filters view." "exceptions,filters" "" }
{Settings 1 1 Null null Nil Null 0 0 0 0 0 0 Gear "settings" "Settings" "Opens the settings view." "theme,color,scheme,options" "" }
//- rjf: queries
@@ -999,7 +989,6 @@ RD_ViewRuleTable:
{ GettingStarted getting_started "Getting Started" "" QuestionMark 0 0 0 0 0 0 0 "" }
//- rjf: meta (settings)
{ ExceptionFilters exception_filters "Exception Filters" "" Gear 0 0 0 0 0 0 1 "An interface which controls whether or not the debugger will halt attached processes upon encountering specific exception codes for the first time." }
{ Settings settings "Settings" "" Gear 0 0 0 0 0 0 1 "An interface to modify general settings for the debugger's appearance and behavior." }
//- rjf: temporary view for loading files - must analyze file before picking viewer
+351 -930
View File
File diff suppressed because it is too large Load Diff
+57 -92
View File
@@ -39,21 +39,6 @@ struct RD_Binding
OS_Modifiers modifiers;
};
typedef struct RD_BindingNode RD_BindingNode;
struct RD_BindingNode
{
RD_BindingNode *next;
RD_Binding binding;
};
typedef struct RD_BindingList RD_BindingList;
struct RD_BindingList
{
RD_BindingNode *first;
RD_BindingNode *last;
U64 count;
};
typedef struct RD_StringBindingPair RD_StringBindingPair;
struct RD_StringBindingPair
{
@@ -61,6 +46,47 @@ struct RD_StringBindingPair
RD_Binding binding;
};
typedef struct RD_KeyMapNode RD_KeyMapNode;
struct RD_KeyMapNode
{
RD_KeyMapNode *name_hash_next;
RD_KeyMapNode *binding_hash_next;
struct RD_Cfg *cfg;
String8 name;
RD_Binding binding;
};
typedef struct RD_KeyMapNodePtr RD_KeyMapNodePtr;
struct RD_KeyMapNodePtr
{
RD_KeyMapNodePtr *next;
RD_KeyMapNode *v;
};
typedef struct RD_KeyMapNodePtrList RD_KeyMapNodePtrList;
struct RD_KeyMapNodePtrList
{
RD_KeyMapNodePtr *first;
RD_KeyMapNodePtr *last;
U64 count;
};
typedef struct RD_KeyMapSlot RD_KeyMapSlot;
struct RD_KeyMapSlot
{
RD_KeyMapNode *first;
RD_KeyMapNode *last;
};
typedef struct RD_KeyMap RD_KeyMap;
struct RD_KeyMap
{
U64 name_slots_count;
RD_KeyMapSlot *name_slots;
U64 binding_slots_count;
RD_KeyMapSlot *binding_slots;
};
////////////////////////////////
//~ rjf: Evaluation Spaces
@@ -68,6 +94,7 @@ typedef U64 RD_EvalSpaceKind;
enum
{
RD_EvalSpaceKind_CtrlEntity = E_SpaceKind_FirstUserDefined,
RD_EvalSpaceKind_MetaCfg,
RD_EvalSpaceKind_MetaEntity,
RD_EvalSpaceKind_MetaCtrlEntity,
RD_EvalSpaceKind_MetaCollection,
@@ -148,7 +175,7 @@ enum
typedef RD_VIEW_RULE_UI_FUNCTION_SIG(RD_ViewRuleUIFunctionType);
////////////////////////////////
//~ rjf: View Types
//~ rjf: View State Types
typedef struct RD_ArenaExt RD_ArenaExt;
struct RD_ArenaExt
@@ -355,50 +382,6 @@ struct RD_Location
String8 name;
};
////////////////////////////////
//~ rjf: Key Map Types
typedef struct RD_KeyMapNode RD_KeyMapNode;
struct RD_KeyMapNode
{
RD_KeyMapNode *name_hash_next;
RD_KeyMapNode *binding_hash_next;
RD_Cfg *cfg;
String8 name;
RD_Binding binding;
};
typedef struct RD_KeyMapNodePtr RD_KeyMapNodePtr;
struct RD_KeyMapNodePtr
{
RD_KeyMapNodePtr *next;
RD_KeyMapNode *v;
};
typedef struct RD_KeyMapNodePtrList RD_KeyMapNodePtrList;
struct RD_KeyMapNodePtrList
{
RD_KeyMapNodePtr *first;
RD_KeyMapNodePtr *last;
U64 count;
};
typedef struct RD_KeyMapSlot RD_KeyMapSlot;
struct RD_KeyMapSlot
{
RD_KeyMapNode *first;
RD_KeyMapNode *last;
};
typedef struct RD_KeyMap RD_KeyMap;
struct RD_KeyMap
{
U64 name_slots_count;
RD_KeyMapSlot *name_slots;
U64 binding_slots_count;
RD_KeyMapSlot *binding_slots;
};
////////////////////////////////
//~ rjf: New Panel Types (Queried From Config)
@@ -816,6 +799,12 @@ struct RD_State
B32 quit;
B32 quit_after_success;
// rjf: config bucket paths
Arena *user_path_arena;
String8 user_path;
Arena *project_path_arena;
String8 project_path;
// rjf: log
Log *log;
String8 log_path;
@@ -841,6 +830,10 @@ struct RD_State
// rjf: key map (constructed from-scratch each frame)
RD_KeyMap *key_map;
// rjf: theme target (constructed from-scratch each frame)
RD_Theme *theme;
RD_Theme *theme_target;
// rjf: registers stack
RD_RegsNode base_regs;
RD_RegsNode *top_regs;
@@ -937,38 +930,12 @@ struct RD_State
U64 kind_alloc_gens[RD_EntityKind_COUNT];
RD_EntityListCache kind_caches[RD_EntityKind_COUNT];
// rjf: key map table
#if 0 // TODO(rjf): @cfg
Arena *key_map_arena;
U64 key_map_table_size;
RD_KeyMapSlot *key_map_table;
RD_KeyMapNode *free_key_map_node;
U64 key_map_total_count;
#endif
// rjf: bind change
Arena *bind_change_arena;
B32 bind_change_active;
String8 bind_change_cmd_name;
RD_Binding bind_change_binding;
// rjf: config reading state
Arena *cfg_path_arenas[RD_CfgSrc_COUNT];
String8 cfg_paths[RD_CfgSrc_COUNT];
U64 cfg_cached_timestamp[RD_CfgSrc_COUNT];
Arena *cfg_arena;
RD_CfgTable cfg_table;
U64 ctrl_exception_code_filters[(CTRL_ExceptionCodeKind_COUNT+63)/64];
// rjf: running theme state
RD_Theme cfg_theme_target;
RD_Theme cfg_theme;
Arena *cfg_main_font_path_arena;
Arena *cfg_code_font_path_arena;
String8 cfg_main_font_path;
String8 cfg_code_font_path;
FNT_Tag cfg_font_tags[RD_FontSlot_COUNT]; // derivative from font paths
// rjf: global settings
RD_SettingVal cfg_setting_vals[RD_CfgSrc_COUNT][RD_SettingCode_COUNT];
@@ -1231,6 +1198,10 @@ internal DR_FancyStringList rd_title_fstrs_from_ctrl_entity(Arena *arena, CTRL_E
////////////////////////////////
//~ rjf: Evaluation Spaces
//- rjf: cfg <-> eval space
internal RD_Cfg *rd_cfg_from_eval_space(E_Space space);
internal E_Space rd_eval_space_from_cfg(RD_Cfg *cfg);
//- rjf: entity <-> eval space
internal RD_Entity *rd_entity_from_eval_space(E_Space space);
internal E_Space rd_eval_space_from_entity(RD_Entity *entity);
@@ -1414,15 +1385,9 @@ internal void rd_request_frame(void);
//- rjf: per-frame arena
internal Arena *rd_frame_arena(void);
//- rjf: config paths
internal String8 rd_cfg_path_from_src(RD_CfgSrc src);
//- rjf: entity cache queries
internal RD_EntityList rd_query_cached_entity_list_with_kind(RD_EntityKind kind);
//- rjf: config state
internal RD_CfgTable *rd_cfg_table(void);
////////////////////////////////
//~ rjf: Registers
+2 -138
View File
@@ -6050,144 +6050,6 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(geo3d)
scratch_end(scratch);
}
////////////////////////////////
//~ rjf: exception_filters @view_hook_impl
RD_VIEW_RULE_UI_FUNCTION_DEF(exception_filters)
{
ProfBeginFunction();
Temp scratch = scratch_begin(0, 0);
F32 row_height_px = floor_f32(ui_top_font_size()*2.5f);
UI_ScrollPt2 scroll_pos = rd_view_scroll_pos();
String8 query = string;
//- rjf: get state
typedef struct RD_ExceptionFiltersViewState RD_ExceptionFiltersViewState;
struct RD_ExceptionFiltersViewState
{
Vec2S64 cursor;
};
RD_ExceptionFiltersViewState *sv = rd_view_state(RD_ExceptionFiltersViewState);
//- rjf: get list of options
typedef struct RD_ExceptionFiltersOption RD_ExceptionFiltersOption;
struct RD_ExceptionFiltersOption
{
String8 name;
FuzzyMatchRangeList matches;
B32 is_enabled;
CTRL_ExceptionCodeKind exception_code_kind;
};
typedef struct RD_ExceptionFiltersOptionChunkNode RD_ExceptionFiltersOptionChunkNode;
struct RD_ExceptionFiltersOptionChunkNode
{
RD_ExceptionFiltersOptionChunkNode *next;
RD_ExceptionFiltersOption *v;
U64 cap;
U64 count;
};
typedef struct RD_ExceptionFiltersOptionChunkList RD_ExceptionFiltersOptionChunkList;
struct RD_ExceptionFiltersOptionChunkList
{
RD_ExceptionFiltersOptionChunkNode *first;
RD_ExceptionFiltersOptionChunkNode *last;
U64 option_count;
U64 node_count;
};
typedef struct RD_ExceptionFiltersOptionArray RD_ExceptionFiltersOptionArray;
struct RD_ExceptionFiltersOptionArray
{
RD_ExceptionFiltersOption *v;
U64 count;
};
RD_ExceptionFiltersOptionChunkList opts_list = {0};
for(CTRL_ExceptionCodeKind k = (CTRL_ExceptionCodeKind)(CTRL_ExceptionCodeKind_Null+1);
k < CTRL_ExceptionCodeKind_COUNT;
k = (CTRL_ExceptionCodeKind)(k+1))
{
RD_ExceptionFiltersOptionChunkNode *node = opts_list.last;
String8 name = push_str8f(scratch.arena, "0x%x %S", ctrl_exception_code_kind_code_table[k], ctrl_exception_code_kind_display_string_table[k]);
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, query, name);
if(matches.count >= matches.needle_part_count)
{
if(node == 0 || node->count >= node->cap)
{
node = push_array(scratch.arena, RD_ExceptionFiltersOptionChunkNode, 1);
node->cap = 256;
node->v = push_array_no_zero(scratch.arena, RD_ExceptionFiltersOption, node->cap);
SLLQueuePush(opts_list.first, opts_list.last, node);
opts_list.node_count += 1;
}
node->v[node->count].name = name;
node->v[node->count].matches = matches;
node->v[node->count].is_enabled = !!(rd_state->ctrl_exception_code_filters[k/64] & (1ull<<(k%64)));
node->v[node->count].exception_code_kind = k;
node->count += 1;
opts_list.option_count += 1;
}
}
RD_ExceptionFiltersOptionArray opts = {0};
{
opts.count = opts_list.option_count;
opts.v = push_array_no_zero(scratch.arena, RD_ExceptionFiltersOption, opts.count);
U64 idx = 0;
for(RD_ExceptionFiltersOptionChunkNode *n = opts_list.first; n != 0; n = n->next)
{
MemoryCopy(opts.v+idx, n->v, n->count*sizeof(RD_ExceptionFiltersOption));
idx += n->count;
}
}
//- rjf: build option table
Rng1S64 visible_row_range = {0};
UI_ScrollListParams scroll_list_params = {0};
{
Vec2F32 rect_dim = dim_2f32(rect);
scroll_list_params.flags = UI_ScrollListFlag_All;
scroll_list_params.row_height_px = row_height_px;
scroll_list_params.dim_px = rect_dim;
scroll_list_params.cursor_range = r2s64(v2s64(0, 0), v2s64(0, opts.count));
scroll_list_params.item_range = r1s64(0, opts.count);
scroll_list_params.cursor_min_is_empty_selection[Axis2_Y] = 1;
}
UI_ScrollListSignal scroll_list_sig = {0};
UI_Focus(UI_FocusKind_On)
UI_ScrollList(&scroll_list_params,
&scroll_pos.y,
&sv->cursor,
0,
&visible_row_range,
&scroll_list_sig)
UI_Focus(UI_FocusKind_Null)
{
for(S64 row = visible_row_range.min; row <= visible_row_range.max && row < opts.count; row += 1)
UI_FocusHot(sv->cursor.y == row+1 ? UI_FocusKind_On : UI_FocusKind_Off)
{
RD_ExceptionFiltersOption *opt = &opts.v[row];
UI_Signal sig = rd_icon_buttonf(opt->is_enabled ? RD_IconKind_CheckFilled : RD_IconKind_CheckHollow, &opt->matches, "%S", opt->name);
if(ui_clicked(sig))
{
if(opt->exception_code_kind != CTRL_ExceptionCodeKind_Null)
{
CTRL_ExceptionCodeKind k = opt->exception_code_kind;
if(opt->is_enabled)
{
rd_state->ctrl_exception_code_filters[k/64] &= ~(1ull<<(k%64));
}
else
{
rd_state->ctrl_exception_code_filters[k/64] |= (1ull<<(k%64));
}
}
}
}
}
rd_store_view_scroll_pos(scroll_pos);
scratch_end(scratch);
ProfEnd();
}
////////////////////////////////
//~ rjf: settings @view_hook_impl
@@ -6264,6 +6126,7 @@ rd_qsort_compare_settings_item(RD_SettingsItem *a, RD_SettingsItem *b)
RD_VIEW_RULE_UI_FUNCTION_DEF(settings)
{
#if 0
ProfBeginFunction();
Temp scratch = scratch_begin(0, 0);
F32 row_height_px = floor_f32(ui_top_font_size()*2.5f);
@@ -6888,4 +6751,5 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(settings)
rd_store_view_scroll_pos(scroll_pos);
scratch_end(scratch);
ProfEnd();
#endif
}