diff --git a/src/base/base_entry_point.c b/src/base/base_entry_point.c index eb4408a9..00041247 100644 --- a/src/base/base_entry_point.c +++ b/src/base/base_entry_point.c @@ -67,12 +67,12 @@ main_thread_base_entry_point(void (*entry_point)(CmdLine *cmdline), char **argum #if defined(FONT_CACHE_H) && !defined(FNT_INIT_MANUAL) fnt_init(); #endif -#if defined(DF_CORE_H) && !defined(DF_INIT_MANUAL) - DF_StateDeltaHistory *hist = df_state_delta_history_alloc(); - df_core_init(&cmdline, hist); +#if defined(DBG_ENGINE_CORE_H) && !defined(DF_INIT_MANUAL) + D_StateDeltaHistory *hist = d_state_delta_history_alloc(); + d_init(&cmdline, hist); #endif -#if defined(DF_GFX_H) && !defined(DF_GFX_INIT_MANUAL) - df_gfx_init(update_and_render, df_state_delta_history()); +#if defined(DBG_GFX_CORE_H) && !defined(DF_GFX_INIT_MANUAL) + df_gfx_init(update_and_render, d_state_delta_history()); #endif entry_point(&cmdline); if(capture) diff --git a/src/base/base_inc.c b/src/base/base_inc.c index b1a30708..6e8ccd55 100644 --- a/src/base/base_inc.c +++ b/src/base/base_inc.c @@ -4,8 +4,8 @@ //////////////////////////////// //~ rjf: Base Includes -#undef RADDBG_LAYER_COLOR -#define RADDBG_LAYER_COLOR 0.20f, 0.60f, 0.80f +#undef MARKUP_LAYER_COLOR +#define MARKUP_LAYER_COLOR 0.20f, 0.60f, 0.80f #include "base_core.c" #include "base_profile.c" diff --git a/src/df/core/df_core.mdesk b/src/dbg_engine/dbg_engine.mdesk similarity index 95% rename from src/df/core/df_core.mdesk rename to src/dbg_engine/dbg_engine.mdesk index a33a5868..1ebed937 100644 --- a/src/df/core/df_core.mdesk +++ b/src/dbg_engine/dbg_engine.mdesk @@ -5,7 +5,7 @@ //~ rjf: Config Sources @table(string, name, load_cmd, write_cmd, apply_cmd) -DF_CfgSrcTable: +D_CfgSrcTable: { {"user" User OpenUser WriteUserData ApplyUserData } {"project" Project OpenProject WriteProjectData ApplyProjectData } @@ -23,7 +23,7 @@ DF_CfgSrcTable: // operations________ mutation cascading__ names lt sz // /..................\ /....................\ /...\ | | // dl fz ed rn en cn dp lu tu lp tp lh ld th td nc np ul iz -DF_EntityKindTable: +D_EntityKindTable: { {Nil nil nils 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "Label" Null "Nil" } {Root root roots 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "Label" Null "Root" } @@ -85,19 +85,19 @@ DF_EntityKindTable: //~ rjf: Built-In Command Tables @table(name, name_lower, c_type) -DF_CmdParamSlotTable: +D_CmdParamSlotTable: { - {Window window `DF_Handle`} - {Panel panel `DF_Handle`} - {DestPanel dest_panel `DF_Handle`} - {PrevView prev_view `DF_Handle`} - {View view `DF_Handle`} - {Entity entity `DF_Handle`} - {EntityList entity_list `DF_HandleList`} + {Window window `D_Handle`} + {Panel panel `D_Handle`} + {DestPanel dest_panel `D_Handle`} + {PrevView prev_view `D_Handle`} + {View view `D_Handle`} + {Entity entity `D_Handle`} + {EntityList entity_list `D_HandleList`} {String string `String8`} {FilePath file_path `String8`} {TextPoint text_point `TxtPt`} - {CmdSpec cmd_spec `struct DF_CmdSpec *`} + {CmdSpec cmd_spec `struct D_CmdSpec *`} {ViewSpec view_spec `struct DF_ViewSpec *`} {ParamsTree params_tree `MD_Node *`} {OSEvent os_event `struct OS_Event *`} @@ -115,7 +115,7 @@ DF_CmdParamSlotTable: @table(name ui_vis ipc_docs_vis q_slot q_ent_kind q_allow_files q_allow_folders q_keep_oi q_select_oi q_is_code q_required canonical_icon string display_name desc search_tags ) // / | | | \___ ______________________________________________/ | | | | | // / | | | \ / | | | | | -DF_CoreCmdTable:// | | | | | | | | | | +D_CoreCmdTable: // | | | | | | | | | | { {Null 0 0 Null Nil 0 0 0 0 0 0 Null "" "" "" "" } @@ -518,7 +518,7 @@ DF_CoreCmdTable:// | | | | // are specified in both tables under the same name. @table(coverage_check name name_lower string ih ex xp vb display_name docs schema description) -DF_CoreViewRuleTable: +D_ViewRuleTable: { {x Default default "default" - - - x "Default" - "" "" } {x Array array "array" - - x - "Array" x "x:{expr}" "Specifies that a pointer points to N elements, rather than only 1." } @@ -643,21 +643,21 @@ DF_DevToggleTable: //- rjf: enums -@enum DF_CfgSrc: +@enum D_CfgSrc: { - @expand(DF_CfgSrcTable a) `$(a.name)`, + @expand(D_CfgSrcTable a) `$(a.name)`, COUNT, } -@enum DF_EntityKind: +@enum D_EntityKind: { - @expand(DF_EntityKindTable a) `$(a.name)`, + @expand(D_EntityKindTable a) `$(a.name)`, COUNT, } -@enum DF_CoreCmdKind: +@enum D_CmdKind: { - @expand(DF_CoreCmdTable, a) `$(a.name)`, + @expand(D_CoreCmdTable, a) `$(a.name)`, COUNT, } @@ -667,109 +667,109 @@ DF_DevToggleTable: COUNT, } -@enum DF_CoreViewRuleKind: +@enum D_ViewRuleKind: { - @expand(DF_CoreViewRuleTable a) `$(a.name)`, + @expand(D_ViewRuleTable a) `$(a.name)`, COUNT, } //- rjf: command params -@enum DF_CmdParamSlot: +@enum D_CmdParamSlot: { Null, - @expand(DF_CmdParamSlotTable a) `$(a.name)`, + @expand(D_CmdParamSlotTable a) `$(a.name)`, COUNT, } -@struct DF_CmdParams: +@struct D_CmdParams: { - `U64 slot_props[(DF_CmdParamSlot_COUNT + 63) / 64]`; - @expand(DF_CmdParamSlotTable a) `$(a.c_type) $(a.name_lower)`; + `U64 slot_props[(D_CmdParamSlot_COUNT + 63) / 64]`; + @expand(D_CmdParamSlotTable a) `$(a.c_type) $(a.name_lower)`; } -@data(Rng1U64) df_g_cmd_param_slot_range_table: +@data(Rng1U64) d_cmd_param_slot_range_table: { `{0}`, - @expand(DF_CmdParamSlotTable a) `{OffsetOf(DF_CmdParams, $(a.name_lower)), OffsetOf(DF_CmdParams, $(a.name_lower)) + sizeof($(a.c_type))}`, + @expand(D_CmdParamSlotTable a) `{OffsetOf(D_CmdParams, $(a.name_lower)), OffsetOf(D_CmdParams, $(a.name_lower)) + sizeof($(a.c_type))}`, } //- rjf: entity kind tables -@data(DF_IconKind) df_g_entity_kind_icon_kind_table: +@data(DF_IconKind) d_entity_kind_icon_kind_table: { - @expand(DF_EntityKindTable a) `DF_IconKind_$(a.icon_kind)`, + @expand(D_EntityKindTable a) `DF_IconKind_$(a.icon_kind)`, } -@data(String8) df_g_entity_kind_display_string_table: +@data(String8) d_entity_kind_display_string_table: { - @expand(DF_EntityKindTable a) `str8_lit_comp("$(a.display_string)")`, + @expand(D_EntityKindTable a) `str8_lit_comp("$(a.display_string)")`, } -@data(String8) df_g_entity_kind_name_lower_table: +@data(String8) d_entity_kind_name_lower_table: { - @expand(DF_EntityKindTable a) `str8_lit_comp("$(a.name_lower)")`, + @expand(D_EntityKindTable a) `str8_lit_comp("$(a.name_lower)")`, } -@data(String8) df_g_entity_kind_name_lower_plural_table: +@data(String8) d_entity_kind_name_lower_plural_table: { - @expand(DF_EntityKindTable a) `str8_lit_comp("$(a.name_lower_plural)")`, + @expand(D_EntityKindTable a) `str8_lit_comp("$(a.name_lower_plural)")`, } -@data(String8) df_g_entity_kind_name_label_table: +@data(String8) d_entity_kind_name_label_table: { - @expand(DF_EntityKindTable a) `str8_lit_comp("$(a.name_label)")`, + @expand(D_EntityKindTable a) `str8_lit_comp("$(a.name_label)")`, } -@data(DF_EntityKindFlags) df_g_entity_kind_flags_table: +@data(D_EntityKindFlags) d_entity_kind_flags_table: { - @expand(DF_EntityKindTable a) `($(a.op_delete)*DF_EntityKindFlag_CanDelete) | ($(a.op_freeze)*DF_EntityKindFlag_CanFreeze) | ($(a.op_edit)*DF_EntityKindFlag_CanEdit) | ($(a.op_rename)*DF_EntityKindFlag_CanRename) | ($(a.op_enable)*DF_EntityKindFlag_CanEnable) | ($(a.op_cond)*DF_EntityKindFlag_CanCondition) | ($(a.op_dup)*DF_EntityKindFlag_CanDuplicate) | ($(a.lf_mut_user_cfg)*DF_EntityKindFlag_LeafMutUserConfig | $(a.lf_mut_prof_cfg)*DF_EntityKindFlag_LeafMutProjectConfig | $(a.lf_mut_halt)*DF_EntityKindFlag_LeafMutSoftHalt | $(a.lf_mut_dbg)*DF_EntityKindFlag_LeafMutDebugInfoMap | $(a.tr_mut_user_cfg)*DF_EntityKindFlag_TreeMutUserConfig | $(a.tr_mut_prof_cfg)*DF_EntityKindFlag_TreeMutProjectConfig | $(a.tr_mut_halt)*DF_EntityKindFlag_TreeMutSoftHalt | $(a.tr_mut_dbg)*DF_EntityKindFlag_TreeMutDebugInfoMap | $(a.name_is_code)*DF_EntityKindFlag_NameIsCode | $(a.name_is_path)*DF_EntityKindFlag_NameIsPath | $(a.user_lifetime)*DF_EntityKindFlag_UserDefinedLifetime) | $(a.is_serialized)*DF_EntityKindFlag_IsSerializedToConfig`, + @expand(D_EntityKindTable a) `($(a.op_delete)*D_EntityKindFlag_CanDelete) | ($(a.op_freeze)*D_EntityKindFlag_CanFreeze) | ($(a.op_edit)*D_EntityKindFlag_CanEdit) | ($(a.op_rename)*D_EntityKindFlag_CanRename) | ($(a.op_enable)*D_EntityKindFlag_CanEnable) | ($(a.op_cond)*D_EntityKindFlag_CanCondition) | ($(a.op_dup)*D_EntityKindFlag_CanDuplicate) | ($(a.lf_mut_user_cfg)*D_EntityKindFlag_LeafMutUserConfig | $(a.lf_mut_prof_cfg)*D_EntityKindFlag_LeafMutProjectConfig | $(a.lf_mut_halt)*D_EntityKindFlag_LeafMutSoftHalt | $(a.lf_mut_dbg)*D_EntityKindFlag_LeafMutDebugInfoMap | $(a.tr_mut_user_cfg)*D_EntityKindFlag_TreeMutUserConfig | $(a.tr_mut_prof_cfg)*D_EntityKindFlag_TreeMutProjectConfig | $(a.tr_mut_halt)*D_EntityKindFlag_TreeMutSoftHalt | $(a.tr_mut_dbg)*D_EntityKindFlag_TreeMutDebugInfoMap | $(a.name_is_code)*D_EntityKindFlag_NameIsCode | $(a.name_is_path)*D_EntityKindFlag_NameIsPath | $(a.user_lifetime)*D_EntityKindFlag_UserDefinedLifetime) | $(a.is_serialized)*D_EntityKindFlag_IsSerializedToConfig`, } //- rjf: config source tables -@data(String8) df_g_cfg_src_string_table: +@data(String8) d_cfg_src_string_table: { - @expand(DF_CfgSrcTable a) `str8_lit_comp("$(a.string)")`, + @expand(D_CfgSrcTable a) `str8_lit_comp("$(a.string)")`, } -@data(DF_CoreCmdKind) df_g_cfg_src_load_cmd_kind_table: +@data(D_CmdKind) d_cfg_src_load_cmd_kind_table: { - @expand(DF_CfgSrcTable a) `DF_CoreCmdKind_$(a.load_cmd)`, + @expand(D_CfgSrcTable a) `D_CmdKind_$(a.load_cmd)`, } -@data(DF_CoreCmdKind) df_g_cfg_src_write_cmd_kind_table: +@data(D_CmdKind) d_cfg_src_write_cmd_kind_table: { - @expand(DF_CfgSrcTable a) `DF_CoreCmdKind_$(a.write_cmd)`, + @expand(D_CfgSrcTable a) `D_CmdKind_$(a.write_cmd)`, } -@data(DF_CoreCmdKind) df_g_cfg_src_apply_cmd_kind_table: +@data(D_CmdKind) d_cfg_src_apply_cmd_kind_table: { - @expand(DF_CfgSrcTable a) `DF_CoreCmdKind_$(a.apply_cmd)`; + @expand(D_CfgSrcTable a) `D_CmdKind_$(a.apply_cmd)`; } //- rjf: core view rule function prototypes @gen { - @expand(DF_CoreViewRuleTable a) `$(a.xp == "x" -> "DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(" .. a.name_lower .. ");")`; - @expand(DF_CoreViewRuleTable a) `$(a.vb == "x" -> "DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(" .. a.name_lower .. ");")`; + @expand(D_ViewRuleTable a) `$(a.xp == "x" -> "D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(" .. a.name_lower .. ");")`; + @expand(D_ViewRuleTable a) `$(a.vb == "x" -> "D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(" .. a.name_lower .. ");")`; } //- rjf: core command kind tables -@data(DF_CmdSpecInfo) @c_file df_g_core_cmd_kind_spec_info_table: +@data(D_CmdSpecInfo) @c_file d_core_cmd_kind_spec_info_table: { - @expand(DF_CoreCmdTable, a) - ```{ str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.desc)"), str8_lit_comp("$(a.search_tags)"), str8_lit_comp("$(a.display_name)"), (DF_CmdSpecFlag_ListInUI*$(a.ui_vis))|(DF_CmdSpecFlag_ListInIPCDocs*$(a.ipc_docs_vis)), {DF_CmdParamSlot_$(a.q_slot), DF_EntityKind_$(a.q_ent_kind), (DF_CmdQueryFlag_AllowFiles*$(a.q_allow_files))|(DF_CmdQueryFlag_AllowFolders*$(a.q_allow_folders))|(DF_CmdQueryFlag_CodeInput*$(a.q_is_code))|(DF_CmdQueryFlag_KeepOldInput*$(a.q_keep_oi))|(DF_CmdQueryFlag_SelectOldInput*$(a.q_select_oi))|(DF_CmdQueryFlag_Required*$(a.q_required))}, DF_IconKind_$(a.canonical_icon)}```; + @expand(D_CoreCmdTable, a) + ```{ str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.desc)"), str8_lit_comp("$(a.search_tags)"), str8_lit_comp("$(a.display_name)"), (D_CmdSpecFlag_ListInUI*$(a.ui_vis))|(D_CmdSpecFlag_ListInIPCDocs*$(a.ipc_docs_vis)), {D_CmdParamSlot_$(a.q_slot), D_EntityKind_$(a.q_ent_kind), (D_CmdQueryFlag_AllowFiles*$(a.q_allow_files))|(D_CmdQueryFlag_AllowFolders*$(a.q_allow_folders))|(D_CmdQueryFlag_CodeInput*$(a.q_is_code))|(D_CmdQueryFlag_KeepOldInput*$(a.q_keep_oi))|(D_CmdQueryFlag_SelectOldInput*$(a.q_select_oi))|(D_CmdQueryFlag_Required*$(a.q_required))}, DF_IconKind_$(a.canonical_icon)}```; } //- rjf: core view rule tables -@data(DF_CoreViewRuleSpecInfo) @c_file df_g_core_view_rule_spec_info_table: +@data(D_ViewRuleSpecInfo) @c_file d_core_view_rule_spec_info_table: { - @expand(DF_CoreViewRuleTable a) - ```{str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.display_name)"), str8_lit_comp("$(a.schema)"), str8_lit_comp("$(a.description)"), (DF_CoreViewRuleSpecInfoFlag_Inherited*$(a.ih == "x"))|(DF_CoreViewRuleSpecInfoFlag_Expandable*$(a.ex == "x"))|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*$(a.xp == "x"))|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*$(a.vb == "x")), $(a.xp == "x" -> "DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME("..a.name_lower..")") $(a.xp != "x" -> 0), $(a.vb == "x" -> "DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME("..a.name_lower..")") $(a.vb != "x" -> 0), }```; + @expand(D_ViewRuleTable a) + ```{str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.display_name)"), str8_lit_comp("$(a.schema)"), str8_lit_comp("$(a.description)"), (D_ViewRuleSpecInfoFlag_Inherited*$(a.ih == "x"))|(D_ViewRuleSpecInfoFlag_Expandable*$(a.ex == "x"))|(D_ViewRuleSpecInfoFlag_ExprResolution*$(a.xp == "x"))|(D_ViewRuleSpecInfoFlag_VizBlockProd*$(a.vb == "x")), $(a.xp == "x" -> "D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME("..a.name_lower..")") $(a.xp != "x" -> 0), $(a.vb == "x" -> "D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME("..a.name_lower..")") $(a.vb != "x" -> 0), }```; } //- rjf: icon kinds diff --git a/src/df/core/df_core.c b/src/dbg_engine/dbg_engine_core.c similarity index 57% rename from src/df/core/df_core.c rename to src/dbg_engine/dbg_engine_core.c index 36296f6c..db904fba 100644 --- a/src/df/core/df_core.c +++ b/src/dbg_engine/dbg_engine_core.c @@ -1,19 +1,19 @@ // Copyright (c) 2024 Epic Games Tools // Licensed under the MIT license (https://opensource.org/license/mit/) -#undef RADDBG_LAYER_COLOR -#define RADDBG_LAYER_COLOR 0.70f, 0.50f, 0.25f +#undef MARKUP_LAYER_COLOR +#define MARKUP_LAYER_COLOR 0.70f, 0.50f, 0.25f //////////////////////////////// //~ rjf: Generated Code -#include "df/core/generated/df_core.meta.c" +#include "dbg_engine/generated/dbg_engine.meta.c" //////////////////////////////// //~ rjf: Basic Helpers internal U64 -df_hash_from_seed_string(U64 seed, String8 string) +d_hash_from_seed_string(U64 seed, String8 string) { U64 result = seed; for(U64 i = 0; i < string.size; i += 1) @@ -24,13 +24,13 @@ df_hash_from_seed_string(U64 seed, String8 string) } internal U64 -df_hash_from_string(String8 string) +d_hash_from_string(String8 string) { - return df_hash_from_seed_string(5381, string); + return d_hash_from_seed_string(5381, string); } internal U64 -df_hash_from_seed_string__case_insensitive(U64 seed, String8 string) +d_hash_from_seed_string__case_insensitive(U64 seed, String8 string) { U64 result = seed; for(U64 i = 0; i < string.size; i += 1) @@ -41,56 +41,56 @@ df_hash_from_seed_string__case_insensitive(U64 seed, String8 string) } internal U64 -df_hash_from_string__case_insensitive(String8 string) +d_hash_from_string__case_insensitive(String8 string) { - return df_hash_from_seed_string__case_insensitive(5381, string); + return d_hash_from_seed_string__case_insensitive(5381, string); } //////////////////////////////// //~ rjf: Handles -internal DF_Handle -df_handle_zero(void) +internal D_Handle +d_handle_zero(void) { - DF_Handle result = {0}; + D_Handle result = {0}; return result; } internal B32 -df_handle_match(DF_Handle a, DF_Handle b) +d_handle_match(D_Handle a, D_Handle b) { return (a.u64[0] == b.u64[0] && a.u64[1] == b.u64[1]); } internal void -df_handle_list_push_node(DF_HandleList *list, DF_HandleNode *node) +d_handle_list_push_node(D_HandleList *list, D_HandleNode *node) { DLLPushBack(list->first, list->last, node); list->count += 1; } internal void -df_handle_list_push(Arena *arena, DF_HandleList *list, DF_Handle handle) +d_handle_list_push(Arena *arena, D_HandleList *list, D_Handle handle) { - DF_HandleNode *n = push_array(arena, DF_HandleNode, 1); + D_HandleNode *n = push_array(arena, D_HandleNode, 1); n->handle = handle; - df_handle_list_push_node(list, n); + d_handle_list_push_node(list, n); } internal void -df_handle_list_remove(DF_HandleList *list, DF_HandleNode *node) +d_handle_list_remove(D_HandleList *list, D_HandleNode *node) { DLLRemove(list->first, list->last, node); list->count -= 1; } -internal DF_HandleNode * -df_handle_list_find(DF_HandleList *list, DF_Handle handle) +internal D_HandleNode * +d_handle_list_find(D_HandleList *list, D_Handle handle) { - DF_HandleNode *result = 0; - for(DF_HandleNode *n = list->first; n != 0; n = n->next) + D_HandleNode *result = 0; + for(D_HandleNode *n = list->first; n != 0; n = n->next) { - if(df_handle_match(n->handle, handle)) + if(d_handle_match(n->handle, handle)) { result = n; break; @@ -99,13 +99,13 @@ df_handle_list_find(DF_HandleList *list, DF_Handle handle) return result; } -internal DF_HandleList -df_push_handle_list_copy(Arena *arena, DF_HandleList list) +internal D_HandleList +d_push_handle_list_copy(Arena *arena, D_HandleList list) { - DF_HandleList result = {0}; - for(DF_HandleNode *n = list.first; n != 0; n = n->next) + D_HandleList result = {0}; + for(D_HandleNode *n = list.first; n != 0; n = n->next) { - df_handle_list_push(arena, &result, n->handle); + d_handle_list_push(arena, &result, n->handle); } return result; } @@ -113,11 +113,11 @@ df_push_handle_list_copy(Arena *arena, DF_HandleList list) //////////////////////////////// //~ rjf: State History Data Structure -internal DF_StateDeltaHistory * -df_state_delta_history_alloc(void) +internal D_StateDeltaHistory * +d_state_delta_history_alloc(void) { Arena *arena = arena_alloc(); - DF_StateDeltaHistory *hist = push_array(arena, DF_StateDeltaHistory, 1); + D_StateDeltaHistory *hist = push_array(arena, D_StateDeltaHistory, 1); hist->arena = arena; for(Side side = (Side)0; side < Side_COUNT; side = (Side)(side+1)) { @@ -127,7 +127,7 @@ df_state_delta_history_alloc(void) } internal void -df_state_delta_history_release(DF_StateDeltaHistory *hist) +d_state_delta_history_release(D_StateDeltaHistory *hist) { for(Side side = (Side)0; side < Side_COUNT; side = (Side)(side+1)) { @@ -137,7 +137,7 @@ df_state_delta_history_release(DF_StateDeltaHistory *hist) } internal void -df_state_delta_history_batch_begin(DF_StateDeltaHistory *hist) +d_state_delta_history_batch_begin(D_StateDeltaHistory *hist) { if(hist == 0) { return; } if(hist->side_arenas[Side_Max] != 0) @@ -145,53 +145,53 @@ df_state_delta_history_batch_begin(DF_StateDeltaHistory *hist) arena_clear(hist->side_arenas[Side_Max]); hist->side_tops[Side_Max] = 0; } - DF_StateDeltaBatch *batch = push_array(hist->side_arenas[Side_Min], DF_StateDeltaBatch, 1); + D_StateDeltaBatch *batch = push_array(hist->side_arenas[Side_Min], D_StateDeltaBatch, 1); SLLStackPush(hist->side_tops[Side_Min], batch); hist->batch_is_active = 1; } internal void -df_state_delta_history_batch_end(DF_StateDeltaHistory *hist) +d_state_delta_history_batch_end(D_StateDeltaHistory *hist) { if(hist == 0) { return; } hist->batch_is_active = 0; } internal void -df_state_delta_history_push_delta_(DF_StateDeltaHistory *hist, DF_StateDeltaParams *params) +d_state_delta_history_push_delta_(D_StateDeltaHistory *hist, D_StateDeltaParams *params) { if(hist == 0) { return; } - DF_StateDeltaBatch *batch = hist->side_tops[Side_Min]; + D_StateDeltaBatch *batch = hist->side_tops[Side_Min]; if(batch == 0 || hist->batch_is_active == 0) { return; } - DF_StateDeltaNode *n = push_array(hist->side_arenas[Side_Min], DF_StateDeltaNode, 1); + D_StateDeltaNode *n = push_array(hist->side_arenas[Side_Min], D_StateDeltaNode, 1); SLLQueuePush(batch->first, batch->last, n); - n->v.guard_entity = df_handle_from_entity(params->guard_entity); + n->v.guard_entity = d_handle_from_entity(params->guard_entity); n->v.vaddr = (U64)params->ptr; n->v.data = push_str8_copy(hist->arena, str8((U8*)params->ptr, params->size)); } internal void -df_state_delta_history_wind(DF_StateDeltaHistory *hist, Side side) +d_state_delta_history_wind(D_StateDeltaHistory *hist, Side side) { if(hist == 0) { return; } B32 done = 0; - for(DF_StateDeltaBatch *src_batch = hist->side_tops[side]; + for(D_StateDeltaBatch *src_batch = hist->side_tops[side]; src_batch != 0 && !done; src_batch = hist->side_tops[side]) { U64 pop_pos = (U64)hist->side_tops[side] - (U64)hist->side_arenas[side]; SLLStackPop(hist->side_tops[side]); { - DF_StateDeltaBatch *dst_batch = push_array(hist->side_arenas[side_flip(side)], DF_StateDeltaBatch, 1); + D_StateDeltaBatch *dst_batch = push_array(hist->side_arenas[side_flip(side)], D_StateDeltaBatch, 1); SLLStackPush(hist->side_tops[side_flip(side)], dst_batch); - for(DF_StateDeltaNode *src_n = src_batch->first; src_n != 0; src_n = src_n->next) + for(D_StateDeltaNode *src_n = src_batch->first; src_n != 0; src_n = src_n->next) { - DF_StateDelta *src_delta = &src_n->v; - B32 handle_is_good = (df_handle_match(src_delta->guard_entity, df_handle_zero()) || - !df_entity_is_nil(df_entity_from_handle(src_delta->guard_entity))); + D_StateDelta *src_delta = &src_n->v; + B32 handle_is_good = (d_handle_match(src_delta->guard_entity, d_handle_zero()) || + !d_entity_is_nil(d_entity_from_handle(src_delta->guard_entity))); if(handle_is_good) { - DF_StateDeltaNode *dst_n = push_array(hist->side_arenas[side_flip(side)], DF_StateDeltaNode, 1); + D_StateDeltaNode *dst_n = push_array(hist->side_arenas[side_flip(side)], D_StateDeltaNode, 1); SLLQueuePush(dst_batch->first, dst_batch->last, dst_n); dst_n->v.vaddr = src_delta->vaddr; dst_n->v.data = push_str8_copy(hist->side_arenas[side_flip(side)], str8((U8 *)src_delta->vaddr, src_delta->data.size)); @@ -209,10 +209,10 @@ df_state_delta_history_wind(DF_StateDeltaHistory *hist, Side side) //- rjf: keys -internal DF_ExpandKey -df_expand_key_make(U64 parent_hash, U64 child_num) +internal D_ExpandKey +d_expand_key_make(U64 parent_hash, U64 child_num) { - DF_ExpandKey key; + D_ExpandKey key; { key.parent_hash = parent_hash; key.child_num = child_num; @@ -220,50 +220,50 @@ df_expand_key_make(U64 parent_hash, U64 child_num) return key; } -internal DF_ExpandKey -df_expand_key_zero(void) +internal D_ExpandKey +d_expand_key_zero(void) { - DF_ExpandKey key = {0}; + D_ExpandKey key = {0}; return key; } internal B32 -df_expand_key_match(DF_ExpandKey a, DF_ExpandKey b) +d_expand_key_match(D_ExpandKey a, D_ExpandKey b) { return MemoryMatchStruct(&a, &b); } internal U64 -df_hash_from_expand_key(DF_ExpandKey key) +df_hash_from_expand_key(D_ExpandKey key) { U64 data[] = { key.child_num, }; - U64 hash = df_hash_from_seed_string(key.parent_hash, str8((U8 *)data, sizeof(data))); + U64 hash = d_hash_from_seed_string(key.parent_hash, str8((U8 *)data, sizeof(data))); return hash; } //- rjf: table internal void -df_expand_tree_table_init(Arena *arena, DF_ExpandTreeTable *table, U64 slot_count) +d_expand_tree_table_init(Arena *arena, D_ExpandTreeTable *table, U64 slot_count) { MemoryZeroStruct(table); table->slots_count = slot_count; - table->slots = push_array(arena, DF_ExpandSlot, table->slots_count); + table->slots = push_array(arena, D_ExpandSlot, table->slots_count); } -internal DF_ExpandNode * -df_expand_node_from_key(DF_ExpandTreeTable *table, DF_ExpandKey key) +internal D_ExpandNode * +d_expand_node_from_key(D_ExpandTreeTable *table, D_ExpandKey key) { U64 hash = df_hash_from_expand_key(key); U64 slot_idx = hash%table->slots_count; - DF_ExpandSlot *slot = &table->slots[slot_idx]; - DF_ExpandNode *node = 0; - for(DF_ExpandNode *n = slot->first; n != 0; n = n->hash_next) + D_ExpandSlot *slot = &table->slots[slot_idx]; + D_ExpandNode *node = 0; + for(D_ExpandNode *n = slot->first; n != 0; n = n->hash_next) { - if(df_expand_key_match(n->key, key)) + if(d_expand_key_match(n->key, key)) { node = n; break; @@ -273,18 +273,18 @@ df_expand_node_from_key(DF_ExpandTreeTable *table, DF_ExpandKey key) } internal B32 -df_expand_key_is_set(DF_ExpandTreeTable *table, DF_ExpandKey key) +d_expand_key_is_set(D_ExpandTreeTable *table, D_ExpandKey key) { - DF_ExpandNode *node = df_expand_node_from_key(table, key); + D_ExpandNode *node = d_expand_node_from_key(table, key); return (node != 0 && node->expanded); } internal void -df_expand_set_expansion(Arena *arena, DF_ExpandTreeTable *table, DF_ExpandKey parent_key, DF_ExpandKey key, B32 expanded) +d_expand_set_expansion(Arena *arena, D_ExpandTreeTable *table, D_ExpandKey parent_key, D_ExpandKey key, B32 expanded) { // rjf: map keys => nodes - DF_ExpandNode *parent_node = df_expand_node_from_key(table, parent_key); - DF_ExpandNode *node = df_expand_node_from_key(table, key); + D_ExpandNode *parent_node = d_expand_node_from_key(table, parent_key); + D_ExpandNode *node = d_expand_node_from_key(table, key); // rjf: make node if we don't have one, and we need one if(node == 0 && expanded) @@ -297,7 +297,7 @@ df_expand_set_expansion(Arena *arena, DF_ExpandTreeTable *table, DF_ExpandKey pa } else { - node = push_array(arena, DF_ExpandNode, 1); + node = push_array(arena, D_ExpandNode, 1); } // rjf: link into table @@ -308,8 +308,8 @@ df_expand_set_expansion(Arena *arena, DF_ExpandTreeTable *table, DF_ExpandKey pa // rjf: link into parent if(parent_node != 0) { - DF_ExpandNode *prev = 0; - for(DF_ExpandNode *n = parent_node->first; n != 0; n = n->next) + D_ExpandNode *prev = 0; + for(D_ExpandNode *n = parent_node->first; n != 0; n = n->next) { if(n->key.child_num < key.child_num) { @@ -355,22 +355,13 @@ df_expand_set_expansion(Arena *arena, DF_ExpandTreeTable *table, DF_ExpandKey pa //////////////////////////////// //~ rjf: Config Type Functions -internal DF_CfgTree * -df_cfg_tree_copy(Arena *arena, DF_CfgTree *src) -{ - DF_CfgTree *dst = push_array(arena, DF_CfgTree, 1); - dst->source = src->source; - dst->root = md_tree_copy(arena, src->root); - return dst; -} - internal void -df_cfg_table_push_unparsed_string(Arena *arena, DF_CfgTable *table, String8 string, DF_CfgSrc source) +d_cfg_table_push_unparsed_string(Arena *arena, D_CfgTable *table, String8 string, D_CfgSrc source) { if(table->slot_count == 0) { table->slot_count = 64; - table->slots = push_array(arena, DF_CfgSlot, table->slot_count); + table->slots = push_array(arena, D_CfgSlot, table->slot_count); } MD_TokenizeResult tokenize = md_tokenize_from_text(arena, string); MD_ParseResult parse = md_parse_from_text_tokens(arena, str8_lit(""), string, tokenize.tokens); @@ -378,13 +369,13 @@ df_cfg_table_push_unparsed_string(Arena *arena, DF_CfgTable *table, String8 stri { // rjf: map string -> hash*slot String8 string = str8(tln->string.str, tln->string.size); - U64 hash = df_hash_from_string__case_insensitive(string); + U64 hash = d_hash_from_string__case_insensitive(string); U64 slot_idx = hash % table->slot_count; - DF_CfgSlot *slot = &table->slots[slot_idx]; + D_CfgSlot *slot = &table->slots[slot_idx]; // rjf: find existing value for this string - DF_CfgVal *val = 0; - for(DF_CfgVal *v = slot->first; v != 0; v = v->hash_next) + D_CfgVal *val = 0; + for(D_CfgVal *v = slot->first; v != 0; v = v->hash_next) { if(str8_match(v->string, string, StringMatchFlag_CaseInsensitive)) { @@ -396,7 +387,7 @@ df_cfg_table_push_unparsed_string(Arena *arena, DF_CfgTable *table, String8 stri // rjf: create new value if needed if(val == 0) { - val = push_array(arena, DF_CfgVal, 1); + val = push_array(arena, D_CfgVal, 1); val->string = push_str8_copy(arena, string); val->insertion_stamp = table->insertion_stamp_counter; SLLStackPush_N(slot->first, val, hash_next); @@ -405,31 +396,31 @@ df_cfg_table_push_unparsed_string(Arena *arena, DF_CfgTable *table, String8 stri } // rjf: create new node within this value - DF_CfgTree *tree = push_array(arena, DF_CfgTree, 1); - SLLQueuePush_NZ(&df_g_nil_cfg_tree, val->first, val->last, tree, next); + D_CfgTree *tree = push_array(arena, D_CfgTree, 1); + SLLQueuePush_NZ(&d_nil_cfg_tree, val->first, val->last, tree, next); tree->source = source; tree->root = md_tree_copy(arena, tln); } } -internal DF_CfgTable -df_cfg_table_from_inheritance(Arena *arena, DF_CfgTable *src) +internal D_CfgTable +d_cfg_table_from_inheritance(Arena *arena, D_CfgTable *src) { - DF_CfgTable dst_ = {0}; - DF_CfgTable *dst = &dst_; + D_CfgTable dst_ = {0}; + D_CfgTable *dst = &dst_; { dst->slot_count = src->slot_count; - dst->slots = push_array(arena, DF_CfgSlot, dst->slot_count); + dst->slots = push_array(arena, D_CfgSlot, dst->slot_count); } - for(DF_CfgVal *src_val = src->first_val; src_val != 0 && src_val != &df_g_nil_cfg_val; src_val = src_val->linear_next) + for(D_CfgVal *src_val = src->first_val; src_val != 0 && src_val != &d_nil_cfg_val; src_val = src_val->linear_next) { - DF_CoreViewRuleSpec *spec = df_core_view_rule_spec_from_string(src_val->string); - if(spec->info.flags & DF_CoreViewRuleSpecInfoFlag_Inherited) + D_ViewRuleSpec *spec = d_view_rule_spec_from_string(src_val->string); + if(spec->info.flags & D_ViewRuleSpecInfoFlag_Inherited) { - U64 hash = df_hash_from_string(spec->info.string); + U64 hash = d_hash_from_string(spec->info.string); U64 dst_slot_idx = hash%dst->slot_count; - DF_CfgSlot *dst_slot = &dst->slots[dst_slot_idx]; - DF_CfgVal *dst_val = push_array(arena, DF_CfgVal, 1); + D_CfgSlot *dst_slot = &dst->slots[dst_slot_idx]; + D_CfgVal *dst_val = push_array(arena, D_CfgVal, 1); dst_val->first = src_val->first; dst_val->last = src_val->last; dst_val->string = src_val->string; @@ -441,26 +432,16 @@ df_cfg_table_from_inheritance(Arena *arena, DF_CfgTable *src) return dst_; } -internal DF_CfgTable -df_cfg_table_copy(Arena *arena, DF_CfgTable *src) +internal D_CfgVal * +d_cfg_val_from_string(D_CfgTable *table, String8 string) { - DF_CfgTable result = {0}; - result.slot_count = src->slot_count; - result.slots = push_array(arena, DF_CfgSlot, result.slot_count); - MemoryCopy(result.slots, src->slots, sizeof(DF_CfgSlot)*result.slot_count); - return result; -} - -internal DF_CfgVal * -df_cfg_val_from_string(DF_CfgTable *table, String8 string) -{ - DF_CfgVal *result = &df_g_nil_cfg_val; + D_CfgVal *result = &d_nil_cfg_val; if(table->slot_count != 0) { - U64 hash = df_hash_from_string__case_insensitive(string); + U64 hash = d_hash_from_string__case_insensitive(string); U64 slot_idx = hash % table->slot_count; - DF_CfgSlot *slot = &table->slots[slot_idx]; - for(DF_CfgVal *val = slot->first; val != 0; val = val->hash_next) + D_CfgSlot *slot = &table->slots[slot_idx]; + for(D_CfgVal *val = slot->first; val != 0; val = val->hash_next) { if(str8_match(val->string, string, StringMatchFlag_CaseInsensitive)) { @@ -475,13 +456,13 @@ df_cfg_val_from_string(DF_CfgTable *table, String8 string) //////////////////////////////// //~ rjf: Debug Info Extraction Type Pure Functions -internal DF_LineList -df_line_list_copy(Arena *arena, DF_LineList *list) +internal D_LineList +d_line_list_copy(Arena *arena, D_LineList *list) { - DF_LineList dst = {0}; - for(DF_LineNode *src_n = list->first; src_n != 0; src_n = src_n->next) + D_LineList dst = {0}; + for(D_LineNode *src_n = list->first; src_n != 0; src_n = src_n->next) { - DF_LineNode *dst_n = push_array(arena, DF_LineNode, 1); + D_LineNode *dst_n = push_array(arena, D_LineNode, 1); MemoryCopyStruct(dst_n, src_n); dst_n->v.dbgi_key = di_key_copy(arena, &src_n->v.dbgi_key); SLLQueuePush(dst.first, dst.last, dst_n); @@ -493,11 +474,11 @@ df_line_list_copy(Arena *arena, DF_LineList *list) //////////////////////////////// //~ rjf: Control Flow Analysis Functions -internal DF_CtrlFlowInfo -df_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DASM_InstFlags exit_points_mask, Architecture arch, U64 vaddr, String8 code) +internal D_CtrlFlowInfo +d_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DASM_InstFlags exit_points_mask, Architecture arch, U64 vaddr, String8 code) { Temp scratch = scratch_begin(&arena, 1); - DF_CtrlFlowInfo info = {0}; + D_CtrlFlowInfo info = {0}; for(U64 offset = 0; offset < code.size;) { DASM_Inst inst = dasm_inst_from_code(scratch.arena, arch, vaddr+offset, str8_skip(code, offset), DASM_Syntax_Intel); @@ -506,11 +487,11 @@ df_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DASM_InstFlags exit_points_ info.total_size += inst.size; if(inst.flags & exit_points_mask) { - DF_CtrlFlowPoint point = {0}; + D_CtrlFlowPoint point = {0}; point.inst_flags = inst.flags; point.vaddr = inst_vaddr; point.jump_dest_vaddr = inst.jump_dest_vaddr; - DF_CtrlFlowPointNode *node = push_array(arena, DF_CtrlFlowPointNode, 1); + D_CtrlFlowPointNode *node = push_array(arena, D_CtrlFlowPointNode, 1); node->v = point; SLLQueuePush(info.exit_points.first, info.exit_points.last, node); info.exit_points.count += 1; @@ -526,78 +507,24 @@ df_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DASM_InstFlags exit_points_ //- rjf: specs internal B32 -df_cmd_spec_is_nil(DF_CmdSpec *spec) +d_cmd_spec_is_nil(D_CmdSpec *spec) { - return (spec == 0 || spec == &df_g_nil_cmd_spec); + return (spec == 0 || spec == &d_nil_cmd_spec); } internal void -df_cmd_spec_list_push(Arena *arena, DF_CmdSpecList *list, DF_CmdSpec *spec) +d_cmd_spec_list_push(Arena *arena, D_CmdSpecList *list, D_CmdSpec *spec) { - DF_CmdSpecNode *n = push_array(arena, DF_CmdSpecNode, 1); + D_CmdSpecNode *n = push_array(arena, D_CmdSpecNode, 1); n->spec = spec; SLLQueuePush(list->first, list->last, n); list->count += 1; } -internal DF_CmdSpecArray -df_cmd_spec_array_from_list(Arena *arena, DF_CmdSpecList list) -{ - DF_CmdSpecArray result = {0}; - result.count = list.count; - result.v = push_array(arena, DF_CmdSpec *, list.count); - U64 idx = 0; - for(DF_CmdSpecNode *n = list.first; n != 0; n = n->next, idx += 1) - { - result.v[idx] = n->spec; - } - return result; -} - -internal int -df_qsort_compare_cmd_spec__run_counter(DF_CmdSpec **a, DF_CmdSpec **b) -{ - int result = 0; - if(a[0]->run_count > b[0]->run_count) - { - result = -1; - } - else if(a[0]->run_count < b[0]->run_count) - { - result = +1; - } - return result; -} - -internal void -df_cmd_spec_array_sort_by_run_counter__in_place(DF_CmdSpecArray array) -{ - quick_sort(array.v, array.count, sizeof(DF_CmdSpec *), df_qsort_compare_cmd_spec__run_counter); -} - -internal DF_Handle -df_handle_from_cmd_spec(DF_CmdSpec *spec) -{ - DF_Handle handle = {0}; - handle.u64[0] = (U64)spec; - return handle; -} - -internal DF_CmdSpec * -df_cmd_spec_from_handle(DF_Handle handle) -{ - DF_CmdSpec *result = (DF_CmdSpec *)handle.u64[0]; - if(result == 0) - { - result = &df_g_nil_cmd_spec; - } - return result; -} - //- rjf: string -> command parsing internal String8 -df_cmd_name_part_from_string(String8 string) +d_cmd_name_part_from_string(String8 string) { String8 result = string; for(U64 idx = 0; idx <= string.size; idx += 1) @@ -612,7 +539,7 @@ df_cmd_name_part_from_string(String8 string) } internal String8 -df_cmd_arg_part_from_string(String8 string) +d_cmd_arg_part_from_string(String8 string) { String8 result = str8_lit(""); B32 found_space = 0; @@ -633,63 +560,63 @@ df_cmd_arg_part_from_string(String8 string) //- rjf: command parameter bundles -internal DF_CmdParams -df_cmd_params_zero(void) +internal D_CmdParams +d_cmd_params_zero(void) { - DF_CmdParams p = {0}; + D_CmdParams p = {0}; return p; } internal void -df_cmd_params_mark_slot(DF_CmdParams *params, DF_CmdParamSlot slot) +d_cmd_params_mark_slot(D_CmdParams *params, D_CmdParamSlot slot) { params->slot_props[slot/64] |= (1ull<<(slot%64)); } internal B32 -df_cmd_params_has_slot(DF_CmdParams *params, DF_CmdParamSlot slot) +d_cmd_params_has_slot(D_CmdParams *params, D_CmdParamSlot slot) { return !!(params->slot_props[slot/64] & (1ull<<(slot%64))); } internal String8 -df_cmd_params_apply_spec_query(Arena *arena, DF_CmdParams *params, DF_CmdSpec *spec, String8 query) +d_cmd_params_apply_spec_query(Arena *arena, D_CmdParams *params, D_CmdSpec *spec, String8 query) { String8 error = {0}; switch(spec->info.query.slot) { default: - case DF_CmdParamSlot_String: + case D_CmdParamSlot_String: { params->string = push_str8_copy(arena, query); - df_cmd_params_mark_slot(params, DF_CmdParamSlot_String); + d_cmd_params_mark_slot(params, D_CmdParamSlot_String); }break; - case DF_CmdParamSlot_FilePath: + case D_CmdParamSlot_FilePath: { String8TxtPtPair pair = str8_txt_pt_pair_from_string(query); params->file_path = push_str8_copy(arena, pair.string); params->text_point = pair.pt; - df_cmd_params_mark_slot(params, DF_CmdParamSlot_FilePath); - df_cmd_params_mark_slot(params, DF_CmdParamSlot_TextPoint); + d_cmd_params_mark_slot(params, D_CmdParamSlot_FilePath); + d_cmd_params_mark_slot(params, D_CmdParamSlot_TextPoint); }break; - case DF_CmdParamSlot_TextPoint: + case D_CmdParamSlot_TextPoint: { U64 v = 0; if(try_u64_from_str8_c_rules(query, &v)) { params->text_point.column = 1; params->text_point.line = v; - df_cmd_params_mark_slot(params, DF_CmdParamSlot_TextPoint); + d_cmd_params_mark_slot(params, D_CmdParamSlot_TextPoint); } else { error = str8_lit("Couldn't interpret as a line number."); } }break; - case DF_CmdParamSlot_VirtualAddr: goto use_numeric_eval; - case DF_CmdParamSlot_VirtualOff: goto use_numeric_eval; - case DF_CmdParamSlot_Index: goto use_numeric_eval; - case DF_CmdParamSlot_ID: goto use_numeric_eval; + case D_CmdParamSlot_VirtualAddr: goto use_numeric_eval; + case D_CmdParamSlot_VirtualOff: goto use_numeric_eval; + case D_CmdParamSlot_Index: goto use_numeric_eval; + case D_CmdParamSlot_ID: goto use_numeric_eval; use_numeric_eval: { Temp scratch = scratch_begin(&arena, 1); @@ -707,35 +634,35 @@ df_cmd_params_apply_spec_query(Arena *arena, DF_CmdParams *params, DF_CmdSpec *s switch(spec->info.query.slot) { default:{}break; - case DF_CmdParamSlot_VirtualAddr: + case D_CmdParamSlot_VirtualAddr: { params->vaddr = u64; - df_cmd_params_mark_slot(params, DF_CmdParamSlot_VirtualAddr); + d_cmd_params_mark_slot(params, D_CmdParamSlot_VirtualAddr); }break; - case DF_CmdParamSlot_VirtualOff: + case D_CmdParamSlot_VirtualOff: { params->voff = u64; - df_cmd_params_mark_slot(params, DF_CmdParamSlot_VirtualOff); + d_cmd_params_mark_slot(params, D_CmdParamSlot_VirtualOff); }break; - case DF_CmdParamSlot_Index: + case D_CmdParamSlot_Index: { params->index = u64; - df_cmd_params_mark_slot(params, DF_CmdParamSlot_Index); + d_cmd_params_mark_slot(params, D_CmdParamSlot_Index); }break; - case DF_CmdParamSlot_UnwindIndex: + case D_CmdParamSlot_UnwindIndex: { params->unwind_index = u64; - df_cmd_params_mark_slot(params, DF_CmdParamSlot_UnwindIndex); + d_cmd_params_mark_slot(params, D_CmdParamSlot_UnwindIndex); }break; - case DF_CmdParamSlot_InlineDepth: + case D_CmdParamSlot_InlineDepth: { params->inline_depth = u64; - df_cmd_params_mark_slot(params, DF_CmdParamSlot_InlineDepth); + d_cmd_params_mark_slot(params, D_CmdParamSlot_InlineDepth); }break; - case DF_CmdParamSlot_ID: + case D_CmdParamSlot_ID: { params->id = u64; - df_cmd_params_mark_slot(params, DF_CmdParamSlot_ID); + d_cmd_params_mark_slot(params, D_CmdParamSlot_ID); }break; } } @@ -752,9 +679,9 @@ df_cmd_params_apply_spec_query(Arena *arena, DF_CmdParams *params, DF_CmdSpec *s //- rjf: command lists internal void -df_cmd_list_push(Arena *arena, DF_CmdList *cmds, DF_CmdParams *params, DF_CmdSpec *spec) +d_cmd_list_push(Arena *arena, D_CmdList *cmds, D_CmdParams *params, D_CmdSpec *spec) { - DF_CmdNode *n = push_array(arena, DF_CmdNode, 1); + D_CmdNode *n = push_array(arena, D_CmdNode, 1); n->cmd.spec = spec; n->cmd.params = df_cmd_params_copy(arena, params); DLLPushBack(cmds->first, cmds->last, n); @@ -763,15 +690,15 @@ df_cmd_list_push(Arena *arena, DF_CmdList *cmds, DF_CmdParams *params, DF_CmdSpe //- rjf: string -> core layer command kind -internal DF_CoreCmdKind -df_core_cmd_kind_from_string(String8 string) +internal D_CmdKind +d_cmd_kind_from_string(String8 string) { - DF_CoreCmdKind result = DF_CoreCmdKind_Null; - for(U64 idx = 0; idx < ArrayCount(df_g_core_cmd_kind_spec_info_table); idx += 1) + D_CmdKind result = D_CmdKind_Null; + for(U64 idx = 0; idx < ArrayCount(d_core_cmd_kind_spec_info_table); idx += 1) { - if(str8_match(string, df_g_core_cmd_kind_spec_info_table[idx].string, StringMatchFlag_CaseInsensitive)) + if(str8_match(string, d_core_cmd_kind_spec_info_table[idx].string, StringMatchFlag_CaseInsensitive)) { - result = (DF_CoreCmdKind)idx; + result = (D_CmdKind)idx; break; } } @@ -784,85 +711,85 @@ df_core_cmd_kind_from_string(String8 string) //- rjf: nil internal B32 -df_entity_is_nil(DF_Entity *entity) +d_entity_is_nil(D_Entity *entity) { - return (entity == 0 || entity == &df_g_nil_entity); + return (entity == 0 || entity == &d_nil_entity); } //- rjf: handle <-> entity conversions internal U64 -df_index_from_entity(DF_Entity *entity) +d_index_from_entity(D_Entity *entity) { - return (U64)(entity - df_state->entities_base); + return (U64)(entity - d_state->entities_base); } -internal DF_Handle -df_handle_from_entity(DF_Entity *entity) +internal D_Handle +d_handle_from_entity(D_Entity *entity) { - DF_Handle handle = df_handle_zero(); - if(!df_entity_is_nil(entity)) + D_Handle handle = d_handle_zero(); + if(!d_entity_is_nil(entity)) { - handle.u64[0] = df_index_from_entity(entity); + handle.u64[0] = d_index_from_entity(entity); handle.u64[1] = entity->gen; } return handle; } -internal DF_Entity * -df_entity_from_handle(DF_Handle handle) +internal D_Entity * +d_entity_from_handle(D_Handle handle) { - DF_Entity *result = df_state->entities_base + handle.u64[0]; - if(handle.u64[0] >= df_state->entities_count || result->gen != handle.u64[1]) + D_Entity *result = d_state->entities_base + handle.u64[0]; + if(handle.u64[0] >= d_state->entities_count || result->gen != handle.u64[1]) { - result = &df_g_nil_entity; + result = &d_nil_entity; } return result; } -internal DF_EntityList -df_entity_list_from_handle_list(Arena *arena, DF_HandleList handles) +internal D_EntityList +d_entity_list_from_handle_list(Arena *arena, D_HandleList handles) { - DF_EntityList result = {0}; - for(DF_HandleNode *n = handles.first; n != 0; n = n->next) + D_EntityList result = {0}; + for(D_HandleNode *n = handles.first; n != 0; n = n->next) { - DF_Entity *entity = df_entity_from_handle(n->handle); - if(!df_entity_is_nil(entity)) + D_Entity *entity = d_entity_from_handle(n->handle); + if(!d_entity_is_nil(entity)) { - df_entity_list_push(arena, &result, entity); + d_entity_list_push(arena, &result, entity); } } return result; } -internal DF_HandleList -df_handle_list_from_entity_list(Arena *arena, DF_EntityList entities) +internal D_HandleList +d_handle_list_from_entity_list(Arena *arena, D_EntityList entities) { - DF_HandleList result = {0}; - for(DF_EntityNode *n = entities.first; n != 0; n = n->next) + D_HandleList result = {0}; + for(D_EntityNode *n = entities.first; n != 0; n = n->next) { - DF_Handle handle = df_handle_from_entity(n->entity); - df_handle_list_push(arena, &result, handle); + D_Handle handle = d_handle_from_entity(n->entity); + d_handle_list_push(arena, &result, handle); } return result; } //- rjf: entity recursion iterators -internal DF_EntityRec -df_entity_rec_df(DF_Entity *entity, DF_Entity *subtree_root, U64 sib_off, U64 child_off) +internal D_EntityRec +d_entity_rec_df(D_Entity *entity, D_Entity *subtree_root, U64 sib_off, U64 child_off) { - DF_EntityRec result = {0}; - if(!df_entity_is_nil(*MemberFromOffset(DF_Entity **, entity, child_off))) + D_EntityRec result = {0}; + if(!d_entity_is_nil(*MemberFromOffset(D_Entity **, entity, child_off))) { - result.next = *MemberFromOffset(DF_Entity **, entity, child_off); + result.next = *MemberFromOffset(D_Entity **, entity, child_off); result.push_count = 1; } - else for(DF_Entity *parent = entity; parent != subtree_root && !df_entity_is_nil(parent); parent = parent->parent) + else for(D_Entity *parent = entity; parent != subtree_root && !d_entity_is_nil(parent); parent = parent->parent) { - if(parent != subtree_root && !df_entity_is_nil(*MemberFromOffset(DF_Entity **, parent, sib_off))) + if(parent != subtree_root && !d_entity_is_nil(*MemberFromOffset(D_Entity **, parent, sib_off))) { - result.next = *MemberFromOffset(DF_Entity **, parent, sib_off); + result.next = *MemberFromOffset(D_Entity **, parent, sib_off); break; } result.pop_count += 1; @@ -872,11 +799,11 @@ df_entity_rec_df(DF_Entity *entity, DF_Entity *subtree_root, U64 sib_off, U64 ch //- rjf: ancestor/child introspection -internal DF_Entity * -df_entity_child_from_kind(DF_Entity *entity, DF_EntityKind kind) +internal D_Entity * +d_entity_child_from_kind(D_Entity *entity, D_EntityKind kind) { - DF_Entity *result = &df_g_nil_entity; - for(DF_Entity *child = entity->first; !df_entity_is_nil(child); child = child->next) + D_Entity *result = &d_nil_entity; + for(D_Entity *child = entity->first; !d_entity_is_nil(child); child = child->next) { if(child->kind == kind) { @@ -887,11 +814,11 @@ df_entity_child_from_kind(DF_Entity *entity, DF_EntityKind kind) return result; } -internal DF_Entity * -df_entity_ancestor_from_kind(DF_Entity *entity, DF_EntityKind kind) +internal D_Entity * +d_entity_ancestor_from_kind(D_Entity *entity, D_EntityKind kind) { - DF_Entity *result = &df_g_nil_entity; - for(DF_Entity *p = entity->parent; !df_entity_is_nil(p); p = p->parent) + D_Entity *result = &d_nil_entity; + for(D_Entity *p = entity->parent; !d_entity_is_nil(p); p = p->parent) { if(p->kind == kind) { @@ -902,25 +829,25 @@ df_entity_ancestor_from_kind(DF_Entity *entity, DF_EntityKind kind) return result; } -internal DF_EntityList -df_push_entity_child_list_with_kind(Arena *arena, DF_Entity *entity, DF_EntityKind kind) +internal D_EntityList +d_push_entity_child_list_with_kind(Arena *arena, D_Entity *entity, D_EntityKind kind) { - DF_EntityList result = {0}; - for(DF_Entity *child = entity->first; !df_entity_is_nil(child); child = child->next) + D_EntityList result = {0}; + for(D_Entity *child = entity->first; !d_entity_is_nil(child); child = child->next) { if(child->kind == kind) { - df_entity_list_push(arena, &result, child); + d_entity_list_push(arena, &result, child); } } return result; } -internal DF_Entity * -df_entity_child_from_name_and_kind(DF_Entity *parent, String8 string, DF_EntityKind kind) +internal D_Entity * +d_entity_child_from_name_and_kind(D_Entity *parent, String8 string, D_EntityKind kind) { - DF_Entity *result = &df_g_nil_entity; - for(DF_Entity *child = parent->first; !df_entity_is_nil(child); child = child->next) + D_Entity *result = &d_nil_entity; + for(D_Entity *child = parent->first; !d_entity_is_nil(child); child = child->next) { if(str8_match(child->name, string, 0) && child->kind == kind) { @@ -934,22 +861,22 @@ df_entity_child_from_name_and_kind(DF_Entity *parent, String8 string, DF_EntityK //- rjf: entity list building internal void -df_entity_list_push(Arena *arena, DF_EntityList *list, DF_Entity *entity) +d_entity_list_push(Arena *arena, D_EntityList *list, D_Entity *entity) { - DF_EntityNode *n = push_array(arena, DF_EntityNode, 1); + D_EntityNode *n = push_array(arena, D_EntityNode, 1); n->entity = entity; SLLQueuePush(list->first, list->last, n); list->count += 1; } -internal DF_EntityArray -df_entity_array_from_list(Arena *arena, DF_EntityList *list) +internal D_EntityArray +d_entity_array_from_list(Arena *arena, D_EntityList *list) { - DF_EntityArray result = {0}; + D_EntityArray result = {0}; result.count = list->count; - result.v = push_array(arena, DF_Entity *, result.count); + result.v = push_array(arena, D_Entity *, result.count); U64 idx = 0; - for(DF_EntityNode *n = list->first; n != 0; n = n->next, idx += 1) + for(D_EntityNode *n = list->first; n != 0; n = n->next, idx += 1) { result.v[idx] = n->entity; } @@ -958,27 +885,27 @@ df_entity_array_from_list(Arena *arena, DF_EntityList *list) //- rjf: entity fuzzy list building -internal DF_EntityFuzzyItemArray -df_entity_fuzzy_item_array_from_entity_list_needle(Arena *arena, DF_EntityList *list, String8 needle) +internal D_EntityFuzzyItemArray +d_entity_fuzzy_item_array_from_entity_list_needle(Arena *arena, D_EntityList *list, String8 needle) { Temp scratch = scratch_begin(&arena, 1); - DF_EntityArray array = df_entity_array_from_list(scratch.arena, list); - DF_EntityFuzzyItemArray result = df_entity_fuzzy_item_array_from_entity_array_needle(arena, &array, needle); + D_EntityArray array = d_entity_array_from_list(scratch.arena, list); + D_EntityFuzzyItemArray result = d_entity_fuzzy_item_array_from_entity_array_needle(arena, &array, needle); return result; } -internal DF_EntityFuzzyItemArray -df_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, DF_EntityArray *array, String8 needle) +internal D_EntityFuzzyItemArray +d_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, D_EntityArray *array, String8 needle) { Temp scratch = scratch_begin(&arena, 1); - DF_EntityFuzzyItemArray result = {0}; + D_EntityFuzzyItemArray result = {0}; result.count = array->count; - result.v = push_array(arena, DF_EntityFuzzyItem, result.count); + result.v = push_array(arena, D_EntityFuzzyItem, result.count); U64 result_idx = 0; for(U64 src_idx = 0; src_idx < array->count; src_idx += 1) { - DF_Entity *entity = array->v[src_idx]; - String8 display_string = df_display_string_from_entity(scratch.arena, entity); + D_Entity *entity = array->v[src_idx]; + String8 display_string = d_display_string_from_entity(scratch.arena, entity); FuzzyMatchRangeList matches = fuzzy_match_find(arena, needle, display_string); if(matches.count >= matches.needle_part_count) { @@ -988,7 +915,7 @@ df_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, DF_EntityArray } else { - String8 search_tags = df_search_tags_from_entity(scratch.arena, entity); + String8 search_tags = d_search_tags_from_entity(scratch.arena, entity); if(search_tags.size != 0) { FuzzyMatchRangeList tag_matches = fuzzy_match_find(scratch.arena, needle, search_tags); @@ -1009,15 +936,15 @@ df_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, DF_EntityArray //- rjf: full path building, from file/folder entities internal String8 -df_full_path_from_entity(Arena *arena, DF_Entity *entity) +d_full_path_from_entity(Arena *arena, D_Entity *entity) { String8 string = {0}; { Temp scratch = scratch_begin(&arena, 1); String8List strs = {0}; - for(DF_Entity *e = entity; !df_entity_is_nil(e); e = e->parent) + for(D_Entity *e = entity; !d_entity_is_nil(e); e = e->parent) { - if(e->kind == DF_EntityKind_File) + if(e->kind == D_EntityKind_File) { str8_list_push_front(scratch.arena, &strs, e->name); } @@ -1033,7 +960,7 @@ df_full_path_from_entity(Arena *arena, DF_Entity *entity) //- rjf: display string entities, for referencing entities in ui internal String8 -df_display_string_from_entity(Arena *arena, DF_Entity *entity) +d_display_string_from_entity(Arena *arena, D_Entity *entity) { String8 result = {0}; switch(entity->kind) @@ -1046,12 +973,12 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) } else { - String8 kind_string = df_g_entity_kind_display_string_table[entity->kind]; + String8 kind_string = d_entity_kind_display_string_table[entity->kind]; result = push_str8f(arena, "%S $%I64u", kind_string, entity->id); } }break; - case DF_EntityKind_Target: + case D_EntityKind_Target: { if(entity->name.size != 0) { @@ -1059,12 +986,12 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) } else { - DF_Entity *exe = df_entity_child_from_kind(entity, DF_EntityKind_Executable); + D_Entity *exe = d_entity_child_from_kind(entity, D_EntityKind_Executable); result = push_str8_copy(arena, exe->name); } }break; - case DF_EntityKind_Breakpoint: + case D_EntityKind_Breakpoint: { if(entity->name.size != 0) { @@ -1072,12 +999,12 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) } else { - DF_Entity *loc = df_entity_child_from_kind(entity, DF_EntityKind_Location); - if(loc->flags & DF_EntityFlag_HasTextPoint) + D_Entity *loc = d_entity_child_from_kind(entity, D_EntityKind_Location); + if(loc->flags & D_EntityFlag_HasTextPoint) { result = push_str8f(arena, "%S:%I64d:%I64d", str8_skip_last_slash(loc->name), loc->text_point.line, loc->text_point.column); } - else if(loc->flags & DF_EntityFlag_HasVAddr) + else if(loc->flags & D_EntityFlag_HasVAddr) { result = str8_from_u64(arena, loc->vaddr, 16, 16, 0); } @@ -1088,9 +1015,9 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) } }break; - case DF_EntityKind_Process: + case D_EntityKind_Process: { - DF_Entity *main_mod_child = df_entity_child_from_kind(entity, DF_EntityKind_Module); + D_Entity *main_mod_child = d_entity_child_from_kind(entity, D_EntityKind_Module); String8 main_mod_name = str8_skip_last_slash(main_mod_child->name); result = push_str8f(arena, "%S%s%sPID: %i%s", main_mod_name, @@ -1100,13 +1027,13 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) main_mod_name.size != 0 ? ")" : ""); }break; - case DF_EntityKind_Thread: + case D_EntityKind_Thread: { String8 name = entity->name; if(name.size == 0) { - DF_Entity *process = df_entity_ancestor_from_kind(entity, DF_EntityKind_Process); - DF_Entity *first_thread = df_entity_child_from_kind(process, DF_EntityKind_Thread); + D_Entity *process = d_entity_ancestor_from_kind(entity, D_EntityKind_Process); + D_Entity *first_thread = d_entity_child_from_kind(process, D_EntityKind_Thread); if(first_thread == entity) { name = str8_lit("Main Thread"); @@ -1120,12 +1047,12 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) name.size != 0 ? ")" : ""); }break; - case DF_EntityKind_Module: + case D_EntityKind_Module: { result = push_str8_copy(arena, str8_skip_last_slash(entity->name)); }break; - case DF_EntityKind_RecentProject: + case D_EntityKind_RecentProject: { result = push_str8_copy(arena, str8_skip_last_slash(entity->name)); }break; @@ -1136,23 +1063,23 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) //- rjf: extra search tag strings for fuzzy filtering entities internal String8 -df_search_tags_from_entity(Arena *arena, DF_Entity *entity) +d_search_tags_from_entity(Arena *arena, D_Entity *entity) { String8 result = {0}; - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == D_EntityKind_Thread) { Temp scratch = scratch_begin(&arena, 1); - DF_Entity *process = df_entity_ancestor_from_kind(entity, DF_EntityKind_Process); - CTRL_Unwind unwind = df_query_cached_unwind_from_thread(entity); + D_Entity *process = d_entity_ancestor_from_kind(entity, D_EntityKind_Process); + CTRL_Unwind unwind = d_query_cached_unwind_from_thread(entity); String8List strings = {0}; for(U64 frame_num = unwind.frames.count; frame_num > 0; frame_num -= 1) { CTRL_UnwindFrame *f = &unwind.frames.v[frame_num-1]; U64 rip_vaddr = regs_rip_from_arch_block(entity->arch, f->regs); - DF_Entity *module = df_module_from_process_vaddr(process, rip_vaddr); - U64 rip_voff = df_voff_from_vaddr(module, rip_vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - String8 procedure_name = df_symbol_name_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff, 0); + D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr); + U64 rip_voff = d_voff_from_vaddr(module, rip_vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + String8 procedure_name = d_symbol_name_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff, 0); if(procedure_name.size != 0) { str8_list_push(scratch.arena, &strings, procedure_name); @@ -1169,10 +1096,10 @@ df_search_tags_from_entity(Arena *arena, DF_Entity *entity) //- rjf: entity -> color operations internal Vec4F32 -df_hsva_from_entity(DF_Entity *entity) +d_hsva_from_entity(D_Entity *entity) { Vec4F32 result = {0}; - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & D_EntityFlag_HasColor) { result = entity->color_hsva; } @@ -1180,10 +1107,10 @@ df_hsva_from_entity(DF_Entity *entity) } internal Vec4F32 -df_rgba_from_entity(DF_Entity *entity) +d_rgba_from_entity(D_Entity *entity) { Vec4F32 result = {0}; - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & D_EntityFlag_HasColor) { Vec3F32 hsv = v3f32(entity->color_hsva.x, entity->color_hsva.y, entity->color_hsva.z); Vec3F32 rgb = rgb_from_hsv(hsv); @@ -1194,37 +1121,37 @@ df_rgba_from_entity(DF_Entity *entity) //- rjf: entity -> expansion tree keys -internal DF_ExpandKey -df_expand_key_from_entity(DF_Entity *entity) +internal D_ExpandKey +d_expand_key_from_entity(D_Entity *entity) { - DF_ExpandKey parent_key = df_parent_expand_key_from_entity(entity); - DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(parent_key), (U64)entity); + D_ExpandKey parent_key = d_parent_expand_key_from_entity(entity); + D_ExpandKey key = d_expand_key_make(df_hash_from_expand_key(parent_key), (U64)entity); return key; } -internal DF_ExpandKey -df_parent_expand_key_from_entity(DF_Entity *entity) +internal D_ExpandKey +d_parent_expand_key_from_entity(D_Entity *entity) { - DF_ExpandKey parent_key = df_expand_key_make(5381, (U64)entity); + D_ExpandKey parent_key = d_expand_key_make(5381, (U64)entity); return parent_key; } //- rjf: entity -> evaluation -internal DF_EntityEval * -df_eval_from_entity(Arena *arena, DF_Entity *entity) +internal D_EntityEval * +d_eval_from_entity(Arena *arena, D_Entity *entity) { - DF_EntityEval *eval = push_array(arena, DF_EntityEval, 1); + D_EntityEval *eval = push_array(arena, D_EntityEval, 1); { - DF_Entity *loc = df_entity_child_from_kind(entity, DF_EntityKind_Location); - DF_Entity *cnd = df_entity_child_from_kind(entity, DF_EntityKind_Condition); + D_Entity *loc = d_entity_child_from_kind(entity, D_EntityKind_Location); + D_Entity *cnd = d_entity_child_from_kind(entity, D_EntityKind_Condition); String8 label_string = push_str8_copy(arena, entity->name); String8 loc_string = {0}; - if(loc->flags & DF_EntityFlag_HasTextPoint) + if(loc->flags & D_EntityFlag_HasTextPoint) { loc_string = push_str8f(arena, "%S:%I64u:%I64u", loc->name, loc->text_point.line, loc->text_point.column); } - else if(loc->flags & DF_EntityFlag_HasVAddr) + else if(loc->flags & D_EntityFlag_HasVAddr) { loc_string = push_str8f(arena, "0x%I64x", loc->vaddr); } @@ -1242,7 +1169,7 @@ df_eval_from_entity(Arena *arena, DF_Entity *entity) //~ rjf: Name Allocation internal U64 -df_name_bucket_idx_from_string_size(U64 size) +d_name_bucket_idx_from_string_size(U64 size) { U64 size_rounded = u64_up_to_pow2(size+1); size_rounded = ClampBot((1<<4), size_rounded); @@ -1256,16 +1183,16 @@ df_name_bucket_idx_from_string_size(U64 size) case 1<<8: {bucket_idx = 4;}break; case 1<<9: {bucket_idx = 5;}break; case 1<<10:{bucket_idx = 6;}break; - default:{bucket_idx = ArrayCount(df_state->free_name_chunks)-1;}break; + default:{bucket_idx = ArrayCount(d_state->free_name_chunks)-1;}break; } return bucket_idx; } internal String8 -df_name_alloc(String8 string) +d_name_alloc(String8 string) { if(string.size == 0) {return str8_zero();} - U64 bucket_idx = df_name_bucket_idx_from_string_size(string.size); + U64 bucket_idx = d_name_bucket_idx_from_string_size(string.size); // rjf: loop -> find node, allocate if not there // @@ -1275,19 +1202,19 @@ df_name_alloc(String8 string) // which is not undoable; the free lists we control, and are thus // trivially undoable) // - DF_NameChunkNode *node = 0; + D_NameChunkNode *node = 0; for(;node == 0;) { - node = df_state->free_name_chunks[bucket_idx]; + node = d_state->free_name_chunks[bucket_idx]; // rjf: pull from bucket free list if(node != 0) { - if(bucket_idx == ArrayCount(df_state->free_name_chunks)-1) + if(bucket_idx == ArrayCount(d_state->free_name_chunks)-1) { node = 0; - DF_NameChunkNode *prev = 0; - for(DF_NameChunkNode *n = df_state->free_name_chunks[bucket_idx]; + D_NameChunkNode *prev = 0; + for(D_NameChunkNode *n = d_state->free_name_chunks[bucket_idx]; n != 0; prev = n, n = n->next) { @@ -1295,12 +1222,12 @@ df_name_alloc(String8 string) { if(prev == 0) { - df_state_delta_history_push_struct_delta(df_state_delta_history(), &df_state->free_name_chunks[bucket_idx]); - df_state->free_name_chunks[bucket_idx] = n->next; + d_state_delta_history_push_struct_delta(d_state_delta_history(), &d_state->free_name_chunks[bucket_idx]); + d_state->free_name_chunks[bucket_idx] = n->next; } else { - df_state_delta_history_push_struct_delta(df_state_delta_history(), &prev->next); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &prev->next); prev->next = n->next; } node = n; @@ -1310,8 +1237,8 @@ df_name_alloc(String8 string) } else { - df_state_delta_history_push_struct_delta(df_state_delta_history(), &df_state->free_name_chunks[bucket_idx]); - SLLStackPop(df_state->free_name_chunks[bucket_idx]); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &d_state->free_name_chunks[bucket_idx]); + SLLStackPop(d_state->free_name_chunks[bucket_idx]); } } @@ -1319,7 +1246,7 @@ df_name_alloc(String8 string) if(node == 0) { U64 chunk_size = 0; - if(bucket_idx < ArrayCount(df_state->free_name_chunks)-1) + if(bucket_idx < ArrayCount(d_state->free_name_chunks)-1) { chunk_size = 1<<(bucket_idx+4); } @@ -1327,29 +1254,29 @@ df_name_alloc(String8 string) { chunk_size = u64_up_to_pow2(string.size); } - U8 *chunk_memory = push_array(df_state->arena, U8, chunk_size); - DF_NameChunkNode *chunk = (DF_NameChunkNode *)chunk_memory; - SLLStackPush(df_state->free_name_chunks[bucket_idx], chunk); + U8 *chunk_memory = push_array(d_state->arena, U8, chunk_size); + D_NameChunkNode *chunk = (D_NameChunkNode *)chunk_memory; + SLLStackPush(d_state->free_name_chunks[bucket_idx], chunk); } } // rjf: fill string & return String8 allocated_string = str8((U8 *)node, string.size); - df_state_delta_history_push_delta(df_state_delta_history(), .ptr = allocated_string.str, .size = Max(allocated_string.size, sizeof(*node))); + d_state_delta_history_push_delta(d_state_delta_history(), .ptr = allocated_string.str, .size = Max(allocated_string.size, sizeof(*node))); MemoryCopy((U8 *)node, string.str, string.size); return allocated_string; } internal void -df_name_release(String8 string) +d_name_release(String8 string) { if(string.size == 0) {return;} - U64 bucket_idx = df_name_bucket_idx_from_string_size(string.size); - DF_NameChunkNode *node = (DF_NameChunkNode *)string.str; - df_state_delta_history_push_delta(df_state_delta_history(), .ptr = node, .size = Max(node->size, sizeof(*node))); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &df_state->free_name_chunks[bucket_idx]); + U64 bucket_idx = d_name_bucket_idx_from_string_size(string.size); + D_NameChunkNode *node = (D_NameChunkNode *)string.str; + d_state_delta_history_push_delta(d_state_delta_history(), .ptr = node, .size = Max(node->size, sizeof(*node))); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &d_state->free_name_chunks[bucket_idx]); node->size = u64_up_to_pow2(string.size); - SLLStackPush(df_state->free_name_chunks[bucket_idx], node); + SLLStackPush(d_state->free_name_chunks[bucket_idx], node); } //////////////////////////////// @@ -1358,58 +1285,58 @@ df_name_release(String8 string) //- rjf: entity mutation notification codepath internal void -df_entity_notify_mutation(DF_Entity *entity) +d_entity_notify_mutation(D_Entity *entity) { - for(DF_Entity *e = entity; !df_entity_is_nil(e); e = e->parent) + for(D_Entity *e = entity; !d_entity_is_nil(e); e = e->parent) { - DF_EntityKindFlags flags = df_g_entity_kind_flags_table[entity->kind]; - if(e == entity && flags & DF_EntityKindFlag_LeafMutProjectConfig) + D_EntityKindFlags flags = d_entity_kind_flags_table[entity->kind]; + if(e == entity && flags & D_EntityKindFlag_LeafMutProjectConfig) { - DF_CmdParams p = {0}; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_WriteProjectData)); + D_CmdParams p = {0}; + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_WriteProjectData)); } - if(e == entity && flags & DF_EntityKindFlag_LeafMutSoftHalt && df_ctrl_targets_running()) + if(e == entity && flags & D_EntityKindFlag_LeafMutSoftHalt && d_ctrl_targets_running()) { - df_state->entities_mut_soft_halt = 1; + d_state->entities_mut_soft_halt = 1; } - if(e == entity && flags & DF_EntityKindFlag_LeafMutDebugInfoMap) + if(e == entity && flags & D_EntityKindFlag_LeafMutDebugInfoMap) { - df_state->entities_mut_dbg_info_map = 1; + d_state->entities_mut_dbg_info_map = 1; } - if(flags & DF_EntityKindFlag_TreeMutSoftHalt && df_ctrl_targets_running()) + if(flags & D_EntityKindFlag_TreeMutSoftHalt && d_ctrl_targets_running()) { - df_state->entities_mut_soft_halt = 1; + d_state->entities_mut_soft_halt = 1; } - if(flags & DF_EntityKindFlag_TreeMutDebugInfoMap) + if(flags & D_EntityKindFlag_TreeMutDebugInfoMap) { - df_state->entities_mut_dbg_info_map = 1; + d_state->entities_mut_dbg_info_map = 1; } } } //- rjf: entity allocation + tree forming -internal DF_Entity * -df_entity_alloc(DF_Entity *parent, DF_EntityKind kind) +internal D_Entity * +d_entity_alloc(D_Entity *parent, D_EntityKind kind) { - B32 user_defined_lifetime = !!(df_g_entity_kind_flags_table[kind] & DF_EntityKindFlag_UserDefinedLifetime); + B32 user_defined_lifetime = !!(d_entity_kind_flags_table[kind] & D_EntityKindFlag_UserDefinedLifetime); U64 free_list_idx = !!user_defined_lifetime; - if(df_entity_is_nil(parent)) { parent = df_state->entities_root; } + if(d_entity_is_nil(parent)) { parent = d_state->entities_root; } // rjf: empty free list -> push new - if(!df_state->entities_free[free_list_idx]) + if(!d_state->entities_free[free_list_idx]) { - DF_Entity *entity = push_array(df_state->entities_arena, DF_Entity, 1); - df_state->entities_count += 1; - df_state->entities_free_count += 1; - SLLStackPush(df_state->entities_free[free_list_idx], entity); + D_Entity *entity = push_array(d_state->entities_arena, D_Entity, 1); + d_state->entities_count += 1; + d_state->entities_free_count += 1; + SLLStackPush(d_state->entities_free[free_list_idx], entity); } // rjf: pop new entity off free-list - DF_Entity *entity = df_state->entities_free[free_list_idx]; - SLLStackPop(df_state->entities_free[free_list_idx]); - df_state->entities_free_count -= 1; - df_state->entities_active_count += 1; + D_Entity *entity = d_state->entities_free[free_list_idx]; + SLLStackPop(d_state->entities_free[free_list_idx]); + d_state->entities_free_count -= 1; + d_state->entities_active_count += 1; // rjf: zero entity { @@ -1419,23 +1346,23 @@ df_entity_alloc(DF_Entity *parent, DF_EntityKind kind) } // rjf: set up alloc'd entity links - entity->first = entity->last = entity->next = entity->prev = entity->parent = &df_g_nil_entity; + entity->first = entity->last = entity->next = entity->prev = entity->parent = &d_nil_entity; entity->parent = parent; // rjf: stitch up parent links - if(df_entity_is_nil(parent)) + if(d_entity_is_nil(parent)) { - df_state->entities_root = entity; + d_state->entities_root = entity; } else { - DLLPushBack_NPZ(&df_g_nil_entity, parent->first, parent->last, entity, next, prev); + DLLPushBack_NPZ(&d_nil_entity, parent->first, parent->last, entity, next, prev); } // rjf: fill out metadata entity->kind = kind; - df_state->entities_id_gen += 1; - entity->id = df_state->entities_id_gen; + d_state->entities_id_gen += 1; + entity->id = d_state->entities_id_gen; entity->gen += 1; entity->alloc_time_us = os_now_microseconds(); @@ -1446,13 +1373,13 @@ df_entity_alloc(DF_Entity *parent, DF_EntityKind kind) } // rjf: dirtify caches - df_state->kind_alloc_gens[kind] += 1; - df_entity_notify_mutation(entity); + d_state->kind_alloc_gens[kind] += 1; + d_entity_notify_mutation(entity); // rjf: log LogInfoNamedBlockF("new_entity") { - log_infof("kind: \"%S\"\n", df_g_entity_kind_display_string_table[kind]); + log_infof("kind: \"%S\"\n", d_entity_kind_display_string_table[kind]); log_infof("id: $0x%I64x\n", entity->id); } @@ -1460,36 +1387,36 @@ df_entity_alloc(DF_Entity *parent, DF_EntityKind kind) } internal void -df_entity_mark_for_deletion(DF_Entity *entity) +d_entity_mark_for_deletion(D_Entity *entity) { - if(!df_entity_is_nil(entity)) + if(!d_entity_is_nil(entity)) { - entity->flags |= DF_EntityFlag_MarkedForDeletion; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_MarkedForDeletion; + d_entity_notify_mutation(entity); } } internal void -df_entity_release(DF_Entity *entity) +d_entity_release(D_Entity *entity) { Temp scratch = scratch_begin(0, 0); // rjf: unpack - U64 free_list_idx = !!(df_g_entity_kind_flags_table[entity->kind] & DF_EntityKindFlag_UserDefinedLifetime); + U64 free_list_idx = !!(d_entity_kind_flags_table[entity->kind] & D_EntityKindFlag_UserDefinedLifetime); // rjf: release whole tree typedef struct Task Task; struct Task { Task *next; - DF_Entity *e; + D_Entity *e; }; Task start_task = {0, entity}; Task *first_task = &start_task; Task *last_task = &start_task; for(Task *task = first_task; task != 0; task = task->next) { - for(DF_Entity *child = task->e->first; !df_entity_is_nil(child); child = child->next) + for(D_Entity *child = task->e->first; !d_entity_is_nil(child); child = child->next) { Task *t = push_array(scratch.arena, Task, 1); t->e = child; @@ -1497,251 +1424,251 @@ df_entity_release(DF_Entity *entity) } LogInfoNamedBlockF("end_entity") { - String8 name = df_display_string_from_entity(scratch.arena, task->e); - log_infof("kind: \"%S\"\n", df_g_entity_kind_display_string_table[task->e->kind]); + String8 name = d_display_string_from_entity(scratch.arena, task->e); + log_infof("kind: \"%S\"\n", d_entity_kind_display_string_table[task->e->kind]); log_infof("id: $0x%I64x\n", task->e->id); log_infof("display_string: \"%S\"\n", name); } - df_set_thread_freeze_state(task->e, 0); - SLLStackPush(df_state->entities_free[free_list_idx], task->e); - df_state->entities_free_count += 1; - df_state->entities_active_count -= 1; + d_set_thread_freeze_state(task->e, 0); + SLLStackPush(d_state->entities_free[free_list_idx], task->e); + d_state->entities_free_count += 1; + d_state->entities_active_count -= 1; task->e->gen += 1; if(task->e->name.size != 0) { - df_name_release(task->e->name); + d_name_release(task->e->name); } - df_state->kind_alloc_gens[task->e->kind] += 1; + d_state->kind_alloc_gens[task->e->kind] += 1; } scratch_end(scratch); } internal void -df_entity_change_parent(DF_Entity *entity, DF_Entity *old_parent, DF_Entity *new_parent, DF_Entity *prev_child) +d_entity_change_parent(D_Entity *entity, D_Entity *old_parent, D_Entity *new_parent, D_Entity *prev_child) { Assert(entity->parent == old_parent); - Assert(prev_child->parent == old_parent || df_entity_is_nil(prev_child)); + Assert(prev_child->parent == old_parent || d_entity_is_nil(prev_child)); // rjf: fix up links - if(!df_entity_is_nil(old_parent)) + if(!d_entity_is_nil(old_parent)) { - DLLRemove_NPZ(&df_g_nil_entity, old_parent->first, old_parent->last, entity, next, prev); + DLLRemove_NPZ(&d_nil_entity, old_parent->first, old_parent->last, entity, next, prev); } - if(!df_entity_is_nil(new_parent)) + if(!d_entity_is_nil(new_parent)) { - DLLInsert_NPZ(&df_g_nil_entity, new_parent->first, new_parent->last, prev_child, entity, next, prev); + DLLInsert_NPZ(&d_nil_entity, new_parent->first, new_parent->last, prev_child, entity, next, prev); } entity->parent = new_parent; // rjf: notify - df_entity_notify_mutation(entity); - df_entity_notify_mutation(new_parent); - df_entity_notify_mutation(old_parent); - df_entity_notify_mutation(prev_child); - df_state->kind_alloc_gens[entity->kind] += 1; + d_entity_notify_mutation(entity); + d_entity_notify_mutation(new_parent); + d_entity_notify_mutation(old_parent); + d_entity_notify_mutation(prev_child); + d_state->kind_alloc_gens[entity->kind] += 1; } //- rjf: entity simple equipment internal void -df_entity_equip_txt_pt(DF_Entity *entity, TxtPt point) +d_entity_equip_txt_pt(D_Entity *entity, TxtPt point) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->text_point, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->text_point, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->text_point = point; - entity->flags |= DF_EntityFlag_HasTextPoint; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasTextPoint; + d_entity_notify_mutation(entity); } internal void -df_entity_equip_entity_handle(DF_Entity *entity, DF_Handle handle) +d_entity_equip_entity_handle(D_Entity *entity, D_Handle handle) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->entity_handle, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->entity_handle, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->entity_handle = handle; - entity->flags |= DF_EntityFlag_HasEntityHandle; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasEntityHandle; + d_entity_notify_mutation(entity); } internal void -df_entity_equip_disabled(DF_Entity *entity, B32 value) +d_entity_equip_disabled(D_Entity *entity, B32 value) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->disabled, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->disabled, .guard_entity = entity); entity->disabled = value; - df_entity_notify_mutation(entity); + d_entity_notify_mutation(entity); } internal void -df_entity_equip_u64(DF_Entity *entity, U64 u64) +d_entity_equip_u64(D_Entity *entity, U64 u64) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->u64, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->u64, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->u64 = u64; - entity->flags |= DF_EntityFlag_HasU64; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasU64; + d_entity_notify_mutation(entity); } internal void -df_entity_equip_color_rgba(DF_Entity *entity, Vec4F32 rgba) +d_entity_equip_color_rgba(D_Entity *entity, Vec4F32 rgba) { - df_require_entity_nonnil(entity, return); + d_require_entity_nonnil(entity, return); Vec3F32 rgb = v3f32(rgba.x, rgba.y, rgba.z); Vec3F32 hsv = hsv_from_rgb(rgb); Vec4F32 hsva = v4f32(hsv.x, hsv.y, hsv.z, rgba.w); - df_entity_equip_color_hsva(entity, hsva); + d_entity_equip_color_hsva(entity, hsva); } internal void -df_entity_equip_color_hsva(DF_Entity *entity, Vec4F32 hsva) +d_entity_equip_color_hsva(D_Entity *entity, Vec4F32 hsva) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->color_hsva, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->color_hsva, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->color_hsva = hsva; - entity->flags |= DF_EntityFlag_HasColor; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasColor; + d_entity_notify_mutation(entity); } internal void -df_entity_equip_cfg_src(DF_Entity *entity, DF_CfgSrc cfg_src) +d_entity_equip_cfg_src(D_Entity *entity, D_CfgSrc cfg_src) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->cfg_src, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->cfg_src, .guard_entity = entity); entity->cfg_src = cfg_src; - df_entity_notify_mutation(entity); + d_entity_notify_mutation(entity); } internal void -df_entity_equip_timestamp(DF_Entity *entity, U64 timestamp) +d_entity_equip_timestamp(D_Entity *entity, U64 timestamp) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->timestamp, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->timestamp, .guard_entity = entity); entity->timestamp = timestamp; - df_entity_notify_mutation(entity); + d_entity_notify_mutation(entity); } //- rjf: control layer correllation equipment internal void -df_entity_equip_ctrl_machine_id(DF_Entity *entity, CTRL_MachineID machine_id) +d_entity_equip_ctrl_machine_id(D_Entity *entity, CTRL_MachineID machine_id) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->ctrl_machine_id, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->ctrl_machine_id, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->ctrl_machine_id = machine_id; - entity->flags |= DF_EntityFlag_HasCtrlMachineID; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasCtrlMachineID; + d_entity_notify_mutation(entity); } internal void -df_entity_equip_ctrl_handle(DF_Entity *entity, DMN_Handle handle) +d_entity_equip_ctrl_handle(D_Entity *entity, DMN_Handle handle) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->ctrl_handle, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->ctrl_handle, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->ctrl_handle = handle; - entity->flags |= DF_EntityFlag_HasCtrlHandle; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasCtrlHandle; + d_entity_notify_mutation(entity); } internal void -df_entity_equip_arch(DF_Entity *entity, Architecture arch) +d_entity_equip_arch(D_Entity *entity, Architecture arch) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->arch, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->arch, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->arch = arch; - entity->flags |= DF_EntityFlag_HasArch; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasArch; + d_entity_notify_mutation(entity); } internal void -df_entity_equip_ctrl_id(DF_Entity *entity, U32 id) +d_entity_equip_ctrl_id(D_Entity *entity, U32 id) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->ctrl_id, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->ctrl_id, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->ctrl_id = id; - entity->flags |= DF_EntityFlag_HasCtrlID; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasCtrlID; + d_entity_notify_mutation(entity); } internal void -df_entity_equip_stack_base(DF_Entity *entity, U64 stack_base) +d_entity_equip_stack_base(D_Entity *entity, U64 stack_base) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->stack_base, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->stack_base, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->stack_base = stack_base; - entity->flags |= DF_EntityFlag_HasStackBase; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasStackBase; + d_entity_notify_mutation(entity); } internal void -df_entity_equip_vaddr_rng(DF_Entity *entity, Rng1U64 range) +d_entity_equip_vaddr_rng(D_Entity *entity, Rng1U64 range) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->vaddr_rng, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->vaddr_rng, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->vaddr_rng = range; - entity->flags |= DF_EntityFlag_HasVAddrRng; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasVAddrRng; + d_entity_notify_mutation(entity); } internal void -df_entity_equip_vaddr(DF_Entity *entity, U64 vaddr) +d_entity_equip_vaddr(D_Entity *entity, U64 vaddr) { - df_require_entity_nonnil(entity, return); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->vaddr, .guard_entity = entity); - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); + d_require_entity_nonnil(entity, return); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->vaddr, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); entity->vaddr = vaddr; - entity->flags |= DF_EntityFlag_HasVAddr; - df_entity_notify_mutation(entity); + entity->flags |= D_EntityFlag_HasVAddr; + d_entity_notify_mutation(entity); } //- rjf: name equipment internal void -df_entity_equip_name(DF_Entity *entity, String8 name) +d_entity_equip_name(D_Entity *entity, String8 name) { - df_require_entity_nonnil(entity, return); + d_require_entity_nonnil(entity, return); if(entity->name.size != 0) { - df_name_release(entity->name); + d_name_release(entity->name); } - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->name, .guard_entity = entity); + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->name, .guard_entity = entity); if(name.size != 0) { - entity->name = df_name_alloc(name); + entity->name = d_name_alloc(name); } else { entity->name = str8_zero(); } - df_entity_notify_mutation(entity); + d_entity_notify_mutation(entity); } internal void -df_entity_equip_namef(DF_Entity *entity, char *fmt, ...) +d_entity_equip_namef(D_Entity *entity, char *fmt, ...) { Temp scratch = scratch_begin(0, 0); va_list args; va_start(args, fmt); String8 string = push_str8fv(scratch.arena, fmt, args); va_end(args); - df_entity_equip_name(entity, string); + d_entity_equip_name(entity, string); scratch_end(scratch); } //- rjf: opening folders/files & maintaining the entity model of the filesystem -internal DF_Entity * -df_entity_from_path(String8 path, DF_EntityFromPathFlags flags) +internal D_Entity * +d_entity_from_path(String8 path, D_EntityFromPathFlags flags) { Temp scratch = scratch_begin(0, 0); PathStyle path_style = PathStyle_Relative; @@ -1749,19 +1676,19 @@ df_entity_from_path(String8 path, DF_EntityFromPathFlags flags) StringMatchFlags path_match_flags = path_match_flags_from_os(operating_system_from_context()); //- rjf: pass 1: open parts, ignore overrides - DF_Entity *file_no_override = &df_g_nil_entity; + D_Entity *file_no_override = &d_nil_entity; { - DF_Entity *parent = df_entity_root(); + D_Entity *parent = d_entity_root(); for(String8Node *path_part_n = path_parts.first; path_part_n != 0; path_part_n = path_part_n->next) { // rjf: find next child - DF_Entity *next_parent = &df_g_nil_entity; - for(DF_Entity *child = parent->first; !df_entity_is_nil(child); child = child->next) + D_Entity *next_parent = &d_nil_entity; + for(D_Entity *child = parent->first; !d_entity_is_nil(child); child = child->next) { B32 name_matches = str8_match(child->name, path_part_n->string, path_match_flags); - if(name_matches && child->kind == DF_EntityKind_File) + if(name_matches && child->kind == D_EntityKind_File) { next_parent = child; break; @@ -1769,29 +1696,29 @@ df_entity_from_path(String8 path, DF_EntityFromPathFlags flags) } // rjf: no next -> allocate one - if(df_entity_is_nil(next_parent)) + if(d_entity_is_nil(next_parent)) { - if(flags & DF_EntityFromPathFlag_OpenAsNeeded) + if(flags & D_EntityFromPathFlag_OpenAsNeeded) { - String8 parent_path = df_full_path_from_entity(scratch.arena, parent); + String8 parent_path = d_full_path_from_entity(scratch.arena, parent); String8 path = push_str8f(scratch.arena, "%S%s%S", parent_path, parent_path.size != 0 ? "/" : "", path_part_n->string); FileProperties file_properties = os_properties_from_file_path(path); - if(file_properties.created != 0 || flags & DF_EntityFromPathFlag_OpenMissing) + if(file_properties.created != 0 || flags & D_EntityFromPathFlag_OpenMissing) { - next_parent = df_entity_alloc(parent, DF_EntityKind_File); - df_entity_equip_name(next_parent, path_part_n->string); + next_parent = d_entity_alloc(parent, D_EntityKind_File); + d_entity_equip_name(next_parent, path_part_n->string); next_parent->timestamp = file_properties.modified; - next_parent->flags |= DF_EntityFlag_IsFolder * !!(file_properties.flags & FilePropertyFlag_IsFolder); - next_parent->flags |= DF_EntityFlag_IsMissing * !!(file_properties.created == 0); + next_parent->flags |= D_EntityFlag_IsFolder * !!(file_properties.flags & FilePropertyFlag_IsFolder); + next_parent->flags |= D_EntityFlag_IsMissing * !!(file_properties.created == 0); if(path_part_n->next != 0) { - next_parent->flags |= DF_EntityFlag_IsFolder; + next_parent->flags |= D_EntityFlag_IsFolder; } } } else { - parent = &df_g_nil_entity; + parent = &d_nil_entity; break; } } @@ -1799,53 +1726,53 @@ df_entity_from_path(String8 path, DF_EntityFromPathFlags flags) // rjf: next parent -> follow it parent = next_parent; } - file_no_override = (parent != df_entity_root() ? parent : &df_g_nil_entity); + file_no_override = (parent != d_entity_root() ? parent : &d_nil_entity); } //- rjf: pass 2: follow overrides - DF_Entity *file_overrides_applied = &df_g_nil_entity; - if(flags & DF_EntityFromPathFlag_AllowOverrides) + D_Entity *file_overrides_applied = &d_nil_entity; + if(flags & D_EntityFromPathFlag_AllowOverrides) { - DF_Entity *parent = df_entity_root(); + D_Entity *parent = d_entity_root(); for(String8Node *path_part_n = path_parts.first; path_part_n != 0; path_part_n = path_part_n->next) { // rjf: find next child - DF_Entity *next_parent = &df_g_nil_entity; - for(DF_Entity *child = parent->first; !df_entity_is_nil(child); child = child->next) + D_Entity *next_parent = &d_nil_entity; + for(D_Entity *child = parent->first; !d_entity_is_nil(child); child = child->next) { B32 name_matches = str8_match(child->name, path_part_n->string, path_match_flags); - if(name_matches && child->kind == DF_EntityKind_File) + if(name_matches && child->kind == D_EntityKind_File) { next_parent = child; } } // rjf: no next -> allocate one - if(df_entity_is_nil(next_parent)) + if(d_entity_is_nil(next_parent)) { - if(flags & DF_EntityFromPathFlag_OpenAsNeeded) + if(flags & D_EntityFromPathFlag_OpenAsNeeded) { - String8 parent_path = df_full_path_from_entity(scratch.arena, parent); + String8 parent_path = d_full_path_from_entity(scratch.arena, parent); String8 path = push_str8f(scratch.arena, "%S%s%S", parent_path, parent_path.size != 0 ? "/" : "", path_part_n->string); FileProperties file_properties = os_properties_from_file_path(path); - if(file_properties.created != 0 || flags & DF_EntityFromPathFlag_OpenMissing) + if(file_properties.created != 0 || flags & D_EntityFromPathFlag_OpenMissing) { - next_parent = df_entity_alloc(parent, DF_EntityKind_File); - df_entity_equip_name(next_parent, path_part_n->string); + next_parent = d_entity_alloc(parent, D_EntityKind_File); + d_entity_equip_name(next_parent, path_part_n->string); next_parent->timestamp = file_properties.modified; - next_parent->flags |= DF_EntityFlag_IsFolder * !!(file_properties.flags & FilePropertyFlag_IsFolder); - next_parent->flags |= DF_EntityFlag_IsMissing * !!(file_properties.created == 0); + next_parent->flags |= D_EntityFlag_IsFolder * !!(file_properties.flags & FilePropertyFlag_IsFolder); + next_parent->flags |= D_EntityFlag_IsMissing * !!(file_properties.created == 0); if(path_part_n->next != 0) { - next_parent->flags |= DF_EntityFlag_IsFolder; + next_parent->flags |= D_EntityFlag_IsFolder; } } } else { - parent = &df_g_nil_entity; + parent = &d_nil_entity; break; } } @@ -1853,14 +1780,14 @@ df_entity_from_path(String8 path, DF_EntityFromPathFlags flags) // rjf: next parent -> follow it parent = next_parent; } - file_overrides_applied = (parent != df_entity_root() ? parent : &df_g_nil_entity);; + file_overrides_applied = (parent != d_entity_root() ? parent : &d_nil_entity);; } //- rjf: pick & return result - DF_Entity *result = (flags & DF_EntityFromPathFlag_AllowOverrides) ? file_overrides_applied : file_no_override; - if(flags & DF_EntityFromPathFlag_AllowOverrides && + D_Entity *result = (flags & D_EntityFromPathFlag_AllowOverrides) ? file_overrides_applied : file_no_override; + if(flags & D_EntityFromPathFlag_AllowOverrides && result == file_overrides_applied && - result->flags & DF_EntityFlag_IsMissing) + result->flags & D_EntityFlag_IsMissing) { result = file_no_override; } @@ -1872,7 +1799,7 @@ df_entity_from_path(String8 path, DF_EntityFromPathFlags flags) //- rjf: file path map override lookups internal String8List -df_possible_overrides_from_file_path(Arena *arena, String8 file_path) +d_possible_overrides_from_file_path(Arena *arena, String8 file_path) { // NOTE(rjf): This path, given some target file path, scans all file path map // overrides, and collects the set of file paths which could've redirected @@ -1892,13 +1819,13 @@ df_possible_overrides_from_file_path(Arena *arena, String8 file_path) PathStyle pth_style = PathStyle_Relative; String8List pth_parts = path_normalized_list_from_string(scratch.arena, file_path, &pth_style); { - DF_EntityList links = df_query_cached_entity_list_with_kind(DF_EntityKind_FilePathMap); - for(DF_EntityNode *n = links.first; n != 0; n = n->next) + D_EntityList links = d_query_cached_entity_list_with_kind(D_EntityKind_FilePathMap); + for(D_EntityNode *n = links.first; n != 0; n = n->next) { //- rjf: unpack link - DF_Entity *link = n->entity; - DF_Entity *src = df_entity_child_from_kind(link, DF_EntityKind_Source); - DF_Entity *dst = df_entity_child_from_kind(link, DF_EntityKind_Dest); + D_Entity *link = n->entity; + D_Entity *src = d_entity_child_from_kind(link, D_EntityKind_Source); + D_Entity *dst = d_entity_child_from_kind(link, D_EntityKind_Dest); PathStyle src_style = PathStyle_Relative; PathStyle dst_style = PathStyle_Relative; String8List src_parts = path_normalized_list_from_string(scratch.arena, src->name, &src_style); @@ -1946,37 +1873,37 @@ df_possible_overrides_from_file_path(Arena *arena, String8 file_path) //- rjf: top-level state queries -internal DF_Entity * -df_entity_root(void) +internal D_Entity * +d_entity_root(void) { - return df_state->entities_root; + return d_state->entities_root; } -internal DF_EntityList -df_push_entity_list_with_kind(Arena *arena, DF_EntityKind kind) +internal D_EntityList +d_push_entity_list_with_kind(Arena *arena, D_EntityKind kind) { ProfBeginFunction(); - DF_EntityList result = {0}; - for(DF_Entity *entity = df_state->entities_root; - !df_entity_is_nil(entity); - entity = df_entity_rec_df_pre(entity, &df_g_nil_entity).next) + D_EntityList result = {0}; + for(D_Entity *entity = d_state->entities_root; + !d_entity_is_nil(entity); + entity = d_entity_rec_df_pre(entity, &d_nil_entity).next) { if(entity->kind == kind) { - df_entity_list_push(arena, &result, entity); + d_entity_list_push(arena, &result, entity); } } ProfEnd(); return result; } -internal DF_Entity * -df_entity_from_id(DF_EntityID id) +internal D_Entity * +d_entity_from_id(D_EntityID id) { - DF_Entity *result = &df_g_nil_entity; - for(DF_Entity *e = df_entity_root(); - !df_entity_is_nil(e); - e = df_entity_rec_df_pre(e, &df_g_nil_entity).next) + D_Entity *result = &d_nil_entity; + for(D_Entity *e = d_entity_root(); + !d_entity_is_nil(e); + e = d_entity_rec_df_pre(e, &d_nil_entity).next) { if(e->id == id) { @@ -1987,40 +1914,40 @@ df_entity_from_id(DF_EntityID id) return result; } -internal DF_Entity * -df_machine_entity_from_machine_id(CTRL_MachineID machine_id) +internal D_Entity * +d_machine_entity_from_machine_id(CTRL_MachineID machine_id) { - DF_Entity *result = &df_g_nil_entity; - for(DF_Entity *e = df_entity_root(); - !df_entity_is_nil(e); - e = df_entity_rec_df_pre(e, &df_g_nil_entity).next) + D_Entity *result = &d_nil_entity; + for(D_Entity *e = d_entity_root(); + !d_entity_is_nil(e); + e = d_entity_rec_df_pre(e, &d_nil_entity).next) { - if(e->kind == DF_EntityKind_Machine && e->ctrl_machine_id == machine_id) + if(e->kind == D_EntityKind_Machine && e->ctrl_machine_id == machine_id) { result = e; break; } } - if(df_entity_is_nil(result)) + if(d_entity_is_nil(result)) { - result = df_entity_alloc(df_entity_root(), DF_EntityKind_Machine); - df_entity_equip_ctrl_machine_id(result, machine_id); + result = d_entity_alloc(d_entity_root(), D_EntityKind_Machine); + d_entity_equip_ctrl_machine_id(result, machine_id); } return result; } -internal DF_Entity * -df_entity_from_ctrl_handle(CTRL_MachineID machine_id, DMN_Handle handle) +internal D_Entity * +d_entity_from_ctrl_handle(CTRL_MachineID machine_id, DMN_Handle handle) { - DF_Entity *result = &df_g_nil_entity; + D_Entity *result = &d_nil_entity; if(handle.u64[0] != 0) { - for(DF_Entity *e = df_entity_root(); - !df_entity_is_nil(e); - e = df_entity_rec_df_pre(e, &df_g_nil_entity).next) + for(D_Entity *e = d_entity_root(); + !d_entity_is_nil(e); + e = d_entity_rec_df_pre(e, &d_nil_entity).next) { - if(e->flags & DF_EntityFlag_HasCtrlMachineID && - e->flags & DF_EntityFlag_HasCtrlHandle && + if(e->flags & D_EntityFlag_HasCtrlMachineID && + e->flags & D_EntityFlag_HasCtrlHandle && e->ctrl_machine_id == machine_id && MemoryMatchStruct(&e->ctrl_handle, &handle)) { @@ -2032,18 +1959,18 @@ df_entity_from_ctrl_handle(CTRL_MachineID machine_id, DMN_Handle handle) return result; } -internal DF_Entity * -df_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id) +internal D_Entity * +d_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id) { - DF_Entity *result = &df_g_nil_entity; + D_Entity *result = &d_nil_entity; if(id != 0) { - for(DF_Entity *e = df_entity_root(); - !df_entity_is_nil(e); - e = df_entity_rec_df_pre(e, &df_g_nil_entity).next) + for(D_Entity *e = d_entity_root(); + !d_entity_is_nil(e); + e = d_entity_rec_df_pre(e, &d_nil_entity).next) { - if(e->flags & DF_EntityFlag_HasCtrlMachineID && - e->flags & DF_EntityFlag_HasCtrlID && + if(e->flags & D_EntityFlag_HasCtrlMachineID && + e->flags & D_EntityFlag_HasCtrlID && e->ctrl_machine_id == machine_id && e->ctrl_id == id) { @@ -2055,12 +1982,12 @@ df_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id) return result; } -internal DF_Entity * -df_entity_from_name_and_kind(String8 string, DF_EntityKind kind) +internal D_Entity * +d_entity_from_name_and_kind(String8 string, D_EntityKind kind) { - DF_Entity *result = &df_g_nil_entity; - DF_EntityList all_of_this_kind = df_query_cached_entity_list_with_kind(kind); - for(DF_EntityNode *n = all_of_this_kind.first; n != 0; n = n->next) + D_Entity *result = &d_nil_entity; + D_EntityList all_of_this_kind = d_query_cached_entity_list_with_kind(kind); + for(D_EntityNode *n = all_of_this_kind.first; n != 0; n = n->next) { if(str8_match(n->entity->name, string, 0)) { @@ -2071,12 +1998,12 @@ df_entity_from_name_and_kind(String8 string, DF_EntityKind kind) return result; } -internal DF_Entity * -df_entity_from_u64_and_kind(U64 u64, DF_EntityKind kind) +internal D_Entity * +d_entity_from_u64_and_kind(U64 u64, D_EntityKind kind) { - DF_Entity *result = &df_g_nil_entity; - DF_EntityList all_of_this_kind = df_query_cached_entity_list_with_kind(kind); - for(DF_EntityNode *n = all_of_this_kind.first; n != 0; n = n->next) + D_Entity *result = &d_nil_entity; + D_EntityList all_of_this_kind = d_query_cached_entity_list_with_kind(kind); + for(D_EntityNode *n = all_of_this_kind.first; n != 0; n = n->next) { if(n->entity->u64 == u64) { @@ -2090,50 +2017,50 @@ df_entity_from_u64_and_kind(U64 u64, DF_EntityKind kind) //- rjf: entity freezing state internal void -df_set_thread_freeze_state(DF_Entity *thread, B32 frozen) +d_set_thread_freeze_state(D_Entity *thread, B32 frozen) { - DF_Handle thread_handle = df_handle_from_entity(thread); - DF_HandleNode *already_frozen_node = df_handle_list_find(&df_state->frozen_threads, thread_handle); + D_Handle thread_handle = d_handle_from_entity(thread); + D_HandleNode *already_frozen_node = d_handle_list_find(&d_state->frozen_threads, thread_handle); B32 is_frozen = !!already_frozen_node; B32 should_be_frozen = frozen; // rjf: not frozen => frozen if(!is_frozen && should_be_frozen) { - DF_HandleNode *node = df_state->free_handle_node; + D_HandleNode *node = d_state->free_handle_node; if(node) { - SLLStackPop(df_state->free_handle_node); + SLLStackPop(d_state->free_handle_node); } else { - node = push_array(df_state->arena, DF_HandleNode, 1); + node = push_array(d_state->arena, D_HandleNode, 1); } node->handle = thread_handle; - df_handle_list_push_node(&df_state->frozen_threads, node); - df_state->entities_mut_soft_halt = 1; + d_handle_list_push_node(&d_state->frozen_threads, node); + d_state->entities_mut_soft_halt = 1; } // rjf: frozen => not frozen if(is_frozen && !should_be_frozen) { - df_state->entities_mut_soft_halt = 1; - df_handle_list_remove(&df_state->frozen_threads, already_frozen_node); - SLLStackPush(df_state->free_handle_node, already_frozen_node); + d_state->entities_mut_soft_halt = 1; + d_handle_list_remove(&d_state->frozen_threads, already_frozen_node); + SLLStackPush(d_state->free_handle_node, already_frozen_node); } - df_entity_notify_mutation(thread); + d_entity_notify_mutation(thread); } internal B32 -df_entity_is_frozen(DF_Entity *entity) +d_entity_is_frozen(D_Entity *entity) { - B32 is_frozen = !df_entity_is_nil(entity); - for(DF_Entity *e = entity; !df_entity_is_nil(e); e = df_entity_rec_df_pre(e, entity).next) + B32 is_frozen = !d_entity_is_nil(entity); + for(D_Entity *e = entity; !d_entity_is_nil(e); e = d_entity_rec_df_pre(e, entity).next) { - if(e->kind == DF_EntityKind_Thread) + if(e->kind == D_EntityKind_Thread) { - B32 thread_is_frozen = !!df_handle_list_find(&df_state->frozen_threads, df_handle_from_entity(e)); + B32 thread_is_frozen = !!d_handle_list_find(&d_state->frozen_threads, d_handle_from_entity(e)); if(!thread_is_frozen) { is_frozen = 0; @@ -2148,14 +2075,14 @@ df_entity_is_frozen(DF_Entity *entity) //~ rjf: Command Stateful Functions internal void -df_register_cmd_specs(DF_CmdSpecInfoArray specs) +d_register_cmd_specs(D_CmdSpecInfoArray specs) { - U64 registrar_idx = df_state->total_registrar_count; - df_state->total_registrar_count += 1; + U64 registrar_idx = d_state->total_registrar_count; + d_state->total_registrar_count += 1; for(U64 idx = 0; idx < specs.count; idx += 1) { // rjf: extract info from array slot - DF_CmdSpecInfo *info = &specs.v[idx]; + D_CmdSpecInfo *info = &specs.v[idx]; // rjf: skip empties if(info->string.size == 0) @@ -2164,19 +2091,19 @@ df_register_cmd_specs(DF_CmdSpecInfoArray specs) } // rjf: determine hash/slot - U64 hash = df_hash_from_string(info->string); - U64 slot = hash % df_state->cmd_spec_table_size; + U64 hash = d_hash_from_string(info->string); + U64 slot = hash % d_state->cmd_spec_table_size; // rjf: allocate node & push - DF_CmdSpec *spec = push_array(df_state->arena, DF_CmdSpec, 1); - SLLStackPush_N(df_state->cmd_spec_table[slot], spec, hash_next); + D_CmdSpec *spec = push_array(d_state->arena, D_CmdSpec, 1); + SLLStackPush_N(d_state->cmd_spec_table[slot], spec, hash_next); // rjf: fill node - DF_CmdSpecInfo *info_copy = &spec->info; - info_copy->string = push_str8_copy(df_state->arena, info->string); - info_copy->description = push_str8_copy(df_state->arena, info->description); - info_copy->search_tags = push_str8_copy(df_state->arena, info->search_tags); - info_copy->display_name = push_str8_copy(df_state->arena, info->display_name); + D_CmdSpecInfo *info_copy = &spec->info; + info_copy->string = push_str8_copy(d_state->arena, info->string); + info_copy->description = push_str8_copy(d_state->arena, info->description); + info_copy->search_tags = push_str8_copy(d_state->arena, info->search_tags); + info_copy->display_name = push_str8_copy(d_state->arena, info->display_name); info_copy->flags = info->flags; info_copy->query = info->query; info_copy->canonical_icon_kind = info->canonical_icon_kind; @@ -2185,14 +2112,14 @@ df_register_cmd_specs(DF_CmdSpecInfoArray specs) } } -internal DF_CmdSpec * -df_cmd_spec_from_string(String8 string) +internal D_CmdSpec * +d_cmd_spec_from_string(String8 string) { - DF_CmdSpec *result = &df_g_nil_cmd_spec; + D_CmdSpec *result = &d_nil_cmd_spec; { - U64 hash = df_hash_from_string(string); - U64 slot = hash%df_state->cmd_spec_table_size; - for(DF_CmdSpec *n = df_state->cmd_spec_table[slot]; n != 0; n = n->hash_next) + U64 hash = d_hash_from_string(string); + U64 slot = hash%d_state->cmd_spec_table_size; + for(D_CmdSpec *n = d_state->cmd_spec_table[slot]; n != 0; n = n->hash_next) { if(str8_match(n->info.string, string, 0)) { @@ -2204,32 +2131,32 @@ df_cmd_spec_from_string(String8 string) return result; } -internal DF_CmdSpec * -df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind core_cmd_kind) +internal D_CmdSpec * +d_cmd_spec_from_kind(D_CmdKind core_cmd_kind) { - String8 string = df_g_core_cmd_kind_spec_info_table[core_cmd_kind].string; - DF_CmdSpec *result = df_cmd_spec_from_string(string); + String8 string = d_core_cmd_kind_spec_info_table[core_cmd_kind].string; + D_CmdSpec *result = d_cmd_spec_from_string(string); return result; } internal void -df_cmd_spec_counter_inc(DF_CmdSpec *spec) +d_cmd_spec_counter_inc(D_CmdSpec *spec) { - if(!df_cmd_spec_is_nil(spec)) + if(!d_cmd_spec_is_nil(spec)) { spec->run_count += 1; } } -internal DF_CmdSpecList -df_push_cmd_spec_list(Arena *arena) +internal D_CmdSpecList +d_push_cmd_spec_list(Arena *arena) { - DF_CmdSpecList list = {0}; - for(U64 idx = 0; idx < df_state->cmd_spec_table_size; idx += 1) + D_CmdSpecList list = {0}; + for(U64 idx = 0; idx < d_state->cmd_spec_table_size; idx += 1) { - for(DF_CmdSpec *spec = df_state->cmd_spec_table[idx]; spec != 0; spec = spec->hash_next) + for(D_CmdSpec *spec = d_state->cmd_spec_table[idx]; spec != 0; spec = spec->hash_next) { - df_cmd_spec_list_push(arena, &list, spec); + d_cmd_spec_list_push(arena, &list, spec); } } return list; @@ -2239,12 +2166,12 @@ df_push_cmd_spec_list(Arena *arena) //~ rjf: View Rule Spec Stateful Functions internal void -df_register_core_view_rule_specs(DF_CoreViewRuleSpecInfoArray specs) +d_register_view_rule_specs(D_ViewRuleSpecInfoArray specs) { for(U64 idx = 0; idx < specs.count; idx += 1) { // rjf: extract info from array slot - DF_CoreViewRuleSpecInfo *info = &specs.v[idx]; + D_ViewRuleSpecInfo *info = &specs.v[idx]; // rjf: skip empties if(info->string.size == 0) @@ -2253,30 +2180,30 @@ df_register_core_view_rule_specs(DF_CoreViewRuleSpecInfoArray specs) } // rjf: determine hash/slot - U64 hash = df_hash_from_string(info->string); - U64 slot_idx = hash%df_state->view_rule_spec_table_size; + U64 hash = d_hash_from_string(info->string); + U64 slot_idx = hash%d_state->view_rule_spec_table_size; // rjf: allocate node & push - DF_CoreViewRuleSpec *spec = push_array(df_state->arena, DF_CoreViewRuleSpec, 1); - SLLStackPush_N(df_state->view_rule_spec_table[slot_idx], spec, hash_next); + D_ViewRuleSpec *spec = push_array(d_state->arena, D_ViewRuleSpec, 1); + SLLStackPush_N(d_state->view_rule_spec_table[slot_idx], spec, hash_next); // rjf: fill node - DF_CoreViewRuleSpecInfo *info_copy = &spec->info; + D_ViewRuleSpecInfo *info_copy = &spec->info; MemoryCopyStruct(info_copy, info); - info_copy->string = push_str8_copy(df_state->arena, info->string); - info_copy->display_string = push_str8_copy(df_state->arena, info->display_string); - info_copy->description = push_str8_copy(df_state->arena, info->description); + info_copy->string = push_str8_copy(d_state->arena, info->string); + info_copy->display_string = push_str8_copy(d_state->arena, info->display_string); + info_copy->description = push_str8_copy(d_state->arena, info->description); } } -internal DF_CoreViewRuleSpec * -df_core_view_rule_spec_from_string(String8 string) +internal D_ViewRuleSpec * +d_view_rule_spec_from_string(String8 string) { - DF_CoreViewRuleSpec *spec = &df_g_nil_core_view_rule_spec; + D_ViewRuleSpec *spec = &d_nil_core_view_rule_spec; { - U64 hash = df_hash_from_string(string); - U64 slot_idx = hash%df_state->view_rule_spec_table_size; - for(DF_CoreViewRuleSpec *s = df_state->view_rule_spec_table[slot_idx]; s != 0; s = s->hash_next) + U64 hash = d_hash_from_string(string); + U64 slot_idx = hash%d_state->view_rule_spec_table_size; + for(D_ViewRuleSpec *s = d_state->view_rule_spec_table[slot_idx]; s != 0; s = s->hash_next) { if(str8_match(string, s->info.string, 0)) { @@ -2384,15 +2311,15 @@ df_core_view_rule_spec_from_string(String8 string) // at them with the "save-stack-pointer | single-step-after" behaviors. internal CTRL_TrapList -df_trap_net_from_thread__step_over_inst(Arena *arena, DF_Entity *thread) +d_trap_net_from_thread__step_over_inst(Arena *arena, D_Entity *thread) { Temp scratch = scratch_begin(&arena, 1); CTRL_TrapList result = {0}; // rjf: thread => unpacked info - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - Architecture arch = df_architecture_from_entity(thread); - U64 ip_vaddr = ctrl_query_cached_rip_from_thread(df_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + Architecture arch = d_architecture_from_entity(thread); + U64 ip_vaddr = ctrl_query_cached_rip_from_thread(d_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); // rjf: ip => machine code String8 machine_code = {0}; @@ -2421,31 +2348,31 @@ df_trap_net_from_thread__step_over_inst(Arena *arena, DF_Entity *thread) } internal CTRL_TrapList -df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread) +d_trap_net_from_thread__step_over_line(Arena *arena, D_Entity *thread) { Temp scratch = scratch_begin(&arena, 1); log_infof("step_over_line:\n{\n"); CTRL_TrapList result = {0}; // rjf: thread => info - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - DF_Entity *module = df_module_from_thread(thread); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - Architecture arch = df_architecture_from_entity(thread); - U64 ip_vaddr = ctrl_query_cached_rip_from_thread(df_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + D_Entity *module = d_module_from_thread(thread); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + Architecture arch = d_architecture_from_entity(thread); + U64 ip_vaddr = ctrl_query_cached_rip_from_thread(d_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); log_infof("ip_vaddr: 0x%I64x\n", ip_vaddr); log_infof("dbgi_key: {%S, 0x%I64x}\n", dbgi_key.path, dbgi_key.min_timestamp); // rjf: ip => line vaddr range Rng1U64 line_vaddr_rng = {0}; { - U64 ip_voff = df_voff_from_vaddr(module, ip_vaddr); - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, ip_voff); + U64 ip_voff = d_voff_from_vaddr(module, ip_vaddr); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, ip_voff); Rng1U64 line_voff_rng = {0}; if(lines.first != 0) { line_voff_rng = lines.first->v.voff_range; - line_vaddr_rng = df_vaddr_range_from_voff_range(module, line_voff_rng); + line_vaddr_rng = d_vaddr_range_from_voff_range(module, line_voff_rng); log_infof("line: {%S:%I64i}\n", lines.first->v.file_path, lines.first->v.pt.line); } log_infof("voff_range: {0x%I64x, 0x%I64x}\n", line_voff_rng.min, line_voff_rng.max); @@ -2457,11 +2384,11 @@ df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread) // MSVC exports line info at these line numbers when /JMC (Just My Code) debugging // is enabled. This is enabled by default normally. { - U64 opl_line_voff_rng = df_voff_from_vaddr(module, line_vaddr_rng.max); - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, opl_line_voff_rng); + U64 opl_line_voff_rng = d_voff_from_vaddr(module, line_vaddr_rng.max); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, opl_line_voff_rng); if(lines.first != 0 && (lines.first->v.pt.line == 0xf00f00 || lines.first->v.pt.line == 0xfeefee)) { - line_vaddr_rng.max = df_vaddr_from_voff(module, lines.first->v.voff_range.max); + line_vaddr_rng.max = d_vaddr_from_voff(module, lines.first->v.voff_range.max); } } @@ -2493,22 +2420,22 @@ df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread) } // rjf: machine code => ctrl flow analysis - DF_CtrlFlowInfo ctrl_flow_info = {0}; + D_CtrlFlowInfo ctrl_flow_info = {0}; if(good_line_info) { - ctrl_flow_info = df_ctrl_flow_info_from_arch_vaddr_code(scratch.arena, - DASM_InstFlag_Call| - DASM_InstFlag_Branch| - DASM_InstFlag_UnconditionalJump| - DASM_InstFlag_ChangesStackPointer| - DASM_InstFlag_Return, - arch, - line_vaddr_rng.min, - machine_code); + ctrl_flow_info = d_ctrl_flow_info_from_arch_vaddr_code(scratch.arena, + DASM_InstFlag_Call| + DASM_InstFlag_Branch| + DASM_InstFlag_UnconditionalJump| + DASM_InstFlag_ChangesStackPointer| + DASM_InstFlag_Return, + arch, + line_vaddr_rng.min, + machine_code); LogInfoNamedBlockF("ctrl_flow_info") { log_infof("flags: %x\n", ctrl_flow_info.flags); - LogInfoNamedBlockF("exit_points") for(DF_CtrlFlowPointNode *n = ctrl_flow_info.exit_points.first; n != 0; n = n->next) + LogInfoNamedBlockF("exit_points") for(D_CtrlFlowPointNode *n = ctrl_flow_info.exit_points.first; n != 0; n = n->next) { log_infof("{vaddr:0x%I64x, jump_dest_vaddr:0x%I64x, inst_flags:%x}\n", n->v.vaddr, n->v.jump_dest_vaddr, n->v.inst_flags); } @@ -2516,9 +2443,9 @@ df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread) } // rjf: push traps for all exit points - if(good_line_info) for(DF_CtrlFlowPointNode *n = ctrl_flow_info.exit_points.first; n != 0; n = n->next) + if(good_line_info) for(D_CtrlFlowPointNode *n = ctrl_flow_info.exit_points.first; n != 0; n = n->next) { - DF_CtrlFlowPoint *point = &n->v; + D_CtrlFlowPoint *point = &n->v; CTRL_TrapFlags flags = 0; B32 add = 1; U64 trap_addr = point->vaddr; @@ -2584,28 +2511,28 @@ df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread) } internal CTRL_TrapList -df_trap_net_from_thread__step_into_line(Arena *arena, DF_Entity *thread) +d_trap_net_from_thread__step_into_line(Arena *arena, D_Entity *thread) { Temp scratch = scratch_begin(&arena, 1); CTRL_TrapList result = {0}; // rjf: thread => info - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - DF_Entity *module = df_module_from_thread(thread); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - Architecture arch = df_architecture_from_entity(thread); - U64 ip_vaddr = ctrl_query_cached_rip_from_thread(df_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + D_Entity *module = d_module_from_thread(thread); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + Architecture arch = d_architecture_from_entity(thread); + U64 ip_vaddr = ctrl_query_cached_rip_from_thread(d_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); // rjf: ip => line vaddr range Rng1U64 line_vaddr_rng = {0}; { - U64 ip_voff = df_voff_from_vaddr(module, ip_vaddr); - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, ip_voff); + U64 ip_voff = d_voff_from_vaddr(module, ip_vaddr); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, ip_voff); Rng1U64 line_voff_rng = {0}; if(lines.first != 0) { line_voff_rng = lines.first->v.voff_range; - line_vaddr_rng = df_vaddr_range_from_voff_range(module, line_voff_rng); + line_vaddr_rng = d_vaddr_range_from_voff_range(module, line_voff_rng); } } @@ -2614,11 +2541,11 @@ df_trap_net_from_thread__step_into_line(Arena *arena, DF_Entity *thread) // MSVC exports line info at these line numbers when /JMC (Just My Code) debugging // is enabled. This is enabled by default normally. { - U64 opl_line_voff_rng = df_voff_from_vaddr(module, line_vaddr_rng.max); - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, opl_line_voff_rng); + U64 opl_line_voff_rng = d_voff_from_vaddr(module, line_vaddr_rng.max); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, opl_line_voff_rng); if(lines.first != 0 && (lines.first->v.pt.line == 0xf00f00 || lines.first->v.pt.line == 0xfeefee)) { - line_vaddr_rng.max = df_vaddr_from_voff(module, lines.first->v.voff_range.max); + line_vaddr_rng.max = d_vaddr_from_voff(module, lines.first->v.voff_range.max); } } @@ -2634,24 +2561,24 @@ df_trap_net_from_thread__step_into_line(Arena *arena, DF_Entity *thread) } // rjf: machine code => ctrl flow analysis - DF_CtrlFlowInfo ctrl_flow_info = {0}; + D_CtrlFlowInfo ctrl_flow_info = {0}; if(good_line_info) { - ctrl_flow_info = df_ctrl_flow_info_from_arch_vaddr_code(scratch.arena, - DASM_InstFlag_Call| - DASM_InstFlag_Branch| - DASM_InstFlag_UnconditionalJump| - DASM_InstFlag_ChangesStackPointer| - DASM_InstFlag_Return, - arch, - line_vaddr_rng.min, - machine_code); + ctrl_flow_info = d_ctrl_flow_info_from_arch_vaddr_code(scratch.arena, + DASM_InstFlag_Call| + DASM_InstFlag_Branch| + DASM_InstFlag_UnconditionalJump| + DASM_InstFlag_ChangesStackPointer| + DASM_InstFlag_Return, + arch, + line_vaddr_rng.min, + machine_code); } // rjf: push traps for all exit points - if(good_line_info) for(DF_CtrlFlowPointNode *n = ctrl_flow_info.exit_points.first; n != 0; n = n->next) + if(good_line_info) for(D_CtrlFlowPointNode *n = ctrl_flow_info.exit_points.first; n != 0; n = n->next) { - DF_CtrlFlowPoint *point = &n->v; + D_CtrlFlowPoint *point = &n->v; CTRL_TrapFlags flags = 0; B32 add = 1; U64 trap_addr = point->vaddr; @@ -2709,25 +2636,25 @@ df_trap_net_from_thread__step_into_line(Arena *arena, DF_Entity *thread) //- rjf: module <=> debug info keys internal DI_Key -df_dbgi_key_from_module(DF_Entity *module) +d_dbgi_key_from_module(D_Entity *module) { - DF_Entity *debug_info_path = df_entity_child_from_kind(module, DF_EntityKind_DebugInfoPath); + D_Entity *debug_info_path = d_entity_child_from_kind(module, D_EntityKind_DebugInfoPath); DI_Key key = {debug_info_path->name, debug_info_path->timestamp}; return key; } -internal DF_EntityList -df_modules_from_dbgi_key(Arena *arena, DI_Key *dbgi_key) +internal D_EntityList +d_modules_from_dbgi_key(Arena *arena, DI_Key *dbgi_key) { - DF_EntityList list = {0}; - DF_EntityList all_modules = df_query_cached_entity_list_with_kind(DF_EntityKind_Module); - for(DF_EntityNode *n = all_modules.first; n != 0; n = n->next) + D_EntityList list = {0}; + D_EntityList all_modules = d_query_cached_entity_list_with_kind(D_EntityKind_Module); + for(D_EntityNode *n = all_modules.first; n != 0; n = n->next) { - DF_Entity *module = n->entity; - DI_Key module_dbgi_key = df_dbgi_key_from_module(module); + D_Entity *module = n->entity; + DI_Key module_dbgi_key = d_dbgi_key_from_module(module); if(di_key_match(&module_dbgi_key, dbgi_key)) { - df_entity_list_push(arena, &list, module); + d_entity_list_push(arena, &list, module); } } return list; @@ -2736,44 +2663,44 @@ df_modules_from_dbgi_key(Arena *arena, DI_Key *dbgi_key) //- rjf: voff <=> vaddr internal U64 -df_base_vaddr_from_module(DF_Entity *module) +d_base_vaddr_from_module(D_Entity *module) { U64 module_base_vaddr = module->vaddr; return module_base_vaddr; } internal U64 -df_voff_from_vaddr(DF_Entity *module, U64 vaddr) +d_voff_from_vaddr(D_Entity *module, U64 vaddr) { - U64 module_base_vaddr = df_base_vaddr_from_module(module); + U64 module_base_vaddr = d_base_vaddr_from_module(module); U64 voff = vaddr - module_base_vaddr; return voff; } internal U64 -df_vaddr_from_voff(DF_Entity *module, U64 voff) +d_vaddr_from_voff(D_Entity *module, U64 voff) { - U64 module_base_vaddr = df_base_vaddr_from_module(module); + U64 module_base_vaddr = d_base_vaddr_from_module(module); U64 vaddr = voff + module_base_vaddr; return vaddr; } internal Rng1U64 -df_voff_range_from_vaddr_range(DF_Entity *module, Rng1U64 vaddr_rng) +d_voff_range_from_vaddr_range(D_Entity *module, Rng1U64 vaddr_rng) { U64 rng_size = dim_1u64(vaddr_rng); Rng1U64 voff_rng = {0}; - voff_rng.min = df_voff_from_vaddr(module, vaddr_rng.min); + voff_rng.min = d_voff_from_vaddr(module, vaddr_rng.min); voff_rng.max = voff_rng.min + rng_size; return voff_rng; } internal Rng1U64 -df_vaddr_range_from_voff_range(DF_Entity *module, Rng1U64 voff_rng) +d_vaddr_range_from_voff_range(D_Entity *module, Rng1U64 voff_rng) { U64 rng_size = dim_1u64(voff_rng); Rng1U64 vaddr_rng = {0}; - vaddr_rng.min = df_vaddr_from_voff(module, voff_rng.min); + vaddr_rng.min = d_vaddr_from_voff(module, voff_rng.min); vaddr_rng.max = vaddr_rng.min + rng_size; return vaddr_rng; } @@ -2784,7 +2711,7 @@ df_vaddr_range_from_voff_range(DF_Entity *module, Rng1U64 voff_rng) //- rjf: symbol lookups internal String8 -df_symbol_name_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff, B32 decorated) +d_symbol_name_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff, B32 decorated) { String8 result = {0}; { @@ -2828,15 +2755,15 @@ df_symbol_name_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff, B32 } internal String8 -df_symbol_name_from_process_vaddr(Arena *arena, DF_Entity *process, U64 vaddr, B32 decorated) +d_symbol_name_from_process_vaddr(Arena *arena, D_Entity *process, U64 vaddr, B32 decorated) { ProfBeginFunction(); String8 result = {0}; { - DF_Entity *module = df_module_from_process_vaddr(process, vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - U64 voff = df_voff_from_vaddr(module, vaddr); - result = df_symbol_name_from_dbgi_key_voff(arena, &dbgi_key, voff, decorated); + D_Entity *module = d_module_from_process_vaddr(process, vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + U64 voff = d_voff_from_vaddr(module, vaddr); + result = d_symbol_name_from_dbgi_key_voff(arena, &dbgi_key, voff, decorated); } ProfEnd(); return result; @@ -2845,7 +2772,7 @@ df_symbol_name_from_process_vaddr(Arena *arena, DF_Entity *process, U64 vaddr, B //- rjf: symbol -> voff lookups internal U64 -df_voff_from_dbgi_key_symbol_name(DI_Key *dbgi_key, String8 symbol_name) +d_voff_from_dbgi_key_symbol_name(DI_Key *dbgi_key, String8 symbol_name) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); @@ -2926,7 +2853,7 @@ df_voff_from_dbgi_key_symbol_name(DI_Key *dbgi_key, String8 symbol_name) } internal U64 -df_type_num_from_dbgi_key_name(DI_Key *dbgi_key, String8 name) +d_type_num_from_dbgi_key_name(DI_Key *dbgi_key, String8 name) { ProfBeginFunction(); DI_Scope *scope = di_scope_open(); @@ -2966,13 +2893,13 @@ df_type_num_from_dbgi_key_name(DI_Key *dbgi_key, String8 name) //- rjf: voff -> line info -internal DF_LineList -df_lines_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff) +internal D_LineList +d_lines_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff) { Temp scratch = scratch_begin(&arena, 1); DI_Scope *scope = di_scope_open(); RDI_Parsed *rdi = di_rdi_from_key(scope, dbgi_key, 0); - DF_LineList result = {0}; + D_LineList result = {0}; { //- rjf: gather line tables typedef struct LineTableNode LineTableNode; @@ -3027,7 +2954,7 @@ df_lines_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff) StringJoin join = {0}; join.sep = str8_lit("/"); String8 file_normalized_full_path = str8_list_join(arena, &path_parts, &join); - DF_LineNode *n = push_array(arena, DF_LineNode, 1); + D_LineNode *n = push_array(arena, D_LineNode, 1); SLLQueuePush(result.first, result.last, n); result.count += 1; if(line->file_idx != 0 && file_normalized_full_path.size != 0) @@ -3045,7 +2972,7 @@ df_lines_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff) } //- rjf: clamp all lines from all tables by shallowest (most unwound) range - for(DF_LineNode *n = result.first; n != 0; n = n->next) + for(D_LineNode *n = result.first; n != 0; n = n->next) { n->v.voff_range = intersect_1u64(n->v.voff_range, shallowest_voff_range); } @@ -3057,18 +2984,18 @@ df_lines_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff) //- rjf: file:line -> line info -internal DF_LineListArray -df_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64 line_num_range) +internal D_LineListArray +d_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64 line_num_range) { - DF_LineListArray array = {0}; + D_LineListArray array = {0}; { array.count = dim_1s64(line_num_range)+1; - array.v = push_array(arena, DF_LineList, array.count); + array.v = push_array(arena, D_LineList, array.count); } Temp scratch = scratch_begin(&arena, 1); DI_Scope *scope = di_scope_open(); - DI_KeyList dbgi_keys = df_push_active_dbgi_key_list(scratch.arena); - String8List overrides = df_possible_overrides_from_file_path(scratch.arena, file_path); + DI_KeyList dbgi_keys = d_push_active_dbgi_key_list(scratch.arena); + String8List overrides = d_possible_overrides_from_file_path(scratch.arena, file_path); for(String8Node *override_n = overrides.first; override_n != 0; override_n = override_n->next) @@ -3116,7 +3043,7 @@ df_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S6 line_num <= line_num_range.max; line_num += 1, line_idx += 1) { - DF_LineList *list = &array.v[line_idx]; + D_LineList *list = &array.v[line_idx]; U32 voff_count = 0; U64 *voffs = rdi_line_voffs_from_num(&line_map, u32_from_u64_saturate((U64)line_num), &voff_count); for(U64 idx = 0; idx < voff_count; idx += 1) @@ -3132,7 +3059,7 @@ df_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S6 { Rng1U64 range = r1u64(base_voff, unit_line_info.voffs[line_info_idx+1]); S64 actual_line = (S64)unit_line_info.lines[line_info_idx].line_num; - DF_LineNode *n = push_array(arena, DF_LineNode, 1); + D_LineNode *n = push_array(arena, D_LineNode, 1); n->v.voff_range = range; n->v.pt.line = (S64)actual_line; n->v.pt.column = 1; @@ -3156,11 +3083,11 @@ df_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S6 return array; } -internal DF_LineList -df_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num) +internal D_LineList +d_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num) { - DF_LineListArray array = df_lines_array_from_file_path_line_range(arena, file_path, r1s64(line_num, line_num+1)); - DF_LineList list = {0}; + D_LineListArray array = d_lines_array_from_file_path_line_range(arena, file_path, r1s64(line_num, line_num+1)); + D_LineList list = {0}; if(array.count != 0) { list = array.v[0]; @@ -3171,13 +3098,13 @@ df_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num) //////////////////////////////// //~ rjf: Process/Thread/Module Info Lookups -internal DF_Entity * -df_module_from_process_vaddr(DF_Entity *process, U64 vaddr) +internal D_Entity * +d_module_from_process_vaddr(D_Entity *process, U64 vaddr) { - DF_Entity *module = &df_g_nil_entity; - for(DF_Entity *child = process->first; !df_entity_is_nil(child); child = child->next) + D_Entity *module = &d_nil_entity; + for(D_Entity *child = process->first; !d_entity_is_nil(child); child = child->next) { - if(child->kind == DF_EntityKind_Module && contains_1u64(child->vaddr_rng, vaddr)) + if(child->kind == D_EntityKind_Module && contains_1u64(child->vaddr_rng, vaddr)) { module = child; break; @@ -3186,24 +3113,24 @@ df_module_from_process_vaddr(DF_Entity *process, U64 vaddr) return module; } -internal DF_Entity * -df_module_from_thread(DF_Entity *thread) +internal D_Entity * +d_module_from_thread(D_Entity *thread) { - DF_Entity *process = thread->parent; - U64 rip = df_query_cached_rip_from_thread(thread); - return df_module_from_process_vaddr(process, rip); + D_Entity *process = thread->parent; + U64 rip = d_query_cached_rip_from_thread(thread); + return d_module_from_process_vaddr(process, rip); } internal U64 -df_tls_base_vaddr_from_process_root_rip(DF_Entity *process, U64 root_vaddr, U64 rip_vaddr) +d_tls_base_vaddr_from_process_root_rip(D_Entity *process, U64 root_vaddr, U64 rip_vaddr) { ProfBeginFunction(); U64 base_vaddr = 0; Temp scratch = scratch_begin(0, 0); - if(!df_ctrl_targets_running()) + if(!d_ctrl_targets_running()) { //- rjf: unpack module info - DF_Entity *module = df_module_from_process_vaddr(process, rip_vaddr); + D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr); Rng1U64 tls_vaddr_range = ctrl_tls_vaddr_range_from_module(module->ctrl_machine_id, module->ctrl_handle); U64 addr_size = bit_size_from_arch(process->arch)/8; @@ -3278,13 +3205,13 @@ df_tls_base_vaddr_from_process_root_rip(DF_Entity *process, U64 root_vaddr, U64 } internal Architecture -df_architecture_from_entity(DF_Entity *entity) +d_architecture_from_entity(D_Entity *entity) { return entity->arch; } internal E_String2NumMap * -df_push_locals_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbgi_key, U64 voff) +d_push_locals_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbgi_key, U64 voff) { RDI_Parsed *rdi = di_rdi_from_key(scope, dbgi_key, 0); E_String2NumMap *result = e_push_locals_map_from_rdi_voff(arena, rdi, voff); @@ -3292,7 +3219,7 @@ df_push_locals_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbg } internal E_String2NumMap * -df_push_member_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbgi_key, U64 voff) +d_push_member_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbgi_key, U64 voff) { RDI_Parsed *rdi = di_rdi_from_key(scope, dbgi_key, 0); E_String2NumMap *result = e_push_member_map_from_rdi_voff(arena, rdi, voff); @@ -3300,26 +3227,26 @@ df_push_member_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbg } internal B32 -df_set_thread_rip(DF_Entity *thread, U64 vaddr) +d_set_thread_rip(D_Entity *thread, U64 vaddr) { Temp scratch = scratch_begin(0, 0); - void *block = ctrl_query_cached_reg_block_from_thread(scratch.arena, df_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); + void *block = ctrl_query_cached_reg_block_from_thread(scratch.arena, d_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); regs_arch_block_write_rip(thread->arch, block, vaddr); B32 result = ctrl_thread_write_reg_block(thread->ctrl_machine_id, thread->ctrl_handle, block); // rjf: early mutation of unwind cache for immediate frontend effect if(result) { - DF_UnwindCache *cache = &df_state->unwind_cache; + D_UnwindCache *cache = &d_state->unwind_cache; if(cache->slots_count != 0) { - DF_Handle thread_handle = df_handle_from_entity(thread); - U64 hash = df_hash_from_string(str8_struct(&thread_handle)); + D_Handle thread_handle = d_handle_from_entity(thread); + U64 hash = d_hash_from_string(str8_struct(&thread_handle)); U64 slot_idx = hash%cache->slots_count; - DF_UnwindCacheSlot *slot = &cache->slots[slot_idx]; - for(DF_UnwindCacheNode *n = slot->first; n != 0; n = n->next) + D_UnwindCacheSlot *slot = &cache->slots[slot_idx]; + for(D_UnwindCacheNode *n = slot->first; n != 0; n = n->next) { - if(df_handle_match(n->thread, thread_handle) && n->unwind.frames.count != 0) + if(d_handle_match(n->thread, thread_handle) && n->unwind.frames.count != 0) { regs_arch_block_write_rip(thread->arch, n->unwind.frames.v[0].regs, vaddr); break; @@ -3332,16 +3259,16 @@ df_set_thread_rip(DF_Entity *thread, U64 vaddr) return result; } -internal DF_Entity * -df_module_from_thread_candidates(DF_Entity *thread, DF_EntityList *candidates) +internal D_Entity * +d_module_from_thread_candidates(D_Entity *thread, D_EntityList *candidates) { - DF_Entity *src_module = df_module_from_thread(thread); - DF_Entity *module = &df_g_nil_entity; - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - for(DF_EntityNode *n = candidates->first; n != 0; n = n->next) + D_Entity *src_module = d_module_from_thread(thread); + D_Entity *module = &d_nil_entity; + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + for(D_EntityNode *n = candidates->first; n != 0; n = n->next) { - DF_Entity *candidate_module = n->entity; - DF_Entity *candidate_process = df_entity_ancestor_from_kind(candidate_module, DF_EntityKind_Process); + D_Entity *candidate_module = n->entity; + D_Entity *candidate_process = d_entity_ancestor_from_kind(candidate_module, D_EntityKind_Process); if(candidate_process == process) { module = candidate_module; @@ -3354,22 +3281,22 @@ df_module_from_thread_candidates(DF_Entity *thread, DF_EntityList *candidates) return module; } -internal DF_Unwind -df_unwind_from_ctrl_unwind(Arena *arena, DI_Scope *di_scope, DF_Entity *process, CTRL_Unwind *base_unwind) +internal D_Unwind +d_unwind_from_ctrl_unwind(Arena *arena, DI_Scope *di_scope, D_Entity *process, CTRL_Unwind *base_unwind) { - Architecture arch = df_architecture_from_entity(process); - DF_Unwind result = {0}; + Architecture arch = d_architecture_from_entity(process); + D_Unwind result = {0}; result.frames.concrete_frame_count = base_unwind->frames.count; result.frames.total_frame_count = result.frames.concrete_frame_count; - result.frames.v = push_array(arena, DF_UnwindFrame, result.frames.concrete_frame_count); + result.frames.v = push_array(arena, D_UnwindFrame, result.frames.concrete_frame_count); for(U64 idx = 0; idx < result.frames.concrete_frame_count; idx += 1) { CTRL_UnwindFrame *src = &base_unwind->frames.v[idx]; - DF_UnwindFrame *dst = &result.frames.v[idx]; + D_UnwindFrame *dst = &result.frames.v[idx]; U64 rip_vaddr = regs_rip_from_arch_block(arch, src->regs); - DF_Entity *module = df_module_from_process_vaddr(process, rip_vaddr); - U64 rip_voff = df_voff_from_vaddr(module, rip_vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); + D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr); + U64 rip_voff = d_voff_from_vaddr(module, rip_vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); RDI_Parsed *rdi = di_rdi_from_key(di_scope, &dbgi_key, 0); RDI_Scope *scope = rdi_scope_from_voff(rdi, rip_voff); @@ -3384,7 +3311,7 @@ df_unwind_from_ctrl_unwind(Arena *arena, DI_Scope *di_scope, DF_Entity *process, s = rdi_element_from_name_idx(rdi, Scopes, s->parent_scope_idx)) { RDI_InlineSite *site = rdi_element_from_name_idx(rdi, InlineSites, s->inline_site_idx); - DF_UnwindInlineFrame *inline_frame = push_array(arena, DF_UnwindInlineFrame, 1); + D_UnwindInlineFrame *inline_frame = push_array(arena, D_UnwindInlineFrame, 1); DLLPushFront(dst->first_inline_frame, dst->last_inline_frame, inline_frame); inline_frame->inline_site = site; dst->inline_frame_count += 1; @@ -3401,13 +3328,13 @@ df_unwind_from_ctrl_unwind(Arena *arena, DI_Scope *di_scope, DF_Entity *process, //- rjf: control message dispatching internal void -df_push_ctrl_msg(CTRL_Msg *msg) +d_push_ctrl_msg(CTRL_Msg *msg) { - CTRL_Msg *dst = ctrl_msg_list_push(df_state->ctrl_msg_arena, &df_state->ctrl_msgs); - ctrl_msg_deep_copy(df_state->ctrl_msg_arena, dst, msg); - if(df_state->ctrl_soft_halt_issued == 0 && df_ctrl_targets_running()) + CTRL_Msg *dst = ctrl_msg_list_push(d_state->ctrl_msg_arena, &d_state->ctrl_msgs); + ctrl_msg_deep_copy(d_state->ctrl_msg_arena, dst, msg); + if(d_state->ctrl_soft_halt_issued == 0 && d_ctrl_targets_running()) { - df_state->ctrl_soft_halt_issued = 1; + d_state->ctrl_soft_halt_issued = 1; ctrl_halt(); } } @@ -3415,41 +3342,41 @@ df_push_ctrl_msg(CTRL_Msg *msg) //- rjf: control thread running internal void -df_ctrl_run(DF_RunKind run, DF_Entity *run_thread, CTRL_RunFlags flags, CTRL_TrapList *run_traps) +d_ctrl_run(D_RunKind run, D_Entity *run_thread, CTRL_RunFlags flags, CTRL_TrapList *run_traps) { Temp scratch = scratch_begin(0, 0); // rjf: build run message - CTRL_Msg msg = {(run == DF_RunKind_Run || run == DF_RunKind_Step) ? CTRL_MsgKind_Run : CTRL_MsgKind_SingleStep}; + CTRL_Msg msg = {(run == D_RunKind_Run || run == D_RunKind_Step) ? CTRL_MsgKind_Run : CTRL_MsgKind_SingleStep}; { - DF_EntityList user_bps = df_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - DF_Entity *process = df_entity_ancestor_from_kind(run_thread, DF_EntityKind_Process); + D_EntityList user_bps = d_query_cached_entity_list_with_kind(D_EntityKind_Breakpoint); + D_Entity *process = d_entity_ancestor_from_kind(run_thread, D_EntityKind_Process); msg.run_flags = flags; msg.machine_id = run_thread->ctrl_machine_id; msg.entity = run_thread->ctrl_handle; msg.parent = process->ctrl_handle; - MemoryCopyArray(msg.exception_code_filters, df_state->ctrl_exception_code_filters); + MemoryCopyArray(msg.exception_code_filters, d_state->ctrl_exception_code_filters); if(run_traps != 0) { MemoryCopyStruct(&msg.traps, run_traps); } - for(DF_EntityNode *user_bp_n = user_bps.first; + for(D_EntityNode *user_bp_n = user_bps.first; user_bp_n != 0; user_bp_n = user_bp_n->next) { // rjf: unpack user breakpoint entity - DF_Entity *user_bp = user_bp_n->entity; + D_Entity *user_bp = user_bp_n->entity; if(user_bp->disabled) { continue; } - DF_Entity *loc = df_entity_child_from_kind(user_bp, DF_EntityKind_Location); - DF_Entity *cnd = df_entity_child_from_kind(user_bp, DF_EntityKind_Condition); + D_Entity *loc = d_entity_child_from_kind(user_bp, D_EntityKind_Location); + D_Entity *cnd = d_entity_child_from_kind(user_bp, D_EntityKind_Condition); // rjf: textual location -> add breakpoints for all possible override locations - if(loc->flags & DF_EntityFlag_HasTextPoint) + if(loc->flags & D_EntityFlag_HasTextPoint) { - String8List overrides = df_possible_overrides_from_file_path(scratch.arena, loc->name); + String8List overrides = d_possible_overrides_from_file_path(scratch.arena, loc->name); for(String8Node *n = overrides.first; n != 0; n = n->next) { CTRL_UserBreakpoint ctrl_user_bp = {CTRL_UserBreakpointKind_FileNameAndLineColNumber}; @@ -3461,7 +3388,7 @@ df_ctrl_run(DF_RunKind run, DF_Entity *run_thread, CTRL_RunFlags flags, CTRL_Tra } // rjf: virtual address location -> add breakpoint for address - else if(loc->flags & DF_EntityFlag_HasVAddr) + else if(loc->flags & D_EntityFlag_HasVAddr) { CTRL_UserBreakpoint ctrl_user_bp = {CTRL_UserBreakpointKind_VirtualAddress}; ctrl_user_bp.u64 = loc->vaddr; @@ -3478,10 +3405,10 @@ df_ctrl_run(DF_RunKind run, DF_Entity *run_thread, CTRL_RunFlags flags, CTRL_Tra ctrl_user_breakpoint_list_push(scratch.arena, &msg.user_bps, &ctrl_user_bp); } } - for(DF_HandleNode *n = df_state->frozen_threads.first; n != 0; n = n->next) + for(D_HandleNode *n = d_state->frozen_threads.first; n != 0; n = n->next) { - DF_Entity *thread = df_entity_from_handle(n->handle); - if(!df_entity_is_nil(thread)) + D_Entity *thread = d_entity_from_handle(n->handle); + if(!d_entity_is_nil(thread)) { CTRL_MachineIDHandlePair pair = {thread->ctrl_machine_id, thread->ctrl_handle}; ctrl_machine_id_handle_pair_list_push(scratch.arena, &msg.freeze_state_threads, &pair); @@ -3491,9 +3418,9 @@ df_ctrl_run(DF_RunKind run, DF_Entity *run_thread, CTRL_RunFlags flags, CTRL_Tra } // rjf: push msg - df_push_ctrl_msg(&msg); + d_push_ctrl_msg(&msg); - // rjf: copy run traps to scratch (needed, if the caller can pass `df_state->ctrl_last_run_traps`) + // rjf: copy run traps to scratch (needed, if the caller can pass `d_state->ctrl_last_run_traps`) CTRL_TrapList run_traps_copy = {0}; if(run_traps != 0) { @@ -3501,17 +3428,17 @@ df_ctrl_run(DF_RunKind run, DF_Entity *run_thread, CTRL_RunFlags flags, CTRL_Tra } // rjf: store last run info - arena_clear(df_state->ctrl_last_run_arena); - df_state->ctrl_last_run_kind = run; - df_state->ctrl_last_run_frame_idx = df_frame_index(); - df_state->ctrl_last_run_thread = df_handle_from_entity(run_thread); - df_state->ctrl_last_run_flags = flags; - df_state->ctrl_last_run_traps = ctrl_trap_list_copy(df_state->ctrl_last_run_arena, &run_traps_copy); - df_state->ctrl_is_running = 1; + arena_clear(d_state->ctrl_last_run_arena); + d_state->ctrl_last_run_kind = run; + d_state->ctrl_last_run_frame_idx = d_frame_index(); + d_state->ctrl_last_run_thread = d_handle_from_entity(run_thread); + d_state->ctrl_last_run_flags = flags; + d_state->ctrl_last_run_traps = ctrl_trap_list_copy(d_state->ctrl_last_run_arena, &run_traps_copy); + d_state->ctrl_is_running = 1; // rjf: reset selected frame to top unwind - df_state->base_interact_regs.v.unwind_count = 0; - df_state->base_interact_regs.v.inline_depth = 0; + d_state->base_interact_regs.v.unwind_count = 0; + d_state->base_interact_regs.v.inline_depth = 0; scratch_end(scratch); } @@ -3519,9 +3446,9 @@ df_ctrl_run(DF_RunKind run, DF_Entity *run_thread, CTRL_RunFlags flags, CTRL_Tra //- rjf: stopped info from the control thread internal CTRL_Event -df_ctrl_last_stop_event(void) +d_ctrl_last_stop_event(void) { - return df_state->ctrl_last_stop_event; + return d_state->ctrl_last_stop_event; } //////////////////////////////// @@ -3529,19 +3456,19 @@ df_ctrl_last_stop_event(void) //- rjf: entity <-> eval space -internal DF_Entity * -df_entity_from_eval_space(E_Space space) +internal D_Entity * +d_entity_from_eval_space(E_Space space) { - DF_Entity *entity = &df_g_nil_entity; + D_Entity *entity = &d_nil_entity; if(space.u64[0] == 0 && space.u64[1] != 0) { - entity = (DF_Entity *)space.u64[1]; + entity = (D_Entity *)space.u64[1]; } return entity; } internal E_Space -df_eval_space_from_entity(DF_Entity *entity) +d_eval_space_from_entity(D_Entity *entity) { E_Space space = {0}; space.u64[1] = (U64)entity; @@ -3551,14 +3478,14 @@ df_eval_space_from_entity(DF_Entity *entity) //- rjf: eval space reads/writes internal B32 -df_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) +d_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) { B32 result = 0; - DF_Entity *entity = df_entity_from_eval_space(space); + D_Entity *entity = d_entity_from_eval_space(space); switch(entity->kind) { //- rjf: nil-space -> fall back to file system - case DF_EntityKind_Nil: + case D_EntityKind_Nil: { U128 key = space; U128 hash = hs_hash_from_key(key, 0); @@ -3582,7 +3509,7 @@ df_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) Temp scratch = scratch_begin(0, 0); arena_push(scratch.arena, 0, 64); U64 pos_min = arena_pos(scratch.arena); - DF_EntityEval *eval = df_eval_from_entity(scratch.arena, entity); + D_EntityEval *eval = d_eval_from_entity(scratch.arena, entity); U64 pos_opl = arena_pos(scratch.arena); Rng1U64 legal_range = r1u64(0, pos_opl-pos_min); if(contains_1u64(legal_range, range.min)) @@ -3600,10 +3527,10 @@ df_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) }break; //- rjf: process -> reading process memory - case DF_EntityKind_Process: + case D_EntityKind_Process: { Temp scratch = scratch_begin(0, 0); - CTRL_ProcessMemorySlice slice = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, entity->ctrl_machine_id, entity->ctrl_handle, range, df_state->frame_eval_memread_endt_us); + CTRL_ProcessMemorySlice slice = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, entity->ctrl_machine_id, entity->ctrl_handle, range, d_state->frame_eval_memread_endt_us); String8 data = slice.data; if(data.size == dim_1u64(range)) { @@ -3614,10 +3541,10 @@ df_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) }break; //- rjf: thread -> reading from thread register block - case DF_EntityKind_Thread: + case D_EntityKind_Thread: { Temp scratch = scratch_begin(0, 0); - CTRL_Unwind unwind = df_query_cached_unwind_from_thread(entity); + CTRL_Unwind unwind = d_query_cached_unwind_from_thread(entity); U64 frame_idx = e_interpret_ctx->reg_unwind_count; if(frame_idx < unwind.frames.count) { @@ -3636,62 +3563,62 @@ df_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) } internal B32 -df_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range) +d_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range) { B32 result = 0; - DF_Entity *entity = df_entity_from_eval_space(space); + D_Entity *entity = d_entity_from_eval_space(space); switch(entity->kind) { //- rjf: default -> making commits to entity evaluation default: { Temp scratch = scratch_begin(0, 0); - DF_EntityEval *eval = df_eval_from_entity(scratch.arena, entity); + D_EntityEval *eval = d_eval_from_entity(scratch.arena, entity); U64 range_dim = dim_1u64(range); - if(range.min == OffsetOf(DF_EntityEval, enabled) && + if(range.min == OffsetOf(D_EntityEval, enabled) && range_dim >= 1) { result = 1; B32 new_enabled = !!((U8 *)in)[0]; - df_entity_equip_disabled(entity, !new_enabled); + d_entity_equip_disabled(entity, !new_enabled); } else if(range.min == eval->label_off && range_dim >= 1) { result = 1; String8 new_name = str8_cstring_capped((U8 *)in, (U8 *)in+range_dim); - df_entity_equip_name(entity, new_name); + d_entity_equip_name(entity, new_name); } else if(range.min == eval->condition_off && range_dim >= 1) { result = 1; - DF_Entity *condition = df_entity_child_from_kind(entity, DF_EntityKind_Condition); - if(df_entity_is_nil(condition)) + D_Entity *condition = d_entity_child_from_kind(entity, D_EntityKind_Condition); + if(d_entity_is_nil(condition)) { - condition = df_entity_alloc(entity, DF_EntityKind_Condition); + condition = d_entity_alloc(entity, D_EntityKind_Condition); } String8 new_name = str8_cstring_capped((U8 *)in, (U8 *)in+range_dim); - df_entity_equip_name(condition, new_name); + d_entity_equip_name(condition, new_name); } scratch_end(scratch); }break; //- rjf: process -> commit to process memory - case DF_EntityKind_Process: + case D_EntityKind_Process: { result = ctrl_process_write(entity->ctrl_machine_id, entity->ctrl_handle, range, in); }break; //- rjf: thread -> commit to thread's register block - case DF_EntityKind_Thread: + case D_EntityKind_Thread: { - CTRL_Unwind unwind = df_query_cached_unwind_from_thread(entity); + CTRL_Unwind unwind = d_query_cached_unwind_from_thread(entity); U64 frame_idx = 0; if(frame_idx < unwind.frames.count) { Temp scratch = scratch_begin(0, 0); - U64 regs_size = regs_block_size_from_architecture(df_architecture_from_entity(entity)); + U64 regs_size = regs_block_size_from_architecture(d_architecture_from_entity(entity)); Rng1U64 legal_range = r1u64(0, regs_size); Rng1U64 write_range = intersect_1u64(legal_range, range); U64 write_size = dim_1u64(write_range); @@ -3710,20 +3637,20 @@ df_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range) //- rjf: asynchronous streamed reads -> hashes from spaces internal U128 -df_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated) +d_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated) { U128 result = {0}; - DF_Entity *entity = df_entity_from_eval_space(space); + D_Entity *entity = d_entity_from_eval_space(space); switch(entity->kind) { //- rjf: nil space -> filesystem key encoded inside of `space` - case DF_EntityKind_Nil: + case D_EntityKind_Nil: { result = space; }break; //- rjf: process space -> query - case DF_EntityKind_Process: + case D_EntityKind_Process: { result = ctrl_hash_store_key_from_process_vaddr_range(entity->ctrl_machine_id, entity->ctrl_handle, range, zero_terminated); }break; @@ -3734,14 +3661,14 @@ df_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated) //- rjf: space -> entire range internal Rng1U64 -df_whole_range_from_eval_space(E_Space space) +d_whole_range_from_eval_space(E_Space space) { Rng1U64 result = r1u64(0, 0); - DF_Entity *entity = df_entity_from_eval_space(space); + D_Entity *entity = d_entity_from_eval_space(space); switch(entity->kind) { //- rjf: nil space -> filesystem key encoded inside of `space` - case DF_EntityKind_Nil: + case D_EntityKind_Nil: { HS_Scope *scope = hs_scope_open(); U128 hash = {0}; @@ -3757,7 +3684,7 @@ df_whole_range_from_eval_space(E_Space space) result = r1u64(0, data.size); hs_scope_close(scope); }break; - case DF_EntityKind_Process: + case D_EntityKind_Process: { result = r1u64(0, 0x7FFFFFFFFFFFull); }break; @@ -3774,64 +3701,64 @@ df_whole_range_from_eval_space(E_Space space) #include "third_party/blake2/blake2b.c" #endif -internal DF_EvalViewKey -df_eval_view_key_make(U64 v0, U64 v1) +internal D_EvalViewKey +d_eval_view_key_make(U64 v0, U64 v1) { - DF_EvalViewKey v = {v0, v1}; + D_EvalViewKey v = {v0, v1}; return v; } -internal DF_EvalViewKey -df_eval_view_key_from_string(String8 string) +internal D_EvalViewKey +d_eval_view_key_from_string(String8 string) { - DF_EvalViewKey key = {0}; + D_EvalViewKey key = {0}; blake2b((U8 *)&key.u64[0], sizeof(key), string.str, string.size, 0, 0); return key; } -internal DF_EvalViewKey -df_eval_view_key_from_stringf(char *fmt, ...) +internal D_EvalViewKey +d_eval_view_key_from_stringf(char *fmt, ...) { Temp scratch = scratch_begin(0, 0); va_list args; va_start(args, fmt); String8 string = push_str8fv(scratch.arena, fmt, args); va_end(args); - DF_EvalViewKey key = df_eval_view_key_from_string(string); + D_EvalViewKey key = d_eval_view_key_from_string(string); scratch_end(scratch); return key; } internal B32 -df_eval_view_key_match(DF_EvalViewKey a, DF_EvalViewKey b) +d_eval_view_key_match(D_EvalViewKey a, D_EvalViewKey b) { return MemoryMatchStruct(&a, &b); } -internal DF_EvalView * -df_eval_view_from_key(DF_EvalViewKey key) +internal D_EvalView * +d_eval_view_from_key(D_EvalViewKey key) { - DF_EvalView *eval_view = &df_g_nil_eval_view; + D_EvalView *eval_view = &d_nil_eval_view; { - U64 slot_idx = key.u64[1]%df_state->eval_view_cache.slots_count; - DF_EvalViewSlot *slot = &df_state->eval_view_cache.slots[slot_idx]; - for(DF_EvalView *v = slot->first; v != &df_g_nil_eval_view && v != 0; v = v->hash_next) + U64 slot_idx = key.u64[1]%d_state->eval_view_cache.slots_count; + D_EvalViewSlot *slot = &d_state->eval_view_cache.slots[slot_idx]; + for(D_EvalView *v = slot->first; v != &d_nil_eval_view && v != 0; v = v->hash_next) { - if(df_eval_view_key_match(key, v->key)) + if(d_eval_view_key_match(key, v->key)) { eval_view = v; break; } } - if(eval_view == &df_g_nil_eval_view) + if(eval_view == &d_nil_eval_view) { - eval_view = push_array(df_state->arena, DF_EvalView, 1); - DLLPushBack_NPZ(&df_g_nil_eval_view, slot->first, slot->last, eval_view, hash_next, hash_prev); + eval_view = push_array(d_state->arena, D_EvalView, 1); + DLLPushBack_NPZ(&d_nil_eval_view, slot->first, slot->last, eval_view, hash_next, hash_prev); eval_view->key = key; eval_view->arena = arena_alloc(); - df_expand_tree_table_init(eval_view->arena, &eval_view->expand_tree_table, 256); + d_expand_tree_table_init(eval_view->arena, &eval_view->expand_tree_table, 256); eval_view->view_rule_table.slot_count = 64; - eval_view->view_rule_table.slots = push_array(eval_view->arena, DF_EvalViewRuleCacheSlot, eval_view->view_rule_table.slot_count); + eval_view->view_rule_table.slots = push_array(eval_view->arena, D_EvalViewRuleCacheSlot, eval_view->view_rule_table.slot_count); } } return eval_view; @@ -3840,19 +3767,19 @@ df_eval_view_from_key(DF_EvalViewKey key) //- rjf: key -> view rules internal void -df_eval_view_set_key_rule(DF_EvalView *eval_view, DF_ExpandKey key, String8 view_rule_string) +d_eval_view_set_key_rule(D_EvalView *eval_view, D_ExpandKey key, String8 view_rule_string) { //- rjf: key -> hash * slot idx * slot String8 key_string = str8_struct(&key); - U64 hash = df_hash_from_string(key_string); + U64 hash = d_hash_from_string(key_string); U64 slot_idx = hash%eval_view->view_rule_table.slot_count; - DF_EvalViewRuleCacheSlot *slot = &eval_view->view_rule_table.slots[slot_idx]; + D_EvalViewRuleCacheSlot *slot = &eval_view->view_rule_table.slots[slot_idx]; //- rjf: slot -> existing node - DF_EvalViewRuleCacheNode *existing_node = 0; - for(DF_EvalViewRuleCacheNode *n = slot->first; n != 0; n = n->hash_next) + D_EvalViewRuleCacheNode *existing_node = 0; + for(D_EvalViewRuleCacheNode *n = slot->first; n != 0; n = n->hash_next) { - if(df_expand_key_match(n->key, key)) + if(d_expand_key_match(n->key, key)) { existing_node = n; break; @@ -3860,10 +3787,10 @@ df_eval_view_set_key_rule(DF_EvalView *eval_view, DF_ExpandKey key, String8 view } //- rjf: existing node * new node -> node - DF_EvalViewRuleCacheNode *node = existing_node; + D_EvalViewRuleCacheNode *node = existing_node; if(node == 0) { - node = push_array(eval_view->arena, DF_EvalViewRuleCacheNode, 1); + node = push_array(eval_view->arena, D_EvalViewRuleCacheNode, 1); DLLPushBack_NP(slot->first, slot->last, node, hash_next, hash_prev); node->key = key; node->buffer_cap = 512; @@ -3879,21 +3806,21 @@ df_eval_view_set_key_rule(DF_EvalView *eval_view, DF_ExpandKey key, String8 view } internal String8 -df_eval_view_rule_from_key(DF_EvalView *eval_view, DF_ExpandKey key) +d_eval_view_rule_from_key(D_EvalView *eval_view, D_ExpandKey key) { String8 result = {0}; //- rjf: key -> hash * slot idx * slot String8 key_string = str8_struct(&key); - U64 hash = df_hash_from_string(key_string); + U64 hash = d_hash_from_string(key_string); U64 slot_idx = hash%eval_view->view_rule_table.slot_count; - DF_EvalViewRuleCacheSlot *slot = &eval_view->view_rule_table.slots[slot_idx]; + D_EvalViewRuleCacheSlot *slot = &eval_view->view_rule_table.slots[slot_idx]; //- rjf: slot -> existing node - DF_EvalViewRuleCacheNode *existing_node = 0; - for(DF_EvalViewRuleCacheNode *n = slot->first; n != 0; n = n->hash_next) + D_EvalViewRuleCacheNode *existing_node = 0; + for(D_EvalViewRuleCacheNode *n = slot->first; n != 0; n = n->hash_next) { - if(df_expand_key_match(n->key, key)) + if(d_expand_key_match(n->key, key)) { existing_node = n; break; @@ -3915,12 +3842,12 @@ df_eval_view_rule_from_key(DF_EvalView *eval_view, DF_ExpandKey key) //- rjf: expr * view rule table -> expr internal E_Expr * -df_expr_from_expr_cfg(Arena *arena, E_Expr *expr, DF_CfgTable *cfg) +d_expr_from_expr_cfg(Arena *arena, E_Expr *expr, D_CfgTable *cfg) { - for(DF_CfgVal *val = cfg->first_val; val != 0 && val != &df_g_nil_cfg_val; val = val->linear_next) + for(D_CfgVal *val = cfg->first_val; val != 0 && val != &d_nil_cfg_val; val = val->linear_next) { - DF_CoreViewRuleSpec *spec = df_core_view_rule_spec_from_string(val->string); - if(spec->info.flags & DF_CoreViewRuleSpecInfoFlag_ExprResolution) + D_ViewRuleSpec *spec = d_view_rule_spec_from_string(val->string); + if(spec->info.flags & D_ViewRuleSpecInfoFlag_ExprResolution) { expr = spec->info.expr_resolution(arena, expr, val->last->root); } @@ -3931,7 +3858,7 @@ df_expr_from_expr_cfg(Arena *arena, E_Expr *expr, DF_CfgTable *cfg) //- rjf: evaluation value string builder helpers internal String8 -df_string_from_ascii_value(Arena *arena, U8 val) +d_string_from_ascii_value(Arena *arena, U8 val) { String8 result = {0}; switch(val) @@ -3958,7 +3885,7 @@ df_string_from_ascii_value(Arena *arena, U8 val) } internal String8 -df_string_from_hresult_facility_code(U32 code) +d_string_from_hresult_facility_code(U32 code) { String8 result = {0}; switch(code) @@ -4087,7 +4014,7 @@ df_string_from_hresult_facility_code(U32 code) } internal String8 -df_string_from_hresult_code(U32 code) +d_string_from_hresult_code(U32 code) { String8 result = {0}; switch(code) @@ -4110,14 +4037,14 @@ df_string_from_hresult_code(U32 code) } internal String8 -df_string_from_simple_typed_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 radix, E_Eval eval) +d_string_from_simple_typed_eval(Arena *arena, D_EvalVizStringFlags flags, U32 radix, E_Eval eval) { String8 result = {0}; E_TypeKey type_key = e_type_unwrap(eval.type_key); E_TypeKind type_kind = e_type_kind_from_key(type_key); U64 type_byte_size = e_type_byte_size_from_key(type_key); U8 digit_group_separator = 0; - if(!(flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules)) + if(!(flags & D_EvalVizStringFlag_ReadOnlyDisplayRules)) { digit_group_separator = 0; } @@ -4132,7 +4059,7 @@ df_string_from_simple_typed_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 case E_TypeKind_HResult: { - if(flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules) + if(flags & D_EvalVizStringFlag_ReadOnlyDisplayRules) { Temp scratch = scratch_begin(&arena, 1); U32 hresult_value = (U32)eval.value.u64; @@ -4140,8 +4067,8 @@ df_string_from_simple_typed_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 U32 error_code = (hresult_value); U32 facility = (hresult_value & 0x7ff0000) >> 16; String8 value_string = str8_from_s64(scratch.arena, eval.value.u64, radix, 0, digit_group_separator); - String8 facility_string = df_string_from_hresult_facility_code(facility); - String8 error_string = df_string_from_hresult_code(error_code); + String8 facility_string = d_string_from_hresult_facility_code(facility); + String8 error_string = d_string_from_hresult_code(error_code); result = push_str8f(arena, "%S%s%s%S%s%s%S%s", error_string, error_string.size != 0 ? " " : "", @@ -4166,10 +4093,10 @@ df_string_from_simple_typed_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 case E_TypeKind_UChar16: case E_TypeKind_UChar32: { - String8 char_str = df_string_from_ascii_value(arena, eval.value.s64); + String8 char_str = d_string_from_ascii_value(arena, eval.value.s64); if(char_str.size != 0) { - if(flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules) + if(flags & D_EvalVizStringFlag_ReadOnlyDisplayRules) { String8 imm_string = str8_from_s64(arena, eval.value.s64, radix, 0, digit_group_separator); result = push_str8f(arena, "'%S' (%S)", char_str, imm_string); @@ -4233,7 +4160,7 @@ df_string_from_simple_typed_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 break; } } - if(flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules) + if(flags & D_EvalVizStringFlag_ReadOnlyDisplayRules) { if(constant_name.size != 0) { @@ -4259,7 +4186,7 @@ df_string_from_simple_typed_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 } internal String8 -df_escaped_from_raw_string(Arena *arena, String8 raw) +d_escaped_from_raw_string(Arena *arena, String8 raw) { Temp scratch = scratch_begin(&arena, 1); String8List parts = {0}; @@ -4304,7 +4231,7 @@ df_escaped_from_raw_string(Arena *arena, String8 raw) //- rjf: type info -> expandability/editablity internal B32 -df_type_key_is_expandable(E_TypeKey type_key) +d_type_key_is_expandable(E_TypeKey type_key) { B32 result = 0; for(E_TypeKey t = type_key; !result; t = e_type_unwrap(e_type_direct_from_key(e_type_unwrap(t)))) @@ -4327,7 +4254,7 @@ df_type_key_is_expandable(E_TypeKey type_key) } internal B32 -df_type_key_is_editable(E_TypeKey type_key) +d_type_key_is_editable(E_TypeKey type_key) { B32 result = 0; for(E_TypeKey t = type_key; !result; t = e_type_unwrap(e_type_direct_from_key(e_type_unwrap(t)))) @@ -4348,7 +4275,7 @@ df_type_key_is_editable(E_TypeKey type_key) //- rjf: writing values back to child processes internal B32 -df_commit_eval_value_string(E_Eval dst_eval, String8 string) +d_commit_eval_value_string(E_Eval dst_eval, String8 string) { B32 result = 0; if(dst_eval.mode == E_Mode_Offset) @@ -4417,12 +4344,12 @@ df_commit_eval_value_string(E_Eval dst_eval, String8 string) //- rjf: type helpers internal E_MemberArray -df_filtered_data_members_from_members_cfg_table(Arena *arena, E_MemberArray members, DF_CfgTable *cfg) +d_filtered_data_members_from_members_cfg_table(Arena *arena, E_MemberArray members, D_CfgTable *cfg) { - DF_CfgVal *only = df_cfg_val_from_string(cfg, str8_lit("only")); - DF_CfgVal *omit = df_cfg_val_from_string(cfg, str8_lit("omit")); + D_CfgVal *only = d_cfg_val_from_string(cfg, str8_lit("only")); + D_CfgVal *omit = d_cfg_val_from_string(cfg, str8_lit("omit")); E_MemberArray filtered_members = members; - if(only != &df_g_nil_cfg_val || omit != &df_g_nil_cfg_val) + if(only != &d_nil_cfg_val || omit != &d_nil_cfg_val) { Temp scratch = scratch_begin(&arena, 1); typedef struct DF_TypeMemberLooseNode DF_TypeMemberLooseNode; @@ -4439,7 +4366,7 @@ df_filtered_data_members_from_members_cfg_table(Arena *arena, E_MemberArray memb { // rjf: check if included by 'only's B32 is_included = 1; - for(DF_CfgTree *r = only->first; r != &df_g_nil_cfg_tree; r = r->next) + for(D_CfgTree *r = only->first; r != &d_nil_cfg_tree; r = r->next) { is_included = 0; for(MD_EachNode(name_node, r->root->first)) @@ -4455,7 +4382,7 @@ df_filtered_data_members_from_members_cfg_table(Arena *arena, E_MemberArray memb end_inclusion_check:; // rjf: remove if excluded by 'omit's - for(DF_CfgTree *r = omit->first; r != &df_g_nil_cfg_tree; r = r->next) + for(D_CfgTree *r = omit->first; r != &d_nil_cfg_tree; r = r->next) { for(MD_EachNode(name_node, r->root->first)) { @@ -4496,10 +4423,10 @@ df_filtered_data_members_from_members_cfg_table(Arena *arena, E_MemberArray memb return filtered_members; } -internal DF_EvalLinkBaseChunkList -df_eval_link_base_chunk_list_from_eval(Arena *arena, E_TypeKey link_member_type_key, U64 link_member_off, E_Eval eval, U64 cap) +internal D_EvalLinkBaseChunkList +d_eval_link_base_chunk_list_from_eval(Arena *arena, E_TypeKey link_member_type_key, U64 link_member_off, E_Eval eval, U64 cap) { - DF_EvalLinkBaseChunkList list = {0}; + D_EvalLinkBaseChunkList list = {0}; for(E_Eval base_eval = eval, last_eval = zero_struct; list.count < cap;) { // rjf: check this ptr's validity @@ -4510,10 +4437,10 @@ df_eval_link_base_chunk_list_from_eval(Arena *arena, E_TypeKey link_member_type_ // rjf: gather { - DF_EvalLinkBaseChunkNode *chunk = list.last; + D_EvalLinkBaseChunkNode *chunk = list.last; if(chunk == 0 || chunk->count == ArrayCount(chunk->b)) { - chunk = push_array_no_zero(arena, DF_EvalLinkBaseChunkNode, 1); + chunk = push_array_no_zero(arena, D_EvalLinkBaseChunkNode, 1); chunk->next = 0; chunk->count = 0; SLLQueuePush(list.first, list.last, chunk); @@ -4541,12 +4468,12 @@ df_eval_link_base_chunk_list_from_eval(Arena *arena, E_TypeKey link_member_type_ return list; } -internal DF_EvalLinkBase -df_eval_link_base_from_chunk_list_index(DF_EvalLinkBaseChunkList *list, U64 idx) +internal D_EvalLinkBase +d_eval_link_base_from_chunk_list_index(D_EvalLinkBaseChunkList *list, U64 idx) { - DF_EvalLinkBase result = zero_struct; + D_EvalLinkBase result = zero_struct; U64 scan_idx = 0; - for(DF_EvalLinkBaseChunkNode *chunk = list->first; chunk != 0; chunk = chunk->next) + for(D_EvalLinkBaseChunkNode *chunk = list->first; chunk != 0; chunk = chunk->next) { U64 chunk_idx_opl = scan_idx+chunk->count; if(scan_idx <= idx && idx < chunk_idx_opl) @@ -4558,16 +4485,16 @@ df_eval_link_base_from_chunk_list_index(DF_EvalLinkBaseChunkList *list, U64 idx) return result; } -internal DF_EvalLinkBaseArray -df_eval_link_base_array_from_chunk_list(Arena *arena, DF_EvalLinkBaseChunkList *chunks) +internal D_EvalLinkBaseArray +d_eval_link_base_array_from_chunk_list(Arena *arena, D_EvalLinkBaseChunkList *chunks) { - DF_EvalLinkBaseArray array = {0}; + D_EvalLinkBaseArray array = {0}; array.count = chunks->count; - array.v = push_array_no_zero(arena, DF_EvalLinkBase, array.count); + array.v = push_array_no_zero(arena, D_EvalLinkBase, array.count); U64 idx = 0; - for(DF_EvalLinkBaseChunkNode *n = chunks->first; n != 0; n = n->next) + for(D_EvalLinkBaseChunkNode *n = chunks->first; n != 0; n = n->next) { - MemoryCopy(array.v + idx, n->b, n->count * sizeof(DF_EvalLinkBase)); + MemoryCopy(array.v + idx, n->b, n->count * sizeof(D_EvalLinkBase)); idx += n->count; } return array; @@ -4575,26 +4502,26 @@ df_eval_link_base_array_from_chunk_list(Arena *arena, DF_EvalLinkBaseChunkList * //- rjf: viz block collection building -internal DF_EvalVizBlock * -df_eval_viz_block_begin(Arena *arena, DF_EvalVizBlockKind kind, DF_ExpandKey parent_key, DF_ExpandKey key, S32 depth) +internal D_EvalVizBlock * +d_eval_viz_block_begin(Arena *arena, D_EvalVizBlockKind kind, D_ExpandKey parent_key, D_ExpandKey key, S32 depth) { - DF_EvalVizBlockNode *n = push_array(arena, DF_EvalVizBlockNode, 1); + D_EvalVizBlockNode *n = push_array(arena, D_EvalVizBlockNode, 1); n->v.kind = kind; n->v.parent_key = parent_key; n->v.key = key; n->v.depth = depth; n->v.expr = &e_expr_nil; - n->v.cfg_table = &df_g_nil_cfg_table; + n->v.cfg_table = &d_nil_cfg_table; return &n->v; } -internal DF_EvalVizBlock * -df_eval_viz_block_split_and_continue(Arena *arena, DF_EvalVizBlockList *list, DF_EvalVizBlock *split_block, U64 split_idx) +internal D_EvalVizBlock * +d_eval_viz_block_split_and_continue(Arena *arena, D_EvalVizBlockList *list, D_EvalVizBlock *split_block, U64 split_idx) { U64 total_count = split_block->semantic_idx_range.max; split_block->visual_idx_range.max = split_block->semantic_idx_range.max = split_idx; - df_eval_viz_block_end(list, split_block); - DF_EvalVizBlock *continue_block = df_eval_viz_block_begin(arena, split_block->kind, split_block->parent_key, split_block->key, split_block->depth); + d_eval_viz_block_end(list, split_block); + D_EvalVizBlock *continue_block = d_eval_viz_block_begin(arena, split_block->kind, split_block->parent_key, split_block->key, split_block->depth); continue_block->string = split_block->string; continue_block->expr = split_block->expr; continue_block->visual_idx_range = continue_block->semantic_idx_range = r1u64(split_idx+1, total_count); @@ -4608,9 +4535,9 @@ df_eval_viz_block_split_and_continue(Arena *arena, DF_EvalVizBlockList *list, DF } internal void -df_eval_viz_block_end(DF_EvalVizBlockList *list, DF_EvalVizBlock *block) +d_eval_viz_block_end(D_EvalVizBlockList *list, D_EvalVizBlock *block) { - DF_EvalVizBlockNode *n = CastFromMember(DF_EvalVizBlockNode, v, block); + D_EvalVizBlockNode *n = CastFromMember(D_EvalVizBlockNode, v, block); SLLQueuePush(list->first, list->last, n); list->count += 1; list->total_visual_row_count += dim_1u64(block->visual_idx_range); @@ -4618,40 +4545,40 @@ df_eval_viz_block_end(DF_EvalVizBlockList *list, DF_EvalVizBlock *block) } internal void -df_append_expr_eval_viz_blocks__rec(Arena *arena, DF_EvalView *eval_view, DF_ExpandKey parent_key, DF_ExpandKey key, String8 string, E_Expr *expr, DF_CfgTable *cfg_table, S32 depth, DF_EvalVizBlockList *list_out) +d_append_expr_eval_viz_blocks__rec(Arena *arena, D_EvalView *eval_view, D_ExpandKey parent_key, D_ExpandKey key, String8 string, E_Expr *expr, D_CfgTable *cfg_table, S32 depth, D_EvalVizBlockList *list_out) { ProfBeginFunction(); Temp scratch = scratch_begin(&arena, 1); //- rjf: apply expr resolution view rules - expr = df_expr_from_expr_cfg(arena, expr, cfg_table); + expr = d_expr_from_expr_cfg(arena, expr, cfg_table); //- rjf: determine if this key is expanded - DF_ExpandNode *node = df_expand_node_from_key(&eval_view->expand_tree_table, key); + D_ExpandNode *node = d_expand_node_from_key(&eval_view->expand_tree_table, key); B32 parent_is_expanded = (node != 0 && node->expanded); //- rjf: push block for expression root { - DF_EvalVizBlock *block = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Root, parent_key, key, depth); + D_EvalVizBlock *block = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_Root, parent_key, key, depth); block->string = string; block->expr = expr; block->cfg_table = cfg_table; block->visual_idx_range = r1u64(key.child_num-1, key.child_num+0); block->semantic_idx_range = r1u64(key.child_num-1, key.child_num+0); - df_eval_viz_block_end(list_out, block); + d_eval_viz_block_end(list_out, block); } //- rjf: determine view rule to generate children blocks - DF_CoreViewRuleSpec *expand_view_rule_spec = df_core_view_rule_spec_from_string(str8_lit("default")); + D_ViewRuleSpec *expand_view_rule_spec = d_view_rule_spec_from_string(str8_lit("default")); MD_Node *expand_view_rule_params = &md_nil_node; if(parent_is_expanded) { - for(DF_CfgVal *val = cfg_table->first_val; - val != 0 && val != &df_g_nil_cfg_val; + for(D_CfgVal *val = cfg_table->first_val; + val != 0 && val != &d_nil_cfg_val; val = val->linear_next) { - DF_CoreViewRuleSpec *spec = df_core_view_rule_spec_from_string(val->string); - if(spec->info.flags & DF_CoreViewRuleSpecInfoFlag_VizBlockProd) + D_ViewRuleSpec *spec = d_view_rule_spec_from_string(val->string); + if(spec->info.flags & D_ViewRuleSpecInfoFlag_VizBlockProd) { expand_view_rule_spec = spec; expand_view_rule_params = val->last->root; @@ -4661,7 +4588,7 @@ df_append_expr_eval_viz_blocks__rec(Arena *arena, DF_EvalView *eval_view, DF_Exp } //- rjf: do view rule children block generation, if we have an applicable view rule - if(parent_is_expanded && expand_view_rule_spec != &df_g_nil_core_view_rule_spec) + if(parent_is_expanded && expand_view_rule_spec != &d_nil_core_view_rule_spec) { expand_view_rule_spec->info.viz_block_prod(arena, eval_view, parent_key, key, node, string, expr, cfg_table, depth+1, expand_view_rule_params, list_out); } @@ -4670,11 +4597,11 @@ df_append_expr_eval_viz_blocks__rec(Arena *arena, DF_EvalView *eval_view, DF_Exp ProfEnd(); } -internal DF_EvalVizBlockList -df_eval_viz_block_list_from_eval_view_expr_keys(Arena *arena, DF_EvalView *eval_view, DF_CfgTable *cfg_table, String8 expr, DF_ExpandKey parent_key, DF_ExpandKey key) +internal D_EvalVizBlockList +d_eval_viz_block_list_from_eval_view_expr_keys(Arena *arena, D_EvalView *eval_view, D_CfgTable *cfg_table, String8 expr, D_ExpandKey parent_key, D_ExpandKey key) { ProfBeginFunction(); - DF_EvalVizBlockList blocks = {0}; + D_EvalVizBlockList blocks = {0}; { E_TokenArray tokens = e_token_array_from_text(arena, expr); E_Parse parse = e_parse_expr_from_text_tokens(arena, expr, &tokens); @@ -4711,22 +4638,22 @@ df_eval_viz_block_list_from_eval_view_expr_keys(Arena *arena, DF_EvalView *eval_ str8_list_push(arena, &default_view_rules, passthrough_view_rule); } } - String8 view_rule_string = df_eval_view_rule_from_key(eval_view, key); - DF_CfgTable *cfg_table_inherited = push_array(arena, DF_CfgTable, 1); - *cfg_table_inherited = df_cfg_table_from_inheritance(arena, cfg_table); + String8 view_rule_string = d_eval_view_rule_from_key(eval_view, key); + D_CfgTable *cfg_table_inherited = push_array(arena, D_CfgTable, 1); + *cfg_table_inherited = d_cfg_table_from_inheritance(arena, cfg_table); for(String8Node *n = default_view_rules.first; n != 0; n = n->next) { - df_cfg_table_push_unparsed_string(arena, cfg_table_inherited, n->string, DF_CfgSrc_User); + d_cfg_table_push_unparsed_string(arena, cfg_table_inherited, n->string, D_CfgSrc_User); } - df_cfg_table_push_unparsed_string(arena, cfg_table_inherited, view_rule_string, DF_CfgSrc_User); - df_append_expr_eval_viz_blocks__rec(arena, eval_view, parent_key, key, expr, parse.expr, cfg_table_inherited, 0, &blocks); + d_cfg_table_push_unparsed_string(arena, cfg_table_inherited, view_rule_string, D_CfgSrc_User); + d_append_expr_eval_viz_blocks__rec(arena, eval_view, parent_key, key, expr, parse.expr, cfg_table_inherited, 0, &blocks); } ProfEnd(); return blocks; } internal void -df_eval_viz_block_list_concat__in_place(DF_EvalVizBlockList *dst, DF_EvalVizBlockList *to_push) +d_eval_viz_block_list_concat__in_place(D_EvalVizBlockList *dst, D_EvalVizBlockList *to_push) { if(dst->last == 0) { @@ -4744,13 +4671,13 @@ df_eval_viz_block_list_concat__in_place(DF_EvalVizBlockList *dst, DF_EvalVizBloc } internal S64 -df_row_num_from_viz_block_list_key(DF_EvalVizBlockList *blocks, DF_ExpandKey key) +d_row_num_from_viz_block_list_key(D_EvalVizBlockList *blocks, D_ExpandKey key) { S64 row_num = 1; B32 found = 0; - for(DF_EvalVizBlockNode *n = blocks->first; n != 0; n = n->next) + for(D_EvalVizBlockNode *n = blocks->first; n != 0; n = n->next) { - DF_EvalVizBlock *block = &n->v; + D_EvalVizBlock *block = &n->v; if(key.parent_hash == block->key.parent_hash) { B32 this_block_contains_this_key = 0; @@ -4792,14 +4719,14 @@ df_row_num_from_viz_block_list_key(DF_EvalVizBlockList *blocks, DF_ExpandKey key return row_num; } -internal DF_ExpandKey -df_key_from_viz_block_list_row_num(DF_EvalVizBlockList *blocks, S64 row_num) +internal D_ExpandKey +d_key_from_viz_block_list_row_num(D_EvalVizBlockList *blocks, S64 row_num) { - DF_ExpandKey key = {0}; + D_ExpandKey key = {0}; S64 scan_y = 1; - for(DF_EvalVizBlockNode *n = blocks->first; n != 0; n = n->next) + for(D_EvalVizBlockNode *n = blocks->first; n != 0; n = n->next) { - DF_EvalVizBlock *vb = &n->v; + D_EvalVizBlock *vb = &n->v; Rng1S64 vb_row_num_range = r1s64(scan_y, scan_y + (S64)dim_1u64(vb->semantic_idx_range)); if(contains_1s64(vb_row_num_range, row_num)) { @@ -4823,14 +4750,14 @@ df_key_from_viz_block_list_row_num(DF_EvalVizBlockList *blocks, S64 row_num) return key; } -internal DF_ExpandKey -df_parent_key_from_viz_block_list_row_num(DF_EvalVizBlockList *blocks, S64 row_num) +internal D_ExpandKey +d_parent_key_from_viz_block_list_row_num(D_EvalVizBlockList *blocks, S64 row_num) { - DF_ExpandKey key = {0}; + D_ExpandKey key = {0}; S64 scan_y = 1; - for(DF_EvalVizBlockNode *n = blocks->first; n != 0; n = n->next) + for(D_EvalVizBlockNode *n = blocks->first; n != 0; n = n->next) { - DF_EvalVizBlock *vb = &n->v; + D_EvalVizBlock *vb = &n->v; Rng1S64 vb_row_num_range = r1s64(scan_y, scan_y + (S64)dim_1u64(vb->semantic_idx_range)); if(contains_1s64(vb_row_num_range, row_num)) { @@ -4845,13 +4772,13 @@ df_parent_key_from_viz_block_list_row_num(DF_EvalVizBlockList *blocks, S64 row_n //- rjf: viz block * index -> expression internal E_Expr * -df_expr_from_eval_viz_block_index(Arena *arena, DF_EvalVizBlock *block, U64 index) +d_expr_from_eval_viz_block_index(Arena *arena, D_EvalVizBlock *block, U64 index) { E_Expr *result = block->expr; switch(block->kind) { default:{}break; - case DF_EvalVizBlockKind_Members: + case D_EvalVizBlockKind_Members: { E_MemberArray *members = &block->members; if(index < members->count) @@ -4861,7 +4788,7 @@ df_expr_from_eval_viz_block_index(Arena *arena, DF_EvalVizBlock *block, U64 inde result = dot_expr; } }break; - case DF_EvalVizBlockKind_EnumMembers: + case D_EvalVizBlockKind_EnumMembers: { E_EnumValArray *enum_vals = &block->enum_vals; if(index < enum_vals->count) @@ -4871,17 +4798,17 @@ df_expr_from_eval_viz_block_index(Arena *arena, DF_EvalVizBlock *block, U64 inde result = dot_expr; } }break; - case DF_EvalVizBlockKind_Elements: + case D_EvalVizBlockKind_Elements: { E_Expr *idx_expr = e_expr_ref_array_index(arena, block->expr, index); result = idx_expr; }break; - case DF_EvalVizBlockKind_DebugInfoTable: + case D_EvalVizBlockKind_DebugInfoTable: { // rjf: unpack row info FZY_Item *item = &block->fzy_backing_items.v[index]; - DF_ExpandKey parent_key = block->parent_key; - DF_ExpandKey key = block->key; + D_ExpandKey parent_key = block->parent_key; + D_ExpandKey key = block->key; key.child_num = block->fzy_backing_items.v[index].idx; // rjf: determine module to which this item belongs @@ -4979,31 +4906,31 @@ df_expr_from_eval_viz_block_index(Arena *arena, DF_EvalVizBlock *block, U64 inde //- rjf: viz row list building -internal DF_EvalVizRow * -df_eval_viz_row_list_push_new(Arena *arena, DF_EvalView *eval_view, DF_EvalVizWindowedRowList *rows, DF_EvalVizBlock *block, DF_ExpandKey key, E_Expr *expr) +internal D_EvalVizRow * +d_eval_viz_row_list_push_new(Arena *arena, D_EvalView *eval_view, D_EvalVizWindowedRowList *rows, D_EvalVizBlock *block, D_ExpandKey key, E_Expr *expr) { // rjf: push - DF_EvalVizRow *row = push_array(arena, DF_EvalVizRow, 1); + D_EvalVizRow *row = push_array(arena, D_EvalVizRow, 1); SLLQueuePush(rows->first, rows->last, row); rows->count += 1; // rjf: pick cfg table; resolve expression if needed - DF_CfgTable *cfg_table = 0; + D_CfgTable *cfg_table = 0; switch(block->kind) { default: { - cfg_table = push_array(arena, DF_CfgTable, 1); - *cfg_table = df_cfg_table_from_inheritance(arena, block->cfg_table); - String8 row_view_rules = df_eval_view_rule_from_key(eval_view, key); + cfg_table = push_array(arena, D_CfgTable, 1); + *cfg_table = d_cfg_table_from_inheritance(arena, block->cfg_table); + String8 row_view_rules = d_eval_view_rule_from_key(eval_view, key); if(row_view_rules.size != 0) { - df_cfg_table_push_unparsed_string(arena, cfg_table, row_view_rules, DF_CfgSrc_User); + d_cfg_table_push_unparsed_string(arena, cfg_table, row_view_rules, D_CfgSrc_User); } - expr = df_expr_from_expr_cfg(arena, expr, cfg_table); + expr = d_expr_from_expr_cfg(arena, expr, cfg_table); }break; - case DF_EvalVizBlockKind_Root: - case DF_EvalVizBlockKind_Canvas: + case D_EvalVizBlockKind_Root: + case D_EvalVizBlockKind_Canvas: { cfg_table = block->cfg_table; }break; @@ -5012,7 +4939,7 @@ df_eval_viz_row_list_push_new(Arena *arena, DF_EvalView *eval_view, DF_EvalVizWi // rjf: determine row ui hook to use for this row DF_GfxViewRuleSpec *value_ui_rule_spec = &df_g_nil_gfx_view_rule_spec; MD_Node *value_ui_rule_params = &md_nil_node; - for(DF_CfgVal *val = cfg_table->first_val; val != 0 && val != &df_g_nil_cfg_val; val = val->linear_next) + for(D_CfgVal *val = cfg_table->first_val; val != 0 && val != &d_nil_cfg_val; val = val->linear_next) { DF_GfxViewRuleSpec *spec = df_gfx_view_rule_spec_from_string(val->string); if(spec->info.flags & DF_GfxViewRuleSpecInfoFlag_RowUI) @@ -5026,9 +4953,9 @@ df_eval_viz_row_list_push_new(Arena *arena, DF_EvalView *eval_view, DF_EvalVizWi // rjf: determine block ui hook to use for this row DF_GfxViewRuleSpec *expand_ui_rule_spec = &df_g_nil_gfx_view_rule_spec; MD_Node *expand_ui_rule_params = &md_nil_node; - if(block->kind == DF_EvalVizBlockKind_Canvas) + if(block->kind == D_EvalVizBlockKind_Canvas) { - for(DF_CfgVal *val = cfg_table->first_val; val != 0 && val != &df_g_nil_cfg_val; val = val->linear_next) + for(D_CfgVal *val = cfg_table->first_val; val != 0 && val != &d_nil_cfg_val; val = val->linear_next) { DF_GfxViewRuleSpec *spec = df_gfx_view_rule_spec_from_string(val->string); if(spec->info.flags & DF_GfxViewRuleSpecInfoFlag_ViewUI) @@ -5068,8 +4995,8 @@ df_eval_viz_row_list_push_new(Arena *arena, DF_EvalView *eval_view, DF_EvalVizWi return row; } -internal DF_EvalVizWindowedRowList -df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DF_EvalView *eval_view, Rng1S64 visible_range, DF_EvalVizBlockList *blocks) +internal D_EvalVizWindowedRowList +d_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, D_EvalView *eval_view, Rng1S64 visible_range, D_EvalVizBlockList *blocks) { ProfBeginFunction(); Temp scratch = scratch_begin(&arena, 1); @@ -5079,10 +5006,10 @@ df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DF_EvalView *eva // U64 visual_idx_off = 0; U64 semantic_idx_off = 0; - DF_EvalVizWindowedRowList list = {0}; - for(DF_EvalVizBlockNode *n = blocks->first; n != 0; n = n->next) + D_EvalVizWindowedRowList list = {0}; + for(D_EvalVizBlockNode *n = blocks->first; n != 0; n = n->next) { - DF_EvalVizBlock *block = &n->v; + D_EvalVizBlock *block = &n->v; ////////////////////////////// //- rjf: extract block info @@ -5140,20 +5067,20 @@ df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DF_EvalView *eva ////////////////////////////// //- rjf: single rows, piping in info from the originating block // - case DF_EvalVizBlockKind_Null: - case DF_EvalVizBlockKind_Root: + case D_EvalVizBlockKind_Null: + case D_EvalVizBlockKind_Root: { - df_eval_viz_row_list_push_new(arena, eval_view, &list, block, block->key, block->expr); + d_eval_viz_row_list_push_new(arena, eval_view, &list, block, block->key, block->expr); }break; ////////////////////////////// //- rjf: canvas -> produce blank row, sized by the idx range specified in the block // - case DF_EvalVizBlockKind_Canvas: + case D_EvalVizBlockKind_Canvas: if(num_skipped_visual < block_num_visual_rows) { - DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(block->parent_key), 1); - DF_EvalVizRow *row = df_eval_viz_row_list_push_new(arena, eval_view, &list, block, key, block->expr); + D_ExpandKey key = d_expand_key_make(df_hash_from_expand_key(block->parent_key), 1); + D_EvalVizRow *row = d_eval_viz_row_list_push_new(arena, eval_view, &list, block, key, block->expr); row->size_in_rows = dim_1u64(intersect_1u64(visible_idx_range, r1u64(0, dim_1u64(block->visual_idx_range)))); row->skipped_size_in_rows= (visible_idx_range.min > block->visual_idx_range.min) ? visible_idx_range.min - block->visual_idx_range.min : 0; row->chopped_size_in_rows= (visible_idx_range.max < block->visual_idx_range.max) ? block->visual_idx_range.max - visible_idx_range.max : 0; @@ -5162,29 +5089,29 @@ df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DF_EvalView *eva ////////////////////////////// //- rjf: all elements of a debug info table -> produce rows for visible range // - case DF_EvalVizBlockKind_DebugInfoTable: + case D_EvalVizBlockKind_DebugInfoTable: for(U64 idx = visible_idx_range.min; idx < visible_idx_range.max; idx += 1) { FZY_Item *item = &block->fzy_backing_items.v[idx]; - DF_ExpandKey parent_key = block->parent_key; - DF_ExpandKey key = block->key; + D_ExpandKey parent_key = block->parent_key; + D_ExpandKey key = block->key; key.child_num = block->fzy_backing_items.v[idx].idx; - E_Expr *row_expr = df_expr_from_eval_viz_block_index(arena, block, idx); - df_eval_viz_row_list_push_new(arena, eval_view, &list, block, key, row_expr); + E_Expr *row_expr = d_expr_from_eval_viz_block_index(arena, block, idx); + d_eval_viz_row_list_push_new(arena, eval_view, &list, block, key, row_expr); }break; ////////////////////////////// //- rjf: members/elements/enum-members // - case DF_EvalVizBlockKind_Members: - case DF_EvalVizBlockKind_EnumMembers: - case DF_EvalVizBlockKind_Elements: + case D_EvalVizBlockKind_Members: + case D_EvalVizBlockKind_EnumMembers: + case D_EvalVizBlockKind_Elements: { for(U64 idx = visible_idx_range.min; idx < visible_idx_range.max; idx += 1) { - DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(block->parent_key), idx+1); - E_Expr *expr = df_expr_from_eval_viz_block_index(arena, block, idx); - df_eval_viz_row_list_push_new(arena, eval_view, &list, block, key, expr); + D_ExpandKey key = d_expand_key_make(df_hash_from_expand_key(block->parent_key), idx+1); + E_Expr *expr = d_expr_from_eval_viz_block_index(arena, block, idx); + d_eval_viz_row_list_push_new(arena, eval_view, &list, block, key, expr); } }break; } @@ -5197,7 +5124,7 @@ df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DF_EvalView *eva //- rjf: viz row -> strings internal String8 -df_expr_string_from_viz_row(Arena *arena, DF_EvalVizRow *row) +d_expr_string_from_viz_row(Arena *arena, D_EvalVizRow *row) { String8 result = row->string; if(result.size == 0) switch(row->expr->kind) @@ -5221,17 +5148,17 @@ df_expr_string_from_viz_row(Arena *arena, DF_EvalVizRow *row) //- rjf: viz row -> expandability/editability internal B32 -df_viz_row_is_expandable(DF_EvalVizRow *row) +d_viz_row_is_expandable(D_EvalVizRow *row) { B32 result = 0; { // rjf: determine if view rules force expandability if(!result) { - for(DF_CfgVal *val = row->cfg_table->first_val; val != 0 && val != &df_g_nil_cfg_val; val = val->linear_next) + for(D_CfgVal *val = row->cfg_table->first_val; val != 0 && val != &d_nil_cfg_val; val = val->linear_next) { - DF_CoreViewRuleSpec *spec = df_core_view_rule_spec_from_string(val->string); - if(spec->info.flags & DF_CoreViewRuleSpecInfoFlag_Expandable) + D_ViewRuleSpec *spec = d_view_rule_spec_from_string(val->string); + if(spec->info.flags & D_ViewRuleSpecInfoFlag_Expandable) { result = 1; break; @@ -5244,7 +5171,7 @@ df_viz_row_is_expandable(DF_EvalVizRow *row) { Temp scratch = scratch_begin(0, 0); E_IRTreeAndType irtree = e_irtree_and_type_from_expr(scratch.arena, row->expr); - result = df_type_key_is_expandable(irtree.type_key); + result = d_type_key_is_expandable(irtree.type_key); scratch_end(scratch); } } @@ -5252,12 +5179,12 @@ df_viz_row_is_expandable(DF_EvalVizRow *row) } internal B32 -df_viz_row_is_editable(DF_EvalVizRow *row) +d_viz_row_is_editable(D_EvalVizRow *row) { B32 result = 0; Temp scratch = scratch_begin(0, 0); E_IRTreeAndType irtree = e_irtree_and_type_from_expr(scratch.arena, row->expr); - result = df_type_key_is_editable(irtree.type_key); + result = d_type_key_is_editable(irtree.type_key); scratch_end(scratch); return result; } @@ -5265,7 +5192,7 @@ df_viz_row_is_editable(DF_EvalVizRow *row) //- rjf: view rule config tree info extraction internal U64 -df_base_offset_from_eval(E_Eval eval) +d_base_offset_from_eval(E_Eval eval) { if(e_type_kind_is_pointer_or_ref(e_type_kind_from_key(eval.type_key))) { @@ -5275,7 +5202,7 @@ df_base_offset_from_eval(E_Eval eval) } internal E_Value -df_value_from_params(MD_Node *params) +d_value_from_params(MD_Node *params) { Temp scratch = scratch_begin(0, 0); String8 expr = md_string_from_children(scratch.arena, params); @@ -5286,7 +5213,7 @@ df_value_from_params(MD_Node *params) } internal E_TypeKey -df_type_key_from_params(MD_Node *params) +d_type_key_from_params(MD_Node *params) { Temp scratch = scratch_begin(0, 0); String8 expr = md_string_from_children(scratch.arena, params); @@ -5298,7 +5225,7 @@ df_type_key_from_params(MD_Node *params) } internal E_Value -df_value_from_params_key(MD_Node *params, String8 key) +d_value_from_params_key(MD_Node *params, String8 key) { Temp scratch = scratch_begin(0, 0); MD_Node *key_node = md_child_from_string(params, key, 0); @@ -5310,10 +5237,10 @@ df_value_from_params_key(MD_Node *params, String8 key) } internal Rng1U64 -df_range_from_eval_params(E_Eval eval, MD_Node *params) +d_range_from_eval_params(E_Eval eval, MD_Node *params) { Temp scratch = scratch_begin(0, 0); - U64 size = df_value_from_params_key(params, str8_lit("size")).u64; + U64 size = d_value_from_params_key(params, str8_lit("size")).u64; E_TypeKey type_key = e_type_unwrap(eval.type_key); E_TypeKind type_kind = e_type_kind_from_key(type_key); E_TypeKey direct_type_key = e_type_unwrap(e_type_direct_from_key(eval.type_key)); @@ -5337,14 +5264,14 @@ df_range_from_eval_params(E_Eval eval, MD_Node *params) size = 16384; } Rng1U64 result = {0}; - result.min = df_base_offset_from_eval(eval); + result.min = d_base_offset_from_eval(eval); result.max = result.min + size; scratch_end(scratch); return result; } internal TXT_LangKind -df_lang_kind_from_eval_params(E_Eval eval, MD_Node *params) +d_lang_kind_from_eval_params(E_Eval eval, MD_Node *params) { TXT_LangKind lang_kind = TXT_LangKind_Null; if(eval.expr->kind == E_ExprKind_LeafFilePath) @@ -5361,7 +5288,7 @@ df_lang_kind_from_eval_params(E_Eval eval, MD_Node *params) } internal Architecture -df_architecture_from_eval_params(E_Eval eval, MD_Node *params) +d_architecture_from_eval_params(E_Eval eval, MD_Node *params) { Architecture arch = Architecture_Null; MD_Node *arch_node = md_child_from_string(params, str8_lit("arch"), 0); @@ -5374,18 +5301,18 @@ df_architecture_from_eval_params(E_Eval eval, MD_Node *params) } internal Vec2S32 -df_dim2s32_from_eval_params(E_Eval eval, MD_Node *params) +d_dim2s32_from_eval_params(E_Eval eval, MD_Node *params) { Vec2S32 dim = v2s32(1, 1); { - dim.x = df_value_from_params_key(params, str8_lit("w")).s32; - dim.y = df_value_from_params_key(params, str8_lit("h")).s32; + dim.x = d_value_from_params_key(params, str8_lit("w")).s32; + dim.y = d_value_from_params_key(params, str8_lit("h")).s32; } return dim; } internal R_Tex2DFormat -df_tex2dformat_from_eval_params(E_Eval eval, MD_Node *params) +d_tex2dformat_from_eval_params(E_Eval eval, MD_Node *params) { R_Tex2DFormat result = R_Tex2DFormat_RGBA8; { @@ -5404,21 +5331,21 @@ df_tex2dformat_from_eval_params(E_Eval eval, MD_Node *params) //- rjf: eval -> entity -internal DF_Entity * -df_entity_from_eval_string(String8 string) +internal D_Entity * +d_entity_from_eval_string(String8 string) { - DF_Entity *entity = &df_g_nil_entity; + D_Entity *entity = &d_nil_entity; { Temp scratch = scratch_begin(0, 0); E_Eval eval = e_eval_from_string(scratch.arena, string); - entity = df_entity_from_eval_space(eval.space); + entity = d_entity_from_eval_space(eval.space); scratch_end(scratch); } return entity; } internal String8 -df_eval_string_from_entity(Arena *arena, DF_Entity *entity) +d_eval_string_from_entity(Arena *arena, D_Entity *entity) { String8 eval_string = push_str8f(arena, "macro:`$%I64u`", entity->id); return eval_string; @@ -5427,7 +5354,7 @@ df_eval_string_from_entity(Arena *arena, DF_Entity *entity) //- rjf: eval <-> file path internal String8 -df_file_path_from_eval_string(Arena *arena, String8 string) +d_file_path_from_eval_string(Arena *arena, String8 string) { String8 result = {0}; { @@ -5435,7 +5362,7 @@ df_file_path_from_eval_string(Arena *arena, String8 string) E_Eval eval = e_eval_from_string(scratch.arena, string); if(eval.expr->kind == E_ExprKind_LeafFilePath) { - result = df_cfg_raw_from_escaped_string(arena, eval.expr->string); + result = d_cfg_raw_from_escaped_string(arena, eval.expr->string); } scratch_end(scratch); } @@ -5443,10 +5370,10 @@ df_file_path_from_eval_string(Arena *arena, String8 string) } internal String8 -df_eval_string_from_file_path(Arena *arena, String8 string) +d_eval_string_from_file_path(Arena *arena, String8 string) { Temp scratch = scratch_begin(&arena, 1); - String8 string_escaped = df_cfg_escaped_from_raw_string(scratch.arena, string); + String8 string_escaped = d_cfg_escaped_from_raw_string(scratch.arena, string); String8 result = push_str8f(arena, "file:\"%S\"", string_escaped); scratch_end(scratch); return result; @@ -5458,121 +5385,115 @@ df_eval_string_from_file_path(Arena *arena, String8 string) //- rjf: frame data internal F32 -df_dt(void) +d_dt(void) { - return df_state->dt; + return d_state->dt; } internal U64 -df_frame_index(void) +d_frame_index(void) { - return df_state->frame_index; + return d_state->frame_index; } internal Arena * -df_frame_arena(void) +d_frame_arena(void) { - return df_state->frame_arenas[df_state->frame_index%ArrayCount(df_state->frame_arenas)]; + return d_state->frame_arenas[d_state->frame_index%ArrayCount(d_state->frame_arenas)]; } internal F64 -df_time_in_seconds(void) +d_time_in_seconds(void) { - return df_state->time_in_seconds; + return d_state->time_in_seconds; } //- rjf: interaction registers -internal DF_InteractRegs * -df_interact_regs(void) +internal D_InteractRegs * +d_interact_regs(void) { - DF_InteractRegs *regs = &df_state->top_interact_regs->v; + D_InteractRegs *regs = &d_state->top_interact_regs->v; return regs; } -internal DF_InteractRegs * -df_base_interact_regs(void) +internal D_InteractRegs * +d_base_interact_regs(void) { - DF_InteractRegs *regs = &df_state->base_interact_regs.v; + D_InteractRegs *regs = &d_state->base_interact_regs.v; return regs; } -internal DF_InteractRegs * -df_push_interact_regs(void) +internal D_InteractRegs * +d_push_interact_regs(void) { - DF_InteractRegs *top = df_interact_regs(); - DF_InteractRegsNode *n = push_array(df_frame_arena(), DF_InteractRegsNode, 1); + D_InteractRegs *top = d_interact_regs(); + D_InteractRegsNode *n = push_array(d_frame_arena(), D_InteractRegsNode, 1); MemoryCopyStruct(&n->v, top); - SLLStackPush(df_state->top_interact_regs, n); + SLLStackPush(d_state->top_interact_regs, n); return &n->v; } -internal DF_InteractRegs * -df_pop_interact_regs(void) +internal D_InteractRegs * +d_pop_interact_regs(void) { - DF_InteractRegs *regs = &df_state->top_interact_regs->v; - SLLStackPop(df_state->top_interact_regs); - if(df_state->top_interact_regs == 0) + D_InteractRegs *regs = &d_state->top_interact_regs->v; + SLLStackPop(d_state->top_interact_regs); + if(d_state->top_interact_regs == 0) { - df_state->top_interact_regs = &df_state->base_interact_regs; + d_state->top_interact_regs = &d_state->base_interact_regs; } return regs; } //- rjf: undo/redo history -internal DF_StateDeltaHistory * -df_state_delta_history(void) +internal D_StateDeltaHistory * +d_state_delta_history(void) { - return df_state->hist; + return d_state->hist; } //- rjf: control state -internal DF_RunKind -df_ctrl_last_run_kind(void) +internal D_RunKind +d_ctrl_last_run_kind(void) { - return df_state->ctrl_last_run_kind; + return d_state->ctrl_last_run_kind; } internal U64 -df_ctrl_last_run_frame_idx(void) +d_ctrl_last_run_frame_idx(void) { - return df_state->ctrl_last_run_frame_idx; -} - -internal U64 -df_ctrl_run_gen(void) -{ - return df_state->ctrl_run_gen; + return d_state->ctrl_last_run_frame_idx; } internal B32 -df_ctrl_targets_running(void) +d_ctrl_targets_running(void) { - return df_state->ctrl_is_running; + return d_state->ctrl_is_running; } //- rjf: config paths internal String8 -df_cfg_path_from_src(DF_CfgSrc src) +d_cfg_path_from_src(D_CfgSrc src) { - return df_state->cfg_paths[src]; + return d_state->cfg_paths[src]; } //- rjf: config state -internal DF_CfgTable * -df_cfg_table(void) +internal D_CfgTable * +d_cfg_table(void) { - return &df_state->cfg_table; + return &d_state->cfg_table; } //- rjf: config serialization internal String8 -df_cfg_escaped_from_raw_string(Arena *arena, String8 string) +d_cfg_escaped_from_raw_string(Arena *arena, String8 string) { Temp scratch = scratch_begin(&arena, 1); String8List parts = {0}; @@ -5600,7 +5521,7 @@ df_cfg_escaped_from_raw_string(Arena *arena, String8 string) } internal String8 -df_cfg_raw_from_escaped_string(Arena *arena, String8 string) +d_cfg_raw_from_escaped_string(Arena *arena, String8 string) { Temp scratch = scratch_begin(&arena, 1); String8List parts = {0}; @@ -5632,7 +5553,7 @@ df_cfg_raw_from_escaped_string(Arena *arena, String8 string) } internal String8List -df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) +d_cfg_strings_from_core(Arena *arena, String8 root_path, D_CfgSrc source) { ProfBeginFunction(); local_persist char *spaces = " "; @@ -5641,18 +5562,18 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) //- rjf: write all entities { - for(EachEnumVal(DF_EntityKind, k)) + for(EachEnumVal(D_EntityKind, k)) { - DF_EntityKindFlags k_flags = df_g_entity_kind_flags_table[k]; - if(!(k_flags & DF_EntityKindFlag_IsSerializedToConfig)) + D_EntityKindFlags k_flags = d_entity_kind_flags_table[k]; + if(!(k_flags & D_EntityKindFlag_IsSerializedToConfig)) { continue; } B32 first = 1; - DF_EntityList entities = df_query_cached_entity_list_with_kind(k); - for(DF_EntityNode *n = entities.first; n != 0; n = n->next) + D_EntityList entities = d_query_cached_entity_list_with_kind(k); + for(D_EntityNode *n = entities.first; n != 0; n = n->next) { - DF_Entity *entity = n->entity; + D_Entity *entity = n->entity; if(entity->cfg_src != source) { continue; @@ -5660,18 +5581,18 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) if(first) { first = 0; - String8 title_name = df_g_entity_kind_name_lower_plural_table[k]; + String8 title_name = d_entity_kind_name_lower_plural_table[k]; str8_list_pushf(arena, &strs, "/// %S %.*s\n\n", title_name, (int)Max(0, 79 - (title_name.size + 5)), slashes); } - DF_EntityRec rec = {0}; + D_EntityRec rec = {0}; S64 depth = 0; - for(DF_Entity *e = entity; !df_entity_is_nil(e); e = rec.next) + for(D_Entity *e = entity; !d_entity_is_nil(e); e = rec.next) { //- rjf: get next iteration - rec = df_entity_rec_df_pre(e, entity); + rec = d_entity_rec_df_pre(e, entity); //- rjf: unpack entity info typedef U32 EntityInfoFlags; @@ -5685,7 +5606,7 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) EntityInfoFlag_HasChildren = (1<<5), }; String8 entity_name_escaped = e->name; - if(df_g_entity_kind_flags_table[e->kind] & DF_EntityKindFlag_NameIsPath) + if(d_entity_kind_flags_table[e->kind] & D_EntityKindFlag_NameIsPath) { Temp scratch = scratch_begin(&arena, 1); String8 path_normalized = path_normalized_from_string(scratch.arena, e->name); @@ -5694,15 +5615,15 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) } else { - entity_name_escaped = df_cfg_escaped_from_raw_string(arena, e->name); + entity_name_escaped = d_cfg_escaped_from_raw_string(arena, e->name); } EntityInfoFlags info_flags = 0; if(entity_name_escaped.size != 0) { info_flags |= EntityInfoFlag_HasName; } if(!!e->disabled) { info_flags |= EntityInfoFlag_HasDisabled; } - if(e->flags & DF_EntityFlag_HasTextPoint) { info_flags |= EntityInfoFlag_HasTxtPt; } - if(e->flags & DF_EntityFlag_HasVAddr) { info_flags |= EntityInfoFlag_HasVAddr; } - if(e->flags & DF_EntityFlag_HasColor) { info_flags |= EntityInfoFlag_HasColor; } - if(!df_entity_is_nil(e->first)) { info_flags |= EntityInfoFlag_HasChildren; } + if(e->flags & D_EntityFlag_HasTextPoint) { info_flags |= EntityInfoFlag_HasTxtPt; } + if(e->flags & D_EntityFlag_HasVAddr) { info_flags |= EntityInfoFlag_HasVAddr; } + if(e->flags & D_EntityFlag_HasColor) { info_flags |= EntityInfoFlag_HasColor; } + if(!d_entity_is_nil(e->first)) { info_flags |= EntityInfoFlag_HasChildren; } //- rjf: write entity info B32 opened_brace = 0; @@ -5714,7 +5635,7 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) opened_brace = 1; // rjf: write entity title - str8_list_pushf(arena, &strs, "%S:\n{\n", df_g_entity_kind_name_lower_table[e->kind]); + str8_list_pushf(arena, &strs, "%S:\n{\n", d_entity_kind_name_lower_table[e->kind]); // rjf: write this entity's info if(entity_name_escaped.size != 0) @@ -5725,18 +5646,18 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) { str8_list_pushf(arena, &strs, "disabled: 1\n"); } - if(e->flags & DF_EntityFlag_HasColor) + if(e->flags & D_EntityFlag_HasColor) { - Vec4F32 hsva = df_hsva_from_entity(e); + Vec4F32 hsva = d_hsva_from_entity(e); Vec4F32 rgba = rgba_from_hsva(hsva); U32 rgba_hex = u32_from_rgba(rgba); str8_list_pushf(arena, &strs, "color: 0x%x\n", rgba_hex); } - if(e->flags & DF_EntityFlag_HasTextPoint) + if(e->flags & D_EntityFlag_HasTextPoint) { str8_list_pushf(arena, &strs, "line: %I64d\n", e->text_point.line); } - if(e->flags & DF_EntityFlag_HasVAddr) + if(e->flags & D_EntityFlag_HasVAddr) { str8_list_pushf(arena, &strs, "vaddr: (0x%I64x)\n", e->vaddr); } @@ -5744,11 +5665,11 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) //- rjf: single-line fast-paths case EntityInfoFlag_HasName: - {str8_list_pushf(arena, &strs, "%S: \"%S\"\n", df_g_entity_kind_name_lower_table[e->kind], entity_name_escaped);}break; + {str8_list_pushf(arena, &strs, "%S: \"%S\"\n", d_entity_kind_name_lower_table[e->kind], entity_name_escaped);}break; case EntityInfoFlag_HasName|EntityInfoFlag_HasTxtPt: - {str8_list_pushf(arena, &strs, "%S: (\"%S\":%I64d)\n", df_g_entity_kind_name_lower_table[e->kind], entity_name_escaped, e->text_point.line);}break; + {str8_list_pushf(arena, &strs, "%S: (\"%S\":%I64d)\n", d_entity_kind_name_lower_table[e->kind], entity_name_escaped, e->text_point.line);}break; case EntityInfoFlag_HasVAddr: - {str8_list_pushf(arena, &strs, "%S: (0x%I64x)\n", df_g_entity_kind_name_lower_table[e->kind], e->vaddr);}break; + {str8_list_pushf(arena, &strs, "%S: (0x%I64x)\n", d_entity_kind_name_lower_table[e->kind], e->vaddr);}break; //- rjf: empty case 0: @@ -5772,7 +5693,7 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) } // rjf: separate top-level entities with extra newline - if(df_entity_is_nil(rec.next) && (rec.pop_count != 0 || n->next == 0)) + if(d_entity_is_nil(rec.next) && (rec.pop_count != 0 || n->next == 0)) { str8_list_pushf(arena, &strs, "\n"); } @@ -5782,7 +5703,7 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) } //- rjf: write exception code filters - if(source == DF_CfgSrc_Project) + if(source == D_CfgSrc_Project) { str8_list_push(arena, &strs, str8_lit("/// exception code filters ////////////////////////////////////////////////////\n")); str8_list_push(arena, &strs, str8_lit("\n")); @@ -5793,7 +5714,7 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) k = (CTRL_ExceptionCodeKind)(k+1)) { String8 name = ctrl_exception_code_kind_lowercase_code_string_table[k]; - B32 value = !!(df_state->ctrl_exception_code_filters[k/64] & (1ull<<(k%64))); + B32 value = !!(d_state->ctrl_exception_code_filters[k/64] & (1ull<<(k%64))); str8_list_pushf(arena, &strs, " %S: %i\n", name, value); } str8_list_push(arena, &strs, str8_lit("}\n\n")); @@ -5801,15 +5722,15 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) //- rjf: write eval view cache #if 0 - if(source == DF_CfgSrc_Project) + if(source == D_CfgSrc_Project) { B32 first = 1; for(U64 eval_view_slot_idx = 0; - eval_view_slot_idx < df_state->eval_view_cache.slots_count; + eval_view_slot_idx < d_state->eval_view_cache.slots_count; eval_view_slot_idx += 1) { - for(DF_EvalView *ev = df_state->eval_view_cache.slots[idx].first; - ev != &df_g_nil_eval_view && ev != 0; + for(D_EvalView *ev = d_state->eval_view_cache.slots[idx].first; + ev != &d_nil_eval_view && ev != 0; ev = ev->hash_next) { if(first) @@ -5825,11 +5746,11 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) expand_slot_idx < ev->expand_tree_table.slots_count; expand_slot_idx += 1) { - for(DF_ExpandNode *expand_node = ev->expand_tree_table.slots[expand_slot_idx].first; + for(D_ExpandNode *expand_node = ev->expand_tree_table.slots[expand_slot_idx].first; expand_node != 0; expand_node = expand_node->hash_next) { - DF_ExpandKey key = expand_node->key; + D_ExpandKey key = expand_node->key; B32 expanded = expand_node->expanded; str8_list_pushf(arena, &strs, " node: ()\n"); } @@ -5845,41 +5766,41 @@ df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source) } internal void -df_cfg_push_write_string(DF_CfgSrc src, String8 string) +d_cfg_push_write_string(D_CfgSrc src, String8 string) { - str8_list_push(df_state->cfg_write_arenas[src], &df_state->cfg_write_data[src], push_str8_copy(df_state->cfg_write_arenas[src], string)); + str8_list_push(d_state->cfg_write_arenas[src], &d_state->cfg_write_data[src], push_str8_copy(d_state->cfg_write_arenas[src], string)); } //- rjf: current path internal String8 -df_current_path(void) +d_current_path(void) { - return df_state->current_path; + return d_state->current_path; } //- rjf: entity kind cache -internal DF_EntityList -df_query_cached_entity_list_with_kind(DF_EntityKind kind) +internal D_EntityList +d_query_cached_entity_list_with_kind(D_EntityKind kind) { ProfBeginFunction(); - DF_EntityListCache *cache = &df_state->kind_caches[kind]; + D_EntityListCache *cache = &d_state->kind_caches[kind]; // rjf: build cached list if we're out-of-date - if(cache->alloc_gen != df_state->kind_alloc_gens[kind]) + if(cache->alloc_gen != d_state->kind_alloc_gens[kind]) { - cache->alloc_gen = df_state->kind_alloc_gens[kind]; + cache->alloc_gen = d_state->kind_alloc_gens[kind]; if(cache->arena == 0) { cache->arena = arena_alloc(); } arena_clear(cache->arena); - cache->list = df_push_entity_list_with_kind(cache->arena, kind); + cache->list = d_push_entity_list_with_kind(cache->arena, kind); } // rjf: grab & return cached list - DF_EntityList result = cache->list; + D_EntityList result = cache->list; ProfEnd(); return result; } @@ -5887,29 +5808,29 @@ df_query_cached_entity_list_with_kind(DF_EntityKind kind) //- rjf: active entity based queries internal DI_KeyList -df_push_active_dbgi_key_list(Arena *arena) +d_push_active_dbgi_key_list(Arena *arena) { DI_KeyList dbgis = {0}; - DF_EntityList modules = df_query_cached_entity_list_with_kind(DF_EntityKind_Module); - for(DF_EntityNode *n = modules.first; n != 0; n = n->next) + D_EntityList modules = d_query_cached_entity_list_with_kind(D_EntityKind_Module); + for(D_EntityNode *n = modules.first; n != 0; n = n->next) { - DF_Entity *module = n->entity; - DI_Key key = df_dbgi_key_from_module(module); + D_Entity *module = n->entity; + DI_Key key = d_dbgi_key_from_module(module); di_key_list_push(arena, &dbgis, &key); } return dbgis; } -internal DF_EntityList -df_push_active_target_list(Arena *arena) +internal D_EntityList +d_push_active_target_list(Arena *arena) { - DF_EntityList active_targets = {0}; - DF_EntityList all_targets = df_query_cached_entity_list_with_kind(DF_EntityKind_Target); - for(DF_EntityNode *n = all_targets.first; n != 0; n = n->next) + D_EntityList active_targets = {0}; + D_EntityList all_targets = d_query_cached_entity_list_with_kind(D_EntityKind_Target); + for(D_EntityNode *n = all_targets.first; n != 0; n = n->next) { if(!n->entity->disabled) { - df_entity_list_push(arena, &active_targets, n->entity); + d_entity_list_push(arena, &active_targets, n->entity); } } return active_targets; @@ -5917,15 +5838,15 @@ df_push_active_target_list(Arena *arena) //- rjf: expand key based entity queries -internal DF_Entity * -df_entity_from_expand_key_and_kind(DF_ExpandKey key, DF_EntityKind kind) +internal D_Entity * +d_entity_from_expand_key_and_kind(D_ExpandKey key, D_EntityKind kind) { - DF_Entity *result = &df_g_nil_entity; - DF_EntityList list = df_query_cached_entity_list_with_kind(kind); - for(DF_EntityNode *n = list.first; n != 0; n = n->next) + D_Entity *result = &d_nil_entity; + D_EntityList list = d_query_cached_entity_list_with_kind(kind); + for(D_EntityNode *n = list.first; n != 0; n = n->next) { - DF_Entity *entity = n->entity; - if(df_expand_key_match(df_expand_key_from_entity(entity), key)) + D_Entity *entity = n->entity; + if(d_expand_key_match(d_expand_key_from_entity(entity), key)) { result = entity; break; @@ -5937,23 +5858,23 @@ df_entity_from_expand_key_and_kind(DF_ExpandKey key, DF_EntityKind kind) //- rjf: per-run caches internal CTRL_Unwind -df_query_cached_unwind_from_thread(DF_Entity *thread) +d_query_cached_unwind_from_thread(D_Entity *thread) { Temp scratch = scratch_begin(0, 0); CTRL_Unwind result = {0}; - if(thread->kind == DF_EntityKind_Thread) + if(thread->kind == D_EntityKind_Thread) { U64 reg_gen = ctrl_reg_gen(); U64 mem_gen = ctrl_mem_gen(); - DF_UnwindCache *cache = &df_state->unwind_cache; - DF_Handle handle = df_handle_from_entity(thread); - U64 hash = df_hash_from_string(str8_struct(&handle)); + D_UnwindCache *cache = &d_state->unwind_cache; + D_Handle handle = d_handle_from_entity(thread); + U64 hash = d_hash_from_string(str8_struct(&handle)); U64 slot_idx = hash%cache->slots_count; - DF_UnwindCacheSlot *slot = &cache->slots[slot_idx]; - DF_UnwindCacheNode *node = 0; - for(DF_UnwindCacheNode *n = slot->first; n != 0; n = n->next) + D_UnwindCacheSlot *slot = &cache->slots[slot_idx]; + D_UnwindCacheNode *node = 0; + for(D_UnwindCacheNode *n = slot->first; n != 0; n = n->next) { - if(df_handle_match(handle, n->thread)) + if(d_handle_match(handle, n->thread)) { node = n; break; @@ -5968,7 +5889,7 @@ df_query_cached_unwind_from_thread(DF_Entity *thread) } else { - node = push_array_no_zero(df_state->arena, DF_UnwindCacheNode, 1); + node = push_array_no_zero(d_state->arena, D_UnwindCacheNode, 1); } MemoryZeroStruct(node); DLLPushBack(slot->first, slot->last, node); @@ -5978,7 +5899,7 @@ df_query_cached_unwind_from_thread(DF_Entity *thread) if(node->reggen != reg_gen || node->memgen != mem_gen) { - CTRL_Unwind new_unwind = ctrl_unwind_from_thread(scratch.arena, df_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle, os_now_microseconds()+100); + CTRL_Unwind new_unwind = ctrl_unwind_from_thread(scratch.arena, d_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle, os_now_microseconds()+100); if(!(new_unwind.flags & (CTRL_UnwindFlag_Error|CTRL_UnwindFlag_Stale)) && new_unwind.frames.count != 0) { node->unwind = ctrl_unwind_deep_copy(node->arena, thread->arch, &new_unwind); @@ -5993,23 +5914,23 @@ df_query_cached_unwind_from_thread(DF_Entity *thread) } internal U64 -df_query_cached_rip_from_thread(DF_Entity *thread) +d_query_cached_rip_from_thread(D_Entity *thread) { - U64 result = df_query_cached_rip_from_thread_unwind(thread, 0); + U64 result = d_query_cached_rip_from_thread_unwind(thread, 0); return result; } internal U64 -df_query_cached_rip_from_thread_unwind(DF_Entity *thread, U64 unwind_count) +d_query_cached_rip_from_thread_unwind(D_Entity *thread, U64 unwind_count) { U64 result = 0; if(unwind_count == 0) { - result = ctrl_query_cached_rip_from_thread(df_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); + result = ctrl_query_cached_rip_from_thread(d_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); } else { - CTRL_Unwind unwind = df_query_cached_unwind_from_thread(thread); + CTRL_Unwind unwind = d_query_cached_unwind_from_thread(thread); if(unwind.frames.count != 0) { result = regs_rip_from_arch_block(thread->arch, unwind.frames.v[unwind_count%unwind.frames.count].regs); @@ -6019,29 +5940,29 @@ df_query_cached_rip_from_thread_unwind(DF_Entity *thread, U64 unwind_count) } internal U64 -df_query_cached_tls_base_vaddr_from_process_root_rip(DF_Entity *process, U64 root_vaddr, U64 rip_vaddr) +d_query_cached_tls_base_vaddr_from_process_root_rip(D_Entity *process, U64 root_vaddr, U64 rip_vaddr) { U64 result = 0; - for(U64 cache_idx = 0; cache_idx < ArrayCount(df_state->tls_base_caches); cache_idx += 1) + for(U64 cache_idx = 0; cache_idx < ArrayCount(d_state->tls_base_caches); cache_idx += 1) { - DF_RunTLSBaseCache *cache = &df_state->tls_base_caches[(df_state->tls_base_cache_gen+cache_idx)%ArrayCount(df_state->tls_base_caches)]; + D_RunTLSBaseCache *cache = &d_state->tls_base_caches[(d_state->tls_base_cache_gen+cache_idx)%ArrayCount(d_state->tls_base_caches)]; if(cache_idx == 0 && cache->slots_count == 0) { cache->slots_count = 256; - cache->slots = push_array(cache->arena, DF_RunTLSBaseCacheSlot, cache->slots_count); + cache->slots = push_array(cache->arena, D_RunTLSBaseCacheSlot, cache->slots_count); } else if(cache->slots_count == 0) { break; } - DF_Handle handle = df_handle_from_entity(process); - U64 hash = df_hash_from_seed_string(df_hash_from_string(str8_struct(&handle)), str8_struct(&rip_vaddr)); + D_Handle handle = d_handle_from_entity(process); + U64 hash = d_hash_from_seed_string(d_hash_from_string(str8_struct(&handle)), str8_struct(&rip_vaddr)); U64 slot_idx = hash%cache->slots_count; - DF_RunTLSBaseCacheSlot *slot = &cache->slots[slot_idx]; - DF_RunTLSBaseCacheNode *node = 0; - for(DF_RunTLSBaseCacheNode *n = slot->first; n != 0; n = n->hash_next) + D_RunTLSBaseCacheSlot *slot = &cache->slots[slot_idx]; + D_RunTLSBaseCacheNode *node = 0; + for(D_RunTLSBaseCacheNode *n = slot->first; n != 0; n = n->hash_next) { - if(df_handle_match(n->process, handle) && n->root_vaddr == root_vaddr && n->rip_vaddr == rip_vaddr) + if(d_handle_match(n->process, handle) && n->root_vaddr == root_vaddr && n->rip_vaddr == rip_vaddr) { node = n; break; @@ -6049,10 +5970,10 @@ df_query_cached_tls_base_vaddr_from_process_root_rip(DF_Entity *process, U64 roo } if(node == 0) { - U64 tls_base_vaddr = df_tls_base_vaddr_from_process_root_rip(process, root_vaddr, rip_vaddr); + U64 tls_base_vaddr = d_tls_base_vaddr_from_process_root_rip(process, root_vaddr, rip_vaddr); if(tls_base_vaddr != 0) { - node = push_array(cache->arena, DF_RunTLSBaseCacheNode, 1); + node = push_array(cache->arena, D_RunTLSBaseCacheNode, 1); SLLQueuePush_N(slot->first, slot->last, node, hash_next); node->process = handle; node->root_vaddr = root_vaddr; @@ -6070,17 +5991,17 @@ df_query_cached_tls_base_vaddr_from_process_root_rip(DF_Entity *process, U64 roo } internal E_String2NumMap * -df_query_cached_locals_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff) +d_query_cached_locals_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff) { ProfBeginFunction(); E_String2NumMap *map = &e_string2num_map_nil; - for(U64 cache_idx = 0; cache_idx < ArrayCount(df_state->locals_caches); cache_idx += 1) + for(U64 cache_idx = 0; cache_idx < ArrayCount(d_state->locals_caches); cache_idx += 1) { - DF_RunLocalsCache *cache = &df_state->locals_caches[(df_state->locals_cache_gen+cache_idx)%ArrayCount(df_state->locals_caches)]; + D_RunLocalsCache *cache = &d_state->locals_caches[(d_state->locals_cache_gen+cache_idx)%ArrayCount(d_state->locals_caches)]; if(cache_idx == 0 && cache->table_size == 0) { cache->table_size = 256; - cache->table = push_array(cache->arena, DF_RunLocalsCacheSlot, cache->table_size); + cache->table = push_array(cache->arena, D_RunLocalsCacheSlot, cache->table_size); } else if(cache->table_size == 0) { @@ -6088,9 +6009,9 @@ df_query_cached_locals_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff) } U64 hash = di_hash_from_key(dbgi_key); U64 slot_idx = hash % cache->table_size; - DF_RunLocalsCacheSlot *slot = &cache->table[slot_idx]; - DF_RunLocalsCacheNode *node = 0; - for(DF_RunLocalsCacheNode *n = slot->first; n != 0; n = n->hash_next) + D_RunLocalsCacheSlot *slot = &cache->table[slot_idx]; + D_RunLocalsCacheNode *node = 0; + for(D_RunLocalsCacheNode *n = slot->first; n != 0; n = n->hash_next) { if(di_key_match(&n->dbgi_key, dbgi_key) && n->voff == voff) { @@ -6101,10 +6022,10 @@ df_query_cached_locals_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff) if(node == 0) { DI_Scope *scope = di_scope_open(); - E_String2NumMap *map = df_push_locals_map_from_dbgi_key_voff(cache->arena, scope, dbgi_key, voff); + E_String2NumMap *map = d_push_locals_map_from_dbgi_key_voff(cache->arena, scope, dbgi_key, voff); if(map->slots_count != 0) { - node = push_array(cache->arena, DF_RunLocalsCacheNode, 1); + node = push_array(cache->arena, D_RunLocalsCacheNode, 1); node->dbgi_key = di_key_copy(cache->arena, dbgi_key); node->voff = voff; node->locals_map = map; @@ -6123,17 +6044,17 @@ df_query_cached_locals_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff) } internal E_String2NumMap * -df_query_cached_member_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff) +d_query_cached_member_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff) { ProfBeginFunction(); E_String2NumMap *map = &e_string2num_map_nil; - for(U64 cache_idx = 0; cache_idx < ArrayCount(df_state->member_caches); cache_idx += 1) + for(U64 cache_idx = 0; cache_idx < ArrayCount(d_state->member_caches); cache_idx += 1) { - DF_RunLocalsCache *cache = &df_state->member_caches[(df_state->member_cache_gen+cache_idx)%ArrayCount(df_state->member_caches)]; + D_RunLocalsCache *cache = &d_state->member_caches[(d_state->member_cache_gen+cache_idx)%ArrayCount(d_state->member_caches)]; if(cache_idx == 0 && cache->table_size == 0) { cache->table_size = 256; - cache->table = push_array(cache->arena, DF_RunLocalsCacheSlot, cache->table_size); + cache->table = push_array(cache->arena, D_RunLocalsCacheSlot, cache->table_size); } else if(cache->table_size == 0) { @@ -6141,9 +6062,9 @@ df_query_cached_member_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff) } U64 hash = di_hash_from_key(dbgi_key); U64 slot_idx = hash % cache->table_size; - DF_RunLocalsCacheSlot *slot = &cache->table[slot_idx]; - DF_RunLocalsCacheNode *node = 0; - for(DF_RunLocalsCacheNode *n = slot->first; n != 0; n = n->hash_next) + D_RunLocalsCacheSlot *slot = &cache->table[slot_idx]; + D_RunLocalsCacheNode *node = 0; + for(D_RunLocalsCacheNode *n = slot->first; n != 0; n = n->hash_next) { if(di_key_match(&n->dbgi_key, dbgi_key) && n->voff == voff) { @@ -6154,10 +6075,10 @@ df_query_cached_member_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff) if(node == 0) { DI_Scope *scope = di_scope_open(); - E_String2NumMap *map = df_push_member_map_from_dbgi_key_voff(cache->arena, scope, dbgi_key, voff); + E_String2NumMap *map = d_push_member_map_from_dbgi_key_voff(cache->arena, scope, dbgi_key, voff); if(map->slots_count != 0) { - node = push_array(cache->arena, DF_RunLocalsCacheNode, 1); + node = push_array(cache->arena, D_RunLocalsCacheNode, 1); node->dbgi_key = di_key_copy(cache->arena, dbgi_key); node->voff = voff; node->locals_map = map; @@ -6178,37 +6099,37 @@ df_query_cached_member_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff) //- rjf: top-level command dispatch internal void -df_push_cmd__root(DF_CmdParams *params, DF_CmdSpec *spec) +d_push_cmd__root(D_CmdParams *params, D_CmdSpec *spec) { // rjf: log if(params->os_event == 0 || params->os_event->kind != OS_EventKind_MouseMove) { Temp scratch = scratch_begin(0, 0); - DF_Entity *entity = df_entity_from_handle(params->entity); + D_Entity *entity = d_entity_from_handle(params->entity); log_infof("df_cmd:\n{\n", spec->info.string); log_infof("spec: \"%S\"\n", spec->info.string); -#define HandleParamPrint(mem_name) if(!df_handle_match(df_handle_zero(), params->mem_name)) { log_infof("%s: [0x%I64x, 0x%I64x]\n", #mem_name, params->mem_name.u64[0], params->mem_name.u64[1]); } +#define HandleParamPrint(mem_name) if(!d_handle_match(d_handle_zero(), params->mem_name)) { log_infof("%s: [0x%I64x, 0x%I64x]\n", #mem_name, params->mem_name.u64[0], params->mem_name.u64[1]); } HandleParamPrint(window); HandleParamPrint(panel); HandleParamPrint(dest_panel); HandleParamPrint(prev_view); HandleParamPrint(view); - if(!df_entity_is_nil(entity)) + if(!d_entity_is_nil(entity)) { - String8 entity_name = df_display_string_from_entity(scratch.arena, entity); + String8 entity_name = d_display_string_from_entity(scratch.arena, entity); log_infof("entity: \"%S\"\n", entity_name); } U64 idx = 0; - for(DF_HandleNode *n = params->entity_list.first; n != 0; n = n->next, idx += 1) + for(D_HandleNode *n = params->entity_list.first; n != 0; n = n->next, idx += 1) { - DF_Entity *entity = df_entity_from_handle(n->handle); - if(!df_entity_is_nil(entity)) + D_Entity *entity = d_entity_from_handle(n->handle); + if(!d_entity_is_nil(entity)) { - String8 entity_name = df_display_string_from_entity(scratch.arena, entity); + String8 entity_name = d_display_string_from_entity(scratch.arena, entity); log_infof("entity_list[%I64u]: \"%S\"\n", idx, entity_name); } } - if(!df_cmd_spec_is_nil(params->cmd_spec)) + if(!d_cmd_spec_is_nil(params->cmd_spec)) { log_infof("cmd_spec: \"%S\"\n", params->cmd_spec->info.string); } @@ -6243,89 +6164,89 @@ df_push_cmd__root(DF_CmdParams *params, DF_CmdSpec *spec) log_infof("}\n\n"); scratch_end(scratch); } - df_cmd_list_push(df_state->root_cmd_arena, &df_state->root_cmds, params, spec); + d_cmd_list_push(d_state->root_cmd_arena, &d_state->root_cmds, params, spec); } //////////////////////////////// //~ rjf: Main Layer Top-Level Calls internal void -df_core_init(CmdLine *cmdln, DF_StateDeltaHistory *hist) +d_init(CmdLine *cmdln, D_StateDeltaHistory *hist) { Arena *arena = arena_alloc(); - df_state = push_array(arena, DF_State, 1); - df_state->arena = arena; - for(U64 idx = 0; idx < ArrayCount(df_state->frame_arenas); idx += 1) + d_state = push_array(arena, D_State, 1); + d_state->arena = arena; + for(U64 idx = 0; idx < ArrayCount(d_state->frame_arenas); idx += 1) { - df_state->frame_arenas[idx] = arena_alloc(); + d_state->frame_arenas[idx] = arena_alloc(); } - df_state->root_cmd_arena = arena_alloc(); - df_state->output_log_key = hs_hash_from_data(str8_lit("df_output_log_key")); - df_state->entities_arena = arena_alloc(.reserve_size = GB(64), .commit_size = KB(64)); - df_state->entities_root = &df_g_nil_entity; - df_state->entities_base = push_array(df_state->entities_arena, DF_Entity, 0); - df_state->entities_count = 0; - df_state->ctrl_msg_arena = arena_alloc(); - df_state->ctrl_entity_store = ctrl_entity_store_alloc(); - df_state->ctrl_stop_arena = arena_alloc(); - df_state->entities_root = df_entity_alloc(&df_g_nil_entity, DF_EntityKind_Root); - df_state->cmd_spec_table_size = 1024; - df_state->cmd_spec_table = push_array(arena, DF_CmdSpec *, df_state->cmd_spec_table_size); - df_state->view_rule_spec_table_size = 1024; - df_state->view_rule_spec_table = push_array(arena, DF_CoreViewRuleSpec *, df_state->view_rule_spec_table_size); - df_state->seconds_til_autosave = 0.5f; - df_state->hist = hist; + d_state->root_cmd_arena = arena_alloc(); + d_state->output_log_key = hs_hash_from_data(str8_lit("df_output_log_key")); + d_state->entities_arena = arena_alloc(.reserve_size = GB(64), .commit_size = KB(64)); + d_state->entities_root = &d_nil_entity; + d_state->entities_base = push_array(d_state->entities_arena, D_Entity, 0); + d_state->entities_count = 0; + d_state->ctrl_msg_arena = arena_alloc(); + d_state->ctrl_entity_store = ctrl_entity_store_alloc(); + d_state->ctrl_stop_arena = arena_alloc(); + d_state->entities_root = d_entity_alloc(&d_nil_entity, D_EntityKind_Root); + d_state->cmd_spec_table_size = 1024; + d_state->cmd_spec_table = push_array(arena, D_CmdSpec *, d_state->cmd_spec_table_size); + d_state->view_rule_spec_table_size = 1024; + d_state->view_rule_spec_table = push_array(arena, D_ViewRuleSpec *, d_state->view_rule_spec_table_size); + d_state->seconds_til_autosave = 0.5f; + d_state->hist = hist; // rjf: set up initial exception filtering rules for(CTRL_ExceptionCodeKind k = (CTRL_ExceptionCodeKind)0; k < CTRL_ExceptionCodeKind_COUNT; k = (CTRL_ExceptionCodeKind)(k+1)) { if(ctrl_exception_code_kind_default_enable_table[k]) { - df_state->ctrl_exception_code_filters[k/64] |= 1ull<<(k%64); + d_state->ctrl_exception_code_filters[k/64] |= 1ull<<(k%64); } } // rjf: set up initial entities { - DF_Entity *local_machine = df_entity_alloc(df_state->entities_root, DF_EntityKind_Machine); - df_entity_equip_ctrl_machine_id(local_machine, CTRL_MachineID_Local); - df_entity_equip_name(local_machine, str8_lit("This PC")); + D_Entity *local_machine = d_entity_alloc(d_state->entities_root, D_EntityKind_Machine); + d_entity_equip_ctrl_machine_id(local_machine, CTRL_MachineID_Local); + d_entity_equip_name(local_machine, str8_lit("This PC")); } // rjf: register core commands { - DF_CmdSpecInfoArray array = {df_g_core_cmd_kind_spec_info_table, ArrayCount(df_g_core_cmd_kind_spec_info_table)}; - df_register_cmd_specs(array); + D_CmdSpecInfoArray array = {d_core_cmd_kind_spec_info_table, ArrayCount(d_core_cmd_kind_spec_info_table)}; + d_register_cmd_specs(array); } // rjf: register core view rules { - DF_CoreViewRuleSpecInfoArray array = {df_g_core_view_rule_spec_info_table, ArrayCount(df_g_core_view_rule_spec_info_table)}; - df_register_core_view_rule_specs(array); + D_ViewRuleSpecInfoArray array = {d_core_view_rule_spec_info_table, ArrayCount(d_core_view_rule_spec_info_table)}; + d_register_view_rule_specs(array); } // rjf: set up caches - df_state->unwind_cache.slots_count = 1024; - df_state->unwind_cache.slots = push_array(arena, DF_UnwindCacheSlot, df_state->unwind_cache.slots_count); - for(U64 idx = 0; idx < ArrayCount(df_state->tls_base_caches); idx += 1) + d_state->unwind_cache.slots_count = 1024; + d_state->unwind_cache.slots = push_array(arena, D_UnwindCacheSlot, d_state->unwind_cache.slots_count); + for(U64 idx = 0; idx < ArrayCount(d_state->tls_base_caches); idx += 1) { - df_state->tls_base_caches[idx].arena = arena_alloc(); + d_state->tls_base_caches[idx].arena = arena_alloc(); } - for(U64 idx = 0; idx < ArrayCount(df_state->locals_caches); idx += 1) + for(U64 idx = 0; idx < ArrayCount(d_state->locals_caches); idx += 1) { - df_state->locals_caches[idx].arena = arena_alloc(); + d_state->locals_caches[idx].arena = arena_alloc(); } - for(U64 idx = 0; idx < ArrayCount(df_state->member_caches); idx += 1) + for(U64 idx = 0; idx < ArrayCount(d_state->member_caches); idx += 1) { - df_state->member_caches[idx].arena = arena_alloc(); + d_state->member_caches[idx].arena = arena_alloc(); } // rjf: set up eval view cache - df_state->eval_view_cache.slots_count = 4096; - df_state->eval_view_cache.slots = push_array(arena, DF_EvalViewSlot, df_state->eval_view_cache.slots_count); + d_state->eval_view_cache.slots_count = 4096; + d_state->eval_view_cache.slots = push_array(arena, D_EvalViewSlot, d_state->eval_view_cache.slots_count); // rjf: set up run state - df_state->ctrl_last_run_arena = arena_alloc(); + d_state->ctrl_last_run_arena = arena_alloc(); // rjf: set up config reading state { @@ -6353,25 +6274,25 @@ df_core_init(CmdLine *cmdln, DF_StateDeltaHistory *hist) } // rjf: set up config path state - String8 cfg_src_paths[DF_CfgSrc_COUNT] = {user_cfg_path, project_cfg_path}; - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + String8 cfg_src_paths[D_CfgSrc_COUNT] = {user_cfg_path, project_cfg_path}; + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { - df_state->cfg_path_arenas[src] = arena_alloc(); - DF_CmdParams params = df_cmd_params_zero(); + d_state->cfg_path_arenas[src] = arena_alloc(); + D_CmdParams params = d_cmd_params_zero(); params.file_path = path_normalized_from_string(scratch.arena, cfg_src_paths[src]); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(df_g_cfg_src_load_cmd_kind_table[src])); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(d_cfg_src_load_cmd_kind_table[src])); } // rjf: set up config table arena - df_state->cfg_arena = arena_alloc(); + d_state->cfg_arena = arena_alloc(); scratch_end(scratch); } // rjf: set up config write state - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { - df_state->cfg_write_arenas[src] = arena_alloc(); + d_state->cfg_write_arenas[src] = arena_alloc(); } // rjf: set up initial browse path @@ -6379,37 +6300,37 @@ df_core_init(CmdLine *cmdln, DF_StateDeltaHistory *hist) Temp scratch = scratch_begin(0, 0); String8 current_path = os_get_current_path(scratch.arena); String8 current_path_with_slash = push_str8f(scratch.arena, "%S/", current_path); - df_state->current_path_arena = arena_alloc(); - df_state->current_path = push_str8_copy(df_state->current_path_arena, current_path_with_slash); + d_state->current_path_arena = arena_alloc(); + d_state->current_path = push_str8_copy(d_state->current_path_arena, current_path_with_slash); scratch_end(scratch); } } -internal DF_CmdList -df_core_gather_root_cmds(Arena *arena) +internal D_CmdList +d_gather_root_cmds(Arena *arena) { - DF_CmdList cmds = {0}; - for(DF_CmdNode *n = df_state->root_cmds.first; n != 0; n = n->next) + D_CmdList cmds = {0}; + for(D_CmdNode *n = d_state->root_cmds.first; n != 0; n = n->next) { - df_cmd_list_push(arena, &cmds, &n->cmd.params, n->cmd.spec); + d_cmd_list_push(arena, &cmds, &n->cmd.params, n->cmd.spec); } return cmds; } internal void -df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) +d_begin_frame(Arena *arena, D_CmdList *cmds, F32 dt) { ProfBeginFunction(); - df_state->frame_index += 1; - arena_clear(df_frame_arena()); - df_state->frame_di_scope = di_scope_open(); - df_state->frame_eval_memread_endt_us = os_now_microseconds() + 5000; - df_state->dt = dt; - df_state->time_in_seconds += dt; - df_state->top_interact_regs = &df_state->base_interact_regs; - df_state->top_interact_regs->v.file_path = push_str8_copy(df_frame_arena(), df_state->top_interact_regs->v.file_path); - df_state->top_interact_regs->v.lines = df_line_list_copy(df_frame_arena(), &df_state->top_interact_regs->v.lines); - df_state->top_interact_regs->v.dbgi_key = di_key_copy(df_frame_arena(), &df_state->top_interact_regs->v.dbgi_key); + d_state->frame_index += 1; + arena_clear(d_frame_arena()); + d_state->frame_di_scope = di_scope_open(); + d_state->frame_eval_memread_endt_us = os_now_microseconds() + 5000; + d_state->dt = dt; + d_state->time_in_seconds += dt; + d_state->top_interact_regs = &d_state->base_interact_regs; + d_state->top_interact_regs->v.file_path = push_str8_copy(d_frame_arena(), d_state->top_interact_regs->v.file_path); + d_state->top_interact_regs->v.lines = d_line_list_copy(d_frame_arena(), &d_state->top_interact_regs->v.lines); + d_state->top_interact_regs->v.dbgi_key = di_key_copy(d_frame_arena(), &d_state->top_interact_regs->v.dbgi_key); //- rjf: sync with ctrl thread ProfScope("sync with ctrl thread") @@ -6422,7 +6343,7 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) //- rjf: consume & process events CTRL_EventList events = ctrl_c2u_pop_events(scratch.arena); - ctrl_entity_store_apply_events(df_state->ctrl_entity_store, &events); + ctrl_entity_store_apply_events(d_state->ctrl_entity_store, &events); for(CTRL_EventNode *event_n = events.first; event_n != 0; event_n = event_n->next) { CTRL_Event *event = &event_n->v; @@ -6444,63 +6365,63 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) case CTRL_EventKind_Started: { - df_state->ctrl_is_running = 1; + d_state->ctrl_is_running = 1; }break; case CTRL_EventKind_Stopped: { - B32 should_snap = !(df_state->ctrl_soft_halt_issued); - df_state->ctrl_is_running = 0; - df_state->ctrl_soft_halt_issued = 0; - DF_Entity *stop_thread = df_entity_from_ctrl_handle(event->machine_id, event->entity); + B32 should_snap = !(d_state->ctrl_soft_halt_issued); + d_state->ctrl_is_running = 0; + d_state->ctrl_soft_halt_issued = 0; + D_Entity *stop_thread = d_entity_from_ctrl_handle(event->machine_id, event->entity); // rjf: gather stop info { - arena_clear(df_state->ctrl_stop_arena); - MemoryCopyStruct(&df_state->ctrl_last_stop_event, event); - df_state->ctrl_last_stop_event.string = push_str8_copy(df_state->ctrl_stop_arena, df_state->ctrl_last_stop_event.string); + arena_clear(d_state->ctrl_stop_arena); + MemoryCopyStruct(&d_state->ctrl_last_stop_event, event); + d_state->ctrl_last_stop_event.string = push_str8_copy(d_state->ctrl_stop_arena, d_state->ctrl_last_stop_event.string); } // rjf: select & snap to thread causing stop - if(should_snap && stop_thread->kind == DF_EntityKind_Thread) + if(should_snap && stop_thread->kind == D_EntityKind_Thread) { - log_infof("stop_thread: \"%S\"\n", df_display_string_from_entity(scratch.arena, stop_thread)); - DF_CmdParams params = df_cmd_params_zero(); - params.entity = df_handle_from_entity(stop_thread); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SelectThread)); + log_infof("stop_thread: \"%S\"\n", d_display_string_from_entity(scratch.arena, stop_thread)); + D_CmdParams params = d_cmd_params_zero(); + params.entity = d_handle_from_entity(stop_thread); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_SelectThread)); } // rjf: if no stop-causing thread, and if selected thread, snap to selected - if(should_snap && df_entity_is_nil(stop_thread)) + if(should_snap && d_entity_is_nil(stop_thread)) { - DF_Entity *selected_thread = df_entity_from_handle(df_interact_regs()->thread); - if(!df_entity_is_nil(selected_thread)) + D_Entity *selected_thread = d_entity_from_handle(d_interact_regs()->thread); + if(!d_entity_is_nil(selected_thread)) { - DF_CmdParams params = df_cmd_params_zero(); - params.entity = df_handle_from_entity(selected_thread); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindThread)); + D_CmdParams params = d_cmd_params_zero(); + params.entity = d_handle_from_entity(selected_thread); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_FindThread)); } } // rjf: thread hit user breakpoint -> increment breakpoint hit count if(should_snap && event->cause == CTRL_EventCause_UserBreakpoint) { - U64 stop_thread_vaddr = ctrl_query_cached_rip_from_thread(df_state->ctrl_entity_store, stop_thread->ctrl_machine_id, stop_thread->ctrl_handle); - DF_Entity *process = df_entity_ancestor_from_kind(stop_thread, DF_EntityKind_Process); - DF_Entity *module = df_module_from_process_vaddr(process, stop_thread_vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - U64 stop_thread_voff = df_voff_from_vaddr(module, stop_thread_vaddr); - DF_EntityList user_bps = df_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - for(DF_EntityNode *n = user_bps.first; n != 0; n = n->next) + U64 stop_thread_vaddr = ctrl_query_cached_rip_from_thread(d_state->ctrl_entity_store, stop_thread->ctrl_machine_id, stop_thread->ctrl_handle); + D_Entity *process = d_entity_ancestor_from_kind(stop_thread, D_EntityKind_Process); + D_Entity *module = d_module_from_process_vaddr(process, stop_thread_vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + U64 stop_thread_voff = d_voff_from_vaddr(module, stop_thread_vaddr); + D_EntityList user_bps = d_query_cached_entity_list_with_kind(D_EntityKind_Breakpoint); + for(D_EntityNode *n = user_bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(bp, DF_EntityKind_Location); - DF_LineList loc_lines = df_lines_from_file_path_line_num(scratch.arena, loc->name, loc->text_point.line); + D_Entity *bp = n->entity; + D_Entity *loc = d_entity_child_from_kind(bp, D_EntityKind_Location); + D_LineList loc_lines = d_lines_from_file_path_line_num(scratch.arena, loc->name, loc->text_point.line); if(loc_lines.first != 0) { - for(DF_LineNode *n = loc_lines.first; n != 0; n = n->next) + for(D_LineNode *n = loc_lines.first; n != 0; n = n->next) { if(contains_1u64(n->v.voff_range, stop_thread_voff)) { @@ -6509,13 +6430,13 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } } } - else if(loc->flags & DF_EntityFlag_HasVAddr && stop_thread_vaddr == loc->vaddr) + else if(loc->flags & D_EntityFlag_HasVAddr && stop_thread_vaddr == loc->vaddr) { bp->u64 += 1; } else if(loc->name.size != 0) { - U64 symb_voff = df_voff_from_dbgi_key_symbol_name(&dbgi_key, loc->name); + U64 symb_voff = d_voff_from_dbgi_key_symbol_name(&dbgi_key, loc->name); if(symb_voff == stop_thread_voff) { bp->u64 += 1; @@ -6528,22 +6449,22 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) if(event->cause == CTRL_EventCause_InterruptedByException || event->cause == CTRL_EventCause_InterruptedByTrap) { - DF_CmdParams params = df_cmd_params_zero(); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + D_CmdParams params = d_cmd_params_zero(); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_Error)); } // rjf: kill all entities which are marked to die on stop { - DF_Entity *request = df_entity_from_id(event->msg_id); - if(df_entity_is_nil(request)) + D_Entity *request = d_entity_from_id(event->msg_id); + if(d_entity_is_nil(request)) { - for(DF_Entity *entity = df_entity_root(); - !df_entity_is_nil(entity); - entity = df_entity_rec_df_pre(entity, df_entity_root()).next) + for(D_Entity *entity = d_entity_root(); + !d_entity_is_nil(entity); + entity = d_entity_rec_df_pre(entity, d_entity_root()).next) { - if(entity->flags & DF_EntityFlag_DiesOnRunStop) + if(entity->flags & D_EntityFlag_DiesOnRunStop) { - df_entity_mark_for_deletion(entity); + d_entity_mark_for_deletion(entity); } } } @@ -6555,54 +6476,54 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) case CTRL_EventKind_NewProc: { // rjf: the first process? -> clear session output & reset all bp hit counts - DF_EntityList existing_processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); + D_EntityList existing_processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); if(existing_processes.count == 0) { MTX_Op op = {r1u64(0, 0xffffffffffffffffull), str8_lit("[new session]\n")}; - mtx_push_op(df_state->output_log_key, op); - DF_EntityList bps = df_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - for(DF_EntityNode *n = bps.first; n != 0; n = n->next) + mtx_push_op(d_state->output_log_key, op); + D_EntityList bps = d_query_cached_entity_list_with_kind(D_EntityKind_Breakpoint); + for(D_EntityNode *n = bps.first; n != 0; n = n->next) { n->entity->u64 = 0; } } // rjf: create entity - DF_Entity *machine = df_machine_entity_from_machine_id(event->machine_id); - DF_Entity *entity = df_entity_alloc(machine, DF_EntityKind_Process); - df_entity_equip_u64(entity, event->msg_id); - df_entity_equip_ctrl_machine_id(entity, event->machine_id); - df_entity_equip_ctrl_handle(entity, event->entity); - df_entity_equip_ctrl_id(entity, event->entity_id); - df_entity_equip_arch(entity, event->arch); + D_Entity *machine = d_machine_entity_from_machine_id(event->machine_id); + D_Entity *entity = d_entity_alloc(machine, D_EntityKind_Process); + d_entity_equip_u64(entity, event->msg_id); + d_entity_equip_ctrl_machine_id(entity, event->machine_id); + d_entity_equip_ctrl_handle(entity, event->entity); + d_entity_equip_ctrl_id(entity, event->entity_id); + d_entity_equip_arch(entity, event->arch); }break; case CTRL_EventKind_NewThread: { // rjf: create entity - DF_Entity *parent = df_entity_from_ctrl_handle(event->machine_id, event->parent); - DF_Entity *entity = df_entity_alloc(parent, DF_EntityKind_Thread); - df_entity_equip_ctrl_machine_id(entity, event->machine_id); - df_entity_equip_ctrl_handle(entity, event->entity); - df_entity_equip_arch(entity, event->arch); - df_entity_equip_ctrl_id(entity, event->entity_id); - df_entity_equip_stack_base(entity, event->stack_base); - df_entity_equip_vaddr(entity, event->rip_vaddr); + D_Entity *parent = d_entity_from_ctrl_handle(event->machine_id, event->parent); + D_Entity *entity = d_entity_alloc(parent, D_EntityKind_Thread); + d_entity_equip_ctrl_machine_id(entity, event->machine_id); + d_entity_equip_ctrl_handle(entity, event->entity); + d_entity_equip_arch(entity, event->arch); + d_entity_equip_ctrl_id(entity, event->entity_id); + d_entity_equip_stack_base(entity, event->stack_base); + d_entity_equip_vaddr(entity, event->rip_vaddr); if(event->string.size != 0) { - df_entity_equip_name(entity, event->string); + d_entity_equip_name(entity, event->string); } // rjf: find any pending thread names correllating with this TID -> equip name if found match { - DF_EntityList pending_thread_names = df_query_cached_entity_list_with_kind(DF_EntityKind_PendingThreadName); - for(DF_EntityNode *n = pending_thread_names.first; n != 0; n = n->next) + D_EntityList pending_thread_names = d_query_cached_entity_list_with_kind(D_EntityKind_PendingThreadName); + for(D_EntityNode *n = pending_thread_names.first; n != 0; n = n->next) { - DF_Entity *pending_thread_name = n->entity; + D_Entity *pending_thread_name = n->entity; if(event->machine_id == pending_thread_name->ctrl_machine_id && event->entity_id == pending_thread_name->ctrl_id) { - df_entity_mark_for_deletion(pending_thread_name); - df_entity_equip_name(entity, pending_thread_name->name); + d_entity_mark_for_deletion(pending_thread_name); + d_entity_equip_name(entity, pending_thread_name->name); break; } } @@ -6610,13 +6531,13 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) // rjf: determine index in process U64 thread_idx_in_process = 0; - for(DF_Entity *child = parent->first; !df_entity_is_nil(child); child = child->next) + for(D_Entity *child = parent->first; !d_entity_is_nil(child); child = child->next) { if(child == entity) { break; } - if(child->kind == DF_EntityKind_Thread) + if(child->kind == D_EntityKind_Thread) { thread_idx_in_process += 1; } @@ -6639,68 +6560,68 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) Vec4F32 thread_color = thread_colors[thread_idx_in_process % ArrayCount(thread_colors)]; // rjf: equip color - df_entity_equip_color_rgba(entity, thread_color); + d_entity_equip_color_rgba(entity, thread_color); // rjf: automatically select if we don't have a selected thread - DF_Entity *selected_thread = df_entity_from_handle(df_state->base_interact_regs.v.thread); - if(df_entity_is_nil(selected_thread)) + D_Entity *selected_thread = d_entity_from_handle(d_state->base_interact_regs.v.thread); + if(d_entity_is_nil(selected_thread)) { - df_state->base_interact_regs.v.thread = df_handle_from_entity(entity); + d_state->base_interact_regs.v.thread = d_handle_from_entity(entity); } // rjf: do initial snap - DF_EntityList already_existing_processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); + D_EntityList already_existing_processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); B32 do_initial_snap = (already_existing_processes.count == 1 && thread_idx_in_process == 0); if(do_initial_snap) { - DF_CmdParams params = df_cmd_params_zero(); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SelectThread)); + D_CmdParams params = d_cmd_params_zero(); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_SelectThread)); } }break; case CTRL_EventKind_NewModule: { // rjf: grab process - DF_Entity *parent = df_entity_from_ctrl_handle(event->machine_id, event->parent); + D_Entity *parent = d_entity_from_ctrl_handle(event->machine_id, event->parent); // rjf: determine if this is the first module B32 is_first = 0; - if(df_entity_is_nil(df_entity_child_from_kind(parent, DF_EntityKind_Module))) + if(d_entity_is_nil(d_entity_child_from_kind(parent, D_EntityKind_Module))) { is_first = 1; } // rjf: create module entity - DF_Entity *module = df_entity_alloc(parent, DF_EntityKind_Module); - df_entity_equip_ctrl_machine_id(module, event->machine_id); - df_entity_equip_ctrl_handle(module, event->entity); - df_entity_equip_arch(module, event->arch); - df_entity_equip_name(module, event->string); - df_entity_equip_vaddr_rng(module, event->vaddr_rng); - df_entity_equip_vaddr(module, event->rip_vaddr); - df_entity_equip_timestamp(module, event->timestamp); + D_Entity *module = d_entity_alloc(parent, D_EntityKind_Module); + d_entity_equip_ctrl_machine_id(module, event->machine_id); + d_entity_equip_ctrl_handle(module, event->entity); + d_entity_equip_arch(module, event->arch); + d_entity_equip_name(module, event->string); + d_entity_equip_vaddr_rng(module, event->vaddr_rng); + d_entity_equip_vaddr(module, event->rip_vaddr); + d_entity_equip_timestamp(module, event->timestamp); // rjf: is first -> find target, equip process & module & first thread with target color if(is_first) { - DF_EntityList targets = df_query_cached_entity_list_with_kind(DF_EntityKind_Target); - for(DF_EntityNode *n = targets.first; n != 0; n = n->next) + D_EntityList targets = d_query_cached_entity_list_with_kind(D_EntityKind_Target); + for(D_EntityNode *n = targets.first; n != 0; n = n->next) { - DF_Entity *target = n->entity; - DF_Entity *exe = df_entity_child_from_kind(target, DF_EntityKind_Executable); + D_Entity *target = n->entity; + D_Entity *exe = d_entity_child_from_kind(target, D_EntityKind_Executable); String8 exe_name = exe->name; String8 exe_name_normalized = path_normalized_from_string(scratch.arena, exe_name); String8 module_name_normalized = path_normalized_from_string(scratch.arena, module->name); if(str8_match(exe_name_normalized, module_name_normalized, StringMatchFlag_CaseInsensitive) && - target->flags & DF_EntityFlag_HasColor) + target->flags & D_EntityFlag_HasColor) { - DF_Entity *first_thread = df_entity_child_from_kind(parent, DF_EntityKind_Thread); - Vec4F32 rgba = df_rgba_from_entity(target); - df_entity_equip_color_rgba(parent, rgba); - df_entity_equip_color_rgba(first_thread, rgba); - df_entity_equip_color_rgba(module, rgba); + D_Entity *first_thread = d_entity_child_from_kind(parent, D_EntityKind_Thread); + Vec4F32 rgba = d_rgba_from_entity(target); + d_entity_equip_color_rgba(parent, rgba); + d_entity_equip_color_rgba(first_thread, rgba); + d_entity_equip_color_rgba(module, rgba); break; } } @@ -6710,35 +6631,35 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) case CTRL_EventKind_EndProc: { U32 pid = event->entity_id; - DF_Entity *process = df_entity_from_ctrl_handle(event->machine_id, event->entity); - df_entity_mark_for_deletion(process); + D_Entity *process = d_entity_from_ctrl_handle(event->machine_id, event->entity); + d_entity_mark_for_deletion(process); }break; case CTRL_EventKind_EndThread: { - DF_Entity *thread = df_entity_from_ctrl_handle(event->machine_id, event->entity); - df_set_thread_freeze_state(thread, 0); - df_entity_mark_for_deletion(thread); + D_Entity *thread = d_entity_from_ctrl_handle(event->machine_id, event->entity); + d_set_thread_freeze_state(thread, 0); + d_entity_mark_for_deletion(thread); }break; case CTRL_EventKind_EndModule: { - DF_Entity *module = df_entity_from_ctrl_handle(event->machine_id, event->entity); - df_entity_mark_for_deletion(module); + D_Entity *module = d_entity_from_ctrl_handle(event->machine_id, event->entity); + d_entity_mark_for_deletion(module); }break; //- rjf: debug info changes case CTRL_EventKind_ModuleDebugInfoPathChange: { - DF_Entity *module = df_entity_from_ctrl_handle(event->machine_id, event->entity); - DF_Entity *debug_info = df_entity_child_from_kind(module, DF_EntityKind_DebugInfoPath); - if(df_entity_is_nil(debug_info)) + D_Entity *module = d_entity_from_ctrl_handle(event->machine_id, event->entity); + D_Entity *debug_info = d_entity_child_from_kind(module, D_EntityKind_DebugInfoPath); + if(d_entity_is_nil(debug_info)) { - debug_info = df_entity_alloc(module, DF_EntityKind_DebugInfoPath); + debug_info = d_entity_alloc(module, D_EntityKind_DebugInfoPath); } - df_entity_equip_name(debug_info, event->string); - df_entity_equip_timestamp(debug_info, event->timestamp); + d_entity_equip_name(debug_info, event->string); + d_entity_equip_timestamp(debug_info, event->timestamp); }break; //- rjf: debug strings @@ -6746,31 +6667,31 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) case CTRL_EventKind_DebugString: { MTX_Op op = {r1u64(max_U64, max_U64), event->string}; - mtx_push_op(df_state->output_log_key, op); + mtx_push_op(d_state->output_log_key, op); }break; case CTRL_EventKind_ThreadName: { String8 string = event->string; - DF_Entity *entity = df_entity_from_ctrl_handle(event->machine_id, event->entity); + D_Entity *entity = d_entity_from_ctrl_handle(event->machine_id, event->entity); if(event->entity_id != 0) { - entity = df_entity_from_ctrl_id(event->machine_id, event->entity_id); + entity = d_entity_from_ctrl_id(event->machine_id, event->entity_id); } - if(df_entity_is_nil(entity)) + if(d_entity_is_nil(entity)) { - DF_Entity *process = df_entity_from_ctrl_handle(event->machine_id, event->parent); - if(!df_entity_is_nil(process)) + D_Entity *process = d_entity_from_ctrl_handle(event->machine_id, event->parent); + if(!d_entity_is_nil(process)) { - entity = df_entity_alloc(process, DF_EntityKind_PendingThreadName); - df_entity_equip_name(entity, string); - df_entity_equip_ctrl_machine_id(entity, event->machine_id); - df_entity_equip_ctrl_id(entity, event->entity_id); + entity = d_entity_alloc(process, D_EntityKind_PendingThreadName); + d_entity_equip_name(entity, string); + d_entity_equip_ctrl_machine_id(entity, event->machine_id); + d_entity_equip_ctrl_id(entity, event->entity_id); } } - if(!df_entity_is_nil(entity)) + if(!d_entity_is_nil(entity)) { - df_entity_equip_name(entity, string); + d_entity_equip_name(entity, string); } }break; @@ -6785,41 +6706,41 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } //- rjf: clear tls base cache - if((df_state->tls_base_cache_reggen_idx != new_reg_gen || - df_state->tls_base_cache_memgen_idx != new_mem_gen) && - !df_ctrl_targets_running()) + if((d_state->tls_base_cache_reggen_idx != new_reg_gen || + d_state->tls_base_cache_memgen_idx != new_mem_gen) && + !d_ctrl_targets_running()) { - df_state->tls_base_cache_gen += 1; - DF_RunTLSBaseCache *cache = &df_state->tls_base_caches[df_state->tls_base_cache_gen%ArrayCount(df_state->tls_base_caches)]; + d_state->tls_base_cache_gen += 1; + D_RunTLSBaseCache *cache = &d_state->tls_base_caches[d_state->tls_base_cache_gen%ArrayCount(d_state->tls_base_caches)]; arena_clear(cache->arena); cache->slots_count = 0; cache->slots = 0; - df_state->tls_base_cache_reggen_idx = new_reg_gen; - df_state->tls_base_cache_memgen_idx = new_mem_gen; + d_state->tls_base_cache_reggen_idx = new_reg_gen; + d_state->tls_base_cache_memgen_idx = new_mem_gen; } //- rjf: clear locals cache - if(df_state->locals_cache_reggen_idx != new_reg_gen && - !df_ctrl_targets_running()) + if(d_state->locals_cache_reggen_idx != new_reg_gen && + !d_ctrl_targets_running()) { - df_state->locals_cache_gen += 1; - DF_RunLocalsCache *cache = &df_state->locals_caches[df_state->locals_cache_gen%ArrayCount(df_state->locals_caches)]; + d_state->locals_cache_gen += 1; + D_RunLocalsCache *cache = &d_state->locals_caches[d_state->locals_cache_gen%ArrayCount(d_state->locals_caches)]; arena_clear(cache->arena); cache->table_size = 0; cache->table = 0; - df_state->locals_cache_reggen_idx = new_reg_gen; + d_state->locals_cache_reggen_idx = new_reg_gen; } //- rjf: clear members cache - if(df_state->member_cache_reggen_idx != new_reg_gen && - !df_ctrl_targets_running()) + if(d_state->member_cache_reggen_idx != new_reg_gen && + !d_ctrl_targets_running()) { - df_state->member_cache_gen += 1; - DF_RunLocalsCache *cache = &df_state->member_caches[df_state->member_cache_gen%ArrayCount(df_state->member_caches)]; + d_state->member_cache_gen += 1; + D_RunLocalsCache *cache = &d_state->member_caches[d_state->member_cache_gen%ArrayCount(d_state->member_caches)]; arena_clear(cache->arena); cache->table_size = 0; cache->table = 0; - df_state->member_cache_reggen_idx = new_reg_gen; + d_state->member_cache_reggen_idx = new_reg_gen; } scratch_end(scratch); @@ -6838,15 +6759,15 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) default:{}break; case DI_EventKind_ConversionStarted: { - DF_Entity *task = df_entity_alloc(df_entity_root(), DF_EntityKind_ConversionTask); - df_entity_equip_name(task, event->string); + D_Entity *task = d_entity_alloc(d_entity_root(), D_EntityKind_ConversionTask); + d_entity_equip_name(task, event->string); }break; case DI_EventKind_ConversionEnded: { - DF_Entity *task = df_entity_from_name_and_kind(event->string, DF_EntityKind_ConversionTask); - if(!df_entity_is_nil(task)) + D_Entity *task = d_entity_from_name_and_kind(event->string, D_EntityKind_ConversionTask); + if(!d_entity_is_nil(task)) { - df_entity_mark_for_deletion(task); + d_entity_mark_for_deletion(task); } }break; } @@ -6869,19 +6790,19 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) //- rjf: clear root level commands { - arena_clear(df_state->root_cmd_arena); - MemoryZeroStruct(&df_state->root_cmds); + arena_clear(d_state->root_cmd_arena); + MemoryZeroStruct(&d_state->root_cmds); } //- rjf: autosave { - df_state->seconds_til_autosave -= dt; - if(df_state->seconds_til_autosave <= 0.f) + d_state->seconds_til_autosave -= dt; + if(d_state->seconds_til_autosave <= 0.f) { - DF_CmdParams params = df_cmd_params_zero(); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_WriteUserData)); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_WriteProjectData)); - df_state->seconds_til_autosave = 5.f; + D_CmdParams params = d_cmd_params_zero(); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_WriteUserData)); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_WriteProjectData)); + d_state->seconds_til_autosave = 5.f; } } @@ -6889,17 +6810,17 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) ProfScope("process top-level commands") { Temp scratch = scratch_begin(&arena, 1); - for(DF_CmdNode *cmd_node = cmds->first; + for(D_CmdNode *cmd_node = cmds->first; cmd_node != 0; cmd_node = cmd_node->next) { temp_end(scratch); // rjf: unpack command - DF_Cmd *cmd = &cmd_node->cmd; - DF_CmdParams params = cmd->params; - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); - df_cmd_spec_counter_inc(cmd->spec); + D_Cmd *cmd = &cmd_node->cmd; + D_CmdParams params = cmd->params; + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); + d_cmd_spec_counter_inc(cmd->spec); // rjf: process command switch(core_cmd_kind) @@ -6907,45 +6828,45 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) default:{}break; //- rjf: command fast paths - case DF_CoreCmdKind_RunCommand: + case D_CmdKind_RunCommand: { - DF_CmdSpec *spec = params.cmd_spec; + D_CmdSpec *spec = params.cmd_spec; if(spec != cmd->spec) { - df_cmd_spec_counter_inc(spec); - if(!(spec->info.query.flags & DF_CmdQueryFlag_Required) && - (spec->info.query.slot == DF_CmdParamSlot_Null || - df_cmd_params_has_slot(¶ms, spec->info.query.slot))) + d_cmd_spec_counter_inc(spec); + if(!(spec->info.query.flags & D_CmdQueryFlag_Required) && + (spec->info.query.slot == D_CmdParamSlot_Null || + d_cmd_params_has_slot(¶ms, spec->info.query.slot))) { - df_cmd_list_push(arena, cmds, ¶ms, spec); + d_cmd_list_push(arena, cmds, ¶ms, spec); } } }break; //- rjf: low-level target control operations - case DF_CoreCmdKind_LaunchAndRun: - case DF_CoreCmdKind_LaunchAndInit: + case D_CmdKind_LaunchAndRun: + case D_CmdKind_LaunchAndInit: { // rjf: get list of targets to launch - DF_EntityList targets = df_entity_list_from_handle_list(scratch.arena, params.entity_list); + D_EntityList targets = d_entity_list_from_handle_list(scratch.arena, params.entity_list); // rjf: no targets => assume all active targets if(targets.count == 0) { - targets = df_push_active_target_list(scratch.arena); + targets = d_push_active_target_list(scratch.arena); } // rjf: launch if(targets.count != 0) { - for(DF_EntityNode *n = targets.first; n != 0; n = n->next) + for(D_EntityNode *n = targets.first; n != 0; n = n->next) { // rjf: extract data from target - DF_Entity *target = n->entity; - String8 name = df_entity_child_from_kind(target, DF_EntityKind_Executable)->name; - String8 args = df_entity_child_from_kind(target, DF_EntityKind_Arguments)->name; - String8 path = df_entity_child_from_kind(target, DF_EntityKind_WorkingDirectory)->name; - String8 entry= df_entity_child_from_kind(target, DF_EntityKind_EntryPoint)->name; + D_Entity *target = n->entity; + String8 name = d_entity_child_from_kind(target, D_EntityKind_Executable)->name; + String8 args = d_entity_child_from_kind(target, D_EntityKind_Arguments)->name; + String8 path = d_entity_child_from_kind(target, D_EntityKind_WorkingDirectory)->name; + String8 entry= d_entity_child_from_kind(target, D_EntityKind_EntryPoint)->name; name = str8_skip_chop_whitespace(name); args = str8_skip_chop_whitespace(args); path = str8_skip_chop_whitespace(path); @@ -6989,110 +6910,110 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) msg.path = path; msg.cmd_line_string_list = cmdln_strings; msg.env_inherit = 1; - MemoryCopyArray(msg.exception_code_filters, df_state->ctrl_exception_code_filters); + MemoryCopyArray(msg.exception_code_filters, d_state->ctrl_exception_code_filters); str8_list_push(scratch.arena, &msg.entry_points, entry); - df_push_ctrl_msg(&msg); + d_push_ctrl_msg(&msg); } } // rjf: run - df_ctrl_run(DF_RunKind_Run, &df_g_nil_entity, CTRL_RunFlag_StopOnEntryPoint * (core_cmd_kind == DF_CoreCmdKind_LaunchAndInit), 0); + d_ctrl_run(D_RunKind_Run, &d_nil_entity, CTRL_RunFlag_StopOnEntryPoint * (core_cmd_kind == D_CmdKind_LaunchAndInit), 0); } // rjf: no targets -> error if(targets.count == 0) { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("No active targets exist; cannot launch."); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Error)); } }break; - case DF_CoreCmdKind_Kill: + case D_CmdKind_Kill: { - DF_EntityList processes = df_entity_list_from_handle_list(scratch.arena, params.entity_list); + D_EntityList processes = d_entity_list_from_handle_list(scratch.arena, params.entity_list); // rjf: no processes => kill everything if(processes.count == 0) { - processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); + processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); } // rjf: kill processes if(processes.count != 0) { - for(DF_EntityNode *n = processes.first; n != 0; n = n->next) + for(D_EntityNode *n = processes.first; n != 0; n = n->next) { - DF_Entity *process = n->entity; + D_Entity *process = n->entity; CTRL_Msg msg = {CTRL_MsgKind_Kill}; { msg.exit_code = 1; msg.machine_id = process->ctrl_machine_id; msg.entity = process->ctrl_handle; - MemoryCopyArray(msg.exception_code_filters, df_state->ctrl_exception_code_filters); + MemoryCopyArray(msg.exception_code_filters, d_state->ctrl_exception_code_filters); } - df_push_ctrl_msg(&msg); + d_push_ctrl_msg(&msg); } } // rjf: no processes -> error if(processes.count == 0) { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("No attached running processes exist; cannot kill."); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Error)); } }break; - case DF_CoreCmdKind_KillAll: + case D_CmdKind_KillAll: { - DF_EntityList processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); + D_EntityList processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); if(processes.count != 0) { - for(DF_EntityNode *n = processes.first; n != 0; n = n->next) + for(D_EntityNode *n = processes.first; n != 0; n = n->next) { - DF_Entity *process = n->entity; + D_Entity *process = n->entity; CTRL_Msg msg = {CTRL_MsgKind_Kill}; { msg.exit_code = 1; msg.machine_id = process->ctrl_machine_id; msg.entity = process->ctrl_handle; - MemoryCopyArray(msg.exception_code_filters, df_state->ctrl_exception_code_filters); + MemoryCopyArray(msg.exception_code_filters, d_state->ctrl_exception_code_filters); } - df_push_ctrl_msg(&msg); + d_push_ctrl_msg(&msg); } } if(processes.count == 0) { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("No attached running processes exist; cannot kill."); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Error)); } }break; - case DF_CoreCmdKind_Detach: + case D_CmdKind_Detach: { - for(DF_HandleNode *n = params.entity_list.first; n != 0; n = n->next) + for(D_HandleNode *n = params.entity_list.first; n != 0; n = n->next) { - DF_Entity *entity = df_entity_from_handle(n->handle); - if(entity->kind == DF_EntityKind_Process) + D_Entity *entity = d_entity_from_handle(n->handle); + if(entity->kind == D_EntityKind_Process) { CTRL_Msg msg = {CTRL_MsgKind_Detach}; msg.machine_id = entity->ctrl_machine_id; msg.entity = entity->ctrl_handle; - MemoryCopyArray(msg.exception_code_filters, df_state->ctrl_exception_code_filters); - df_push_ctrl_msg(&msg); + MemoryCopyArray(msg.exception_code_filters, d_state->ctrl_exception_code_filters); + d_push_ctrl_msg(&msg); } } }break; - case DF_CoreCmdKind_Continue: + case D_CmdKind_Continue: { B32 good_to_run = 0; - DF_EntityList machines = df_query_cached_entity_list_with_kind(DF_EntityKind_Machine); - for(DF_EntityNode *n = machines.first; n != 0; n = n->next) + D_EntityList machines = d_query_cached_entity_list_with_kind(D_EntityKind_Machine); + for(D_EntityNode *n = machines.first; n != 0; n = n->next) { - DF_Entity *machine = n->entity; - if(!df_entity_is_frozen(machine)) + D_Entity *machine = n->entity; + if(!d_entity_is_frozen(machine)) { good_to_run = 1; break; @@ -7100,39 +7021,39 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } if(good_to_run) { - df_ctrl_run(DF_RunKind_Run, &df_g_nil_entity, 0, 0); + d_ctrl_run(D_RunKind_Run, &d_nil_entity, 0, 0); } else { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("Cannot run with all threads frozen."); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Error)); } }break; - case DF_CoreCmdKind_StepIntoInst: - case DF_CoreCmdKind_StepOverInst: - case DF_CoreCmdKind_StepIntoLine: - case DF_CoreCmdKind_StepOverLine: - case DF_CoreCmdKind_StepOut: + case D_CmdKind_StepIntoInst: + case D_CmdKind_StepOverInst: + case D_CmdKind_StepIntoLine: + case D_CmdKind_StepOverLine: + case D_CmdKind_StepOut: { - DF_Entity *thread = df_entity_from_handle(params.entity); - if(df_ctrl_targets_running()) + D_Entity *thread = d_entity_from_handle(params.entity); + if(d_ctrl_targets_running()) { - if(df_ctrl_last_run_kind() == DF_RunKind_Run) + if(d_ctrl_last_run_kind() == D_RunKind_Run) { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("Must halt before stepping."); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Error)); } } - else if(df_entity_is_frozen(thread)) + else if(d_entity_is_frozen(thread)) { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("Must thaw selected thread before stepping."); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Error)); } else { @@ -7141,14 +7062,14 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) switch(core_cmd_kind) { default: break; - case DF_CoreCmdKind_StepIntoInst: {}break; - case DF_CoreCmdKind_StepOverInst: {traps = df_trap_net_from_thread__step_over_inst(scratch.arena, thread);}break; - case DF_CoreCmdKind_StepIntoLine: {traps = df_trap_net_from_thread__step_into_line(scratch.arena, thread);}break; - case DF_CoreCmdKind_StepOverLine: {traps = df_trap_net_from_thread__step_over_line(scratch.arena, thread);}break; - case DF_CoreCmdKind_StepOut: + case D_CmdKind_StepIntoInst: {}break; + case D_CmdKind_StepOverInst: {traps = d_trap_net_from_thread__step_over_inst(scratch.arena, thread);}break; + case D_CmdKind_StepIntoLine: {traps = d_trap_net_from_thread__step_into_line(scratch.arena, thread);}break; + case D_CmdKind_StepOverLine: {traps = d_trap_net_from_thread__step_over_line(scratch.arena, thread);}break; + case D_CmdKind_StepOut: { // rjf: thread => full unwind - CTRL_Unwind unwind = ctrl_unwind_from_thread(scratch.arena, df_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle, os_now_microseconds()+10000); + CTRL_Unwind unwind = ctrl_unwind_from_thread(scratch.arena, d_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle, os_now_microseconds()+10000); // rjf: use first unwind frame to generate trap if(unwind.flags == 0 && unwind.frames.count > 1) @@ -7159,194 +7080,194 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } else { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("Could not find the return address of the current callstack frame successfully."); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Error)); good = 0; } }break; } if(good && traps.count != 0) { - df_ctrl_run(DF_RunKind_Step, thread, 0, &traps); + d_ctrl_run(D_RunKind_Step, thread, 0, &traps); } if(good && traps.count == 0) { - df_ctrl_run(DF_RunKind_SingleStep, thread, 0, &traps); + d_ctrl_run(D_RunKind_SingleStep, thread, 0, &traps); } } }break; - case DF_CoreCmdKind_Halt: - if(df_ctrl_targets_running()) + case D_CmdKind_Halt: + if(d_ctrl_targets_running()) { ctrl_halt(); }break; - case DF_CoreCmdKind_SoftHaltRefresh: + case D_CmdKind_SoftHaltRefresh: { - if(df_ctrl_targets_running()) + if(d_ctrl_targets_running()) { - df_ctrl_run(df_state->ctrl_last_run_kind, df_entity_from_handle(df_state->ctrl_last_run_thread), df_state->ctrl_last_run_flags, &df_state->ctrl_last_run_traps); + d_ctrl_run(d_state->ctrl_last_run_kind, d_entity_from_handle(d_state->ctrl_last_run_thread), d_state->ctrl_last_run_flags, &d_state->ctrl_last_run_traps); } }break; - case DF_CoreCmdKind_SetThreadIP: + case D_CmdKind_SetThreadIP: { - DF_Entity *thread = df_entity_from_handle(params.entity); + D_Entity *thread = d_entity_from_handle(params.entity); U64 vaddr = params.vaddr; - if(thread->kind == DF_EntityKind_Thread && vaddr != 0) + if(thread->kind == D_EntityKind_Thread && vaddr != 0) { - df_set_thread_rip(thread, vaddr); + d_set_thread_rip(thread, vaddr); } }break; //- rjf: high-level composite target control operations - case DF_CoreCmdKind_RunToLine: + case D_CmdKind_RunToLine: { String8 file_path = params.file_path; TxtPt point = params.text_point; - DF_Entity *bp = df_entity_alloc(df_entity_root(), DF_EntityKind_Breakpoint); - df_entity_equip_cfg_src(bp, DF_CfgSrc_Transient); - bp->flags |= DF_EntityFlag_DiesOnRunStop; - DF_Entity *loc = df_entity_alloc(bp, DF_EntityKind_Location); - df_entity_equip_name(loc, file_path); - df_entity_equip_txt_pt(loc, point); - DF_CmdParams p = df_cmd_params_zero(); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Run)); + D_Entity *bp = d_entity_alloc(d_entity_root(), D_EntityKind_Breakpoint); + d_entity_equip_cfg_src(bp, D_CfgSrc_Transient); + bp->flags |= D_EntityFlag_DiesOnRunStop; + D_Entity *loc = d_entity_alloc(bp, D_EntityKind_Location); + d_entity_equip_name(loc, file_path); + d_entity_equip_txt_pt(loc, point); + D_CmdParams p = d_cmd_params_zero(); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Run)); }break; - case DF_CoreCmdKind_RunToAddress: + case D_CmdKind_RunToAddress: { - DF_Entity *bp = df_entity_alloc(df_entity_root(), DF_EntityKind_Breakpoint); - df_entity_equip_cfg_src(bp, DF_CfgSrc_Transient); - bp->flags |= DF_EntityFlag_DiesOnRunStop; - DF_Entity *loc = df_entity_alloc(bp, DF_EntityKind_Location); - df_entity_equip_vaddr(loc, params.vaddr); - DF_CmdParams p = df_cmd_params_zero(); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Run)); + D_Entity *bp = d_entity_alloc(d_entity_root(), D_EntityKind_Breakpoint); + d_entity_equip_cfg_src(bp, D_CfgSrc_Transient); + bp->flags |= D_EntityFlag_DiesOnRunStop; + D_Entity *loc = d_entity_alloc(bp, D_EntityKind_Location); + d_entity_equip_vaddr(loc, params.vaddr); + D_CmdParams p = d_cmd_params_zero(); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Run)); }break; - case DF_CoreCmdKind_Run: + case D_CmdKind_Run: { - DF_CmdParams params = df_cmd_params_zero(); - DF_EntityList processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); + D_CmdParams params = d_cmd_params_zero(); + D_EntityList processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); if(processes.count != 0) { - DF_CmdParams params = df_cmd_params_zero(); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Continue)); + D_CmdParams params = d_cmd_params_zero(); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_Continue)); } - else if(!df_ctrl_targets_running()) + else if(!d_ctrl_targets_running()) { - DF_CmdParams params = df_cmd_params_zero(); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_LaunchAndRun)); + D_CmdParams params = d_cmd_params_zero(); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_LaunchAndRun)); } }break; - case DF_CoreCmdKind_Restart: + case D_CmdKind_Restart: { // rjf: kill all { - DF_CmdParams params = df_cmd_params_zero(); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_KillAll)); + D_CmdParams params = d_cmd_params_zero(); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_KillAll)); } // rjf: gather targets corresponding to all launched processes - DF_EntityList targets = {0}; + D_EntityList targets = {0}; { - DF_EntityList processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); - for(DF_EntityNode *n = processes.first; n != 0; n = n->next) + D_EntityList processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); + for(D_EntityNode *n = processes.first; n != 0; n = n->next) { - DF_Entity *process = n->entity; - DF_Entity *target = df_entity_from_handle(process->entity_handle); - if(!df_entity_is_nil(target)) + D_Entity *process = n->entity; + D_Entity *target = d_entity_from_handle(process->entity_handle); + if(!d_entity_is_nil(target)) { - df_entity_list_push(scratch.arena, &targets, target); + d_entity_list_push(scratch.arena, &targets, target); } } } // rjf: re-launch targets { - DF_CmdParams params = df_cmd_params_zero(); - params.entity_list = df_handle_list_from_entity_list(scratch.arena, targets); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_EntityList); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_LaunchAndRun)); + D_CmdParams params = d_cmd_params_zero(); + params.entity_list = d_handle_list_from_entity_list(scratch.arena, targets); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_EntityList); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_LaunchAndRun)); } }break; - case DF_CoreCmdKind_StepInto: - case DF_CoreCmdKind_StepOver: + case D_CmdKind_StepInto: + case D_CmdKind_StepOver: { - DF_EntityList processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); + D_EntityList processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); if(processes.count != 0) { - DF_CoreCmdKind step_cmd_kind = (core_cmd_kind == DF_CoreCmdKind_StepInto - ? DF_CoreCmdKind_StepIntoLine - : DF_CoreCmdKind_StepOverLine); + D_CmdKind step_cmd_kind = (core_cmd_kind == D_CmdKind_StepInto + ? D_CmdKind_StepIntoLine + : D_CmdKind_StepOverLine); B32 prefer_dasm = params.prefer_dasm; if(prefer_dasm) { - step_cmd_kind = (core_cmd_kind == DF_CoreCmdKind_StepInto - ? DF_CoreCmdKind_StepIntoInst - : DF_CoreCmdKind_StepOverInst); + step_cmd_kind = (core_cmd_kind == D_CmdKind_StepInto + ? D_CmdKind_StepIntoInst + : D_CmdKind_StepOverInst); } - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(step_cmd_kind)); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(step_cmd_kind)); } - else if(!df_ctrl_targets_running()) + else if(!d_ctrl_targets_running()) { - DF_EntityList targets = df_push_active_target_list(scratch.arena); - DF_CmdParams p = params; - p.entity_list = df_handle_list_from_entity_list(scratch.arena, targets); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_EntityList); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_LaunchAndInit)); + D_EntityList targets = d_push_active_target_list(scratch.arena); + D_CmdParams p = params; + p.entity_list = d_handle_list_from_entity_list(scratch.arena, targets); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_EntityList); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_LaunchAndInit)); } }break; //- rjf: debug control context management operations - case DF_CoreCmdKind_SelectThread: + case D_CmdKind_SelectThread: { - DF_Entity *thread = df_entity_from_handle(params.entity); - DF_Entity *module = df_module_from_thread(thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - df_state->base_interact_regs.v.unwind_count = 0; - df_state->base_interact_regs.v.inline_depth = 0; - df_state->base_interact_regs.v.thread = df_handle_from_entity(thread); - df_state->base_interact_regs.v.module = df_handle_from_entity(module); - df_state->base_interact_regs.v.process = df_handle_from_entity(process); + D_Entity *thread = d_entity_from_handle(params.entity); + D_Entity *module = d_module_from_thread(thread); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + d_state->base_interact_regs.v.unwind_count = 0; + d_state->base_interact_regs.v.inline_depth = 0; + d_state->base_interact_regs.v.thread = d_handle_from_entity(thread); + d_state->base_interact_regs.v.module = d_handle_from_entity(module); + d_state->base_interact_regs.v.process = d_handle_from_entity(process); }break; - case DF_CoreCmdKind_SelectUnwind: + case D_CmdKind_SelectUnwind: { DI_Scope *di_scope = di_scope_open(); - DF_Entity *thread = df_entity_from_handle(df_state->base_interact_regs.v.thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - CTRL_Unwind base_unwind = df_query_cached_unwind_from_thread(thread); - DF_Unwind rich_unwind = df_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); + D_Entity *thread = d_entity_from_handle(d_state->base_interact_regs.v.thread); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + CTRL_Unwind base_unwind = d_query_cached_unwind_from_thread(thread); + D_Unwind rich_unwind = d_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); if(params.unwind_index < rich_unwind.frames.concrete_frame_count) { - DF_UnwindFrame *frame = &rich_unwind.frames.v[params.unwind_index]; - df_state->base_interact_regs.v.unwind_count = params.unwind_index; - df_state->base_interact_regs.v.inline_depth = 0; + D_UnwindFrame *frame = &rich_unwind.frames.v[params.unwind_index]; + d_state->base_interact_regs.v.unwind_count = params.unwind_index; + d_state->base_interact_regs.v.inline_depth = 0; if(params.inline_depth <= frame->inline_frame_count) { - df_state->base_interact_regs.v.inline_depth = params.inline_depth; + d_state->base_interact_regs.v.inline_depth = params.inline_depth; } } di_scope_close(di_scope); }break; - case DF_CoreCmdKind_UpOneFrame: - case DF_CoreCmdKind_DownOneFrame: + case D_CmdKind_UpOneFrame: + case D_CmdKind_DownOneFrame: { DI_Scope *di_scope = di_scope_open(); - DF_Entity *thread = df_entity_from_handle(df_state->base_interact_regs.v.thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - CTRL_Unwind base_unwind = df_query_cached_unwind_from_thread(thread); - DF_Unwind rich_unwind = df_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); - U64 crnt_unwind_idx = df_state->base_interact_regs.v.unwind_count; - U64 crnt_inline_dpt = df_state->base_interact_regs.v.inline_depth; + D_Entity *thread = d_entity_from_handle(d_state->base_interact_regs.v.thread); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + CTRL_Unwind base_unwind = d_query_cached_unwind_from_thread(thread); + D_Unwind rich_unwind = d_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); + U64 crnt_unwind_idx = d_state->base_interact_regs.v.unwind_count; + U64 crnt_inline_dpt = d_state->base_interact_regs.v.inline_depth; U64 next_unwind_idx = crnt_unwind_idx; U64 next_inline_dpt = crnt_inline_dpt; if(crnt_unwind_idx < rich_unwind.frames.concrete_frame_count) { - DF_UnwindFrame *f = &rich_unwind.frames.v[crnt_unwind_idx]; + D_UnwindFrame *f = &rich_unwind.frames.v[crnt_unwind_idx]; switch(core_cmd_kind) { default:{}break; - case DF_CoreCmdKind_UpOneFrame: + case D_CmdKind_UpOneFrame: { if(crnt_inline_dpt < f->inline_frame_count) { @@ -7358,7 +7279,7 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) next_inline_dpt = 0; } }break; - case DF_CoreCmdKind_DownOneFrame: + case D_CmdKind_DownOneFrame: { if(crnt_inline_dpt > 0) { @@ -7372,80 +7293,80 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) }break; } } - DF_CmdParams p = params; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_UnwindIndex); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_InlineDepth); + D_CmdParams p = params; + d_cmd_params_mark_slot(&p, D_CmdParamSlot_UnwindIndex); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_InlineDepth); p.unwind_index = next_unwind_idx; p.inline_depth = next_inline_dpt; - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SelectUnwind)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_SelectUnwind)); di_scope_close(di_scope); }break; - case DF_CoreCmdKind_FreezeThread: - case DF_CoreCmdKind_ThawThread: - case DF_CoreCmdKind_FreezeProcess: - case DF_CoreCmdKind_ThawProcess: - case DF_CoreCmdKind_FreezeMachine: - case DF_CoreCmdKind_ThawMachine: + case D_CmdKind_FreezeThread: + case D_CmdKind_ThawThread: + case D_CmdKind_FreezeProcess: + case D_CmdKind_ThawProcess: + case D_CmdKind_FreezeMachine: + case D_CmdKind_ThawMachine: { - DF_CoreCmdKind disptch_kind = ((core_cmd_kind == DF_CoreCmdKind_FreezeThread || - core_cmd_kind == DF_CoreCmdKind_FreezeProcess || - core_cmd_kind == DF_CoreCmdKind_FreezeMachine) - ? DF_CoreCmdKind_FreezeEntity - : DF_CoreCmdKind_ThawEntity); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(disptch_kind)); + D_CmdKind disptch_kind = ((core_cmd_kind == D_CmdKind_FreezeThread || + core_cmd_kind == D_CmdKind_FreezeProcess || + core_cmd_kind == D_CmdKind_FreezeMachine) + ? D_CmdKind_FreezeEntity + : D_CmdKind_ThawEntity); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(disptch_kind)); }break; - case DF_CoreCmdKind_FreezeLocalMachine: + case D_CmdKind_FreezeLocalMachine: { CTRL_MachineID machine_id = CTRL_MachineID_Local; - DF_CmdParams params = df_cmd_params_zero(); - params.entity = df_handle_from_entity(df_machine_entity_from_machine_id(machine_id)); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FreezeMachine)); + D_CmdParams params = d_cmd_params_zero(); + params.entity = d_handle_from_entity(d_machine_entity_from_machine_id(machine_id)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_FreezeMachine)); }break; - case DF_CoreCmdKind_ThawLocalMachine: + case D_CmdKind_ThawLocalMachine: { CTRL_MachineID machine_id = CTRL_MachineID_Local; - DF_CmdParams params = df_cmd_params_zero(); - params.entity = df_handle_from_entity(df_machine_entity_from_machine_id(machine_id)); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ThawMachine)); + D_CmdParams params = d_cmd_params_zero(); + params.entity = d_handle_from_entity(d_machine_entity_from_machine_id(machine_id)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_ThawMachine)); }break; //- rjf: undo/redo - case DF_CoreCmdKind_Undo: + case D_CmdKind_Undo: { - df_state_delta_history_wind(df_state->hist, Side_Min); + d_state_delta_history_wind(d_state->hist, Side_Min); }break; - case DF_CoreCmdKind_Redo: + case D_CmdKind_Redo: { - df_state_delta_history_wind(df_state->hist, Side_Max); + d_state_delta_history_wind(d_state->hist, Side_Max); }break; //- rjf: files - case DF_CoreCmdKind_SetCurrentPath: + case D_CmdKind_SetCurrentPath: { - arena_clear(df_state->current_path_arena); - df_state->current_path = push_str8_copy(df_state->current_path_arena, params.file_path); + arena_clear(d_state->current_path_arena); + d_state->current_path = push_str8_copy(d_state->current_path_arena, params.file_path); }break; //- rjf: config path saving/loading/applying - case DF_CoreCmdKind_OpenRecentProject: + case D_CmdKind_OpenRecentProject: { - DF_Entity *entity = df_entity_from_handle(params.entity); - if(entity->kind == DF_EntityKind_RecentProject) + D_Entity *entity = d_entity_from_handle(params.entity); + if(entity->kind == D_EntityKind_RecentProject) { - DF_CmdParams p = df_cmd_params_zero(); + D_CmdParams p = d_cmd_params_zero(); p.file_path = entity->name; - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_OpenProject)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_OpenProject)); } }break; - case DF_CoreCmdKind_OpenUser: - case DF_CoreCmdKind_OpenProject: + case D_CmdKind_OpenUser: + case D_CmdKind_OpenProject: { - B32 load_cfg[DF_CfgSrc_COUNT] = {0}; - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + B32 load_cfg[D_CfgSrc_COUNT] = {0}; + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { - load_cfg[src] = (core_cmd_kind == df_g_cfg_src_load_cmd_kind_table[src]); + load_cfg[src] = (core_cmd_kind == d_cfg_src_load_cmd_kind_table[src]); } //- rjf: normalize path @@ -7471,35 +7392,35 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) //- rjf: set new config paths if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { if(load_cfg[src]) { - arena_clear(df_state->cfg_path_arenas[src]); - df_state->cfg_paths[src] = push_str8_copy(df_state->cfg_path_arenas[src], new_path); + arena_clear(d_state->cfg_path_arenas[src]); + d_state->cfg_paths[src] = push_str8_copy(d_state->cfg_path_arenas[src], new_path); } } } //- rjf: get config file properties - FileProperties cfg_props[DF_CfgSrc_COUNT] = {0}; + FileProperties cfg_props[D_CfgSrc_COUNT] = {0}; if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { - String8 path = df_cfg_path_from_src(src); + String8 path = d_cfg_path_from_src(src); cfg_props[src] = os_properties_from_file_path(path); } } //- rjf: load files - String8 cfg_data[DF_CfgSrc_COUNT] = {0}; - U64 cfg_timestamps[DF_CfgSrc_COUNT] = {0}; + String8 cfg_data[D_CfgSrc_COUNT] = {0}; + U64 cfg_timestamps[D_CfgSrc_COUNT] = {0}; if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { - String8 path = df_cfg_path_from_src(src); + String8 path = d_cfg_path_from_src(src); OS_Handle file = os_file_open(OS_AccessFlag_ShareRead|OS_AccessFlag_Read, path); FileProperties props = os_properties_from_file(file); String8 data = os_string_from_file_range(scratch.arena, file, r1u64(0, props.size)); @@ -7513,23 +7434,23 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } //- rjf: determine if we need to save config - B32 cfg_save[DF_CfgSrc_COUNT] = {0}; + B32 cfg_save[D_CfgSrc_COUNT] = {0}; if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { cfg_save[src] = (load_cfg[src] && cfg_props[src].created == 0); } } //- rjf: determine if we need to reload config - B32 cfg_load[DF_CfgSrc_COUNT] = {0}; + B32 cfg_load[D_CfgSrc_COUNT] = {0}; B32 cfg_load_any = 0; if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { - cfg_load[src] = (load_cfg[src] && ((cfg_save[src] == 0 && df_state->cfg_cached_timestamp[src] != cfg_timestamps[src]) || cfg_props[src].created == 0)); + cfg_load[src] = (load_cfg[src] && ((cfg_save[src] == 0 && d_state->cfg_cached_timestamp[src] != cfg_timestamps[src]) || cfg_props[src].created == 0)); cfg_load_any = cfg_load_any || cfg_load[src]; } } @@ -7537,11 +7458,11 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) //- rjf: load => build new config table if(cfg_load_any) { - arena_clear(df_state->cfg_arena); - MemoryZeroStruct(&df_state->cfg_table); - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + arena_clear(d_state->cfg_arena); + MemoryZeroStruct(&d_state->cfg_table); + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { - df_cfg_table_push_unparsed_string(df_state->cfg_arena, &df_state->cfg_table, cfg_data[src], src); + d_cfg_table_push_unparsed_string(d_state->cfg_arena, &d_state->cfg_table, cfg_data[src], src); } } @@ -7552,14 +7473,14 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) // if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { if(cfg_load[src]) { - DF_CoreCmdKind cmd_kind = df_g_cfg_src_apply_cmd_kind_table[src]; - DF_CmdParams params = df_cmd_params_zero(); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(cmd_kind)); - df_state->cfg_cached_timestamp[src] = cfg_timestamps[src]; + D_CmdKind cmd_kind = d_cfg_src_apply_cmd_kind_table[src]; + D_CmdParams params = d_cmd_params_zero(); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(cmd_kind)); + d_state->cfg_cached_timestamp[src] = cfg_timestamps[src]; } } } @@ -7567,13 +7488,13 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) //- rjf: save => dispatch write if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { if(cfg_save[src]) { - DF_CoreCmdKind cmd_kind = df_g_cfg_src_write_cmd_kind_table[src]; - DF_CmdParams params = df_cmd_params_zero(); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(cmd_kind)); + D_CmdKind cmd_kind = d_cfg_src_write_cmd_kind_table[src]; + D_CmdParams params = d_cmd_params_zero(); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(cmd_kind)); } } } @@ -7581,24 +7502,24 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) //- rjf: bad file -> alert user if(!file_is_okay) { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = push_str8f(scratch.arena, "\"%S\" appears to refer to an existing file which is not a RADDBG config file. This would overwrite the file.", new_path); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Error)); } }break; //- rjf: loading/applying stateful config changes - case DF_CoreCmdKind_ApplyUserData: - case DF_CoreCmdKind_ApplyProjectData: + case D_CmdKind_ApplyUserData: + case D_CmdKind_ApplyProjectData: { - DF_CfgTable *table = df_cfg_table(); + D_CfgTable *table = d_cfg_table(); //- rjf: get config source - DF_CfgSrc src = DF_CfgSrc_User; - for(DF_CfgSrc s = (DF_CfgSrc)0; s < DF_CfgSrc_COUNT; s = (DF_CfgSrc)(s+1)) + D_CfgSrc src = D_CfgSrc_User; + for(D_CfgSrc s = (D_CfgSrc)0; s < D_CfgSrc_COUNT; s = (D_CfgSrc)(s+1)) { - if(core_cmd_kind == df_g_cfg_src_apply_cmd_kind_table[s]) + if(core_cmd_kind == d_cfg_src_apply_cmd_kind_table[s]) { src = s; break; @@ -7606,15 +7527,15 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } //- rjf: get paths - String8 cfg_path = df_cfg_path_from_src(src); + String8 cfg_path = d_cfg_path_from_src(src); String8 cfg_folder = str8_chop_last_slash(cfg_path); //- rjf: keep track of recent projects - if(src == DF_CfgSrc_Project) + if(src == D_CfgSrc_Project) { - DF_EntityList recent_projects = df_query_cached_entity_list_with_kind(DF_EntityKind_RecentProject); - DF_Entity *recent_project = &df_g_nil_entity; - for(DF_EntityNode *n = recent_projects.first; n != 0; n = n->next) + D_EntityList recent_projects = d_query_cached_entity_list_with_kind(D_EntityKind_RecentProject); + D_Entity *recent_project = &d_nil_entity; + for(D_EntityNode *n = recent_projects.first; n != 0; n = n->next) { if(path_match_normalized(cfg_path, n->entity->name)) { @@ -7622,27 +7543,27 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) break; } } - if(df_entity_is_nil(recent_project)) + if(d_entity_is_nil(recent_project)) { - recent_project = df_entity_alloc(df_entity_root(), DF_EntityKind_RecentProject); - df_entity_equip_name(recent_project, path_normalized_from_string(scratch.arena, cfg_path)); - df_entity_equip_cfg_src(recent_project, DF_CfgSrc_User); + recent_project = d_entity_alloc(d_entity_root(), D_EntityKind_RecentProject); + d_entity_equip_name(recent_project, path_normalized_from_string(scratch.arena, cfg_path)); + d_entity_equip_cfg_src(recent_project, D_CfgSrc_User); } } //- rjf: eliminate all existing entities which are derived from config { - for(EachEnumVal(DF_EntityKind, k)) + for(EachEnumVal(D_EntityKind, k)) { - DF_EntityKindFlags k_flags = df_g_entity_kind_flags_table[k]; - if(k_flags & DF_EntityKindFlag_IsSerializedToConfig) + D_EntityKindFlags k_flags = d_entity_kind_flags_table[k]; + if(k_flags & D_EntityKindFlag_IsSerializedToConfig) { - DF_EntityList entities = df_query_cached_entity_list_with_kind(k); - for(DF_EntityNode *n = entities.first; n != 0; n = n->next) + D_EntityList entities = d_query_cached_entity_list_with_kind(k); + for(D_EntityNode *n = entities.first; n != 0; n = n->next) { if(n->entity->cfg_src == src) { - df_entity_mark_for_deletion(n->entity); + d_entity_mark_for_deletion(n->entity); } } } @@ -7651,29 +7572,29 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) //- rjf: apply all entities { - for(EachEnumVal(DF_EntityKind, k)) + for(EachEnumVal(D_EntityKind, k)) { - DF_EntityKindFlags k_flags = df_g_entity_kind_flags_table[k]; - if(k_flags & DF_EntityKindFlag_IsSerializedToConfig) + D_EntityKindFlags k_flags = d_entity_kind_flags_table[k]; + if(k_flags & D_EntityKindFlag_IsSerializedToConfig) { - DF_CfgVal *k_val = df_cfg_val_from_string(table, df_g_entity_kind_name_lower_table[k]); - for(DF_CfgTree *k_tree = k_val->first; - k_tree != &df_g_nil_cfg_tree; + D_CfgVal *k_val = d_cfg_val_from_string(table, d_entity_kind_name_lower_table[k]); + for(D_CfgTree *k_tree = k_val->first; + k_tree != &d_nil_cfg_tree; k_tree = k_tree->next) { if(k_tree->source != src) { continue; } - DF_Entity *entity = df_entity_alloc(df_entity_root(), k); - df_entity_equip_cfg_src(entity, k_tree->source); + D_Entity *entity = d_entity_alloc(d_entity_root(), k); + d_entity_equip_cfg_src(entity, k_tree->source); // rjf: iterate config tree typedef struct Task Task; struct Task { Task *next; - DF_Entity *entity; + D_Entity *entity; MD_Node *n; }; Task start_task = {0, entity, k_tree->root}; @@ -7687,27 +7608,27 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) // rjf: standalone string literals under an entity -> name if(child->flags & MD_NodeFlag_StringLiteral && child->first == &md_nil_node) { - String8 string = df_cfg_raw_from_escaped_string(scratch.arena, child->string); - if(df_g_entity_kind_flags_table[t->entity->kind] & DF_EntityKindFlag_NameIsPath) + String8 string = d_cfg_raw_from_escaped_string(scratch.arena, child->string); + if(d_entity_kind_flags_table[t->entity->kind] & D_EntityKindFlag_NameIsPath) { string = path_absolute_dst_from_relative_dst_src(scratch.arena, string, cfg_folder); } - df_entity_equip_name(t->entity, string); + d_entity_equip_name(t->entity, string); } // rjf: standalone string literals under an entity, with a numeric child -> name & text location if(child->flags & MD_NodeFlag_StringLiteral && child->first->flags & MD_NodeFlag_Numeric && child->first->first == &md_nil_node) { - String8 string = df_cfg_raw_from_escaped_string(scratch.arena, child->string); - if(df_g_entity_kind_flags_table[t->entity->kind] & DF_EntityKindFlag_NameIsPath) + String8 string = d_cfg_raw_from_escaped_string(scratch.arena, child->string); + if(d_entity_kind_flags_table[t->entity->kind] & D_EntityKindFlag_NameIsPath) { string = path_absolute_dst_from_relative_dst_src(scratch.arena, string, cfg_folder); } - df_entity_equip_name(t->entity, string); + d_entity_equip_name(t->entity, string); S64 line = 0; try_s64_from_str8_c_rules(child->first->string, &line); TxtPt pt = txt_pt(line, 1); - df_entity_equip_txt_pt(t->entity, pt); + d_entity_equip_txt_pt(t->entity, pt); } // rjf: standalone hex literals under an entity -> vaddr @@ -7715,7 +7636,7 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) { U64 vaddr = 0; try_u64_from_str8_c_rules(child->string, &vaddr); - df_entity_equip_vaddr(t->entity, vaddr); + d_entity_equip_vaddr(t->entity, vaddr); } // rjf: specifically named entity equipment @@ -7723,22 +7644,22 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) str8_match(child->string, str8_lit("label"), StringMatchFlag_CaseInsensitive)) && child->first != &md_nil_node) { - String8 string = df_cfg_raw_from_escaped_string(scratch.arena, child->first->string); - if(df_g_entity_kind_flags_table[t->entity->kind] & DF_EntityKindFlag_NameIsPath) + String8 string = d_cfg_raw_from_escaped_string(scratch.arena, child->first->string); + if(d_entity_kind_flags_table[t->entity->kind] & D_EntityKindFlag_NameIsPath) { string = path_absolute_dst_from_relative_dst_src(scratch.arena, string, cfg_folder); } - df_entity_equip_name(t->entity, string); + d_entity_equip_name(t->entity, string); } if((str8_match(child->string, str8_lit("active"), StringMatchFlag_CaseInsensitive) || str8_match(child->string, str8_lit("enabled"), StringMatchFlag_CaseInsensitive)) && child->first != &md_nil_node) { - df_entity_equip_disabled(t->entity, !str8_match(child->first->string, str8_lit("1"), 0)); + d_entity_equip_disabled(t->entity, !str8_match(child->first->string, str8_lit("1"), 0)); } if(str8_match(child->string, str8_lit("disabled"), StringMatchFlag_CaseInsensitive) && child->first != &md_nil_node) { - df_entity_equip_disabled(t->entity, str8_match(child->first->string, str8_lit("1"), 0)); + d_entity_equip_disabled(t->entity, str8_match(child->first->string, str8_lit("1"), 0)); } if(str8_match(child->string, str8_lit("hsva"), StringMatchFlag_CaseInsensitive) && child->first != &md_nil_node) { @@ -7747,20 +7668,20 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) hsva.y = (F32)f64_from_str8(child->first->next->string); hsva.z = (F32)f64_from_str8(child->first->next->next->string); hsva.w = (F32)f64_from_str8(child->first->next->next->next->string); - df_entity_equip_color_hsva(t->entity, hsva); + d_entity_equip_color_hsva(t->entity, hsva); } if(str8_match(child->string, str8_lit("color"), StringMatchFlag_CaseInsensitive) && child->first != &md_nil_node) { Vec4F32 rgba = rgba_from_hex_string_4f32(child->first->string); Vec4F32 hsva = hsva_from_rgba(rgba); - df_entity_equip_color_hsva(t->entity, hsva); + d_entity_equip_color_hsva(t->entity, hsva); } if(str8_match(child->string, str8_lit("line"), StringMatchFlag_CaseInsensitive) && child->first != &md_nil_node) { S64 line = 0; try_s64_from_str8_c_rules(child->first->string, &line); TxtPt pt = txt_pt(line, 1); - df_entity_equip_txt_pt(t->entity, pt); + d_entity_equip_txt_pt(t->entity, pt); } if((str8_match(child->string, str8_lit("vaddr"), StringMatchFlag_CaseInsensitive) || str8_match(child->string, str8_lit("addr"), StringMatchFlag_CaseInsensitive)) && @@ -7768,20 +7689,20 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) { U64 vaddr = 0; try_u64_from_str8_c_rules(child->first->string, &vaddr); - df_entity_equip_vaddr(t->entity, vaddr); + d_entity_equip_vaddr(t->entity, vaddr); } // rjf: sub-entity -> create new task - DF_EntityKind sub_entity_kind = DF_EntityKind_Nil; - for(EachEnumVal(DF_EntityKind, k2)) + D_EntityKind sub_entity_kind = D_EntityKind_Nil; + for(EachEnumVal(D_EntityKind, k2)) { if(child->flags & MD_NodeFlag_Identifier && child->first != &md_nil_node && - (str8_match(child->string, df_g_entity_kind_name_lower_table[k2], StringMatchFlag_CaseInsensitive) || - (k2 == DF_EntityKind_Executable && str8_match(child->string, str8_lit("exe"), StringMatchFlag_CaseInsensitive)))) + (str8_match(child->string, d_entity_kind_name_lower_table[k2], StringMatchFlag_CaseInsensitive) || + (k2 == D_EntityKind_Executable && str8_match(child->string, str8_lit("exe"), StringMatchFlag_CaseInsensitive)))) { Task *task = push_array(scratch.arena, Task, 1); task->next = t->next; - task->entity = df_entity_alloc(t->entity, k2); + task->entity = d_entity_alloc(t->entity, k2); task->n = child; t->next = task; break; @@ -7795,9 +7716,9 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } //- rjf: apply exception code filters - DF_CfgVal *filter_tables = df_cfg_val_from_string(table, str8_lit("exception_code_filters")); - for(DF_CfgTree *table = filter_tables->first; - table != &df_g_nil_cfg_tree; + D_CfgVal *filter_tables = d_cfg_val_from_string(table, str8_lit("exception_code_filters")); + for(D_CfgTree *table = filter_tables->first; + table != &d_nil_cfg_tree; table = table->next) { for(MD_EachNode(rule, table->root->first)) @@ -7822,11 +7743,11 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) { if(val) { - df_state->ctrl_exception_code_filters[kind/64] |= (1ull<<(kind%64)); + d_state->ctrl_exception_code_filters[kind/64] |= (1ull<<(kind%64)); } else { - df_state->ctrl_exception_code_filters[kind/64] &= ~(1ull<<(kind%64)); + d_state->ctrl_exception_code_filters[kind/64] &= ~(1ull<<(kind%64)); } } } @@ -7835,36 +7756,36 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) }break; //- rjf: writing config changes - case DF_CoreCmdKind_WriteUserData: - case DF_CoreCmdKind_WriteProjectData: + case D_CmdKind_WriteUserData: + case D_CmdKind_WriteProjectData: { - DF_CfgSrc src = DF_CfgSrc_User; - for(DF_CfgSrc s = (DF_CfgSrc)0; s < DF_CfgSrc_COUNT; s = (DF_CfgSrc)(s+1)) + D_CfgSrc src = D_CfgSrc_User; + for(D_CfgSrc s = (D_CfgSrc)0; s < D_CfgSrc_COUNT; s = (D_CfgSrc)(s+1)) { - if(core_cmd_kind == df_g_cfg_src_write_cmd_kind_table[s]) + if(core_cmd_kind == d_cfg_src_write_cmd_kind_table[s]) { src = s; break; } } - arena_clear(df_state->cfg_write_arenas[src]); - MemoryZeroStruct(&df_state->cfg_write_data[src]); - String8 path = df_cfg_path_from_src(src); - String8List strs = df_cfg_strings_from_core(scratch.arena, path, src); - String8 header = push_str8f(scratch.arena, "// raddbg %s file\n\n", df_g_cfg_src_string_table[src].str); + arena_clear(d_state->cfg_write_arenas[src]); + MemoryZeroStruct(&d_state->cfg_write_data[src]); + String8 path = d_cfg_path_from_src(src); + String8List strs = d_cfg_strings_from_core(scratch.arena, path, src); + String8 header = push_str8f(scratch.arena, "// raddbg %s file\n\n", d_cfg_src_string_table[src].str); str8_list_push_front(scratch.arena, &strs, header); String8 data = str8_list_join(scratch.arena, &strs, 0); String8 data_indented = indented_from_string(scratch.arena, data); - df_state->cfg_write_issued[src] = 1; - df_cfg_push_write_string(src, data_indented); + d_state->cfg_write_issued[src] = 1; + d_cfg_push_write_string(src, data_indented); }break; //- rjf: override file links - case DF_CoreCmdKind_SetFileOverrideLinkSrc: - case DF_CoreCmdKind_SetFileOverrideLinkDst: + case D_CmdKind_SetFileOverrideLinkSrc: + case D_CmdKind_SetFileOverrideLinkDst: { // rjf: unpack args - DF_Entity *map = df_entity_from_handle(params.entity); + D_Entity *map = d_entity_from_handle(params.entity); String8 path = path_normalized_from_string(scratch.arena, params.file_path); String8 path_folder = str8_chop_last_slash(path); String8 path_file = str8_skip_last_slash(path); @@ -7873,41 +7794,41 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) switch(core_cmd_kind) { default:{}break; - case DF_CoreCmdKind_SetFileOverrideLinkSrc: + case D_CmdKind_SetFileOverrideLinkSrc: { - DF_Entity *map_parent = (params.file_path.size != 0) ? df_entity_from_path(path_folder, DF_EntityFromPathFlag_OpenAsNeeded|DF_EntityFromPathFlag_OpenMissing) : df_entity_root(); - if(df_entity_is_nil(map)) + D_Entity *map_parent = (params.file_path.size != 0) ? d_entity_from_path(path_folder, D_EntityFromPathFlag_OpenAsNeeded|D_EntityFromPathFlag_OpenMissing) : d_entity_root(); + if(d_entity_is_nil(map)) { - map = df_entity_alloc(map_parent, DF_EntityKind_FilePathMap); + map = d_entity_alloc(map_parent, D_EntityKind_FilePathMap); } else { - df_entity_change_parent(map, map->parent, map_parent, &df_g_nil_entity); + d_entity_change_parent(map, map->parent, map_parent, &d_nil_entity); } - df_entity_equip_name(map, path_file); + d_entity_equip_name(map, path_file); }break; - case DF_CoreCmdKind_SetFileOverrideLinkDst: + case D_CmdKind_SetFileOverrideLinkDst: { - if(df_entity_is_nil(map)) + if(d_entity_is_nil(map)) { - map = df_entity_alloc(df_entity_root(), DF_EntityKind_FilePathMap); + map = d_entity_alloc(d_entity_root(), D_EntityKind_FilePathMap); } - DF_Entity *map_dst_entity = &df_g_nil_entity; + D_Entity *map_dst_entity = &d_nil_entity; if(params.file_path.size != 0) { - map_dst_entity = df_entity_from_path(path, DF_EntityFromPathFlag_All); + map_dst_entity = d_entity_from_path(path, D_EntityFromPathFlag_All); } - df_entity_equip_entity_handle(map, df_handle_from_entity(map_dst_entity)); + d_entity_equip_entity_handle(map, d_handle_from_entity(map_dst_entity)); }break; } // rjf: empty src/dest -> delete - if(!df_entity_is_nil(map) && map->name.size == 0 && df_entity_is_nil(df_entity_from_handle(map->entity_handle))) + if(!d_entity_is_nil(map) && map->name.size == 0 && d_entity_is_nil(d_entity_from_handle(map->entity_handle))) { - df_entity_mark_for_deletion(map); + d_entity_mark_for_deletion(map); } }break; - case DF_CoreCmdKind_SetFileReplacementPath: + case D_CmdKind_SetFileReplacementPath: { // NOTE(rjf): // @@ -7929,19 +7850,19 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) // TODO(rjf): //- rjf: grab src file & chosen replacement - DF_Entity *file = df_entity_from_handle(params.entity); - DF_Entity *replacement = df_entity_from_path(params.file_path, DF_EntityFromPathFlag_OpenAsNeeded|DF_EntityFromPathFlag_OpenMissing); + D_Entity *file = d_entity_from_handle(params.entity); + D_Entity *replacement = d_entity_from_path(params.file_path, D_EntityFromPathFlag_OpenAsNeeded|D_EntityFromPathFlag_OpenMissing); //- rjf: find - DF_Entity *first_diff_src = file; - DF_Entity *first_diff_dst = replacement; - for(;!df_entity_is_nil(first_diff_src) && !df_entity_is_nil(first_diff_dst);) + D_Entity *first_diff_src = file; + D_Entity *first_diff_dst = replacement; + for(;!d_entity_is_nil(first_diff_src) && !d_entity_is_nil(first_diff_dst);) { if(!str8_match(first_diff_src->name, first_diff_dst->name, StringMatchFlag_CaseInsensitive) || - first_diff_src->parent->kind != DF_EntityKind_File || - first_diff_src->parent->parent->kind != DF_EntityKind_File || - first_diff_dst->parent->kind != DF_EntityKind_File || - first_diff_dst->parent->parent->kind != DF_EntityKind_File) + first_diff_src->parent->kind != D_EntityKind_File || + first_diff_src->parent->parent->kind != D_EntityKind_File || + first_diff_dst->parent->kind != D_EntityKind_File || + first_diff_dst->parent->parent->kind != D_EntityKind_File) { break; } @@ -7950,68 +7871,68 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } //- rjf: override first different - if(!df_entity_is_nil(first_diff_src) && !df_entity_is_nil(first_diff_dst)) + if(!d_entity_is_nil(first_diff_src) && !d_entity_is_nil(first_diff_dst)) { - DF_Entity *link = df_entity_child_from_name_and_kind(first_diff_src->parent, first_diff_src->name, DF_EntityKind_FilePathMap); - if(df_entity_is_nil(link)) + D_Entity *link = d_entity_child_from_name_and_kind(first_diff_src->parent, first_diff_src->name, D_EntityKind_FilePathMap); + if(d_entity_is_nil(link)) { - link = df_entity_alloc(first_diff_src->parent, DF_EntityKind_FilePathMap); - df_entity_equip_name(link, first_diff_src->name); + link = d_entity_alloc(first_diff_src->parent, D_EntityKind_FilePathMap); + d_entity_equip_name(link, first_diff_src->name); } - df_entity_equip_entity_handle(link, df_handle_from_entity(first_diff_dst)); + d_entity_equip_entity_handle(link, d_handle_from_entity(first_diff_dst)); } }break; //- rjf: auto view rules - case DF_CoreCmdKind_SetAutoViewRuleType: - case DF_CoreCmdKind_SetAutoViewRuleViewRule: + case D_CmdKind_SetAutoViewRuleType: + case D_CmdKind_SetAutoViewRuleViewRule: { - DF_Entity *map = df_entity_from_handle(params.entity); - if(df_entity_is_nil(map)) + D_Entity *map = d_entity_from_handle(params.entity); + if(d_entity_is_nil(map)) { - map = df_entity_alloc(df_entity_root(), DF_EntityKind_AutoViewRule); - df_entity_equip_cfg_src(map, DF_CfgSrc_Project); + map = d_entity_alloc(d_entity_root(), D_EntityKind_AutoViewRule); + d_entity_equip_cfg_src(map, D_CfgSrc_Project); } - DF_Entity *src = df_entity_child_from_kind(map, DF_EntityKind_Source); - if(df_entity_is_nil(src)) + D_Entity *src = d_entity_child_from_kind(map, D_EntityKind_Source); + if(d_entity_is_nil(src)) { - src = df_entity_alloc(map, DF_EntityKind_Source); + src = d_entity_alloc(map, D_EntityKind_Source); } - DF_Entity *dst = df_entity_child_from_kind(map, DF_EntityKind_Dest); - if(df_entity_is_nil(dst)) + D_Entity *dst = d_entity_child_from_kind(map, D_EntityKind_Dest); + if(d_entity_is_nil(dst)) { - dst = df_entity_alloc(map, DF_EntityKind_Dest); + dst = d_entity_alloc(map, D_EntityKind_Dest); } - if(map->kind == DF_EntityKind_AutoViewRule) + if(map->kind == D_EntityKind_AutoViewRule) { - DF_Entity *edit_child = (core_cmd_kind == DF_CoreCmdKind_SetAutoViewRuleType ? src : dst); - df_entity_equip_name(edit_child, params.string); + D_Entity *edit_child = (core_cmd_kind == D_CmdKind_SetAutoViewRuleType ? src : dst); + d_entity_equip_name(edit_child, params.string); } if(src->name.size == 0 && dst->name.size == 0) { - df_entity_mark_for_deletion(map); + d_entity_mark_for_deletion(map); } { - DF_AutoViewRuleMapCache *cache = &df_state->auto_view_rule_cache; + D_AutoViewRuleMapCache *cache = &d_state->auto_view_rule_cache; if(cache->arena == 0) { cache->arena = arena_alloc(); } arena_clear(cache->arena); cache->slots_count = 1024; - cache->slots = push_array(cache->arena, DF_AutoViewRuleSlot, cache->slots_count); - DF_EntityList maps = df_query_cached_entity_list_with_kind(DF_EntityKind_AutoViewRule); - for(DF_EntityNode *n = maps.first; n != 0; n = n->next) + cache->slots = push_array(cache->arena, D_AutoViewRuleSlot, cache->slots_count); + D_EntityList maps = d_query_cached_entity_list_with_kind(D_EntityKind_AutoViewRule); + for(D_EntityNode *n = maps.first; n != 0; n = n->next) { - DF_Entity *map = n->entity; - DF_Entity *src = df_entity_child_from_kind(map, DF_EntityKind_Source); - DF_Entity *dst = df_entity_child_from_kind(map, DF_EntityKind_Dest); + D_Entity *map = n->entity; + D_Entity *src = d_entity_child_from_kind(map, D_EntityKind_Source); + D_Entity *dst = d_entity_child_from_kind(map, D_EntityKind_Dest); String8 type = src->name; String8 view_rule = dst->name; - U64 hash = df_hash_from_string(type); + U64 hash = d_hash_from_string(type); U64 slot_idx = hash%cache->slots_count; - DF_AutoViewRuleSlot *slot = &cache->slots[slot_idx]; - DF_AutoViewRuleNode *node = push_array(cache->arena, DF_AutoViewRuleNode, 1); + D_AutoViewRuleSlot *slot = &cache->slots[slot_idx]; + D_AutoViewRuleNode *node = push_array(cache->arena, D_AutoViewRuleNode, 1); node->type = push_str8_copy(cache->arena, type); node->view_rule = push_str8_copy(cache->arena, view_rule); SLLQueuePush(slot->first, slot->last, node); @@ -8020,93 +7941,93 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) }break; //- rjf: general entity operations - case DF_CoreCmdKind_EnableEntity: - case DF_CoreCmdKind_EnableBreakpoint: - case DF_CoreCmdKind_EnableTarget: + case D_CmdKind_EnableEntity: + case D_CmdKind_EnableBreakpoint: + case D_CmdKind_EnableTarget: { - DF_Entity *entity = df_entity_from_handle(params.entity); - DF_StateDeltaHistoryBatch(df_state_delta_history()) + D_Entity *entity = d_entity_from_handle(params.entity); + D_StateDeltaHistoryBatch(d_state_delta_history()) { - df_entity_equip_disabled(entity, 0); + d_entity_equip_disabled(entity, 0); } }break; - case DF_CoreCmdKind_DisableEntity: - case DF_CoreCmdKind_DisableBreakpoint: - case DF_CoreCmdKind_DisableTarget: + case D_CmdKind_DisableEntity: + case D_CmdKind_DisableBreakpoint: + case D_CmdKind_DisableTarget: { - DF_Entity *entity = df_entity_from_handle(params.entity); - DF_StateDeltaHistoryBatch(df_state_delta_history()) + D_Entity *entity = d_entity_from_handle(params.entity); + D_StateDeltaHistoryBatch(d_state_delta_history()) { - df_entity_equip_disabled(entity, 1); + d_entity_equip_disabled(entity, 1); } }break; - case DF_CoreCmdKind_FreezeEntity: - case DF_CoreCmdKind_ThawEntity: + case D_CmdKind_FreezeEntity: + case D_CmdKind_ThawEntity: { - B32 should_freeze = (core_cmd_kind == DF_CoreCmdKind_FreezeEntity); - DF_Entity *root = df_entity_from_handle(params.entity); - for(DF_Entity *e = root; !df_entity_is_nil(e); e = df_entity_rec_df_pre(e, root).next) + B32 should_freeze = (core_cmd_kind == D_CmdKind_FreezeEntity); + D_Entity *root = d_entity_from_handle(params.entity); + for(D_Entity *e = root; !d_entity_is_nil(e); e = d_entity_rec_df_pre(e, root).next) { - if(e->kind == DF_EntityKind_Thread) + if(e->kind == D_EntityKind_Thread) { - df_set_thread_freeze_state(e, should_freeze); + d_set_thread_freeze_state(e, should_freeze); } } }break; - case DF_CoreCmdKind_RemoveEntity: - case DF_CoreCmdKind_RemoveBreakpoint: - case DF_CoreCmdKind_RemoveTarget: + case D_CmdKind_RemoveEntity: + case D_CmdKind_RemoveBreakpoint: + case D_CmdKind_RemoveTarget: { - DF_Entity *entity = df_entity_from_handle(params.entity); - DF_EntityKindFlags kind_flags = df_g_entity_kind_flags_table[entity->kind]; - if(kind_flags & DF_EntityKindFlag_CanDelete) + D_Entity *entity = d_entity_from_handle(params.entity); + D_EntityKindFlags kind_flags = d_entity_kind_flags_table[entity->kind]; + if(kind_flags & D_EntityKindFlag_CanDelete) { - df_entity_mark_for_deletion(entity); + d_entity_mark_for_deletion(entity); } }break; - case DF_CoreCmdKind_NameEntity: + case D_CmdKind_NameEntity: { - DF_Entity *entity = df_entity_from_handle(params.entity); + D_Entity *entity = d_entity_from_handle(params.entity); String8 string = params.string; - df_entity_equip_name(entity, string); + d_entity_equip_name(entity, string); }break; - case DF_CoreCmdKind_EditEntity:{}break; - case DF_CoreCmdKind_DuplicateEntity: + case D_CmdKind_EditEntity:{}break; + case D_CmdKind_DuplicateEntity: { - DF_Entity *src = df_entity_from_handle(params.entity); - if(!df_entity_is_nil(src)) + D_Entity *src = d_entity_from_handle(params.entity); + if(!d_entity_is_nil(src)) { typedef struct Task Task; struct Task { Task *next; - DF_Entity *src_n; - DF_Entity *dst_parent; + D_Entity *src_n; + D_Entity *dst_parent; }; Task starter_task = {0, src, src->parent}; Task *first_task = &starter_task; Task *last_task = &starter_task; for(Task *task = first_task; task != 0; task = task->next) { - DF_Entity *src_n = task->src_n; + D_Entity *src_n = task->src_n; if(task == first_task) { - df_state_delta_history_batch_begin(df_state_delta_history()); + d_state_delta_history_batch_begin(d_state_delta_history()); } - DF_Entity *dst_n = df_entity_alloc(task->dst_parent, task->src_n->kind); + D_Entity *dst_n = d_entity_alloc(task->dst_parent, task->src_n->kind); if(task == first_task) { - df_state_delta_history_batch_end(df_state_delta_history()); + d_state_delta_history_batch_end(d_state_delta_history()); } - if(src_n->flags & DF_EntityFlag_HasTextPoint) {df_entity_equip_txt_pt(dst_n, src_n->text_point);} - if(src_n->flags & DF_EntityFlag_HasU64) {df_entity_equip_u64(dst_n, src_n->u64);} - if(src_n->flags & DF_EntityFlag_HasColor) {df_entity_equip_color_hsva(dst_n, df_hsva_from_entity(src_n));} - if(src_n->flags & DF_EntityFlag_HasVAddrRng) {df_entity_equip_vaddr_rng(dst_n, src_n->vaddr_rng);} - if(src_n->flags & DF_EntityFlag_HasVAddr) {df_entity_equip_vaddr(dst_n, src_n->vaddr);} - if(src_n->disabled) {df_entity_equip_disabled(dst_n, 1);} - if(src_n->name.size != 0) {df_entity_equip_name(dst_n, src_n->name);} + if(src_n->flags & D_EntityFlag_HasTextPoint) {d_entity_equip_txt_pt(dst_n, src_n->text_point);} + if(src_n->flags & D_EntityFlag_HasU64) {d_entity_equip_u64(dst_n, src_n->u64);} + if(src_n->flags & D_EntityFlag_HasColor) {d_entity_equip_color_hsva(dst_n, d_hsva_from_entity(src_n));} + if(src_n->flags & D_EntityFlag_HasVAddrRng) {d_entity_equip_vaddr_rng(dst_n, src_n->vaddr_rng);} + if(src_n->flags & D_EntityFlag_HasVAddr) {d_entity_equip_vaddr(dst_n, src_n->vaddr);} + if(src_n->disabled) {d_entity_equip_disabled(dst_n, 1);} + if(src_n->name.size != 0) {d_entity_equip_name(dst_n, src_n->name);} dst_n->cfg_src = src_n->cfg_src; - for(DF_Entity *src_child = task->src_n->first; !df_entity_is_nil(src_child); src_child = src_child->next) + for(D_Entity *src_child = task->src_n->first; !d_entity_is_nil(src_child); src_child = src_child->next) { Task *child_task = push_array(scratch.arena, Task, 1); child_task->src_n = src_child; @@ -8116,51 +8037,51 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } } }break; - case DF_CoreCmdKind_RelocateEntity: + case D_CmdKind_RelocateEntity: { - DF_Entity *entity = df_entity_from_handle(params.entity); - DF_Entity *location = df_entity_child_from_kind(entity, DF_EntityKind_Location); - if(df_entity_is_nil(location)) + D_Entity *entity = d_entity_from_handle(params.entity); + D_Entity *location = d_entity_child_from_kind(entity, D_EntityKind_Location); + if(d_entity_is_nil(location)) { - location = df_entity_alloc(entity, DF_EntityKind_Location); + location = d_entity_alloc(entity, D_EntityKind_Location); } - location->flags &= ~DF_EntityFlag_HasTextPoint; - location->flags &= ~DF_EntityFlag_HasVAddr; + location->flags &= ~D_EntityFlag_HasTextPoint; + location->flags &= ~D_EntityFlag_HasVAddr; if(params.text_point.line != 0) { - df_entity_equip_txt_pt(location, params.text_point); + d_entity_equip_txt_pt(location, params.text_point); } if(params.vaddr != 0) { - df_entity_equip_vaddr(location, params.vaddr); + d_entity_equip_vaddr(location, params.vaddr); } if(params.file_path.size != 0) { - df_entity_equip_name(location, params.file_path); + d_entity_equip_name(location, params.file_path); } }break; //- rjf: breakpoints - case DF_CoreCmdKind_AddBreakpoint: - case DF_CoreCmdKind_ToggleBreakpoint: + case D_CmdKind_AddBreakpoint: + case D_CmdKind_ToggleBreakpoint: { String8 file_path = params.file_path; TxtPt pt = params.text_point; String8 name = params.string; U64 vaddr = params.vaddr; B32 removed_already_existing = 0; - if(core_cmd_kind == DF_CoreCmdKind_ToggleBreakpoint) + if(core_cmd_kind == D_CmdKind_ToggleBreakpoint) { - DF_EntityList bps = df_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - for(DF_EntityNode *n = bps.first; n != 0; n = n->next) + D_EntityList bps = d_query_cached_entity_list_with_kind(D_EntityKind_Breakpoint); + for(D_EntityNode *n = bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(bp, DF_EntityKind_Location); - if((loc->flags & DF_EntityFlag_HasTextPoint && path_match_normalized(loc->name, file_path) && loc->text_point.line == pt.line) || - (loc->flags & DF_EntityFlag_HasVAddr && loc->vaddr == vaddr) || - (!(loc->flags & DF_EntityFlag_HasTextPoint) && str8_match(loc->name, name, 0))) + D_Entity *bp = n->entity; + D_Entity *loc = d_entity_child_from_kind(bp, D_EntityKind_Location); + if((loc->flags & D_EntityFlag_HasTextPoint && path_match_normalized(loc->name, file_path) && loc->text_point.line == pt.line) || + (loc->flags & D_EntityFlag_HasVAddr && loc->vaddr == vaddr) || + (!(loc->flags & D_EntityFlag_HasTextPoint) && str8_match(loc->name, name, 0))) { - df_entity_mark_for_deletion(bp); + d_entity_mark_for_deletion(bp); removed_already_existing = 1; break; } @@ -8168,51 +8089,51 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } if(!removed_already_existing) { - DF_Entity *bp = df_entity_alloc(df_entity_root(), DF_EntityKind_Breakpoint); - df_entity_equip_cfg_src(bp, DF_CfgSrc_Project); - DF_Entity *loc = df_entity_alloc(bp, DF_EntityKind_Location); + D_Entity *bp = d_entity_alloc(d_entity_root(), D_EntityKind_Breakpoint); + d_entity_equip_cfg_src(bp, D_CfgSrc_Project); + D_Entity *loc = d_entity_alloc(bp, D_EntityKind_Location); if(file_path.size != 0 && pt.line != 0) { - df_entity_equip_name(loc, file_path); - df_entity_equip_txt_pt(loc, pt); + d_entity_equip_name(loc, file_path); + d_entity_equip_txt_pt(loc, pt); } else if(name.size != 0) { - df_entity_equip_name(loc, name); + d_entity_equip_name(loc, name); } else if(vaddr != 0) { - df_entity_equip_vaddr(loc, vaddr); + d_entity_equip_vaddr(loc, vaddr); } } }break; - case DF_CoreCmdKind_AddAddressBreakpoint: - case DF_CoreCmdKind_AddFunctionBreakpoint: + case D_CmdKind_AddAddressBreakpoint: + case D_CmdKind_AddFunctionBreakpoint: { - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_AddBreakpoint)); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_AddBreakpoint)); }break; //- rjf: watches - case DF_CoreCmdKind_AddWatchPin: - case DF_CoreCmdKind_ToggleWatchPin: + case D_CmdKind_AddWatchPin: + case D_CmdKind_ToggleWatchPin: { String8 file_path = params.file_path; TxtPt pt = params.text_point; String8 name = params.string; U64 vaddr = params.vaddr; B32 removed_already_existing = 0; - if(core_cmd_kind == DF_CoreCmdKind_ToggleWatchPin) + if(core_cmd_kind == D_CmdKind_ToggleWatchPin) { - DF_EntityList wps = df_query_cached_entity_list_with_kind(DF_EntityKind_WatchPin); - for(DF_EntityNode *n = wps.first; n != 0; n = n->next) + D_EntityList wps = d_query_cached_entity_list_with_kind(D_EntityKind_WatchPin); + for(D_EntityNode *n = wps.first; n != 0; n = n->next) { - DF_Entity *wp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(wp, DF_EntityKind_Location); - if((loc->flags & DF_EntityFlag_HasTextPoint && path_match_normalized(loc->name, file_path) && loc->text_point.line == pt.line) || - (loc->flags & DF_EntityFlag_HasVAddr && loc->vaddr == vaddr) || - (!(loc->flags & DF_EntityFlag_HasTextPoint) && str8_match(loc->name, name, 0))) + D_Entity *wp = n->entity; + D_Entity *loc = d_entity_child_from_kind(wp, D_EntityKind_Location); + if((loc->flags & D_EntityFlag_HasTextPoint && path_match_normalized(loc->name, file_path) && loc->text_point.line == pt.line) || + (loc->flags & D_EntityFlag_HasVAddr && loc->vaddr == vaddr) || + (!(loc->flags & D_EntityFlag_HasTextPoint) && str8_match(loc->name, name, 0))) { - df_entity_mark_for_deletion(wp); + d_entity_mark_for_deletion(wp); removed_already_existing = 1; break; } @@ -8220,48 +8141,48 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } if(!removed_already_existing) { - DF_Entity *wp = df_entity_alloc(df_entity_root(), DF_EntityKind_WatchPin); - df_entity_equip_name(wp, name); - df_entity_equip_cfg_src(wp, DF_CfgSrc_Project); - DF_Entity *loc = df_entity_alloc(wp, DF_EntityKind_Location); + D_Entity *wp = d_entity_alloc(d_entity_root(), D_EntityKind_WatchPin); + d_entity_equip_name(wp, name); + d_entity_equip_cfg_src(wp, D_CfgSrc_Project); + D_Entity *loc = d_entity_alloc(wp, D_EntityKind_Location); if(file_path.size != 0 && pt.line != 0) { - df_entity_equip_name(loc, file_path); - df_entity_equip_txt_pt(loc, pt); + d_entity_equip_name(loc, file_path); + d_entity_equip_txt_pt(loc, pt); } else if(vaddr != 0) { - df_entity_equip_vaddr(loc, vaddr); + d_entity_equip_vaddr(loc, vaddr); } } }break; //- rjf: cursor operations - case DF_CoreCmdKind_ToggleBreakpointAtCursor: + case D_CmdKind_ToggleBreakpointAtCursor: { - DF_InteractRegs *regs = df_interact_regs(); - DF_CmdParams p = df_cmd_params_zero(); + D_InteractRegs *regs = d_interact_regs(); + D_CmdParams p = d_cmd_params_zero(); p.file_path = regs->file_path; p.text_point = regs->cursor; p.vaddr = regs->vaddr_range.min; - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ToggleBreakpoint)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_ToggleBreakpoint)); }break; - case DF_CoreCmdKind_ToggleWatchPinAtCursor: + case D_CmdKind_ToggleWatchPinAtCursor: { - DF_InteractRegs *regs = df_interact_regs(); - DF_CmdParams p = df_cmd_params_zero(); + D_InteractRegs *regs = d_interact_regs(); + D_CmdParams p = d_cmd_params_zero(); p.file_path = regs->file_path; p.text_point = regs->cursor; p.vaddr = regs->vaddr_range.min; p.string = params.string; - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ToggleWatchPin)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_ToggleWatchPin)); }break; - case DF_CoreCmdKind_GoToNameAtCursor: - case DF_CoreCmdKind_ToggleWatchExpressionAtCursor: + case D_CmdKind_GoToNameAtCursor: + case D_CmdKind_ToggleWatchExpressionAtCursor: { HS_Scope *hs_scope = hs_scope_open(); TXT_Scope *txt_scope = txt_scope_open(); - DF_InteractRegs *regs = df_interact_regs(); + D_InteractRegs *regs = d_interact_regs(); U128 text_key = regs->text_key; TXT_LangKind lang_kind = regs->lang_kind; TxtRng range = txt_rng(regs->cursor, regs->mark); @@ -8278,144 +8199,144 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) expr_off_range = txt_expr_off_range_from_info_data_pt(&info, data, range.min); } String8 expr = str8_substr(data, expr_off_range); - DF_CmdParams p = df_cmd_params_zero(); + D_CmdParams p = d_cmd_params_zero(); p.string = expr; - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(core_cmd_kind == DF_CoreCmdKind_GoToNameAtCursor ? DF_CoreCmdKind_GoToName : - core_cmd_kind == DF_CoreCmdKind_ToggleWatchExpressionAtCursor ? DF_CoreCmdKind_ToggleWatchExpression : - DF_CoreCmdKind_GoToName)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(core_cmd_kind == D_CmdKind_GoToNameAtCursor ? D_CmdKind_GoToName : + core_cmd_kind == D_CmdKind_ToggleWatchExpressionAtCursor ? D_CmdKind_ToggleWatchExpression : + D_CmdKind_GoToName)); txt_scope_close(txt_scope); hs_scope_close(hs_scope); }break; - case DF_CoreCmdKind_RunToCursor: + case D_CmdKind_RunToCursor: { - String8 file_path = df_interact_regs()->file_path; + String8 file_path = d_interact_regs()->file_path; if(file_path.size != 0) { - DF_CmdParams p = df_cmd_params_zero(); + D_CmdParams p = d_cmd_params_zero(); p.file_path = file_path; - p.text_point = df_interact_regs()->cursor; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunToLine)); + p.text_point = d_interact_regs()->cursor; + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_RunToLine)); } else { - DF_CmdParams p = df_cmd_params_zero(); - p.vaddr = df_interact_regs()->vaddr_range.min; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunToAddress)); + D_CmdParams p = d_cmd_params_zero(); + p.vaddr = d_interact_regs()->vaddr_range.min; + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_RunToAddress)); } }break; - case DF_CoreCmdKind_SetNextStatement: + case D_CmdKind_SetNextStatement: { - DF_Entity *thread = df_entity_from_handle(df_interact_regs()->thread); - String8 file_path = df_interact_regs()->file_path; - U64 new_rip_vaddr = df_interact_regs()->vaddr_range.min; + D_Entity *thread = d_entity_from_handle(d_interact_regs()->thread); + String8 file_path = d_interact_regs()->file_path; + U64 new_rip_vaddr = d_interact_regs()->vaddr_range.min; if(file_path.size != 0) { - DF_LineList *lines = &df_interact_regs()->lines; - for(DF_LineNode *n = lines->first; n != 0; n = n->next) + D_LineList *lines = &d_interact_regs()->lines; + for(D_LineNode *n = lines->first; n != 0; n = n->next) { - DF_EntityList modules = df_modules_from_dbgi_key(scratch.arena, &n->v.dbgi_key); - DF_Entity *module = df_module_from_thread_candidates(thread, &modules); - if(!df_entity_is_nil(module)) + D_EntityList modules = d_modules_from_dbgi_key(scratch.arena, &n->v.dbgi_key); + D_Entity *module = d_module_from_thread_candidates(thread, &modules); + if(!d_entity_is_nil(module)) { - new_rip_vaddr = df_vaddr_from_voff(module, n->v.voff_range.min); + new_rip_vaddr = d_vaddr_from_voff(module, n->v.voff_range.min); break; } } } - DF_CmdParams p = df_cmd_params_zero(); - p.entity = df_handle_from_entity(thread); + D_CmdParams p = d_cmd_params_zero(); + p.entity = d_handle_from_entity(thread); p.vaddr = new_rip_vaddr; - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SetThreadIP)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_SetThreadIP)); }break; //- rjf: targets - case DF_CoreCmdKind_AddTarget: + case D_CmdKind_AddTarget: { // rjf: build target - DF_Entity *entity = &df_g_nil_entity; - DF_StateDeltaHistoryBatch(df_state_delta_history()) + D_Entity *entity = &d_nil_entity; + D_StateDeltaHistoryBatch(d_state_delta_history()) { - entity = df_entity_alloc(df_entity_root(), DF_EntityKind_Target); + entity = d_entity_alloc(d_entity_root(), D_EntityKind_Target); } - df_entity_equip_disabled(entity, 1); - df_entity_equip_cfg_src(entity, DF_CfgSrc_Project); - DF_Entity *exe = df_entity_alloc(entity, DF_EntityKind_Executable); - df_entity_equip_name(exe, params.file_path); + d_entity_equip_disabled(entity, 1); + d_entity_equip_cfg_src(entity, D_CfgSrc_Project); + D_Entity *exe = d_entity_alloc(entity, D_EntityKind_Executable); + d_entity_equip_name(exe, params.file_path); String8 working_dir = str8_chop_last_slash(params.file_path); if(working_dir.size != 0) { String8 working_dir_path = push_str8f(scratch.arena, "%S/", working_dir); - DF_Entity *execution_path = df_entity_alloc(entity, DF_EntityKind_WorkingDirectory); - df_entity_equip_name(execution_path, working_dir_path); + D_Entity *execution_path = d_entity_alloc(entity, D_EntityKind_WorkingDirectory); + d_entity_equip_name(execution_path, working_dir_path); } - DF_CmdParams p = params; - p.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Entity); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_EditTarget)); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SelectTarget)); + D_CmdParams p = params; + p.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Entity); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_EditTarget)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_SelectTarget)); }break; - case DF_CoreCmdKind_SelectTarget: + case D_CmdKind_SelectTarget: { - DF_Entity *entity = df_entity_from_handle(params.entity); - if(entity->kind == DF_EntityKind_Target) + D_Entity *entity = d_entity_from_handle(params.entity); + if(entity->kind == D_EntityKind_Target) { - DF_StateDeltaHistoryBatch(df_state_delta_history()) + D_StateDeltaHistoryBatch(d_state_delta_history()) { - DF_EntityList all_targets = df_query_cached_entity_list_with_kind(DF_EntityKind_Target); + D_EntityList all_targets = d_query_cached_entity_list_with_kind(D_EntityKind_Target); B32 is_selected = !entity->disabled; - for(DF_EntityNode *n = all_targets.first; n != 0; n = n->next) + for(D_EntityNode *n = all_targets.first; n != 0; n = n->next) { - DF_Entity *target = n->entity; - df_entity_equip_disabled(target, 1); + D_Entity *target = n->entity; + d_entity_equip_disabled(target, 1); } if(!is_selected) { - df_entity_equip_disabled(entity, 0); + d_entity_equip_disabled(entity, 0); } } } }break; //- rjf: ended processes - case DF_CoreCmdKind_RetryEndedProcess: + case D_CmdKind_RetryEndedProcess: { - DF_Entity *ended_process = df_entity_from_handle(params.entity); - DF_Entity *target = df_entity_from_handle(ended_process->entity_handle); - if(target->kind == DF_EntityKind_Target) + D_Entity *ended_process = d_entity_from_handle(params.entity); + D_Entity *target = d_entity_from_handle(ended_process->entity_handle); + if(target->kind == D_EntityKind_Target) { - DF_CmdParams p = params; - p.entity = df_handle_from_entity(target); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_LaunchAndRun)); + D_CmdParams p = params; + p.entity = d_handle_from_entity(target); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_LaunchAndRun)); } - else if(df_entity_is_nil(target)) + else if(d_entity_is_nil(target)) { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("The ended process' corresponding target is missing."); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Error)); } - else if(df_entity_is_nil(ended_process)) + else if(d_entity_is_nil(ended_process)) { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("Invalid ended process."); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Error)); } }break; //- rjf: attaching - case DF_CoreCmdKind_Attach: + case D_CmdKind_Attach: { U64 pid = params.id; if(pid != 0) { CTRL_Msg msg = {CTRL_MsgKind_Attach}; msg.entity_id = (U32)pid; - MemoryCopyArray(msg.exception_code_filters, df_state->ctrl_exception_code_filters); - df_push_ctrl_msg(&msg); + MemoryCopyArray(msg.exception_code_filters, d_state->ctrl_exception_code_filters); + d_push_ctrl_msg(&msg); } }break; //- rjf: jit-debugger registration - case DF_CoreCmdKind_RegisterAsJITDebugger: + case D_CmdKind_RegisterAsJITDebugger: { #if OS_WINDOWS char filename_cstr[MAX_PATH] = {0}; @@ -8444,19 +8365,19 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } if(likely_not_in_admin_mode) { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("Could not register as the just-in-time debugger, access was denied; try running the debugger as administrator."); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Error)); } #else - DF_CmdParams p = params; + D_CmdParams p = params; p.string = str8_lit("Registering as the just-in-time debugger is currently not supported on this system."); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Error)); #endif }break; //- rjf: developer commands - case DF_CoreCmdKind_LogMarker: + case D_CmdKind_LogMarker: { log_infof("\"#MARKER\""); }break; @@ -8466,16 +8387,16 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } //- rjf: unpack eval-dependent info - DF_Entity *process = df_entity_from_handle(df_interact_regs()->process); - DF_Entity *thread = df_entity_from_handle(df_interact_regs()->thread); - Architecture arch = df_architecture_from_entity(thread); - U64 unwind_count = df_interact_regs()->unwind_count; - U64 rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, unwind_count); - CTRL_Unwind unwind = df_query_cached_unwind_from_thread(thread); - DF_Entity *module = df_module_from_process_vaddr(process, rip_vaddr); - U64 rip_voff = df_voff_from_vaddr(module, rip_vaddr); - U64 tls_root_vaddr = ctrl_query_cached_tls_root_vaddr_from_thread(df_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); - DF_EntityList all_modules = df_query_cached_entity_list_with_kind(DF_EntityKind_Module); + D_Entity *process = d_entity_from_handle(d_interact_regs()->process); + D_Entity *thread = d_entity_from_handle(d_interact_regs()->thread); + Architecture arch = d_architecture_from_entity(thread); + U64 unwind_count = d_interact_regs()->unwind_count; + U64 rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count); + CTRL_Unwind unwind = d_query_cached_unwind_from_thread(thread); + D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr); + U64 rip_voff = d_voff_from_vaddr(module, rip_vaddr); + U64 tls_root_vaddr = ctrl_query_cached_tls_root_vaddr_from_thread(d_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle); + D_EntityList all_modules = d_query_cached_entity_list_with_kind(D_EntityKind_Module); U64 eval_modules_count = Max(1, all_modules.count); E_Module *eval_modules = push_array(arena, E_Module, eval_modules_count); E_Module *eval_modules_primary = &eval_modules[0]; @@ -8484,14 +8405,14 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) DI_Key primary_dbgi_key = {0}; { U64 eval_module_idx = 0; - for(DF_EntityNode *n = all_modules.first; n != 0; n = n->next, eval_module_idx += 1) + for(D_EntityNode *n = all_modules.first; n != 0; n = n->next, eval_module_idx += 1) { - DF_Entity *m = n->entity; - DI_Key dbgi_key = df_dbgi_key_from_module(m); - eval_modules[eval_module_idx].arch = df_architecture_from_entity(m); - eval_modules[eval_module_idx].rdi = di_rdi_from_key(df_state->frame_di_scope, &dbgi_key, 0); + D_Entity *m = n->entity; + DI_Key dbgi_key = d_dbgi_key_from_module(m); + eval_modules[eval_module_idx].arch = d_architecture_from_entity(m); + eval_modules[eval_module_idx].rdi = di_rdi_from_key(d_state->frame_di_scope, &dbgi_key, 0); eval_modules[eval_module_idx].vaddr_range = m->vaddr_rng; - eval_modules[eval_module_idx].space = df_eval_space_from_entity(df_entity_ancestor_from_kind(m, DF_EntityKind_Process)); + eval_modules[eval_module_idx].space = d_eval_space_from_entity(d_entity_ancestor_from_kind(m, D_EntityKind_Process)); if(module == m) { eval_modules_primary = &eval_modules[eval_module_idx]; @@ -8505,10 +8426,10 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) Rng1U64 *rdis_vaddr_ranges = push_array(arena, Rng1U64, rdis_count); { U64 idx = 0; - for(DF_EntityNode *n = all_modules.first; n != 0; n = n->next, idx += 1) + for(D_EntityNode *n = all_modules.first; n != 0; n = n->next, idx += 1) { - DI_Key dbgi_key = df_dbgi_key_from_module(n->entity); - rdis[idx] = di_rdi_from_key(df_state->frame_di_scope, &dbgi_key, 0); + DI_Key dbgi_key = d_dbgi_key_from_module(n->entity); + rdis[idx] = di_rdi_from_key(d_state->frame_di_scope, &dbgi_key, 0); rdis_vaddr_ranges[idx] = n->entity->vaddr_rng; if(n->entity == module) { @@ -8537,14 +8458,14 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) E_ParseCtx *ctx = parse_ctx; ctx->ip_vaddr = rip_vaddr; ctx->ip_voff = rip_voff; - ctx->ip_thread_space = df_eval_space_from_entity(thread); + ctx->ip_thread_space = d_eval_space_from_entity(thread); ctx->modules = eval_modules; ctx->modules_count = eval_modules_count; ctx->primary_module = eval_modules_primary; ctx->regs_map = ctrl_string2reg_from_arch(ctx->primary_module->arch); ctx->reg_alias_map = ctrl_string2alias_from_arch(ctx->primary_module->arch); - ctx->locals_map = df_query_cached_locals_map_from_dbgi_key_voff(&primary_dbgi_key, rip_voff); - ctx->member_map = df_query_cached_member_map_from_dbgi_key_voff(&primary_dbgi_key, rip_voff); + ctx->locals_map = d_query_cached_locals_map_from_dbgi_key_voff(&primary_dbgi_key, rip_voff); + ctx->member_map = d_query_cached_member_map_from_dbgi_key_voff(&primary_dbgi_key, rip_voff); } e_select_parse_ctx(parse_ctx); @@ -8558,7 +8479,7 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) //- rjf: add macros for constants { // rjf: pid -> current process' ID - if(!df_entity_is_nil(process)) + if(!d_entity_is_nil(process)) { E_Expr *expr = e_push_expr(arena, E_ExprKind_LeafU64, 0); expr->value.u64 = process->ctrl_id; @@ -8566,7 +8487,7 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } // rjf: tid -> current thread's ID - if(!df_entity_is_nil(thread)) + if(!d_entity_is_nil(thread)) { E_Expr *expr = e_push_expr(arena, E_ExprKind_LeafU64, 0); expr->value.u64 = thread->ctrl_id; @@ -8591,20 +8512,20 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) .name = str8_lit("Entity"), .members = entity_members_array.v, .count = entity_members_array.count); - DF_EntityKind evallable_kinds[] = + D_EntityKind evallable_kinds[] = { - DF_EntityKind_Breakpoint, - DF_EntityKind_WatchPin, - DF_EntityKind_Target, + D_EntityKind_Breakpoint, + D_EntityKind_WatchPin, + D_EntityKind_Target, }; for(U64 idx = 0; idx < ArrayCount(evallable_kinds); idx += 1) { - DF_EntityList entities = df_query_cached_entity_list_with_kind(evallable_kinds[idx]); - for(DF_EntityNode *n = entities.first; n != 0; n = n->next) + D_EntityList entities = d_query_cached_entity_list_with_kind(evallable_kinds[idx]); + for(D_EntityNode *n = entities.first; n != 0; n = n->next) { - DF_Entity *entity = n->entity; + D_Entity *entity = n->entity; E_Expr *expr = e_push_expr(arena, E_ExprKind_LeafOffset, 0); - expr->space = df_eval_space_from_entity(entity); + expr->space = d_eval_space_from_entity(entity); expr->mode = E_Mode_Offset; expr->type_key = entity_type; e_string2expr_map_insert(arena, ctx->macro_map, push_str8f(arena, "$%I64u", entity->id), expr); @@ -8618,10 +8539,10 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } //- rjf: add macros for all watches which define identifiers - DF_EntityList watches = df_query_cached_entity_list_with_kind(DF_EntityKind_Watch); - for(DF_EntityNode *n = watches.first; n != 0; n = n->next) + D_EntityList watches = d_query_cached_entity_list_with_kind(D_EntityKind_Watch); + for(D_EntityNode *n = watches.first; n != 0; n = n->next) { - DF_Entity *watch = n->entity; + D_Entity *watch = n->entity; String8 expr = watch->name; E_TokenArray tokens = e_token_array_from_text(arena, expr); E_Parse parse = e_parse_expr_from_text_tokens(arena, expr, &tokens); @@ -8637,16 +8558,16 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) E_InterpretCtx *interpret_ctx = push_array(arena, E_InterpretCtx, 1); { E_InterpretCtx *ctx = interpret_ctx; - ctx->space_read = df_eval_space_read; - ctx->space_write = df_eval_space_write; + ctx->space_read = d_eval_space_read; + ctx->space_write = d_eval_space_write; ctx->primary_space = eval_modules_primary->space; ctx->reg_arch = eval_modules_primary->arch; - ctx->reg_space = df_eval_space_from_entity(thread); + ctx->reg_space = d_eval_space_from_entity(thread); ctx->reg_unwind_count = unwind_count; ctx->module_base = push_array(arena, U64, 1); ctx->module_base[0] = module->vaddr_rng.min; ctx->tls_base = push_array(arena, U64, 1); - ctx->tls_base[0] = df_query_cached_tls_base_vaddr_from_process_root_rip(process, tls_root_vaddr, rip_vaddr); + ctx->tls_base[0] = d_query_cached_tls_base_vaddr_from_process_root_rip(process, tls_root_vaddr, rip_vaddr); } e_select_interpret_ctx(interpret_ctx); @@ -8654,73 +8575,73 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) } internal void -df_core_end_frame(void) +d_end_frame(void) { ProfBeginFunction(); //- rjf: entity mutation -> soft halt - if(df_state->entities_mut_soft_halt) + if(d_state->entities_mut_soft_halt) { - df_state->entities_mut_soft_halt = 0; - DF_CmdParams params = df_cmd_params_zero(); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SoftHaltRefresh)); + d_state->entities_mut_soft_halt = 0; + D_CmdParams params = d_cmd_params_zero(); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_SoftHaltRefresh)); } //- rjf: entity mutation -> send refreshed debug info map - if(df_state->entities_mut_dbg_info_map) ProfScope("entity mutation -> send refreshed debug info map") + if(d_state->entities_mut_dbg_info_map) ProfScope("entity mutation -> send refreshed debug info map") { - df_state->entities_mut_dbg_info_map = 0; + d_state->entities_mut_dbg_info_map = 0; // TODO(rjf) } //- rjf: send messages - if(df_state->ctrl_msgs.count != 0) + if(d_state->ctrl_msgs.count != 0) { - if(ctrl_u2c_push_msgs(&df_state->ctrl_msgs, os_now_microseconds()+100)) + if(ctrl_u2c_push_msgs(&d_state->ctrl_msgs, os_now_microseconds()+100)) { - MemoryZeroStruct(&df_state->ctrl_msgs); - arena_clear(df_state->ctrl_msg_arena); + MemoryZeroStruct(&d_state->ctrl_msgs); + arena_clear(d_state->ctrl_msg_arena); } } //- rjf: eliminate entities that are marked for deletion ProfScope("eliminate deleted entities") { - for(DF_Entity *entity = df_entity_root(), *next = 0; !df_entity_is_nil(entity); entity = next) + for(D_Entity *entity = d_entity_root(), *next = 0; !d_entity_is_nil(entity); entity = next) { - next = df_entity_rec_df_pre(entity, &df_g_nil_entity).next; - if(entity->flags & DF_EntityFlag_MarkedForDeletion) + next = d_entity_rec_df_pre(entity, &d_nil_entity).next; + if(entity->flags & D_EntityFlag_MarkedForDeletion) { - B32 undoable = (df_g_entity_kind_flags_table[entity->kind] & DF_EntityKindFlag_UserDefinedLifetime); + B32 undoable = (d_entity_kind_flags_table[entity->kind] & D_EntityKindFlag_UserDefinedLifetime); // rjf: fixup next entity to iterate to - next = df_entity_rec_df(entity, &df_g_nil_entity, OffsetOf(DF_Entity, next), OffsetOf(DF_Entity, next)).next; + next = d_entity_rec_df(entity, &d_nil_entity, OffsetOf(D_Entity, next), OffsetOf(D_Entity, next)).next; // rjf: eliminate root entity if we're freeing it - if(entity == df_state->entities_root) + if(entity == d_state->entities_root) { - df_state->entities_root = &df_g_nil_entity; + d_state->entities_root = &d_nil_entity; } // rjf: unhook & release this entity tree - df_entity_change_parent(entity, entity->parent, &df_g_nil_entity, &df_g_nil_entity); - df_entity_release(entity); + d_entity_change_parent(entity, entity->parent, &d_nil_entity, &d_nil_entity); + d_entity_release(entity); } } } //- rjf: garbage collect eliminated thread unwinds - for(U64 slot_idx = 0; slot_idx < df_state->unwind_cache.slots_count; slot_idx += 1) + for(U64 slot_idx = 0; slot_idx < d_state->unwind_cache.slots_count; slot_idx += 1) { - DF_UnwindCacheSlot *slot = &df_state->unwind_cache.slots[slot_idx]; - for(DF_UnwindCacheNode *n = slot->first, *next = 0; n != 0; n = next) + D_UnwindCacheSlot *slot = &d_state->unwind_cache.slots[slot_idx]; + for(D_UnwindCacheNode *n = slot->first, *next = 0; n != 0; n = next) { next = n->next; - if(df_entity_is_nil(df_entity_from_handle(n->thread))) + if(d_entity_is_nil(d_entity_from_handle(n->thread))) { DLLRemove(slot->first, slot->last, n); arena_release(n->arena); - SLLStackPush(df_state->unwind_cache.free_node, n); + SLLStackPush(d_state->unwind_cache.free_node, n); } } } @@ -8728,21 +8649,21 @@ df_core_end_frame(void) //- rjf: write config changes ProfScope("write config changes") { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) ProfScope("write %.*s config data", str8_varg(df_g_cfg_src_string_table[src])) + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) ProfScope("write %.*s config data", str8_varg(d_cfg_src_string_table[src])) { - if(df_state->cfg_write_issued[src]) + if(d_state->cfg_write_issued[src]) { - df_state->cfg_write_issued[src] = 0; - String8 path = df_cfg_path_from_src(src); - os_write_data_list_to_file_path(path, df_state->cfg_write_data[src]); + d_state->cfg_write_issued[src] = 0; + String8 path = d_cfg_path_from_src(src); + os_write_data_list_to_file_path(path, d_state->cfg_write_data[src]); } - arena_clear(df_state->cfg_write_arenas[src]); - MemoryZeroStruct(&df_state->cfg_write_data[src]); + arena_clear(d_state->cfg_write_arenas[src]); + MemoryZeroStruct(&d_state->cfg_write_data[src]); } } //- rjf: end scopes - di_scope_close(df_state->frame_di_scope); + di_scope_close(d_state->frame_di_scope); ProfEnd(); } diff --git a/src/dbg_engine/dbg_engine_core.h b/src/dbg_engine/dbg_engine_core.h new file mode 100644 index 00000000..fac026a9 --- /dev/null +++ b/src/dbg_engine/dbg_engine_core.h @@ -0,0 +1,1598 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#ifndef DBG_ENGINE_CORE_H +#define DBG_ENGINE_CORE_H + +//////////////////////////////// +//~ rjf: Handles + +typedef struct D_Handle D_Handle; +struct D_Handle +{ + U64 u64[2]; +}; + +typedef struct D_HandleNode D_HandleNode; +struct D_HandleNode +{ + D_HandleNode *next; + D_HandleNode *prev; + D_Handle handle; +}; + +typedef struct D_HandleList D_HandleList; +struct D_HandleList +{ + D_HandleNode *first; + D_HandleNode *last; + U64 count; +}; + +//////////////////////////////// +//~ rjf: Sparse Tree Expansion State Data Structure + +typedef struct D_ExpandKey D_ExpandKey; +struct D_ExpandKey +{ + U64 parent_hash; + U64 child_num; +}; + +typedef struct D_ExpandNode D_ExpandNode; +struct D_ExpandNode +{ + D_ExpandNode *hash_next; + D_ExpandNode *hash_prev; + D_ExpandNode *first; + D_ExpandNode *last; + D_ExpandNode *next; + D_ExpandNode *prev; + D_ExpandNode *parent; + D_ExpandKey key; + B32 expanded; +}; + +typedef struct D_ExpandSlot D_ExpandSlot; +struct D_ExpandSlot +{ + D_ExpandNode *first; + D_ExpandNode *last; +}; + +typedef struct D_ExpandTreeTable D_ExpandTreeTable; +struct D_ExpandTreeTable +{ + D_ExpandSlot *slots; + U64 slots_count; + D_ExpandNode *free_node; +}; + +//////////////////////////////// +//~ rjf: Entity Kind Flags + +typedef U32 D_EntityKindFlags; +enum +{ + //- rjf: allowed operations + D_EntityKindFlag_CanDelete = (1<<8), + D_EntityKindFlag_CanFreeze = (1<<9), + D_EntityKindFlag_CanEdit = (1<<10), + D_EntityKindFlag_CanRename = (1<<11), + D_EntityKindFlag_CanEnable = (1<<12), + D_EntityKindFlag_CanCondition = (1<<13), + D_EntityKindFlag_CanDuplicate = (1<<14), + + //- rjf: mutation -> cascading effects + D_EntityKindFlag_LeafMutUserConfig = (1<<0), + D_EntityKindFlag_TreeMutUserConfig = (1<<1), + D_EntityKindFlag_LeafMutProjectConfig = (1<<2), + D_EntityKindFlag_TreeMutProjectConfig = (1<<3), + D_EntityKindFlag_LeafMutSoftHalt = (1<<4), + D_EntityKindFlag_TreeMutSoftHalt = (1<<5), + D_EntityKindFlag_LeafMutDebugInfoMap = (1<<6), + D_EntityKindFlag_TreeMutDebugInfoMap = (1<<7), + + //- rjf: name categorization + D_EntityKindFlag_NameIsCode = (1<<15), + D_EntityKindFlag_NameIsPath = (1<<16), + + //- rjf: lifetime categorization + D_EntityKindFlag_UserDefinedLifetime = (1<<17), + + //- rjf: serialization + D_EntityKindFlag_IsSerializedToConfig = (1<<18), +}; + +//////////////////////////////// +//~ rjf: Entity Filesystem Lookup Flags + +typedef U32 D_EntityFromPathFlags; +enum +{ + D_EntityFromPathFlag_AllowOverrides = (1<<0), + D_EntityFromPathFlag_OpenAsNeeded = (1<<1), + D_EntityFromPathFlag_OpenMissing = (1<<2), + D_EntityFromPathFlag_All = 0xffffffff, +}; + +//////////////////////////////// +//~ rjf: Debug Engine Control Communication Types + +typedef enum D_RunKind +{ + D_RunKind_Run, + D_RunKind_SingleStep, + D_RunKind_Step, + D_RunKind_COUNT +} +D_RunKind; + +//////////////////////////////// +//~ rjf: Control Flow Analysis Types + +typedef U32 D_CtrlFlowFlags; +enum +{ + D_CtrlFlowFlag_StackPointerChangesVariably = (1<<0), +}; + +typedef struct D_CtrlFlowPoint D_CtrlFlowPoint; +struct D_CtrlFlowPoint +{ + U64 vaddr; + U64 jump_dest_vaddr; + DASM_InstFlags inst_flags; +}; + +typedef struct D_CtrlFlowPointNode D_CtrlFlowPointNode; +struct D_CtrlFlowPointNode +{ + D_CtrlFlowPointNode *next; + D_CtrlFlowPoint v; +}; + +typedef struct D_CtrlFlowPointList D_CtrlFlowPointList; +struct D_CtrlFlowPointList +{ + D_CtrlFlowPointNode *first; + D_CtrlFlowPointNode *last; + U64 count; +}; + +typedef struct D_CtrlFlowInfo D_CtrlFlowInfo; +struct D_CtrlFlowInfo +{ + D_CtrlFlowFlags flags; + D_CtrlFlowPointList exit_points; + U64 total_size; +}; + +//////////////////////////////// +//~ rjf: View Rule Hook Types + +typedef struct D_CfgTree D_CfgTree; +typedef struct D_CfgVal D_CfgVal; +typedef struct D_CfgTable D_CfgTable; +typedef struct D_EvalView D_EvalView; +typedef struct D_EvalVizBlockList D_EvalVizBlockList; +#define D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_SIG(name) E_Expr *name(Arena *arena, E_Expr *expr, MD_Node *params) +#define D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(name) d_core_view_rule_expr_resolution__##name +#define D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(name) internal D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_SIG(D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(name)) +#define D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_SIG(name) void name(Arena *arena, \ +D_EvalView *eval_view, \ +D_ExpandKey parent_key, \ +D_ExpandKey key, \ +D_ExpandNode *expand_node, \ +String8 string, \ +E_Expr *expr, \ +D_CfgTable *cfg_table, \ +S32 depth, \ +MD_Node *params, \ +struct D_EvalVizBlockList *out) +#define D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(name) d_core_view_rule_viz_block_prod__##name +#define D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(name) internal D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_SIG(D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(name)) +typedef D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_SIG(D_CoreViewRuleExprResolutionHookFunctionType); +typedef D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_SIG(D_CoreViewRuleVizBlockProdHookFunctionType); + +//////////////////////////////// +//~ rjf: Generated Code + +#include "dbg_engine/generated/dbg_engine.meta.h" + +//////////////////////////////// +//~ rjf: Config Types + +typedef struct D_CfgTree D_CfgTree; +struct D_CfgTree +{ + D_CfgTree *next; + D_CfgSrc source; + MD_Node *root; +}; + +typedef struct D_CfgVal D_CfgVal; +struct D_CfgVal +{ + D_CfgVal *hash_next; + D_CfgVal *linear_next; + D_CfgTree *first; + D_CfgTree *last; + U64 insertion_stamp; + String8 string; +}; + +typedef struct D_CfgSlot D_CfgSlot; +struct D_CfgSlot +{ + D_CfgVal *first; +}; + +typedef struct D_CfgTable D_CfgTable; +struct D_CfgTable +{ + U64 slot_count; + D_CfgSlot *slots; + U64 insertion_stamp_counter; + D_CfgVal *first_val; + D_CfgVal *last_val; +}; + +//////////////////////////////// +//~ rjf: View Rules + +typedef U32 D_ViewRuleSpecInfoFlags; // NOTE(rjf): see @view_rule_info +enum +{ + D_ViewRuleSpecInfoFlag_Inherited = (1<<0), + D_ViewRuleSpecInfoFlag_Expandable = (1<<1), + D_ViewRuleSpecInfoFlag_ExprResolution = (1<<2), + D_ViewRuleSpecInfoFlag_VizBlockProd = (1<<3), +}; + +typedef struct D_ViewRuleSpecInfo D_ViewRuleSpecInfo; +struct D_ViewRuleSpecInfo +{ + String8 string; + String8 display_string; + String8 schema; + String8 description; + D_ViewRuleSpecInfoFlags flags; + D_CoreViewRuleExprResolutionHookFunctionType *expr_resolution; + D_CoreViewRuleVizBlockProdHookFunctionType *viz_block_prod; +}; + +typedef struct D_ViewRuleSpecInfoArray D_ViewRuleSpecInfoArray; +struct D_ViewRuleSpecInfoArray +{ + D_ViewRuleSpecInfo *v; + U64 count; +}; + +typedef struct D_ViewRuleSpec D_ViewRuleSpec; +struct D_ViewRuleSpec +{ + D_ViewRuleSpec *hash_next; + D_ViewRuleSpecInfo info; +}; + +//////////////////////////////// +//~ rjf: Entity Types + +typedef U32 D_EntityFlags; +enum +{ + //- rjf: allocationless, simple equipment + D_EntityFlag_HasTextPoint = (1<<0), + D_EntityFlag_HasEntityHandle = (1<<2), + D_EntityFlag_HasU64 = (1<<4), + D_EntityFlag_HasColor = (1<<6), + D_EntityFlag_DiesOnRunStop = (1<<8), + + //- rjf: ctrl entity equipment + D_EntityFlag_HasCtrlMachineID = (1<<9), + D_EntityFlag_HasCtrlHandle = (1<<10), + D_EntityFlag_HasArch = (1<<11), + D_EntityFlag_HasCtrlID = (1<<12), + D_EntityFlag_HasStackBase = (1<<13), + D_EntityFlag_HasTLSRoot = (1<<14), + D_EntityFlag_HasVAddrRng = (1<<15), + D_EntityFlag_HasVAddr = (1<<16), + + //- rjf: file properties + D_EntityFlag_IsFolder = (1<<17), + D_EntityFlag_IsMissing = (1<<18), + + //- rjf: deletion + D_EntityFlag_MarkedForDeletion = (1<<31), +}; + +typedef U64 D_EntityID; + +typedef struct D_Entity D_Entity; +struct D_Entity +{ + // rjf: tree links + D_Entity *first; + D_Entity *last; + D_Entity *next; + D_Entity *prev; + D_Entity *parent; + + // rjf: metadata + D_EntityKind kind; + D_EntityFlags flags; + D_EntityID id; + U64 gen; + U64 alloc_time_us; + F32 alive_t; + + // rjf: basic equipment + TxtPt text_point; + D_Handle entity_handle; + B32 disabled; + U64 u64; + Vec4F32 color_hsva; + F32 life_left; + D_CfgSrc cfg_src; + U64 timestamp; + + // rjf: ctrl equipment + CTRL_MachineID ctrl_machine_id; + DMN_Handle ctrl_handle; + Architecture arch; + U32 ctrl_id; + U64 stack_base; + Rng1U64 vaddr_rng; + U64 vaddr; + + // rjf: name equipment + String8 name; +}; + +typedef struct D_EntityNode D_EntityNode; +struct D_EntityNode +{ + D_EntityNode *next; + D_Entity *entity; +}; + +typedef struct D_EntityList D_EntityList; +struct D_EntityList +{ + D_EntityNode *first; + D_EntityNode *last; + U64 count; +}; + +typedef struct D_EntityArray D_EntityArray; +struct D_EntityArray +{ + D_Entity **v; + U64 count; +}; + +typedef struct D_EntityRec D_EntityRec; +struct D_EntityRec +{ + D_Entity *next; + S32 push_count; + S32 pop_count; +}; + +//////////////////////////////// +//~ rjf: Entity Evaluation Types + +typedef struct D_EntityEval D_EntityEval; +struct D_EntityEval +{ + B64 enabled; + U64 hit_count; + U64 label_off; + U64 location_off; + U64 condition_off; +}; + +//////////////////////////////// +//~ rjf: Entity Fuzzy Listing Types + +typedef struct D_EntityFuzzyItem D_EntityFuzzyItem; +struct D_EntityFuzzyItem +{ + D_Entity *entity; + FuzzyMatchRangeList matches; +}; + +typedef struct D_EntityFuzzyItemArray D_EntityFuzzyItemArray; +struct D_EntityFuzzyItemArray +{ + D_EntityFuzzyItem *v; + U64 count; +}; + +//////////////////////////////// +//~ rjf: Rich (Including Inline) Unwind Types + +typedef struct D_UnwindInlineFrame D_UnwindInlineFrame; +struct D_UnwindInlineFrame +{ + D_UnwindInlineFrame *next; + D_UnwindInlineFrame *prev; + RDI_InlineSite *inline_site; +}; + +typedef struct D_UnwindFrame D_UnwindFrame; +struct D_UnwindFrame +{ + D_UnwindInlineFrame *first_inline_frame; + D_UnwindInlineFrame *last_inline_frame; + U64 inline_frame_count; + void *regs; + RDI_Parsed *rdi; + RDI_Procedure *procedure; +}; + +typedef struct D_UnwindFrameArray D_UnwindFrameArray; +struct D_UnwindFrameArray +{ + D_UnwindFrame *v; + U64 concrete_frame_count; + U64 inline_frame_count; + U64 total_frame_count; +}; + +typedef struct D_Unwind D_Unwind; +struct D_Unwind +{ + D_UnwindFrameArray frames; +}; + +//////////////////////////////// +//~ rjf: Line Info Types + +typedef struct D_Line D_Line; +struct D_Line +{ + String8 file_path; + TxtPt pt; + Rng1U64 voff_range; + DI_Key dbgi_key; +}; + +typedef struct D_LineNode D_LineNode; +struct D_LineNode +{ + D_LineNode *next; + D_Line v; +}; + +typedef struct D_LineList D_LineList; +struct D_LineList +{ + D_LineNode *first; + D_LineNode *last; + U64 count; +}; + +typedef struct D_LineListArray D_LineListArray; +struct D_LineListArray +{ + D_LineList *v; + U64 count; + DI_KeyList dbgi_keys; +}; + +//////////////////////////////// +//~ rjf: Interaction Context Register Types + +typedef struct D_InteractRegs D_InteractRegs; +struct D_InteractRegs +{ + D_Handle module; + D_Handle process; + D_Handle thread; + U64 unwind_count; + U64 inline_depth; + D_Handle window; + D_Handle panel; + D_Handle view; + String8 file_path; + TxtPt cursor; + TxtPt mark; + U128 text_key; + TXT_LangKind lang_kind; + Rng1U64 vaddr_range; + Rng1U64 voff_range; + D_LineList lines; + DI_Key dbgi_key; +}; + +typedef struct D_InteractRegsNode D_InteractRegsNode; +struct D_InteractRegsNode +{ + D_InteractRegsNode *next; + D_InteractRegs v; +}; + +//////////////////////////////// +//~ rjf: Evaluation Visualization Types + +//- rjf: expansion key -> view rule table + +typedef struct D_EvalViewRuleCacheNode D_EvalViewRuleCacheNode; +struct D_EvalViewRuleCacheNode +{ + D_EvalViewRuleCacheNode *hash_next; + D_EvalViewRuleCacheNode *hash_prev; + D_ExpandKey key; + U8 *buffer; + U64 buffer_cap; + U64 buffer_string_size; +}; + +typedef struct D_EvalViewRuleCacheSlot D_EvalViewRuleCacheSlot; +struct D_EvalViewRuleCacheSlot +{ + D_EvalViewRuleCacheNode *first; + D_EvalViewRuleCacheNode *last; +}; + +typedef struct D_EvalViewRuleCacheTable D_EvalViewRuleCacheTable; +struct D_EvalViewRuleCacheTable +{ + U64 slot_count; + D_EvalViewRuleCacheSlot *slots; +}; + +//- rjf: 'eval view' entities for sparse-state expandable tree view cache for evaluation visualization + +typedef struct D_EvalViewKey D_EvalViewKey; +struct D_EvalViewKey +{ + U64 u64[2]; +}; + +typedef struct D_EvalView D_EvalView; +struct D_EvalView +{ + // rjf: links + D_EvalView *hash_next; + D_EvalView *hash_prev; + + // rjf: key + D_EvalViewKey key; + + // rjf: arena + Arena *arena; + + // rjf: expansion state + D_ExpandTreeTable expand_tree_table; + + // rjf: key -> view rule cache + D_EvalViewRuleCacheTable view_rule_table; +}; + +typedef struct D_EvalViewSlot D_EvalViewSlot; +struct D_EvalViewSlot +{ + D_EvalView *first; + D_EvalView *last; +}; + +typedef struct D_EvalViewCache D_EvalViewCache; +struct D_EvalViewCache +{ + D_EvalViewSlot *slots; + U64 slots_count; +}; + +//- rjf: eval view visualization building + +typedef struct D_EvalLinkBase D_EvalLinkBase; +struct D_EvalLinkBase +{ + U64 offset; +}; + +typedef struct D_EvalLinkBaseChunkNode D_EvalLinkBaseChunkNode; +struct D_EvalLinkBaseChunkNode +{ + D_EvalLinkBaseChunkNode *next; + D_EvalLinkBase b[64]; + U64 count; +}; + +typedef struct D_EvalLinkBaseChunkList D_EvalLinkBaseChunkList; +struct D_EvalLinkBaseChunkList +{ + D_EvalLinkBaseChunkNode *first; + D_EvalLinkBaseChunkNode *last; + U64 count; +}; + +typedef struct D_EvalLinkBaseArray D_EvalLinkBaseArray; +struct D_EvalLinkBaseArray +{ + D_EvalLinkBase *v; + U64 count; +}; + +typedef enum D_EvalVizBlockKind +{ + D_EvalVizBlockKind_Null, // empty + D_EvalVizBlockKind_Root, // root of tree or subtree; possibly-expandable expression. + D_EvalVizBlockKind_Members, // members of struct, class, union + D_EvalVizBlockKind_EnumMembers, // members of enum + D_EvalVizBlockKind_Elements, // elements of array + D_EvalVizBlockKind_Canvas, // escape hatch for arbitrary UI + D_EvalVizBlockKind_DebugInfoTable, // block of filtered debug info table elements + D_EvalVizBlockKind_COUNT, +} +D_EvalVizBlockKind; + +typedef struct D_EvalVizBlock D_EvalVizBlock; +struct D_EvalVizBlock +{ + // rjf: kind & keys + D_EvalVizBlockKind kind; + D_ExpandKey parent_key; + D_ExpandKey key; + S32 depth; + + // rjf: evaluation info + String8 string; + E_Expr *expr; + + // rjf: info about ranges that this block spans + Rng1U64 visual_idx_range; + Rng1U64 semantic_idx_range; + + // rjf: visualization config extensions + D_CfgTable *cfg_table; + D_EvalLinkBaseChunkList *link_bases; + E_MemberArray members; + E_EnumValArray enum_vals; + RDI_SectionKind fzy_target; + FZY_ItemArray fzy_backing_items; +}; + +typedef struct D_EvalVizBlockNode D_EvalVizBlockNode; +struct D_EvalVizBlockNode +{ + D_EvalVizBlockNode *next; + D_EvalVizBlock v; +}; + +typedef struct D_EvalVizBlockList D_EvalVizBlockList; +struct D_EvalVizBlockList +{ + D_EvalVizBlockNode *first; + D_EvalVizBlockNode *last; + U64 count; + U64 total_visual_row_count; + U64 total_semantic_row_count; +}; + +typedef struct D_EvalVizBlockArray D_EvalVizBlockArray; +struct D_EvalVizBlockArray +{ + D_EvalVizBlock *v; + U64 count; + U64 total_visual_row_count; + U64 total_semantic_row_count; +}; + +typedef U32 D_EvalVizStringFlags; +enum +{ + D_EvalVizStringFlag_ReadOnlyDisplayRules = (1<<0), +}; + +typedef struct D_EvalVizRow D_EvalVizRow; +struct D_EvalVizRow +{ + D_EvalVizRow *next; + + // rjf: block hierarchy info + S32 depth; + D_ExpandKey parent_key; + D_ExpandKey key; + + // rjf: row size/scroll info + U64 size_in_rows; + U64 skipped_size_in_rows; + U64 chopped_size_in_rows; + + // rjf: evaluation expression + String8 string; + E_Member *member; + E_Expr *expr; + + // rjf: view rule attachments + D_CfgTable *cfg_table; + struct DF_GfxViewRuleSpec *expand_ui_rule_spec; + MD_Node *expand_ui_rule_params; + struct DF_GfxViewRuleSpec *value_ui_rule_spec; + MD_Node *value_ui_rule_params; +}; + +typedef struct D_EvalVizWindowedRowList D_EvalVizWindowedRowList; +struct D_EvalVizWindowedRowList +{ + D_EvalVizRow *first; + D_EvalVizRow *last; + U64 count; + U64 count_before_visual; + U64 count_before_semantic; +}; + +//////////////////////////////// +//~ rjf: Command Specification Types + +typedef U32 D_CmdQueryFlags; +enum +{ + D_CmdQueryFlag_AllowFiles = (1<<0), + D_CmdQueryFlag_AllowFolders = (1<<1), + D_CmdQueryFlag_CodeInput = (1<<2), + D_CmdQueryFlag_KeepOldInput = (1<<3), + D_CmdQueryFlag_SelectOldInput = (1<<4), + D_CmdQueryFlag_Required = (1<<5), +}; + +typedef struct D_CmdQuery D_CmdQuery; +struct D_CmdQuery +{ + D_CmdParamSlot slot; + D_EntityKind entity_kind; + D_CmdQueryFlags flags; +}; + +typedef U32 D_CmdSpecFlags; +enum +{ + D_CmdSpecFlag_ListInUI = (1<<0), + D_CmdSpecFlag_ListInIPCDocs = (1<<1), +}; + +typedef struct D_CmdSpecInfo D_CmdSpecInfo; +struct D_CmdSpecInfo +{ + String8 string; + String8 description; + String8 search_tags; + String8 display_name; + D_CmdSpecFlags flags; + D_CmdQuery query; + DF_IconKind canonical_icon_kind; +}; + +typedef struct D_CmdSpec D_CmdSpec; +struct D_CmdSpec +{ + D_CmdSpec *hash_next; + D_CmdSpecInfo info; + U64 registrar_index; + U64 ordering_index; + U64 run_count; +}; + +typedef struct D_CmdSpecNode D_CmdSpecNode; +struct D_CmdSpecNode +{ + D_CmdSpecNode *next; + D_CmdSpec *spec; +}; + +typedef struct D_CmdSpecList D_CmdSpecList; +struct D_CmdSpecList +{ + D_CmdSpecNode *first; + D_CmdSpecNode *last; + U64 count; +}; + +typedef struct D_CmdSpecArray D_CmdSpecArray; +struct D_CmdSpecArray +{ + D_CmdSpec **v; + U64 count; +}; + +typedef struct D_CmdSpecInfoArray D_CmdSpecInfoArray; +struct D_CmdSpecInfoArray +{ + D_CmdSpecInfo *v; + U64 count; +}; + +//////////////////////////////// +//~ rjf: Command Types + +typedef struct D_Cmd D_Cmd; +struct D_Cmd +{ + D_CmdParams params; + D_CmdSpec *spec; +}; + +typedef struct D_CmdNode D_CmdNode; +struct D_CmdNode +{ + D_CmdNode *next; + D_CmdNode *prev; + D_Cmd cmd; +}; + +typedef struct D_CmdList D_CmdList; +struct D_CmdList +{ + D_CmdNode *first; + D_CmdNode *last; + U64 count; +}; + +//////////////////////////////// +//~ rjf: Main State Caches + +//- rjf: per-entity-kind state cache + +typedef struct D_EntityListCache D_EntityListCache; +struct D_EntityListCache +{ + Arena *arena; + U64 alloc_gen; + D_EntityList list; +}; + +//- rjf: auto view rules hash table cache + +typedef struct D_AutoViewRuleNode D_AutoViewRuleNode; +struct D_AutoViewRuleNode +{ + D_AutoViewRuleNode *next; + String8 type; + String8 view_rule; +}; + +typedef struct D_AutoViewRuleSlot D_AutoViewRuleSlot; +struct D_AutoViewRuleSlot +{ + D_AutoViewRuleNode *first; + D_AutoViewRuleNode *last; +}; + +typedef struct D_AutoViewRuleMapCache D_AutoViewRuleMapCache; +struct D_AutoViewRuleMapCache +{ + Arena *arena; + U64 slots_count; + D_AutoViewRuleSlot *slots; +}; + +//- rjf: per-thread unwind cache + +typedef struct D_UnwindCacheNode D_UnwindCacheNode; +struct D_UnwindCacheNode +{ + D_UnwindCacheNode *next; + D_UnwindCacheNode *prev; + U64 reggen; + U64 memgen; + Arena *arena; + D_Handle thread; + CTRL_Unwind unwind; +}; + +typedef struct D_UnwindCacheSlot D_UnwindCacheSlot; +struct D_UnwindCacheSlot +{ + D_UnwindCacheNode *first; + D_UnwindCacheNode *last; +}; + +typedef struct D_UnwindCache D_UnwindCache; +struct D_UnwindCache +{ + U64 slots_count; + D_UnwindCacheSlot *slots; + D_UnwindCacheNode *free_node; +}; + +//- rjf: per-run tls-base-vaddr cache + +typedef struct D_RunTLSBaseCacheNode D_RunTLSBaseCacheNode; +struct D_RunTLSBaseCacheNode +{ + D_RunTLSBaseCacheNode *hash_next; + D_Handle process; + U64 root_vaddr; + U64 rip_vaddr; + U64 tls_base_vaddr; +}; + +typedef struct D_RunTLSBaseCacheSlot D_RunTLSBaseCacheSlot; +struct D_RunTLSBaseCacheSlot +{ + D_RunTLSBaseCacheNode *first; + D_RunTLSBaseCacheNode *last; +}; + +typedef struct D_RunTLSBaseCache D_RunTLSBaseCache; +struct D_RunTLSBaseCache +{ + Arena *arena; + U64 slots_count; + D_RunTLSBaseCacheSlot *slots; +}; + +//- rjf: per-run locals cache + +typedef struct D_RunLocalsCacheNode D_RunLocalsCacheNode; +struct D_RunLocalsCacheNode +{ + D_RunLocalsCacheNode *hash_next; + DI_Key dbgi_key; + U64 voff; + E_String2NumMap *locals_map; +}; + +typedef struct D_RunLocalsCacheSlot D_RunLocalsCacheSlot; +struct D_RunLocalsCacheSlot +{ + D_RunLocalsCacheNode *first; + D_RunLocalsCacheNode *last; +}; + +typedef struct D_RunLocalsCache D_RunLocalsCache; +struct D_RunLocalsCache +{ + Arena *arena; + U64 table_size; + D_RunLocalsCacheSlot *table; +}; + +//////////////////////////////// +//~ rjf: State Delta History Types + +typedef struct D_StateDeltaParams D_StateDeltaParams; +struct D_StateDeltaParams +{ + void *ptr; + U64 size; + D_Entity *guard_entity; +}; + +typedef struct D_StateDelta D_StateDelta; +struct D_StateDelta +{ + D_Handle guard_entity; + U64 vaddr; + String8 data; +}; + +typedef struct D_StateDeltaNode D_StateDeltaNode; +struct D_StateDeltaNode +{ + D_StateDeltaNode *next; + D_StateDelta v; +}; + +typedef struct D_StateDeltaBatch D_StateDeltaBatch; +struct D_StateDeltaBatch +{ + D_StateDeltaBatch *next; + D_StateDeltaNode *first; + D_StateDeltaNode *last; +}; + +typedef struct D_StateDeltaHistory D_StateDeltaHistory; +struct D_StateDeltaHistory +{ + Arena *arena; + Arena *side_arenas[Side_COUNT]; // min -> undo; max -> redo + D_StateDeltaBatch *side_tops[Side_COUNT]; + B32 batch_is_active; +}; + +//////////////////////////////// +//~ rjf: Main State Types + +//- rjf: name allocator types + +typedef struct D_NameChunkNode D_NameChunkNode; +struct D_NameChunkNode +{ + D_NameChunkNode *next; + U64 size; +}; + +//- rjf: core bundle state type + +typedef struct D_State D_State; +struct D_State +{ + // rjf: top-level state + Arena *arena; + U64 frame_index; + U64 frame_eval_memread_endt_us; + F64 time_in_seconds; + F32 dt; + F32 seconds_til_autosave; + + // rjf: frame info + Arena *frame_arenas[2]; + DI_Scope *frame_di_scope; + + // rjf: interaction registers + D_InteractRegsNode base_interact_regs; + D_InteractRegsNode *top_interact_regs; + + // rjf: top-level command batch + Arena *root_cmd_arena; + D_CmdList root_cmds; + + // rjf: output log key + U128 output_log_key; + + // rjf: history cache + D_StateDeltaHistory *hist; + + // rjf: name allocator + D_NameChunkNode *free_name_chunks[8]; + + // rjf: entity state + Arena *entities_arena; + D_Entity *entities_base; + U64 entities_count; + U64 entities_id_gen; + D_Entity *entities_root; + D_Entity *entities_free[2]; // [0] -> normal lifetime, not user defined; [1] -> user defined lifetime (& thus undoable) + U64 entities_free_count; + U64 entities_active_count; + B32 entities_mut_soft_halt; + B32 entities_mut_dbg_info_map; + + // rjf: entity query caches + U64 kind_alloc_gens[D_EntityKind_COUNT]; + D_EntityListCache kind_caches[D_EntityKind_COUNT]; + D_AutoViewRuleMapCache auto_view_rule_cache; + + // rjf: per-run caches + D_UnwindCache unwind_cache; + U64 tls_base_cache_reggen_idx; + U64 tls_base_cache_memgen_idx; + D_RunTLSBaseCache tls_base_caches[2]; + U64 tls_base_cache_gen; + U64 locals_cache_reggen_idx; + D_RunLocalsCache locals_caches[2]; + U64 locals_cache_gen; + U64 member_cache_reggen_idx; + D_RunLocalsCache member_caches[2]; + U64 member_cache_gen; + + // rjf: eval view cache + D_EvalViewCache eval_view_cache; + + // rjf: command specification table + U64 total_registrar_count; + U64 cmd_spec_table_size; + D_CmdSpec **cmd_spec_table; + + // rjf: view rule specification table + U64 view_rule_spec_table_size; + D_ViewRuleSpec **view_rule_spec_table; + + // rjf: freeze state + D_HandleList frozen_threads; + D_HandleNode *free_handle_node; + + // rjf: control thread user -> ctrl driving state + Arena *ctrl_last_run_arena; + D_RunKind ctrl_last_run_kind; + U64 ctrl_last_run_frame_idx; + D_Handle ctrl_last_run_thread; + CTRL_RunFlags ctrl_last_run_flags; + CTRL_TrapList ctrl_last_run_traps; + B32 ctrl_is_running; + B32 ctrl_soft_halt_issued; + Arena *ctrl_msg_arena; + CTRL_MsgList ctrl_msgs; + U64 ctrl_exception_code_filters[(CTRL_ExceptionCodeKind_COUNT+63)/64]; + + // rjf: control thread ctrl -> user reading state + CTRL_EntityStore *ctrl_entity_store; + Arena *ctrl_stop_arena; + CTRL_Event ctrl_last_stop_event; + + // rjf: config reading state + Arena *cfg_path_arenas[D_CfgSrc_COUNT]; + String8 cfg_paths[D_CfgSrc_COUNT]; + U64 cfg_cached_timestamp[D_CfgSrc_COUNT]; + Arena *cfg_arena; + D_CfgTable cfg_table; + + // rjf: config writing state + B32 cfg_write_issued[D_CfgSrc_COUNT]; + Arena *cfg_write_arenas[D_CfgSrc_COUNT]; + String8List cfg_write_data[D_CfgSrc_COUNT]; + + // rjf: current path + Arena *current_path_arena; + String8 current_path; +}; + +//////////////////////////////// +//~ rjf: Globals + +read_only global D_CmdSpec d_nil_cmd_spec = {0}; +read_only global D_ViewRuleSpec d_nil_core_view_rule_spec = {0}; +read_only global D_CfgTree d_nil_cfg_tree = {&d_nil_cfg_tree, D_CfgSrc_User, &md_nil_node}; +read_only global D_CfgVal d_nil_cfg_val = {&d_nil_cfg_val, &d_nil_cfg_val, &d_nil_cfg_tree, &d_nil_cfg_tree}; +read_only global D_CfgTable d_nil_cfg_table = {0, 0, 0, &d_nil_cfg_val, &d_nil_cfg_val}; +read_only global D_Entity d_nil_entity = +{ + &d_nil_entity, + &d_nil_entity, + &d_nil_entity, + &d_nil_entity, + &d_nil_entity, +}; +read_only global D_EvalView d_nil_eval_view = {&d_nil_eval_view, &d_nil_eval_view}; + +global D_State *d_state = 0; + +//////////////////////////////// +//~ rjf: Basic Helpers + +internal U64 d_hash_from_seed_string(U64 seed, String8 string); +internal U64 d_hash_from_string(String8 string); +internal U64 d_hash_from_seed_string__case_insensitive(U64 seed, String8 string); +internal U64 d_hash_from_string__case_insensitive(String8 string); + +//////////////////////////////// +//~ rjf: Handle Type Pure Functions + +internal D_Handle d_handle_zero(void); +internal B32 d_handle_match(D_Handle a, D_Handle b); +internal void d_handle_list_push_node(D_HandleList *list, D_HandleNode *node); +internal void d_handle_list_push(Arena *arena, D_HandleList *list, D_Handle handle); +internal void d_handle_list_remove(D_HandleList *list, D_HandleNode *node); +internal D_HandleNode *d_handle_list_find(D_HandleList *list, D_Handle handle); +internal D_HandleList d_push_handle_list_copy(Arena *arena, D_HandleList list); + +//////////////////////////////// +//~ rjf: State History Data Structure + +internal D_StateDeltaHistory *d_state_delta_history_alloc(void); +internal void d_state_delta_history_release(D_StateDeltaHistory *hist); +internal void d_state_delta_history_batch_begin(D_StateDeltaHistory *hist); +internal void d_state_delta_history_batch_end(D_StateDeltaHistory *hist); +#define D_StateDeltaHistoryBatch(hist) DeferLoop(d_state_delta_history_batch_begin(hist), d_state_delta_history_batch_end(hist)) +internal void d_state_delta_history_push_delta_(D_StateDeltaHistory *hist, D_StateDeltaParams *params); +#define d_state_delta_history_push_delta(hist, ...) d_state_delta_history_push_delta_((hist), &(D_StateDeltaParams){.size = 1, __VA_ARGS__}) +#define d_state_delta_history_push_struct_delta(hist, sptr, ...) d_state_delta_history_push_delta((hist), .ptr = (sptr), .size = sizeof(*(sptr)), __VA_ARGS__) +internal void d_state_delta_history_wind(D_StateDeltaHistory *hist, Side side); + +//////////////////////////////// +//~ rjf: Sparse Tree Expansion State Data Structure + +//- rjf: keys +internal D_ExpandKey d_expand_key_make(U64 parent_hash, U64 child_num); +internal D_ExpandKey d_expand_key_zero(void); +internal B32 d_expand_key_match(D_ExpandKey a, D_ExpandKey b); + +//- rjf: table +internal void d_expand_tree_table_init(Arena *arena, D_ExpandTreeTable *table, U64 slot_count); +internal D_ExpandNode *d_expand_node_from_key(D_ExpandTreeTable *table, D_ExpandKey key); +internal B32 d_expand_key_is_set(D_ExpandTreeTable *table, D_ExpandKey key); +internal void d_expand_set_expansion(Arena *arena, D_ExpandTreeTable *table, D_ExpandKey parent_key, D_ExpandKey key, B32 expanded); + +//////////////////////////////// +//~ rjf: Config Type Pure Functions + +internal void d_cfg_table_push_unparsed_string(Arena *arena, D_CfgTable *table, String8 string, D_CfgSrc source); +internal D_CfgTable d_cfg_table_from_inheritance(Arena *arena, D_CfgTable *src); +internal D_CfgVal *d_cfg_val_from_string(D_CfgTable *table, String8 string); + +//////////////////////////////// +//~ rjf: Debug Info Extraction Type Pure Functions + +internal D_LineList d_line_list_copy(Arena *arena, D_LineList *list); + +//////////////////////////////// +//~ rjf: Control Flow Analysis Pure Functions + +internal D_CtrlFlowInfo d_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DASM_InstFlags exit_points_mask, Architecture arch, U64 vaddr, String8 code); + +//////////////////////////////// +//~ rjf: Command Type Pure Functions + +//- rjf: specs +internal B32 d_cmd_spec_is_nil(D_CmdSpec *spec); +internal void d_cmd_spec_list_push(Arena *arena, D_CmdSpecList *list, D_CmdSpec *spec); + +//- rjf: string -> command parsing +internal String8 d_cmd_name_part_from_string(String8 string); +internal String8 d_cmd_arg_part_from_string(String8 string); + +//- rjf: command parameter bundles +internal D_CmdParams d_cmd_params_zero(void); +internal void d_cmd_params_mark_slot(D_CmdParams *params, D_CmdParamSlot slot); +internal B32 d_cmd_params_has_slot(D_CmdParams *params, D_CmdParamSlot slot); +internal String8 d_cmd_params_apply_spec_query(Arena *arena, D_CmdParams *params, D_CmdSpec *spec, String8 query); + +//- rjf: command lists +internal void d_cmd_list_push(Arena *arena, D_CmdList *cmds, D_CmdParams *params, D_CmdSpec *spec); + +//- rjf: string -> core layer command kind +internal D_CmdKind d_cmd_kind_from_string(String8 string); + +//////////////////////////////// +//~ rjf: Entity Type Pure Functions + +//- rjf: nil +internal B32 d_entity_is_nil(D_Entity *entity); +#define d_require_entity_nonnil(entity, if_nil_stmts) do{if(d_entity_is_nil(entity)){if_nil_stmts;}}while(0) + +//- rjf: handle <-> entity conversions +internal U64 d_index_from_entity(D_Entity *entity); +internal D_Handle d_handle_from_entity(D_Entity *entity); +internal D_Entity *d_entity_from_handle(D_Handle handle); +internal D_EntityList d_entity_list_from_handle_list(Arena *arena, D_HandleList handles); +internal D_HandleList d_handle_list_from_entity_list(Arena *arena, D_EntityList entities); + +//- rjf: entity recursion iterators +internal D_EntityRec d_entity_rec_df(D_Entity *entity, D_Entity *subtree_root, U64 sib_off, U64 child_off); +#define d_entity_rec_df_pre(entity, subtree_root) d_entity_rec_df((entity), (subtree_root), OffsetOf(D_Entity, next), OffsetOf(D_Entity, first)) +#define d_entity_rec_df_post(entity, subtree_root) d_entity_rec_df((entity), (subtree_root), OffsetOf(D_Entity, prev), OffsetOf(D_Entity, last)) + +//- rjf: ancestor/child introspection +internal D_Entity *d_entity_child_from_kind(D_Entity *entity, D_EntityKind kind); +internal D_Entity *d_entity_ancestor_from_kind(D_Entity *entity, D_EntityKind kind); +internal D_EntityList d_push_entity_child_list_with_kind(Arena *arena, D_Entity *entity, D_EntityKind kind); +internal D_Entity *d_entity_child_from_name_and_kind(D_Entity *parent, String8 string, D_EntityKind kind); + +//- rjf: entity list building +internal void d_entity_list_push(Arena *arena, D_EntityList *list, D_Entity *entity); +internal D_EntityArray d_entity_array_from_list(Arena *arena, D_EntityList *list); +#define d_first_entity_from_list(list) ((list)->first != 0 ? (list)->first->entity : &d_nil_entity) + +//- rjf: entity fuzzy list building +internal D_EntityFuzzyItemArray d_entity_fuzzy_item_array_from_entity_list_needle(Arena *arena, D_EntityList *list, String8 needle); +internal D_EntityFuzzyItemArray d_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, D_EntityArray *array, String8 needle); + +//- rjf: full path building, from file/folder entities +internal String8 d_full_path_from_entity(Arena *arena, D_Entity *entity); + +//- rjf: display string entities, for referencing entities in ui +internal String8 d_display_string_from_entity(Arena *arena, D_Entity *entity); + +//- rjf: extra search tag strings for fuzzy filtering entities +internal String8 d_search_tags_from_entity(Arena *arena, D_Entity *entity); + +//- rjf: entity -> color operations +internal Vec4F32 d_hsva_from_entity(D_Entity *entity); +internal Vec4F32 d_rgba_from_entity(D_Entity *entity); + +//- rjf: entity -> expansion tree keys +internal D_ExpandKey d_expand_key_from_entity(D_Entity *entity); +internal D_ExpandKey d_parent_expand_key_from_entity(D_Entity *entity); + +//- rjf: entity -> evaluation +internal D_EntityEval *d_eval_from_entity(Arena *arena, D_Entity *entity); + +//////////////////////////////// +//~ rjf: Name Allocation + +internal U64 d_name_bucket_idx_from_string_size(U64 size); +internal String8 d_name_alloc(String8 string); +internal void d_name_release(String8 string); + +//////////////////////////////// +//~ rjf: Entity Stateful Functions + +//- rjf: entity mutation notification codepath +internal void d_entity_notify_mutation(D_Entity *entity); + +//- rjf: entity allocation + tree forming +internal D_Entity *d_entity_alloc(D_Entity *parent, D_EntityKind kind); +internal void d_entity_mark_for_deletion(D_Entity *entity); +internal void d_entity_release(D_Entity *entity); +internal void d_entity_change_parent(D_Entity *entity, D_Entity *old_parent, D_Entity *new_parent, D_Entity *prev_child); + +//- rjf: entity simple equipment +internal void d_entity_equip_txt_pt(D_Entity *entity, TxtPt point); +internal void d_entity_equip_entity_handle(D_Entity *entity, D_Handle handle); +internal void d_entity_equip_disabled(D_Entity *entity, B32 b32); +internal void d_entity_equip_u64(D_Entity *entity, U64 u64); +internal void d_entity_equip_color_rgba(D_Entity *entity, Vec4F32 rgba); +internal void d_entity_equip_color_hsva(D_Entity *entity, Vec4F32 hsva); +internal void d_entity_equip_cfg_src(D_Entity *entity, D_CfgSrc cfg_src); +internal void d_entity_equip_timestamp(D_Entity *entity, U64 timestamp); + +//- rjf: control layer correllation equipment +internal void d_entity_equip_ctrl_machine_id(D_Entity *entity, CTRL_MachineID machine_id); +internal void d_entity_equip_ctrl_handle(D_Entity *entity, DMN_Handle handle); +internal void d_entity_equip_arch(D_Entity *entity, Architecture arch); +internal void d_entity_equip_ctrl_id(D_Entity *entity, U32 id); +internal void d_entity_equip_stack_base(D_Entity *entity, U64 stack_base); +internal void d_entity_equip_vaddr_rng(D_Entity *entity, Rng1U64 range); +internal void d_entity_equip_vaddr(D_Entity *entity, U64 vaddr); + +//- rjf: name equipment +internal void d_entity_equip_name(D_Entity *entity, String8 name); +internal void d_entity_equip_namef(D_Entity *entity, char *fmt, ...); + +//- rjf: opening folders/files & maintaining the entity model of the filesystem +internal D_Entity *d_entity_from_path(String8 path, D_EntityFromPathFlags flags); + +//- rjf: file path map override lookups +internal String8List d_possible_overrides_from_file_path(Arena *arena, String8 file_path); + +//- rjf: top-level state queries +internal D_Entity *d_entity_root(void); +internal D_EntityList d_push_entity_list_with_kind(Arena *arena, D_EntityKind kind); +internal D_Entity *d_entity_from_id(D_EntityID id); +internal D_Entity *d_machine_entity_from_machine_id(CTRL_MachineID machine_id); +internal D_Entity *d_entity_from_ctrl_handle(CTRL_MachineID machine_id, DMN_Handle handle); +internal D_Entity *d_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id); +internal D_Entity *d_entity_from_name_and_kind(String8 string, D_EntityKind kind); +internal D_Entity *d_entity_from_u64_and_kind(U64 u64, D_EntityKind kind); + +//- rjf: entity freezing state +internal void d_set_thread_freeze_state(D_Entity *thread, B32 frozen); +internal B32 d_entity_is_frozen(D_Entity *entity); + +//////////////////////////////// +//~ rjf: Command Stateful Functions + +internal void d_register_cmd_specs(D_CmdSpecInfoArray specs); +internal D_CmdSpec *d_cmd_spec_from_string(String8 string); +internal D_CmdSpec *d_cmd_spec_from_kind(D_CmdKind core_cmd_kind); +internal void d_cmd_spec_counter_inc(D_CmdSpec *spec); +internal D_CmdSpecList d_push_cmd_spec_list(Arena *arena); + +//////////////////////////////// +//~ rjf: View Rule Spec Stateful Functions + +internal void d_register_view_rule_specs(D_ViewRuleSpecInfoArray specs); +internal D_ViewRuleSpec *d_view_rule_spec_from_string(String8 string); + +//////////////////////////////// +//~ rjf: Stepping "Trap Net" Builders + +internal CTRL_TrapList d_trap_net_from_thread__step_over_inst(Arena *arena, D_Entity *thread); +internal CTRL_TrapList d_trap_net_from_thread__step_over_line(Arena *arena, D_Entity *thread); +internal CTRL_TrapList d_trap_net_from_thread__step_into_line(Arena *arena, D_Entity *thread); + +//////////////////////////////// +//~ rjf: Modules & Debug Info Mappings + +//- rjf: module <=> debug info keys +internal DI_Key d_dbgi_key_from_module(D_Entity *module); +internal D_EntityList d_modules_from_dbgi_key(Arena *arena, DI_Key *dbgi_key); + +//- rjf: voff <=> vaddr +internal U64 d_base_vaddr_from_module(D_Entity *module); +internal U64 d_voff_from_vaddr(D_Entity *module, U64 vaddr); +internal U64 d_vaddr_from_voff(D_Entity *module, U64 voff); +internal Rng1U64 d_voff_range_from_vaddr_range(D_Entity *module, Rng1U64 vaddr_rng); +internal Rng1U64 d_vaddr_range_from_voff_range(D_Entity *module, Rng1U64 voff_rng); + +//////////////////////////////// +//~ rjf: Debug Info Lookups + +//- rjf: voff|vaddr -> symbol lookups +internal String8 d_symbol_name_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff, B32 decorated); +internal String8 d_symbol_name_from_process_vaddr(Arena *arena, D_Entity *process, U64 vaddr, B32 decorated); + +//- rjf: symbol -> voff lookups +internal U64 d_voff_from_dbgi_key_symbol_name(DI_Key *dbgi_key, String8 symbol_name); +internal U64 d_type_num_from_dbgi_key_name(DI_Key *dbgi_key, String8 name); + +//- rjf: voff -> line info +internal D_LineList d_lines_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff); + +//- rjf: file:line -> line info +internal D_LineListArray d_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64 line_num_range); +internal D_LineList d_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num); + +//////////////////////////////// +//~ rjf: Process/Thread/Module Info Lookups + +internal D_Entity *d_module_from_process_vaddr(D_Entity *process, U64 vaddr); +internal D_Entity *d_module_from_thread(D_Entity *thread); +internal U64 d_tls_base_vaddr_from_process_root_rip(D_Entity *process, U64 root_vaddr, U64 rip_vaddr); +internal Architecture d_architecture_from_entity(D_Entity *entity); +internal E_String2NumMap *d_push_locals_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbgi_key, U64 voff); +internal E_String2NumMap *d_push_member_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbgi_key, U64 voff); +internal B32 d_set_thread_rip(D_Entity *thread, U64 vaddr); +internal D_Entity *d_module_from_thread_candidates(D_Entity *thread, D_EntityList *candidates); +internal D_Unwind d_unwind_from_ctrl_unwind(Arena *arena, DI_Scope *di_scope, D_Entity *process, CTRL_Unwind *base_unwind); + +//////////////////////////////// +//~ rjf: Target Controls + +//- rjf: control message dispatching +internal void d_push_ctrl_msg(CTRL_Msg *msg); + +//- rjf: control thread running +internal void d_ctrl_run(D_RunKind run, D_Entity *run_thread, CTRL_RunFlags flags, CTRL_TrapList *run_traps); + +//- rjf: stopped info from the control thread +internal CTRL_Event d_ctrl_last_stop_event(void); + +//////////////////////////////// +//~ rjf: Evaluation Spaces + +//- rjf: entity <-> eval space +internal D_Entity *d_entity_from_eval_space(E_Space space); +internal E_Space d_eval_space_from_entity(D_Entity *entity); + +//- rjf: eval space reads/writes +internal B32 d_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range); +internal B32 d_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range); + +//- rjf: asynchronous streamed reads -> hashes from spaces +internal U128 d_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated); + +//- rjf: space -> entire range +internal Rng1U64 d_whole_range_from_eval_space(E_Space space); + +//////////////////////////////// +//~ rjf: Evaluation Views + +//- rjf: keys +internal D_EvalViewKey d_eval_view_key_make(U64 v0, U64 v1); +internal D_EvalViewKey d_eval_view_key_from_string(String8 string); +internal D_EvalViewKey d_eval_view_key_from_stringf(char *fmt, ...); +internal B32 d_eval_view_key_match(D_EvalViewKey a, D_EvalViewKey b); + +//- rjf: cache lookup +internal D_EvalView *d_eval_view_from_key(D_EvalViewKey key); + +//- rjf: key -> view rules +internal void d_eval_view_set_key_rule(D_EvalView *eval_view, D_ExpandKey key, String8 view_rule_string); +internal String8 d_eval_view_rule_from_key(D_EvalView *eval_view, D_ExpandKey key); + +//////////////////////////////// +//~ rjf: Evaluation Visualization + +//- rjf: expr * view rule table -> expr +internal E_Expr *d_expr_from_expr_cfg(Arena *arena, E_Expr *expr, D_CfgTable *cfg); + +//- rjf: evaluation value string builder helpers +internal String8 d_string_from_ascii_value(Arena *arena, U8 val); +internal String8 d_string_from_hresult_facility_code(U32 code); +internal String8 d_string_from_hresult_code(U32 code); +internal String8 d_string_from_simple_typed_eval(Arena *arena, D_EvalVizStringFlags flags, U32 radix, E_Eval eval); +internal String8 d_escaped_from_raw_string(Arena *arena, String8 raw); + +//- rjf: type info -> expandability/editablity +internal B32 d_type_key_is_expandable(E_TypeKey type_key); +internal B32 d_type_key_is_editable(E_TypeKey type_key); + +//- rjf: writing values back to child processes +internal B32 d_commit_eval_value_string(E_Eval dst_eval, String8 string); + +//- rjf: type helpers +internal E_MemberArray d_filtered_data_members_from_members_cfg_table(Arena *arena, E_MemberArray members, D_CfgTable *cfg); +internal D_EvalLinkBaseChunkList d_eval_link_base_chunk_list_from_eval(Arena *arena, E_TypeKey link_member_type_key, U64 link_member_off, E_Eval eval, U64 cap); +internal D_EvalLinkBase d_eval_link_base_from_chunk_list_index(D_EvalLinkBaseChunkList *list, U64 idx); +internal D_EvalLinkBaseArray d_eval_link_base_array_from_chunk_list(Arena *arena, D_EvalLinkBaseChunkList *chunks); + +//- rjf: viz block collection building +internal D_EvalVizBlock *d_eval_viz_block_begin(Arena *arena, D_EvalVizBlockKind kind, D_ExpandKey parent_key, D_ExpandKey key, S32 depth); +internal D_EvalVizBlock *d_eval_viz_block_split_and_continue(Arena *arena, D_EvalVizBlockList *list, D_EvalVizBlock *split_block, U64 split_idx); +internal void d_eval_viz_block_end(D_EvalVizBlockList *list, D_EvalVizBlock *block); +internal void d_append_expr_eval_viz_blocks__rec(Arena *arena, D_EvalView *view, D_ExpandKey parent_key, D_ExpandKey key, String8 string, E_Expr *expr, D_CfgTable *cfg_table, S32 depth, D_EvalVizBlockList *list_out); +internal D_EvalVizBlockList d_eval_viz_block_list_from_eval_view_expr_keys(Arena *arena, D_EvalView *eval_view, D_CfgTable *cfg_table, String8 expr, D_ExpandKey parent_key, D_ExpandKey key); +internal void d_eval_viz_block_list_concat__in_place(D_EvalVizBlockList *dst, D_EvalVizBlockList *to_push); + +//- rjf: viz block list <-> table coordinates +internal S64 d_row_num_from_viz_block_list_key(D_EvalVizBlockList *blocks, D_ExpandKey key); +internal D_ExpandKey d_key_from_viz_block_list_row_num(D_EvalVizBlockList *blocks, S64 row_num); +internal D_ExpandKey d_parent_key_from_viz_block_list_row_num(D_EvalVizBlockList *blocks, S64 row_num); + +//- rjf: viz block * index -> expression +internal E_Expr *d_expr_from_eval_viz_block_index(Arena *arena, D_EvalVizBlock *block, U64 index); + +//- rjf: viz row list building +internal D_EvalVizRow *d_eval_viz_row_list_push_new(Arena *arena, D_EvalView *eval_view, D_EvalVizWindowedRowList *rows, D_EvalVizBlock *block, D_ExpandKey key, E_Expr *expr); +internal D_EvalVizWindowedRowList d_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, D_EvalView *eval_view, Rng1S64 visible_range, D_EvalVizBlockList *blocks); + +//- rjf: viz row -> strings +internal String8 d_expr_string_from_viz_row(Arena *arena, D_EvalVizRow *row); + +//- rjf: viz row -> expandability/editability +internal B32 d_viz_row_is_expandable(D_EvalVizRow *row); +internal B32 d_viz_row_is_editable(D_EvalVizRow *row); + +//- rjf: eval / view rule params tree info extraction +internal U64 d_base_offset_from_eval(E_Eval eval); +internal E_Value d_value_from_params(MD_Node *params); +internal E_TypeKey d_type_key_from_params(MD_Node *params); +internal E_Value d_value_from_params_key(MD_Node *params, String8 key); +internal Rng1U64 d_range_from_eval_params(E_Eval eval, MD_Node *params); +internal TXT_LangKind d_lang_kind_from_eval_params(E_Eval eval, MD_Node *params); +internal Architecture d_architecture_from_eval_params(E_Eval eval, MD_Node *params); +internal Vec2S32 d_dim2s32_from_eval_params(E_Eval eval, MD_Node *params); +internal R_Tex2DFormat d_tex2dformat_from_eval_params(E_Eval eval, MD_Node *params); + +//- rjf: eval <-> entity +internal D_Entity *d_entity_from_eval_string(String8 string); +internal String8 d_eval_string_from_entity(Arena *arena, D_Entity *entity); + +//- rjf: eval <-> file path +internal String8 d_file_path_from_eval_string(Arena *arena, String8 string); +internal String8 d_eval_string_from_file_path(Arena *arena, String8 string); + +//////////////////////////////// +//~ rjf: Main State Accessors/Mutators + +//- rjf: frame data +internal F32 d_dt(void); +internal U64 d_frame_index(void); +internal Arena *d_frame_arena(void); +internal F64 d_time_in_seconds(void); + +//- rjf: interaction registers +internal D_InteractRegs *d_interact_regs(void); +internal D_InteractRegs *d_base_interact_regs(void); +internal D_InteractRegs *d_push_interact_regs(void); +internal D_InteractRegs *d_pop_interact_regs(void); + +//- rjf: undo/redo history +internal D_StateDeltaHistory *d_state_delta_history(void); + +//- rjf: control state +internal D_RunKind d_ctrl_last_run_kind(void); +internal U64 d_ctrl_last_run_frame_idx(void); +internal B32 d_ctrl_targets_running(void); + +//- rjf: config paths +internal String8 d_cfg_path_from_src(D_CfgSrc src); + +//- rjf: config state +internal D_CfgTable *d_cfg_table(void); + +//- rjf: config serialization +internal String8 d_cfg_escaped_from_raw_string(Arena *arena, String8 string); +internal String8 d_cfg_raw_from_escaped_string(Arena *arena, String8 string); +internal String8List d_cfg_strings_from_core(Arena *arena, String8 root_path, D_CfgSrc source); +internal void d_cfg_push_write_string(D_CfgSrc src, String8 string); + +//- rjf: current path +internal String8 d_current_path(void); + +//- rjf: entity kind cache +internal D_EntityList d_query_cached_entity_list_with_kind(D_EntityKind kind); + +//- rjf: active entity based queries +internal DI_KeyList d_push_active_dbgi_key_list(Arena *arena); +internal D_EntityList d_push_active_target_list(Arena *arena); + +//- rjf: expand key based entity queries +internal D_Entity *d_entity_from_expand_key_and_kind(D_ExpandKey key, D_EntityKind kind); + +//- rjf: per-run caches +internal CTRL_Unwind d_query_cached_unwind_from_thread(D_Entity *thread); +internal U64 d_query_cached_rip_from_thread(D_Entity *thread); +internal U64 d_query_cached_rip_from_thread_unwind(D_Entity *thread, U64 unwind_count); +internal U64 d_query_cached_tls_base_vaddr_from_process_root_rip(D_Entity *process, U64 root_vaddr, U64 rip_vaddr); +internal E_String2NumMap *d_query_cached_locals_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff); +internal E_String2NumMap *d_query_cached_member_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff); + +//- rjf: top-level command dispatch +internal void d_push_cmd__root(D_CmdParams *params, D_CmdSpec *spec); + +//////////////////////////////// +//~ rjf: Main Layer Top-Level Calls + +internal void d_init(CmdLine *cmdln, D_StateDeltaHistory *hist); +internal D_CmdList d_gather_root_cmds(Arena *arena); +internal void d_begin_frame(Arena *arena, D_CmdList *cmds, F32 dt); +internal void d_end_frame(void); + +#endif // DBG_ENGINE_CORE_H diff --git a/src/dbg_engine/dbg_engine_inc.c b/src/dbg_engine/dbg_engine_inc.c new file mode 100644 index 00000000..81f3a28d --- /dev/null +++ b/src/dbg_engine/dbg_engine_inc.c @@ -0,0 +1,4 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#include "dbg_engine_core.c" diff --git a/src/dbg_engine/dbg_engine_inc.h b/src/dbg_engine/dbg_engine_inc.h new file mode 100644 index 00000000..96ca410a --- /dev/null +++ b/src/dbg_engine/dbg_engine_inc.h @@ -0,0 +1,9 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#ifndef DBG_ENGINE_INC_H +#define DBG_ENGINE_INC_H + +#include "dbg_engine_core.h" + +#endif // DBG_ENGINE_INC_H diff --git a/src/dbg_engine/generated/dbg_engine.meta.c b/src/dbg_engine/generated/dbg_engine.meta.c new file mode 100644 index 00000000..99cfceb6 --- /dev/null +++ b/src/dbg_engine/generated/dbg_engine.meta.c @@ -0,0 +1,583 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +//- GENERATED CODE + +C_LINKAGE_BEGIN +Rng1U64 d_cmd_param_slot_range_table[24] = +{ +{0}, +{OffsetOf(D_CmdParams, window), OffsetOf(D_CmdParams, window) + sizeof(D_Handle)}, +{OffsetOf(D_CmdParams, panel), OffsetOf(D_CmdParams, panel) + sizeof(D_Handle)}, +{OffsetOf(D_CmdParams, dest_panel), OffsetOf(D_CmdParams, dest_panel) + sizeof(D_Handle)}, +{OffsetOf(D_CmdParams, prev_view), OffsetOf(D_CmdParams, prev_view) + sizeof(D_Handle)}, +{OffsetOf(D_CmdParams, view), OffsetOf(D_CmdParams, view) + sizeof(D_Handle)}, +{OffsetOf(D_CmdParams, entity), OffsetOf(D_CmdParams, entity) + sizeof(D_Handle)}, +{OffsetOf(D_CmdParams, entity_list), OffsetOf(D_CmdParams, entity_list) + sizeof(D_HandleList)}, +{OffsetOf(D_CmdParams, string), OffsetOf(D_CmdParams, string) + sizeof(String8)}, +{OffsetOf(D_CmdParams, file_path), OffsetOf(D_CmdParams, file_path) + sizeof(String8)}, +{OffsetOf(D_CmdParams, text_point), OffsetOf(D_CmdParams, text_point) + sizeof(TxtPt)}, +{OffsetOf(D_CmdParams, cmd_spec), OffsetOf(D_CmdParams, cmd_spec) + sizeof(struct D_CmdSpec *)}, +{OffsetOf(D_CmdParams, view_spec), OffsetOf(D_CmdParams, view_spec) + sizeof(struct DF_ViewSpec *)}, +{OffsetOf(D_CmdParams, params_tree), OffsetOf(D_CmdParams, params_tree) + sizeof(MD_Node *)}, +{OffsetOf(D_CmdParams, os_event), OffsetOf(D_CmdParams, os_event) + sizeof(struct OS_Event *)}, +{OffsetOf(D_CmdParams, vaddr), OffsetOf(D_CmdParams, vaddr) + sizeof(U64)}, +{OffsetOf(D_CmdParams, voff), OffsetOf(D_CmdParams, voff) + sizeof(U64)}, +{OffsetOf(D_CmdParams, index), OffsetOf(D_CmdParams, index) + sizeof(U64)}, +{OffsetOf(D_CmdParams, id), OffsetOf(D_CmdParams, id) + sizeof(U64)}, +{OffsetOf(D_CmdParams, prefer_dasm), OffsetOf(D_CmdParams, prefer_dasm) + sizeof(B32)}, +{OffsetOf(D_CmdParams, force_confirm), OffsetOf(D_CmdParams, force_confirm) + sizeof(B32)}, +{OffsetOf(D_CmdParams, dir2), OffsetOf(D_CmdParams, dir2) + sizeof(Dir2)}, +{OffsetOf(D_CmdParams, unwind_index), OffsetOf(D_CmdParams, unwind_index) + sizeof(U64)}, +{OffsetOf(D_CmdParams, inline_depth), OffsetOf(D_CmdParams, inline_depth) + sizeof(U64)}, +}; + +DF_IconKind d_entity_kind_icon_kind_table[28] = +{ +DF_IconKind_Null, +DF_IconKind_Null, +DF_IconKind_Machine, +DF_IconKind_FileOutline, +DF_IconKind_Binoculars, +DF_IconKind_FileOutline, +DF_IconKind_Pin, +DF_IconKind_Binoculars, +DF_IconKind_Binoculars, +DF_IconKind_CircleFilled, +DF_IconKind_CircleFilled, +DF_IconKind_Null, +DF_IconKind_Target, +DF_IconKind_Null, +DF_IconKind_Null, +DF_IconKind_Null, +DF_IconKind_Null, +DF_IconKind_Briefcase, +DF_IconKind_Null, +DF_IconKind_Null, +DF_IconKind_Threads, +DF_IconKind_Thread, +DF_IconKind_Module, +DF_IconKind_Threads, +DF_IconKind_Module, +DF_IconKind_Null, +DF_IconKind_Null, +DF_IconKind_Null, +}; + +String8 d_entity_kind_display_string_table[28] = +{ +str8_lit_comp("Nil"), +str8_lit_comp("Root"), +str8_lit_comp("Machine"), +str8_lit_comp("File"), +str8_lit_comp("Auto View Rule"), +str8_lit_comp("File Path Map"), +str8_lit_comp("Watch Pin"), +str8_lit_comp("Watch"), +str8_lit_comp("View Rule"), +str8_lit_comp("Breakpoint"), +str8_lit_comp("Condition"), +str8_lit_comp("Location"), +str8_lit_comp("Target"), +str8_lit_comp("Executable"), +str8_lit_comp("Arguments"), +str8_lit_comp("Working Directory"), +str8_lit_comp("Entry Point"), +str8_lit_comp("Recent Project"), +str8_lit_comp("Source"), +str8_lit_comp("Destination"), +str8_lit_comp("Process"), +str8_lit_comp("Thread"), +str8_lit_comp("Module"), +str8_lit_comp("Pending Thread Name"), +str8_lit_comp("Debug Info Path"), +str8_lit_comp("Conversion Task"), +str8_lit_comp("Conversion Failure"), +str8_lit_comp("EndedProcess"), +}; + +String8 d_entity_kind_name_lower_table[28] = +{ +str8_lit_comp("nil"), +str8_lit_comp("root"), +str8_lit_comp("machine"), +str8_lit_comp("file"), +str8_lit_comp("auto_view_rule"), +str8_lit_comp("file_path_map"), +str8_lit_comp("watch_pin"), +str8_lit_comp("watch"), +str8_lit_comp("view_rule"), +str8_lit_comp("breakpoint"), +str8_lit_comp("condition"), +str8_lit_comp("location"), +str8_lit_comp("target"), +str8_lit_comp("executable"), +str8_lit_comp("arguments"), +str8_lit_comp("working_directory"), +str8_lit_comp("entry_point"), +str8_lit_comp("recent_project"), +str8_lit_comp("source"), +str8_lit_comp("dest"), +str8_lit_comp("process"), +str8_lit_comp("thread"), +str8_lit_comp("module"), +str8_lit_comp("pending_thread_name"), +str8_lit_comp("debug_info_path"), +str8_lit_comp("conversion_task"), +str8_lit_comp("conversion_fail"), +str8_lit_comp("ended_process"), +}; + +String8 d_entity_kind_name_lower_plural_table[28] = +{ +str8_lit_comp("nils"), +str8_lit_comp("roots"), +str8_lit_comp("machines"), +str8_lit_comp("files"), +str8_lit_comp("auto_view_rules"), +str8_lit_comp("file_path_maps"), +str8_lit_comp("watch_pins"), +str8_lit_comp("watches"), +str8_lit_comp("view_rules"), +str8_lit_comp("breakpoints"), +str8_lit_comp("conditions"), +str8_lit_comp("locations"), +str8_lit_comp("targets"), +str8_lit_comp("executables"), +str8_lit_comp("argumentses"), +str8_lit_comp("working_directories"), +str8_lit_comp("entry_points"), +str8_lit_comp("recent_projects"), +str8_lit_comp("sources"), +str8_lit_comp("dests"), +str8_lit_comp("processes"), +str8_lit_comp("threads"), +str8_lit_comp("modules"), +str8_lit_comp("pending_thread_names"), +str8_lit_comp("debug_info_paths"), +str8_lit_comp("conversion_tasks"), +str8_lit_comp("conversion_fails"), +str8_lit_comp("ended_processes"), +}; + +String8 d_entity_kind_name_label_table[28] = +{ +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Expression"), +str8_lit_comp("Expression"), +str8_lit_comp("Expression"), +str8_lit_comp("Label"), +str8_lit_comp("Expression"), +str8_lit_comp("Location"), +str8_lit_comp("Label"), +str8_lit_comp("Executable"), +str8_lit_comp("Arguments"), +str8_lit_comp("Execution Path"), +str8_lit_comp("Symbol Name"), +str8_lit_comp("Path"), +str8_lit_comp("Path"), +str8_lit_comp("Path"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +}; + +D_EntityKindFlags d_entity_kind_flags_table[28] = +{ +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (1*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 1*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (1*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 1*D_EntityKindFlag_IsSerializedToConfig, +(1*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (1*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 1*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 1*D_EntityKindFlag_IsSerializedToConfig, +(1*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (1*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (1*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 1*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 1*D_EntityKindFlag_IsSerializedToConfig, +(1*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (1*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (1*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 1*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(1*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (1*D_EntityKindFlag_CanEnable) | (1*D_EntityKindFlag_CanCondition) | (1*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 1*D_EntityKindFlag_LeafMutProjectConfig | 1*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 1*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 1*D_EntityKindFlag_LeafMutProjectConfig | 1*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 1*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 1*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 1*D_EntityKindFlag_LeafMutProjectConfig | 1*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 1*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 1*D_EntityKindFlag_NameIsCode | 1*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(1*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (1*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (1*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (1*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 1*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 1*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 1*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 1*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 1*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 1*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 1*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 1*D_EntityKindFlag_LeafMutProjectConfig | 1*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 1*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (1*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 1*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 1*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 1*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (1*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (1*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (0*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(0*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +(1*D_EntityKindFlag_CanDelete) | (0*D_EntityKindFlag_CanFreeze) | (0*D_EntityKindFlag_CanEdit) | (1*D_EntityKindFlag_CanRename) | (0*D_EntityKindFlag_CanEnable) | (0*D_EntityKindFlag_CanCondition) | (0*D_EntityKindFlag_CanDuplicate) | (0*D_EntityKindFlag_LeafMutUserConfig | 0*D_EntityKindFlag_LeafMutProjectConfig | 0*D_EntityKindFlag_LeafMutSoftHalt | 0*D_EntityKindFlag_LeafMutDebugInfoMap | 0*D_EntityKindFlag_TreeMutUserConfig | 0*D_EntityKindFlag_TreeMutProjectConfig | 0*D_EntityKindFlag_TreeMutSoftHalt | 0*D_EntityKindFlag_TreeMutDebugInfoMap | 0*D_EntityKindFlag_NameIsCode | 0*D_EntityKindFlag_NameIsPath | 0*D_EntityKindFlag_UserDefinedLifetime) | 0*D_EntityKindFlag_IsSerializedToConfig, +}; + +String8 d_cfg_src_string_table[4] = +{ +str8_lit_comp("user"), +str8_lit_comp("project"), +str8_lit_comp("command_line"), +str8_lit_comp("transient"), +}; + +D_CmdKind d_cfg_src_load_cmd_kind_table[4] = +{ +D_CmdKind_OpenUser, +D_CmdKind_OpenProject, +D_CmdKind_Null, +D_CmdKind_Null, +}; + +D_CmdKind d_cfg_src_write_cmd_kind_table[4] = +{ +D_CmdKind_WriteUserData, +D_CmdKind_WriteProjectData, +D_CmdKind_Null, +D_CmdKind_Null, +}; + +D_CmdKind d_cfg_src_apply_cmd_kind_table[4] = +{ +D_CmdKind_ApplyUserData, +D_CmdKind_ApplyProjectData, +D_CmdKind_Null, +D_CmdKind_Null, +}; + +D_CmdSpecInfo d_core_cmd_kind_spec_info_table[221] = +{ +{ str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("exit"), str8_lit_comp("Exits the debugger."), str8_lit_comp("quit,close,abort"), str8_lit_comp("Exit"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_X}, +{ str8_lit_comp("run_command"), str8_lit_comp("Runs a command from the command palette."), str8_lit_comp("help,cmd"), str8_lit_comp("Run Command"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_CmdSpec, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("error"), str8_lit_comp("Notifies of an error."), str8_lit_comp(""), str8_lit_comp("Error"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("os_event"), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("OS Event"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ 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("Launch and Run"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_EntityList, D_EntityKind_Target, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Play}, +{ str8_lit_comp("launch_and_init"), str8_lit_comp("Starts debugging a new instance of a target, then stops at the program's entry point."), str8_lit_comp("launch,start,entry,point"), str8_lit_comp("Launch and Initialize"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_EntityList, D_EntityKind_Target, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_PlayStepForward}, +{ str8_lit_comp("kill"), str8_lit_comp("Kills the specified existing debugged process(es)."), str8_lit_comp("stop,kill"), str8_lit_comp("Kill"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_EntityList, D_EntityKind_Process, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Stop}, +{ str8_lit_comp("kill_all"), str8_lit_comp("Kills all debugged child processes."), str8_lit_comp("stop,kill,all"), str8_lit_comp("Kill All"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Stop}, +{ str8_lit_comp("detach"), str8_lit_comp("Detaches the specified debugged process."), str8_lit_comp("detach"), str8_lit_comp("Detach"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_EntityList, D_EntityKind_Process, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, +{ str8_lit_comp("continue"), str8_lit_comp("Continues all halted threads."), str8_lit_comp(""), str8_lit_comp("Continue"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Play}, +{ str8_lit_comp("step_into_inst"), str8_lit_comp("Performs a step that goes into calls, at the instruction level."), str8_lit_comp("single,step,thread"), str8_lit_comp("Step Into (Assembly)"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_StepInto}, +{ str8_lit_comp("step_over_inst"), str8_lit_comp("Performs a step that skips calls, at the instruction level."), str8_lit_comp("single,step,thread"), str8_lit_comp("Step Over (Assembly)"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_StepOver}, +{ str8_lit_comp("step_into_line"), str8_lit_comp("Performs a step that goes into calls, at the source code line level."), str8_lit_comp("step,thread"), str8_lit_comp("Step Into (Line)"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_StepInto}, +{ str8_lit_comp("step_over_line"), str8_lit_comp("Performs a step that skips calls, at the source code line level."), str8_lit_comp("step,thread"), str8_lit_comp("Step Over (Line)"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_StepOver}, +{ str8_lit_comp("step_out"), str8_lit_comp("Runs to the end of the current function and exits it."), str8_lit_comp(""), str8_lit_comp("Step Out"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_StepOut}, +{ str8_lit_comp("halt"), str8_lit_comp("Halts all running processes."), str8_lit_comp("pause"), str8_lit_comp("Halt"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Pause}, +{ str8_lit_comp("soft_halt_refresh"), str8_lit_comp("Interrupts all running processes to collect data, and then resumes them."), str8_lit_comp(""), str8_lit_comp("Soft Halt Refresh"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Refresh}, +{ str8_lit_comp("set_thread_ip"), str8_lit_comp("Sets the passed thread's instruction pointer at the passed address."), str8_lit_comp(""), str8_lit_comp("Set Thread IP"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_VirtualAddr, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, +{ str8_lit_comp("run_to_line"), str8_lit_comp("Runs until a particular source line is hit."), str8_lit_comp(""), str8_lit_comp("Run To Line"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Play}, +{ str8_lit_comp("run_to_address"), str8_lit_comp("Runs until a particular address is hit."), str8_lit_comp(""), str8_lit_comp("Run To Address"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_VirtualAddr, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_PlayStepForward}, +{ str8_lit_comp("run"), str8_lit_comp("Runs all targets after starting them if they have not been started yet."), str8_lit_comp("play"), str8_lit_comp("Run"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Play}, +{ str8_lit_comp("restart"), str8_lit_comp("Kills all running processes, then restarts the targets which were used to launch all current processes (if any)."), str8_lit_comp("restart,retry"), str8_lit_comp("Restart"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Redo}, +{ str8_lit_comp("step_into"), str8_lit_comp("Steps once, possibly into function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Into"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_StepInto}, +{ str8_lit_comp("step_over"), str8_lit_comp("Steps once, always over function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Over"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_StepOver}, +{ str8_lit_comp("run_to_cursor"), str8_lit_comp("Runs the selected thread to the current cursor."), str8_lit_comp("line"), str8_lit_comp("Run To Cursor"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Play}, +{ str8_lit_comp("set_next_statement"), str8_lit_comp("Sets the selected thread's instruction pointer to the cursor's position."), str8_lit_comp(""), str8_lit_comp("Set Next Statement"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, +{ str8_lit_comp("select_thread"), str8_lit_comp("Selects a thread."), str8_lit_comp(""), str8_lit_comp("Select Thread"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Thread, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, +{ str8_lit_comp("select_unwind"), str8_lit_comp("Selects an unwind frame number for the selected thread."), str8_lit_comp(""), str8_lit_comp("Select Unwind"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("up_one_frame"), str8_lit_comp("Selects the call stack frame above the currently selected."), str8_lit_comp(""), str8_lit_comp("Up One Frame"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_UpArrow}, +{ str8_lit_comp("down_one_frame"), str8_lit_comp("Selects the call stack frame below the currently selected."), str8_lit_comp("callstack,unwind"), str8_lit_comp("Down One Frame"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_DownArrow}, +{ str8_lit_comp("freeze_thread"), str8_lit_comp("Freezes the passed thread."), str8_lit_comp("callstack,unwind"), str8_lit_comp("Freeze Thread"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Thread, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Locked}, +{ str8_lit_comp("thaw_thread"), str8_lit_comp("Thaws the passed thread."), str8_lit_comp(""), str8_lit_comp("Thaw Thread"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Thread, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Unlocked}, +{ str8_lit_comp("freeze_process"), str8_lit_comp("Freezes the passed process."), str8_lit_comp(""), str8_lit_comp("Freeze Process"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Process, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Locked}, +{ str8_lit_comp("thaw_process"), str8_lit_comp("Thaws the passed process."), str8_lit_comp(""), str8_lit_comp("Thaw Process"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Process, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Unlocked}, +{ str8_lit_comp("freeze_machine"), str8_lit_comp("Freezes the passed machine."), str8_lit_comp(""), str8_lit_comp("Freeze Machine"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Machine, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Locked}, +{ str8_lit_comp("thaw_machine"), str8_lit_comp("Thaws the passed machine."), str8_lit_comp(""), str8_lit_comp("Thaw Machine"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Machine, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Unlocked}, +{ str8_lit_comp("freeze_local_machine"), str8_lit_comp("Freezes the local machine."), str8_lit_comp(""), str8_lit_comp("Freeze Local Machine"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Machine}, +{ str8_lit_comp("thaw_local_machine"), str8_lit_comp("Thaws the local machine."), str8_lit_comp(""), str8_lit_comp("Thaw Local Machine"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Machine}, +{ str8_lit_comp("inc_ui_font_scale"), str8_lit_comp("Increases the font size used for UI."), str8_lit_comp(""), str8_lit_comp("Increase UI Font Scale"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("dec_ui_font_scale"), str8_lit_comp("Decreases the font size used for UI."), str8_lit_comp(""), str8_lit_comp("Decrease UI Font Scale"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("inc_code_font_scale"), str8_lit_comp("Increases the font size used for code."), str8_lit_comp(""), str8_lit_comp("Increase Code Font Scale"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("dec_code_font_scale"), str8_lit_comp("Decreases the font size used for code."), str8_lit_comp(""), str8_lit_comp("Decrease Code Font Scale"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("open_window"), str8_lit_comp("Opens a new window."), str8_lit_comp(""), str8_lit_comp("Open New Window"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Window}, +{ str8_lit_comp("close_window"), str8_lit_comp("Closes an opened window."), str8_lit_comp(""), str8_lit_comp("Close Window"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Window}, +{ str8_lit_comp("toggle_fullscreen"), str8_lit_comp("Toggles fullscreen view on the active window."), str8_lit_comp(""), str8_lit_comp("Toggle Fullscreen"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Window}, +{ str8_lit_comp("confirm_accept"), str8_lit_comp("Accepts the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Accept"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("confirm_cancel"), str8_lit_comp("Cancels the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Cancel"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("reset_to_default_panels"), str8_lit_comp("Resets the window to the default panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Default Panel Layout"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Window}, +{ str8_lit_comp("reset_to_compact_panels"), str8_lit_comp("Resets the window to the compact panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Compact Panel Layout"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Window}, +{ str8_lit_comp("new_panel_left"), str8_lit_comp("Creates a new panel to the left of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Left"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_XSplit}, +{ str8_lit_comp("new_panel_up"), str8_lit_comp("Creates a new panel at the top of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Up"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_YSplit}, +{ str8_lit_comp("new_panel_right"), str8_lit_comp("Creates a new panel to the right of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Right"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_XSplit}, +{ str8_lit_comp("new_panel_down"), str8_lit_comp("Creates a new panel at the bottom of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Down"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_YSplit}, +{ str8_lit_comp("split_panel"), str8_lit_comp("Creates a new panel in a given direction, and moves a tab to it, if specified."), str8_lit_comp(""), str8_lit_comp("Split Panel"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("rotate_panel_columns"), str8_lit_comp("Rotates all panels at the closest column level of the panel hierarchy."), str8_lit_comp(""), str8_lit_comp("Rotate Panel Columns"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("next_panel"), str8_lit_comp("Cycles the active panel forward."), str8_lit_comp(""), str8_lit_comp("Focus Next Panel"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, +{ str8_lit_comp("prev_panel"), str8_lit_comp("Cycles the active panel backwards."), str8_lit_comp(""), str8_lit_comp("Focus Previous Panel"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow}, +{ str8_lit_comp("focus_panel"), str8_lit_comp("Focuses a new panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("focus_panel_right"), str8_lit_comp("Focuses a panel rightward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Right"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, +{ str8_lit_comp("focus_panel_left"), str8_lit_comp("Focuses a panel leftward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Left"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow}, +{ str8_lit_comp("focus_panel_up"), str8_lit_comp("Focuses a panel upward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Up"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_UpArrow}, +{ str8_lit_comp("focus_panel_down"), str8_lit_comp("Focuses a panel downward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Down"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_DownArrow}, +{ str8_lit_comp("undo"), str8_lit_comp("Undoes the previous action."), str8_lit_comp(""), str8_lit_comp("Undo"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Undo}, +{ str8_lit_comp("redo"), str8_lit_comp("Redoes the first previously undone action."), str8_lit_comp(""), str8_lit_comp("Redo"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Redo}, +{ str8_lit_comp("go_back"), str8_lit_comp("Returns to the previously selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Back"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow}, +{ str8_lit_comp("go_forward"), str8_lit_comp("Returns to the next selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Forward"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, +{ str8_lit_comp("close_panel"), str8_lit_comp("Closes the currently active panel."), str8_lit_comp(""), str8_lit_comp("Close Panel"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_ClosePanel}, +{ str8_lit_comp("next_tab"), str8_lit_comp("Focuses the next tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Next Tab"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, +{ str8_lit_comp("prev_tab"), str8_lit_comp("Focuses the previous tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Previous Tab"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow}, +{ str8_lit_comp("move_tab_right"), str8_lit_comp("Moves the selected tab right one slot."), str8_lit_comp(""), str8_lit_comp("Move Tab Right"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, +{ str8_lit_comp("move_tab_left"), str8_lit_comp("Moves the selected tab left one slot."), str8_lit_comp(""), str8_lit_comp("Move Tab Left"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow}, +{ str8_lit_comp("open_tab"), str8_lit_comp("Opens a new tab with the parameterized view specification."), str8_lit_comp(""), str8_lit_comp("Open Tab"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("close_tab"), str8_lit_comp("Closes the currently opened tab."), str8_lit_comp(""), str8_lit_comp("Close Tab"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_X}, +{ str8_lit_comp("move_tab"), str8_lit_comp("Moves a tab to a new panel."), str8_lit_comp(""), str8_lit_comp("Move Tab"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("tab_bar_top"), str8_lit_comp("Anchors a panel's tab bar to the top of the panel."), str8_lit_comp(""), str8_lit_comp("Anchor Tab Bar To Top"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_UpArrow}, +{ str8_lit_comp("tab_bar_bottom"), str8_lit_comp("Anchors a panel's tab bar to the bottom of the panel."), str8_lit_comp(""), str8_lit_comp("Anchor Tab Bar To Bottom"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_DownArrow}, +{ str8_lit_comp("set_current_path"), str8_lit_comp("Sets the debugger's current path, which is used as a starting point when browsing for files."), str8_lit_comp(""), str8_lit_comp("Set Current Path"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline}, +{ str8_lit_comp("open"), str8_lit_comp("Opens a file."), str8_lit_comp("code,source,file"), str8_lit_comp("Open"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_FilePath, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*1)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline}, +{ str8_lit_comp("switch"), str8_lit_comp("Switches to a loaded file."), str8_lit_comp("code,source,file"), str8_lit_comp("Switch"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_File, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline}, +{ str8_lit_comp("switch_to_partner_file"), str8_lit_comp("Switches to the focused file's partner; or from header to implementation or vice versa."), str8_lit_comp("code,source,file"), str8_lit_comp("Switch To Partner File"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline}, +{ str8_lit_comp("go_to_disassembly"), str8_lit_comp("Goes to the disassembly, if any, for a given source code line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("Go To Disassembly"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Glasses}, +{ str8_lit_comp("go_to_source"), str8_lit_comp("Goes to the source code, if any, for a given disassembly line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("Go To Source"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline}, +{ str8_lit_comp("set_file_override_link_src"), str8_lit_comp("Sets the source path for an override file link."), str8_lit_comp(""), str8_lit_comp("Set File Override Link Source"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("set_file_override_link_dst"), str8_lit_comp("Sets the destination path for an override file link."), str8_lit_comp(""), str8_lit_comp("Set File Override Link Destination"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("set_file_replacement_path"), str8_lit_comp("Sets the path which should be used as the replacement for the passed file."), str8_lit_comp(""), str8_lit_comp("Set File Replacement Path"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("set_auto_view_rule_type"), str8_lit_comp("Sets the type for an auto view rule."), str8_lit_comp(""), str8_lit_comp("Set Auto View Rule Type"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("set_auto_view_rule_view_rule"), str8_lit_comp("Sets the view rule string for an auto view rule."), str8_lit_comp(""), str8_lit_comp("Set Auto View Rule View Rule"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ 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("Open User"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_FilePath, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*1)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Person}, +{ 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("Open Project"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_FilePath, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*1)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Briefcase}, +{ str8_lit_comp("open_recent_project"), str8_lit_comp("Opens a recently used project file."), str8_lit_comp("project,project,session"), str8_lit_comp("Open Recent Project"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_RecentProject, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Briefcase}, +{ str8_lit_comp("apply_user_data"), str8_lit_comp("Applies user data from the active user file."), str8_lit_comp(""), str8_lit_comp("Apply User Data"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("apply_project_data"), str8_lit_comp("Applies project data from the active project file."), str8_lit_comp(""), str8_lit_comp("Apply Project Data"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("write_user_data"), str8_lit_comp("Writes user data to the active user file."), str8_lit_comp(""), str8_lit_comp("Write User Data"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("write_project_data"), str8_lit_comp("Writes project data to the active project file."), str8_lit_comp(""), str8_lit_comp("Write Project Data"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("edit"), str8_lit_comp("Edits the current selection."), str8_lit_comp(""), str8_lit_comp("Edit"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Pencil}, +{ str8_lit_comp("accept"), str8_lit_comp("Accepts current changes, or answers prompts in the affirmative."), str8_lit_comp(""), str8_lit_comp("Accept"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_CheckFilled}, +{ str8_lit_comp("cancel"), str8_lit_comp("Rejects current changes, exits temporary menus, or answers prompts in the negative."), str8_lit_comp(""), str8_lit_comp("Cancel"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_X}, +{ str8_lit_comp("move_left"), str8_lit_comp("Moves the cursor or selection left."), str8_lit_comp(""), str8_lit_comp("Move Left"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_right"), str8_lit_comp("Moves the cursor or selection right."), str8_lit_comp(""), str8_lit_comp("Move Right"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_up"), str8_lit_comp("Moves the cursor or selection up."), str8_lit_comp(""), str8_lit_comp("Move Up"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_down"), str8_lit_comp("Moves the cursor or selection down."), str8_lit_comp(""), str8_lit_comp("Move Down"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_left_select"), str8_lit_comp("Moves the cursor or selection left, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Left Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_right_select"), str8_lit_comp("Moves the cursor or selection right, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Right Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_up_select"), str8_lit_comp("Moves the cursor or selection up, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_down_select"), str8_lit_comp("Moves the cursor or selection down, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_left_chunk"), str8_lit_comp("Moves the cursor or selection left one chunk."), str8_lit_comp(""), str8_lit_comp("Move Left Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_right_chunk"), str8_lit_comp("Moves the cursor or selection right one chunk."), str8_lit_comp(""), str8_lit_comp("Move Right Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_up_chunk"), str8_lit_comp("Moves the cursor or selection up one chunk."), str8_lit_comp(""), str8_lit_comp("Move Up Chunk"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_down_chunk"), str8_lit_comp("Moves the cursor or selection down one chunk."), str8_lit_comp(""), str8_lit_comp("Move Down Chunk"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_up_page"), str8_lit_comp("Moves the cursor or selection up one page."), str8_lit_comp(""), str8_lit_comp("Move Up Page"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_down_page"), str8_lit_comp("Moves the cursor or selection down one page."), str8_lit_comp(""), str8_lit_comp("Move Down Page"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_up_whole"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content."), str8_lit_comp(""), str8_lit_comp("Move Up Whole"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_down_whole"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content."), str8_lit_comp(""), str8_lit_comp("Move Down Whole"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_left_chunk_select"), str8_lit_comp("Moves the cursor or selection left one chunk."), str8_lit_comp(""), str8_lit_comp("Move Left Chunk Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_right_chunk_select"), str8_lit_comp("Moves the cursor or selection right one chunk."), str8_lit_comp(""), str8_lit_comp("Move Right Chunk Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_up_chunk_select"), str8_lit_comp("Moves the cursor or selection up one chunk."), str8_lit_comp(""), str8_lit_comp("Move Up Chunk Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_down_chunk_select"), str8_lit_comp("Moves the cursor or selection down one chunk."), str8_lit_comp(""), str8_lit_comp("Move Down Chunk Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_up_page_select"), str8_lit_comp("Moves the cursor or selection up one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Page Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_down_page_select"), str8_lit_comp("Moves the cursor or selection down one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Page Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_up_whole_select"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Whole Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_down_whole_select"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Whole Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_up_reorder"), str8_lit_comp("Moves the cursor or selection up, while swapping the currently selected element with that upward."), str8_lit_comp(""), str8_lit_comp("Move Up Reorder"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_down_reorder"), str8_lit_comp("Moves the cursor or selection down, while swapping the currently selected element with that downward."), str8_lit_comp(""), str8_lit_comp("Move Down Reorder"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_home"), str8_lit_comp("Moves the cursor to the beginning of the line."), str8_lit_comp(""), str8_lit_comp("Move Home"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_end"), str8_lit_comp("Moves the cursor to the end of the line."), str8_lit_comp(""), str8_lit_comp("Move End"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_home_select"), str8_lit_comp("Moves the cursor to the beginning of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Home Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("move_end_select"), str8_lit_comp("Moves the cursor to the end of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move End Select"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("select_all"), str8_lit_comp("Selects everything possible."), str8_lit_comp(""), str8_lit_comp("Select All"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("delete_single"), str8_lit_comp("Deletes a single element to the right of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Delete Single"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("delete_chunk"), str8_lit_comp("Deletes a chunk to the right of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Delete Chunk"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("backspace_single"), str8_lit_comp("Deletes a single element to the left of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Backspace Single"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("backspace_chunk"), str8_lit_comp("Deletes a chunk to the left of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Backspace Chunk"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("copy"), str8_lit_comp("Copies the active selection to the clipboard."), str8_lit_comp(""), str8_lit_comp("Copy"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Clipboard}, +{ str8_lit_comp("cut"), str8_lit_comp("Copies the active selection to the clipboard, then deletes it."), str8_lit_comp(""), str8_lit_comp("Cut"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Clipboard}, +{ str8_lit_comp("paste"), str8_lit_comp("Pastes the current contents of the clipboard."), str8_lit_comp(""), str8_lit_comp("Paste"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Clipboard}, +{ str8_lit_comp("insert_text"), str8_lit_comp("Inserts the text that was used to cause this command."), str8_lit_comp(""), str8_lit_comp("Insert Text"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("goto_line"), str8_lit_comp("Jumps to a line number in the current code file."), str8_lit_comp(""), str8_lit_comp("Go To Line"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_TextPoint, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, +{ str8_lit_comp("goto_address"), str8_lit_comp("Jumps to an address in the current memory or disassembly view."), str8_lit_comp(""), str8_lit_comp("Go To Address"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_VirtualAddr, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, +{ str8_lit_comp("center_cursor"), str8_lit_comp("Snaps the current code view to center the cursor."), str8_lit_comp(""), str8_lit_comp("Center Cursor"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("contain_cursor"), str8_lit_comp("Snaps the current code view to contain the cursor."), str8_lit_comp(""), str8_lit_comp("Contain Cursor"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("find_text_forward"), str8_lit_comp("Searches the current code file forward (from the cursor) for a string."), str8_lit_comp(""), str8_lit_comp("Find Text (Forward)"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_String, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*1)|(D_CmdQueryFlag_SelectOldInput*1)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Find}, +{ str8_lit_comp("find_text_backward"), str8_lit_comp("Searches the current code file backwards (from the cursor) for a string."), str8_lit_comp(""), str8_lit_comp("Find Text (Backwards)"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_String, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*1)|(D_CmdQueryFlag_SelectOldInput*1)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Find}, +{ str8_lit_comp("find_next"), str8_lit_comp("Searches the current code file forward (from the cursor) for the last searched string."), str8_lit_comp(""), str8_lit_comp("Find Next"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*1)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, +{ str8_lit_comp("find_prev"), str8_lit_comp("Searches the current code file backwards (from the cursor) for the last searched string."), str8_lit_comp(""), str8_lit_comp("Find Previous"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*1)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, +{ str8_lit_comp("find_thread"), str8_lit_comp("Jumps to the passed thread in either source code, disassembly, or both if they're already open."), str8_lit_comp(""), str8_lit_comp("Find Thread"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Thread, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Find}, +{ str8_lit_comp("find_selected_thread"), str8_lit_comp("Jumps to the selected thread in either source code, disassembly, or both if they're already open."), str8_lit_comp(""), str8_lit_comp("Find Selected Thread"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, +{ str8_lit_comp("goto_name"), str8_lit_comp("Searches for the passed string as a file, a symbol in debug info, and more, then jumps to it if possible."), str8_lit_comp(""), str8_lit_comp("Go To Name"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_String, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, +{ str8_lit_comp("goto_name_at_cursor"), str8_lit_comp("Searches for the text at the cursor as a file, a symbol in debug info, and more, then jumps to it if possible."), str8_lit_comp(""), str8_lit_comp("Go To Name At Cursor"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("toggle_watch_expr"), str8_lit_comp("Adds or removes an expression to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("toggle_watch_expr_at_cursor"), str8_lit_comp("Adds or removes the expression that the cursor or selection is currently over to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression At Cursor"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("toggle_watch_expr_at_mouse"), str8_lit_comp("Adds or removes the expression that the mouse is currently over to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression At Mouse"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("set_columns"), str8_lit_comp("Sets the number of columns for a memory view."), str8_lit_comp(""), str8_lit_comp("Set Columns"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Index, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Thumbnails}, +{ str8_lit_comp("toggle_address_visibility"), str8_lit_comp("Toggles the visibility of addresses in a disassembly view."), str8_lit_comp(""), str8_lit_comp("Toggle Address Visibility"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Thumbnails}, +{ str8_lit_comp("toggle_code_bytes_visibility"), str8_lit_comp("Toggles the visibility of machine code bytes in a disassembly view."), str8_lit_comp(""), str8_lit_comp("Toggle Code Bytes Visibility"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Thumbnails}, +{ str8_lit_comp("enable_entity"), str8_lit_comp("Enables an entity."), str8_lit_comp(""), str8_lit_comp("Enable Entity"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("disable_entity"), str8_lit_comp("Disables an entity."), str8_lit_comp(""), str8_lit_comp("Disable Entity"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("freeze_entity"), str8_lit_comp("Freezes an entity."), str8_lit_comp(""), str8_lit_comp("Freeze Entity"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("thaw_entity"), str8_lit_comp("Thaws an entity."), str8_lit_comp(""), str8_lit_comp("Thaw Entity"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("remove_entity"), str8_lit_comp("Removes an entity."), str8_lit_comp(""), str8_lit_comp("Remove Entity"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("name_entity"), str8_lit_comp("Equips an entity with a name."), str8_lit_comp(""), str8_lit_comp("Name Entity"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("edit_entity"), str8_lit_comp("Opens the editor for an entity."), str8_lit_comp(""), str8_lit_comp("Edit Entity"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("duplicate_entity"), str8_lit_comp("Duplicates an entity."), str8_lit_comp(""), str8_lit_comp("Duplicate Entity"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("relocate_entity"), str8_lit_comp("Relocates an entity."), str8_lit_comp(""), str8_lit_comp("Relocate Entity"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("add_breakpoint"), str8_lit_comp("Places a breakpoint at a given location (file path and line number, address, or symbol name)."), str8_lit_comp(""), str8_lit_comp("Add Breakpoint"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled}, +{ str8_lit_comp("add_address_breakpoint"), str8_lit_comp("Places a breakpoint on the specified address."), str8_lit_comp(""), str8_lit_comp("Add Address Breakpoint"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_VirtualAddr, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_CircleFilled}, +{ str8_lit_comp("add_function_breakpoint"), str8_lit_comp("Places a breakpoint on the first address(es) of the specified function."), str8_lit_comp(""), str8_lit_comp("Add Function Breakpoint"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_String, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_CircleFilled}, +{ str8_lit_comp("toggle_breakpoint"), str8_lit_comp("Places or removes a breakpoint at a given location (file path and line number, address, or symbol name)."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled}, +{ str8_lit_comp("remove_breakpoint"), str8_lit_comp("Removes an existing breakpoint."), str8_lit_comp(""), str8_lit_comp("Remove Breakpoint"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Breakpoint, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Trash}, +{ str8_lit_comp("enable_breakpoint"), str8_lit_comp("Enables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Enable Breakpoint"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Breakpoint, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_CheckFilled}, +{ str8_lit_comp("disable_breakpoint"), str8_lit_comp("Disables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Disable Breakpoint"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Breakpoint, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_CheckHollow}, +{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("toggle_breakpoint_cursor"), str8_lit_comp("Places or removes a breakpoint on the line on which the active cursor sits."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint At Cursor"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled}, +{ str8_lit_comp("toggle_watch_pin_at_cursor"), str8_lit_comp("Places or removes a watch pin at the cursor on the currently active file."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin At Cursor"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_String, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*1)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("add_target"), str8_lit_comp("Adds a new target."), str8_lit_comp("application,executable,debug"), str8_lit_comp("Add Target"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_FilePath, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*1)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Target}, +{ str8_lit_comp("remove_target"), str8_lit_comp("Removes an existing target."), str8_lit_comp("delete,remove,target"), str8_lit_comp("Remove Target"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Target, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Trash}, +{ str8_lit_comp("edit_target"), str8_lit_comp("Edits an existing target."), str8_lit_comp(""), str8_lit_comp("Edit Target"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Target, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Pencil}, +{ str8_lit_comp("select_target"), str8_lit_comp("Selects a target."), str8_lit_comp(""), str8_lit_comp("Select Target"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Target, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Target}, +{ str8_lit_comp("enable_target"), str8_lit_comp("Enables a target, in addition to all targets currently enabled."), str8_lit_comp(""), str8_lit_comp("Enable Target"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Target, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_CheckFilled}, +{ str8_lit_comp("disable_target"), str8_lit_comp("Disables a target."), str8_lit_comp(""), str8_lit_comp("Disable Target"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Entity, D_EntityKind_Target, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_CheckHollow}, +{ str8_lit_comp("retry_ended_process"), str8_lit_comp("Launches a new process with the same options as the passed ended process."), str8_lit_comp(""), str8_lit_comp("Retry Ended Process"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Entity, D_EntityKind_Process, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("attach"), str8_lit_comp("Attaches to a process that is already running on the local machine."), str8_lit_comp(""), str8_lit_comp("Attach"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_ID, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, +{ str8_lit_comp("register_as_jit_debugger"), str8_lit_comp("Registers the RAD debugger as the just-in-time (JIT) debugger used by the operating system."), str8_lit_comp(""), str8_lit_comp("Register As Just-In-Time (JIT) Debugger"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("entity_ref_fast_path"), str8_lit_comp("Activates the default behavior when clicking an entity reference."), str8_lit_comp(""), str8_lit_comp("Entity Reference Fast Path"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("spawn_entity_view"), str8_lit_comp("Spawns a new view, given an entity and other parameterizations."), str8_lit_comp(""), str8_lit_comp("Spawn Entity View"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("find_code_location"), str8_lit_comp("Finds a specific source code location given file, line, and column coordinates. Opens the file if necessary."), str8_lit_comp(""), str8_lit_comp("Find Code Location"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_FilePath, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline}, +{ str8_lit_comp("filter"), str8_lit_comp("Begins filtering the active view."), str8_lit_comp("sort,search,filter,find"), str8_lit_comp("Filter"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, +{ str8_lit_comp("apply_filter"), str8_lit_comp("Applies the typed filter to the active view."), str8_lit_comp("sort,search,filter,find,apply"), str8_lit_comp("Apply Filter"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, +{ str8_lit_comp("clear_filter"), str8_lit_comp("Clears the filter applied to the active view."), str8_lit_comp("sort,search,filter,find,clear"), str8_lit_comp("Clear Filter"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, +{ str8_lit_comp("getting_started"), str8_lit_comp("Opens the menu for information on getting started."), str8_lit_comp("tutorial,help"), str8_lit_comp("Getting Started"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_QuestionMark}, +{ str8_lit_comp("commands"), str8_lit_comp("Opens the list of all commands."), str8_lit_comp(""), str8_lit_comp("Commands"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_List}, +{ str8_lit_comp("target"), str8_lit_comp("Opens the editor for a target."), str8_lit_comp(""), str8_lit_comp("Target"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Target}, +{ str8_lit_comp("targets"), str8_lit_comp("Opens the list of all targets."), str8_lit_comp(""), str8_lit_comp("Targets"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Target}, +{ str8_lit_comp("file_path_map"), str8_lit_comp("Opens the file path mapping editor."), str8_lit_comp(""), str8_lit_comp("File Path Map"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline}, +{ str8_lit_comp("auto_view_rules"), str8_lit_comp("Opens the auto view rule editor."), str8_lit_comp(""), str8_lit_comp("Auto View Rules"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("breakpoints"), str8_lit_comp("Opens the breakpoints view."), str8_lit_comp(""), str8_lit_comp("Breakpoints"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled}, +{ str8_lit_comp("watch_pins"), str8_lit_comp("Opens the watch pins view."), str8_lit_comp(""), str8_lit_comp("Watch Pins"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Pin}, +{ str8_lit_comp("scheduler"), str8_lit_comp("Opens the scheduler view, for process and thread controls."), str8_lit_comp("threads,processes,targets"), str8_lit_comp("Scheduler"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Scheduler}, +{ str8_lit_comp("call_stack"), str8_lit_comp("Opens the call stack view."), str8_lit_comp("callstack,thread,unwind"), str8_lit_comp("Call Stack"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Thread}, +{ str8_lit_comp("modules"), str8_lit_comp("Opens the modules view."), str8_lit_comp(""), str8_lit_comp("Modules"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Module}, +{ str8_lit_comp("watch"), str8_lit_comp("Opens a watch view."), str8_lit_comp(""), str8_lit_comp("Watch"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("locals"), str8_lit_comp("Opens a locals view."), str8_lit_comp(""), str8_lit_comp("Locals"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("registers"), str8_lit_comp("Opens a registers view."), str8_lit_comp(""), str8_lit_comp("Registers"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("globals"), str8_lit_comp("Opens a globals view."), str8_lit_comp(""), str8_lit_comp("Globals"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("thread_locals"), str8_lit_comp("Opens a thread locals view."), str8_lit_comp(""), str8_lit_comp("Thread Locals"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("types"), str8_lit_comp("Opens a types view."), str8_lit_comp(""), str8_lit_comp("Types"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("procedures"), str8_lit_comp("Opens a procedures view."), str8_lit_comp(""), str8_lit_comp("Procedures"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, +{ str8_lit_comp("pending_file"), str8_lit_comp("Opens a view which asynchronously analyzes the file path parameter, then picks an appropriate viewer for it."), str8_lit_comp(""), str8_lit_comp("Pending File"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline}, +{ str8_lit_comp("disassembly"), str8_lit_comp("Opens the disassembly view."), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Glasses}, +{ str8_lit_comp("output"), str8_lit_comp("Opens an output view."), str8_lit_comp(""), str8_lit_comp("Output"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_List}, +{ str8_lit_comp("memory"), str8_lit_comp("Opens a memory view."), str8_lit_comp(""), str8_lit_comp("Memory"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Grid}, +{ str8_lit_comp("exception_filters"), str8_lit_comp("Opens the exception filters view."), str8_lit_comp("exceptions,filters"), str8_lit_comp("Exception Filters"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Gear}, +{ str8_lit_comp("settings"), str8_lit_comp("Opens the settings view."), str8_lit_comp("theme,color,scheme,options"), str8_lit_comp("Settings"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Gear}, +{ str8_lit_comp("pick_file"), str8_lit_comp("Opens the file browser to pick a file."), str8_lit_comp(""), str8_lit_comp("Pick File"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_FilePath, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*1)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline}, +{ str8_lit_comp("pick_folder"), str8_lit_comp("Opens the file browser to pick a folder."), str8_lit_comp(""), str8_lit_comp("Pick Folder"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_FilePath, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*1)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_FolderOpenFilled}, +{ str8_lit_comp("pick_file_or_folder"), str8_lit_comp("Opens the file browser to pick a file or folder."), str8_lit_comp(""), str8_lit_comp("Pick File/Folder"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_FilePath, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*1)|(D_CmdQueryFlag_AllowFolders*1)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline}, +{ str8_lit_comp("complete_query"), str8_lit_comp("Completes a query."), str8_lit_comp(""), str8_lit_comp("Complete Query"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("cancel_query"), str8_lit_comp("Cancels a query."), str8_lit_comp(""), str8_lit_comp("Cancel Query"), (D_CmdSpecFlag_ListInUI*0)|(D_CmdSpecFlag_ListInIPCDocs*0), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("toggle_dev_menu"), str8_lit_comp("Opens and closes the developer menu."), str8_lit_comp(""), str8_lit_comp("Toggle Developer Menu"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +{ str8_lit_comp("log_marker"), str8_lit_comp("Logs a marker in the application log, to denote specific points in time within the log."), str8_lit_comp(""), str8_lit_comp("Log Marker"), (D_CmdSpecFlag_ListInUI*1)|(D_CmdSpecFlag_ListInIPCDocs*1), {D_CmdParamSlot_Null, D_EntityKind_Nil, (D_CmdQueryFlag_AllowFiles*0)|(D_CmdQueryFlag_AllowFolders*0)|(D_CmdQueryFlag_CodeInput*0)|(D_CmdQueryFlag_KeepOldInput*0)|(D_CmdQueryFlag_SelectOldInput*0)|(D_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, +}; + +D_ViewRuleSpecInfo d_core_view_rule_spec_info_table[21] = +{ +{str8_lit_comp("default"), str8_lit_comp("Default"), str8_lit_comp(""), str8_lit_comp(""), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(default) , }, +{str8_lit_comp("array"), str8_lit_comp("Array"), str8_lit_comp("x:{expr}"), str8_lit_comp("Specifies that a pointer points to N elements, rather than only 1."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*1)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(array) , 0, }, +{str8_lit_comp("slice"), str8_lit_comp("Slice"), str8_lit_comp(""), str8_lit_comp("Specifies that a pointer within a struct, also containing an integer, points to the number of elements encoded by the integer."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*1)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(slice) , 0, }, +{str8_lit_comp("list"), str8_lit_comp("List"), str8_lit_comp("x:{member}"), str8_lit_comp("Specifies that some struct, union, or class forms the top of a linked list, and the member which points at the following element in the list."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(list) , }, +{str8_lit_comp("bswap"), str8_lit_comp("Byte Swap"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should be byte-swapped, such that their endianness is reversed."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*1)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(bswap) , 0, }, +{str8_lit_comp("cast"), str8_lit_comp("Cast"), str8_lit_comp("x:{type}"), str8_lit_comp("Specifies that the expression to which the view rule is applied should be casted to the provided type."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*1)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(cast) , 0, }, +{str8_lit_comp("dec"), str8_lit_comp("Decimal Base (Base 10)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-10 form."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, +{str8_lit_comp("bin"), str8_lit_comp("Binary Base (Base 2)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-2 form."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, +{str8_lit_comp("oct"), str8_lit_comp("Octal Base (Base 8)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-8 form."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, +{str8_lit_comp("hex"), str8_lit_comp("Hexadecimal Base (Base 16)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-16 form."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, +{str8_lit_comp("only"), str8_lit_comp("Only Specified Members"), str8_lit_comp("x:{member}"), str8_lit_comp("Specifies that only the specified members should appear in struct, union, or class evaluations."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(only) , }, +{str8_lit_comp("omit"), str8_lit_comp("Omit Specified Members"), str8_lit_comp("x:{member}"), str8_lit_comp("Omits a list of member names from appearing in struct, union, or class evaluations."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(omit) , }, +{str8_lit_comp("no_addr"), str8_lit_comp("Disable Address Values"), str8_lit_comp(""), str8_lit_comp("Displays only what pointers point to, if possible, without the pointer's address value."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, +{str8_lit_comp("checkbox"), str8_lit_comp("Checkbox"), str8_lit_comp(""), str8_lit_comp("Displays simple integer values as checkboxes, encoding zero or nonzero values."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, +{str8_lit_comp("color_rgba"), str8_lit_comp("Color (RGBA)"), str8_lit_comp(""), str8_lit_comp("Displays as a color, interpreting the data as encoding R, G, B, and A values."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(color_rgba) , }, +{str8_lit_comp("text"), str8_lit_comp("Text"), str8_lit_comp("x:{'lang':lang, 'size':expr}"), str8_lit_comp("Displays as text."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(text) , }, +{str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), str8_lit_comp("x:{'arch':arch, 'size':expr}"), str8_lit_comp("Displays as disassembled instructions, interpreting the data as raw machine code."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(disasm) , }, +{str8_lit_comp("memory"), str8_lit_comp("Memory"), str8_lit_comp("x:{'size':expr}"), str8_lit_comp("Displays as a raw memory grid."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(memory) , }, +{str8_lit_comp("graph"), str8_lit_comp("Graph"), str8_lit_comp(""), str8_lit_comp("Displays as a pointer graph, visualizing nodes and edges formed by pointers directly."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(graph) , }, +{str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), str8_lit_comp("x:{'w':expr, 'h':expr, 'fmt':tex2dformat}"), str8_lit_comp("Displays as a bitmap, interpreting the data as raw pixel data."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(bitmap) , }, +{str8_lit_comp("geo3d"), str8_lit_comp("Geometry (3D)"), str8_lit_comp("x:{'count':expr, 'vtx':expr, 'vtx_size':expr}"), str8_lit_comp("Displays as geometry, interpreting the data as index or vertex data."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), 0, D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(geo3d) , }, +}; + +String8 df_g_icon_kind_text_table[69] = +{ +str8_lit_comp(""), +str8_lit_comp("b"), +str8_lit_comp("c"), +str8_lit_comp("B"), +str8_lit_comp("C"), +str8_lit_comp("f"), +str8_lit_comp("F"), +str8_lit_comp("g"), +str8_lit_comp("h"), +str8_lit_comp("r"), +str8_lit_comp("s"), +str8_lit_comp("i"), +str8_lit_comp("w"), +str8_lit_comp("W"), +str8_lit_comp("k"), +str8_lit_comp("K"), +str8_lit_comp("L"), +str8_lit_comp("R"), +str8_lit_comp("U"), +str8_lit_comp("D"), +str8_lit_comp("G"), +str8_lit_comp("P"), +str8_lit_comp("3"), +str8_lit_comp("p"), +str8_lit_comp("O"), +str8_lit_comp("o"), +str8_lit_comp("!"), +str8_lit_comp("1"), +str8_lit_comp("<"), +str8_lit_comp(">"), +str8_lit_comp("^"), +str8_lit_comp("v"), +str8_lit_comp("9"), +str8_lit_comp("0"), +str8_lit_comp("7"), +str8_lit_comp("8"), +str8_lit_comp("+"), +str8_lit_comp("-"), +str8_lit_comp("'"), +str8_lit_comp("\""), +str8_lit_comp("M"), +str8_lit_comp("."), +str8_lit_comp("x"), +str8_lit_comp("q"), +str8_lit_comp("j"), +str8_lit_comp("u"), +str8_lit_comp("m"), +str8_lit_comp("n"), +str8_lit_comp("l"), +str8_lit_comp("a"), +str8_lit_comp("z"), +str8_lit_comp("y"), +str8_lit_comp("X"), +str8_lit_comp("Y"), +str8_lit_comp("S"), +str8_lit_comp("T"), +str8_lit_comp("Z"), +str8_lit_comp("d"), +str8_lit_comp("N"), +str8_lit_comp("E"), +str8_lit_comp("H"), +str8_lit_comp("e"), +str8_lit_comp("I"), +str8_lit_comp("J"), +str8_lit_comp("A"), +str8_lit_comp("?"), +str8_lit_comp("4"), +str8_lit_comp("5"), +str8_lit_comp("c"), +}; + +C_LINKAGE_END + diff --git a/src/dbg_engine/generated/dbg_engine.meta.h b/src/dbg_engine/generated/dbg_engine.meta.h new file mode 100644 index 00000000..773160bc --- /dev/null +++ b/src/dbg_engine/generated/dbg_engine.meta.h @@ -0,0 +1,489 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +//- GENERATED CODE + +#ifndef DBG_ENGINE_META_H +#define DBG_ENGINE_META_H + +typedef enum D_CfgSrc +{ +D_CfgSrc_User, +D_CfgSrc_Project, +D_CfgSrc_CommandLine, +D_CfgSrc_Transient, +D_CfgSrc_COUNT, +} D_CfgSrc; + +typedef enum D_EntityKind +{ +D_EntityKind_Nil, +D_EntityKind_Root, +D_EntityKind_Machine, +D_EntityKind_File, +D_EntityKind_AutoViewRule, +D_EntityKind_FilePathMap, +D_EntityKind_WatchPin, +D_EntityKind_Watch, +D_EntityKind_ViewRule, +D_EntityKind_Breakpoint, +D_EntityKind_Condition, +D_EntityKind_Location, +D_EntityKind_Target, +D_EntityKind_Executable, +D_EntityKind_Arguments, +D_EntityKind_WorkingDirectory, +D_EntityKind_EntryPoint, +D_EntityKind_RecentProject, +D_EntityKind_Source, +D_EntityKind_Dest, +D_EntityKind_Process, +D_EntityKind_Thread, +D_EntityKind_Module, +D_EntityKind_PendingThreadName, +D_EntityKind_DebugInfoPath, +D_EntityKind_ConversionTask, +D_EntityKind_ConversionFail, +D_EntityKind_EndedProcess, +D_EntityKind_COUNT, +} D_EntityKind; + +typedef enum D_CmdKind +{ +D_CmdKind_Null, +D_CmdKind_Exit, +D_CmdKind_RunCommand, +D_CmdKind_Error, +D_CmdKind_OSEvent, +D_CmdKind_LaunchAndRun, +D_CmdKind_LaunchAndInit, +D_CmdKind_Kill, +D_CmdKind_KillAll, +D_CmdKind_Detach, +D_CmdKind_Continue, +D_CmdKind_StepIntoInst, +D_CmdKind_StepOverInst, +D_CmdKind_StepIntoLine, +D_CmdKind_StepOverLine, +D_CmdKind_StepOut, +D_CmdKind_Halt, +D_CmdKind_SoftHaltRefresh, +D_CmdKind_SetThreadIP, +D_CmdKind_RunToLine, +D_CmdKind_RunToAddress, +D_CmdKind_Run, +D_CmdKind_Restart, +D_CmdKind_StepInto, +D_CmdKind_StepOver, +D_CmdKind_RunToCursor, +D_CmdKind_SetNextStatement, +D_CmdKind_SelectThread, +D_CmdKind_SelectUnwind, +D_CmdKind_UpOneFrame, +D_CmdKind_DownOneFrame, +D_CmdKind_FreezeThread, +D_CmdKind_ThawThread, +D_CmdKind_FreezeProcess, +D_CmdKind_ThawProcess, +D_CmdKind_FreezeMachine, +D_CmdKind_ThawMachine, +D_CmdKind_FreezeLocalMachine, +D_CmdKind_ThawLocalMachine, +D_CmdKind_IncUIFontScale, +D_CmdKind_DecUIFontScale, +D_CmdKind_IncCodeFontScale, +D_CmdKind_DecCodeFontScale, +D_CmdKind_OpenWindow, +D_CmdKind_CloseWindow, +D_CmdKind_ToggleFullscreen, +D_CmdKind_ConfirmAccept, +D_CmdKind_ConfirmCancel, +D_CmdKind_ResetToDefaultPanels, +D_CmdKind_ResetToCompactPanels, +D_CmdKind_NewPanelLeft, +D_CmdKind_NewPanelUp, +D_CmdKind_NewPanelRight, +D_CmdKind_NewPanelDown, +D_CmdKind_SplitPanel, +D_CmdKind_RotatePanelColumns, +D_CmdKind_NextPanel, +D_CmdKind_PrevPanel, +D_CmdKind_FocusPanel, +D_CmdKind_FocusPanelRight, +D_CmdKind_FocusPanelLeft, +D_CmdKind_FocusPanelUp, +D_CmdKind_FocusPanelDown, +D_CmdKind_Undo, +D_CmdKind_Redo, +D_CmdKind_GoBack, +D_CmdKind_GoForward, +D_CmdKind_ClosePanel, +D_CmdKind_NextTab, +D_CmdKind_PrevTab, +D_CmdKind_MoveTabRight, +D_CmdKind_MoveTabLeft, +D_CmdKind_OpenTab, +D_CmdKind_CloseTab, +D_CmdKind_MoveTab, +D_CmdKind_TabBarTop, +D_CmdKind_TabBarBottom, +D_CmdKind_SetCurrentPath, +D_CmdKind_Open, +D_CmdKind_Switch, +D_CmdKind_SwitchToPartnerFile, +D_CmdKind_GoToDisassembly, +D_CmdKind_GoToSource, +D_CmdKind_SetFileOverrideLinkSrc, +D_CmdKind_SetFileOverrideLinkDst, +D_CmdKind_SetFileReplacementPath, +D_CmdKind_SetAutoViewRuleType, +D_CmdKind_SetAutoViewRuleViewRule, +D_CmdKind_OpenUser, +D_CmdKind_OpenProject, +D_CmdKind_OpenRecentProject, +D_CmdKind_ApplyUserData, +D_CmdKind_ApplyProjectData, +D_CmdKind_WriteUserData, +D_CmdKind_WriteProjectData, +D_CmdKind_Edit, +D_CmdKind_Accept, +D_CmdKind_Cancel, +D_CmdKind_MoveLeft, +D_CmdKind_MoveRight, +D_CmdKind_MoveUp, +D_CmdKind_MoveDown, +D_CmdKind_MoveLeftSelect, +D_CmdKind_MoveRightSelect, +D_CmdKind_MoveUpSelect, +D_CmdKind_MoveDownSelect, +D_CmdKind_MoveLeftChunk, +D_CmdKind_MoveRightChunk, +D_CmdKind_MoveUpChunk, +D_CmdKind_MoveDownChunk, +D_CmdKind_MoveUpPage, +D_CmdKind_MoveDownPage, +D_CmdKind_MoveUpWhole, +D_CmdKind_MoveDownWhole, +D_CmdKind_MoveLeftChunkSelect, +D_CmdKind_MoveRightChunkSelect, +D_CmdKind_MoveUpChunkSelect, +D_CmdKind_MoveDownChunkSelect, +D_CmdKind_MoveUpPageSelect, +D_CmdKind_MoveDownPageSelect, +D_CmdKind_MoveUpWholeSelect, +D_CmdKind_MoveDownWholeSelect, +D_CmdKind_MoveUpReorder, +D_CmdKind_MoveDownReorder, +D_CmdKind_MoveHome, +D_CmdKind_MoveEnd, +D_CmdKind_MoveHomeSelect, +D_CmdKind_MoveEndSelect, +D_CmdKind_SelectAll, +D_CmdKind_DeleteSingle, +D_CmdKind_DeleteChunk, +D_CmdKind_BackspaceSingle, +D_CmdKind_BackspaceChunk, +D_CmdKind_Copy, +D_CmdKind_Cut, +D_CmdKind_Paste, +D_CmdKind_InsertText, +D_CmdKind_GoToLine, +D_CmdKind_GoToAddress, +D_CmdKind_CenterCursor, +D_CmdKind_ContainCursor, +D_CmdKind_FindTextForward, +D_CmdKind_FindTextBackward, +D_CmdKind_FindNext, +D_CmdKind_FindPrev, +D_CmdKind_FindThread, +D_CmdKind_FindSelectedThread, +D_CmdKind_GoToName, +D_CmdKind_GoToNameAtCursor, +D_CmdKind_ToggleWatchExpression, +D_CmdKind_ToggleWatchExpressionAtCursor, +D_CmdKind_ToggleWatchExpressionAtMouse, +D_CmdKind_SetColumns, +D_CmdKind_ToggleAddressVisibility, +D_CmdKind_ToggleCodeBytesVisibility, +D_CmdKind_EnableEntity, +D_CmdKind_DisableEntity, +D_CmdKind_FreezeEntity, +D_CmdKind_ThawEntity, +D_CmdKind_RemoveEntity, +D_CmdKind_NameEntity, +D_CmdKind_EditEntity, +D_CmdKind_DuplicateEntity, +D_CmdKind_RelocateEntity, +D_CmdKind_AddBreakpoint, +D_CmdKind_AddAddressBreakpoint, +D_CmdKind_AddFunctionBreakpoint, +D_CmdKind_ToggleBreakpoint, +D_CmdKind_RemoveBreakpoint, +D_CmdKind_EnableBreakpoint, +D_CmdKind_DisableBreakpoint, +D_CmdKind_AddWatchPin, +D_CmdKind_ToggleWatchPin, +D_CmdKind_ToggleBreakpointAtCursor, +D_CmdKind_ToggleWatchPinAtCursor, +D_CmdKind_AddTarget, +D_CmdKind_RemoveTarget, +D_CmdKind_EditTarget, +D_CmdKind_SelectTarget, +D_CmdKind_EnableTarget, +D_CmdKind_DisableTarget, +D_CmdKind_RetryEndedProcess, +D_CmdKind_Attach, +D_CmdKind_RegisterAsJITDebugger, +D_CmdKind_EntityRefFastPath, +D_CmdKind_SpawnEntityView, +D_CmdKind_FindCodeLocation, +D_CmdKind_Filter, +D_CmdKind_ApplyFilter, +D_CmdKind_ClearFilter, +D_CmdKind_GettingStarted, +D_CmdKind_Commands, +D_CmdKind_Target, +D_CmdKind_Targets, +D_CmdKind_FilePathMap, +D_CmdKind_AutoViewRules, +D_CmdKind_Breakpoints, +D_CmdKind_WatchPins, +D_CmdKind_Scheduler, +D_CmdKind_CallStack, +D_CmdKind_Modules, +D_CmdKind_Watch, +D_CmdKind_Locals, +D_CmdKind_Registers, +D_CmdKind_Globals, +D_CmdKind_ThreadLocals, +D_CmdKind_Types, +D_CmdKind_Procedures, +D_CmdKind_PendingFile, +D_CmdKind_Disassembly, +D_CmdKind_Output, +D_CmdKind_Memory, +D_CmdKind_ExceptionFilters, +D_CmdKind_Settings, +D_CmdKind_PickFile, +D_CmdKind_PickFolder, +D_CmdKind_PickFileOrFolder, +D_CmdKind_CompleteQuery, +D_CmdKind_CancelQuery, +D_CmdKind_ToggleDevMenu, +D_CmdKind_LogMarker, +D_CmdKind_COUNT, +} D_CmdKind; + +typedef enum DF_IconKind +{ +DF_IconKind_Null, +DF_IconKind_FolderOpenOutline, +DF_IconKind_FolderClosedOutline, +DF_IconKind_FolderOpenFilled, +DF_IconKind_FolderClosedFilled, +DF_IconKind_FileOutline, +DF_IconKind_FileFilled, +DF_IconKind_Play, +DF_IconKind_PlayStepForward, +DF_IconKind_Pause, +DF_IconKind_Stop, +DF_IconKind_Info, +DF_IconKind_WarningSmall, +DF_IconKind_WarningBig, +DF_IconKind_Unlocked, +DF_IconKind_Locked, +DF_IconKind_LeftArrow, +DF_IconKind_RightArrow, +DF_IconKind_UpArrow, +DF_IconKind_DownArrow, +DF_IconKind_Gear, +DF_IconKind_Pencil, +DF_IconKind_Trash, +DF_IconKind_Pin, +DF_IconKind_RadioHollow, +DF_IconKind_RadioFilled, +DF_IconKind_CheckHollow, +DF_IconKind_CheckFilled, +DF_IconKind_LeftCaret, +DF_IconKind_RightCaret, +DF_IconKind_UpCaret, +DF_IconKind_DownCaret, +DF_IconKind_UpScroll, +DF_IconKind_DownScroll, +DF_IconKind_LeftScroll, +DF_IconKind_RightScroll, +DF_IconKind_Add, +DF_IconKind_Minus, +DF_IconKind_Thread, +DF_IconKind_Threads, +DF_IconKind_Machine, +DF_IconKind_CircleFilled, +DF_IconKind_X, +DF_IconKind_Refresh, +DF_IconKind_Undo, +DF_IconKind_Redo, +DF_IconKind_Save, +DF_IconKind_Window, +DF_IconKind_Target, +DF_IconKind_Clipboard, +DF_IconKind_Scheduler, +DF_IconKind_Module, +DF_IconKind_XSplit, +DF_IconKind_YSplit, +DF_IconKind_ClosePanel, +DF_IconKind_StepInto, +DF_IconKind_StepOver, +DF_IconKind_StepOut, +DF_IconKind_Find, +DF_IconKind_Palette, +DF_IconKind_Thumbnails, +DF_IconKind_Glasses, +DF_IconKind_Binoculars, +DF_IconKind_List, +DF_IconKind_Grid, +DF_IconKind_QuestionMark, +DF_IconKind_Person, +DF_IconKind_Briefcase, +DF_IconKind_Dot, +DF_IconKind_COUNT, +} DF_IconKind; + +typedef enum D_ViewRuleKind +{ +D_ViewRuleKind_Default, +D_ViewRuleKind_Array, +D_ViewRuleKind_Slice, +D_ViewRuleKind_List, +D_ViewRuleKind_ByteSwap, +D_ViewRuleKind_Cast, +D_ViewRuleKind_BaseDec, +D_ViewRuleKind_BaseBin, +D_ViewRuleKind_BaseOct, +D_ViewRuleKind_BaseHex, +D_ViewRuleKind_Only, +D_ViewRuleKind_Omit, +D_ViewRuleKind_NoAddr, +D_ViewRuleKind_Checkbox, +D_ViewRuleKind_ColorRGBA, +D_ViewRuleKind_Text, +D_ViewRuleKind_Disasm, +D_ViewRuleKind_Memory, +D_ViewRuleKind_Graph, +D_ViewRuleKind_Bitmap, +D_ViewRuleKind_Geo3D, +D_ViewRuleKind_COUNT, +} D_ViewRuleKind; + +typedef enum D_CmdParamSlot +{ +D_CmdParamSlot_Null, +D_CmdParamSlot_Window, +D_CmdParamSlot_Panel, +D_CmdParamSlot_DestPanel, +D_CmdParamSlot_PrevView, +D_CmdParamSlot_View, +D_CmdParamSlot_Entity, +D_CmdParamSlot_EntityList, +D_CmdParamSlot_String, +D_CmdParamSlot_FilePath, +D_CmdParamSlot_TextPoint, +D_CmdParamSlot_CmdSpec, +D_CmdParamSlot_ViewSpec, +D_CmdParamSlot_ParamsTree, +D_CmdParamSlot_OSEvent, +D_CmdParamSlot_VirtualAddr, +D_CmdParamSlot_VirtualOff, +D_CmdParamSlot_Index, +D_CmdParamSlot_ID, +D_CmdParamSlot_PreferDisassembly, +D_CmdParamSlot_ForceConfirm, +D_CmdParamSlot_Dir2, +D_CmdParamSlot_UnwindIndex, +D_CmdParamSlot_InlineDepth, +D_CmdParamSlot_COUNT, +} D_CmdParamSlot; + +typedef struct D_CmdParams D_CmdParams; +struct D_CmdParams +{ +U64 slot_props[(D_CmdParamSlot_COUNT + 63) / 64]; +D_Handle window; +D_Handle panel; +D_Handle dest_panel; +D_Handle prev_view; +D_Handle view; +D_Handle entity; +D_HandleList entity_list; +String8 string; +String8 file_path; +TxtPt text_point; +struct D_CmdSpec * cmd_spec; +struct DF_ViewSpec * view_spec; +MD_Node * params_tree; +struct OS_Event * os_event; +U64 vaddr; +U64 voff; +U64 index; +U64 id; +B32 prefer_dasm; +B32 force_confirm; +Dir2 dir2; +U64 unwind_index; +U64 inline_depth; +}; + +D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(array); +D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(slice); +D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(bswap); +D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(cast); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(list); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(only); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(omit); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(color_rgba); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(text); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(disasm); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(memory); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(graph); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(bitmap); +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(geo3d); +global B32 DEV_telemetry_capture = 0; +global B32 DEV_simulate_lag = 0; +global B32 DEV_draw_ui_text_pos = 0; +global B32 DEV_draw_ui_focus_debug = 0; +global B32 DEV_draw_ui_box_heatmap = 0; +global B32 DEV_eval_compiler_tooltips = 0; +global B32 DEV_eval_watch_key_tooltips = 0; +global B32 DEV_cmd_context_tooltips = 0; +global B32 DEV_scratch_mouse_draw = 0; +global B32 DEV_updating_indicator = 0; +struct {B32 *value_ptr; String8 name;} DEV_toggle_table[] = +{ +{&DEV_telemetry_capture, str8_lit_comp("telemetry_capture")}, +{&DEV_simulate_lag, str8_lit_comp("simulate_lag")}, +{&DEV_draw_ui_text_pos, str8_lit_comp("draw_ui_text_pos")}, +{&DEV_draw_ui_focus_debug, str8_lit_comp("draw_ui_focus_debug")}, +{&DEV_draw_ui_box_heatmap, str8_lit_comp("draw_ui_box_heatmap")}, +{&DEV_eval_compiler_tooltips, str8_lit_comp("eval_compiler_tooltips")}, +{&DEV_eval_watch_key_tooltips, str8_lit_comp("eval_watch_key_tooltips")}, +{&DEV_cmd_context_tooltips, str8_lit_comp("cmd_context_tooltips")}, +{&DEV_scratch_mouse_draw, str8_lit_comp("scratch_mouse_draw")}, +{&DEV_updating_indicator, str8_lit_comp("updating_indicator")}, +}; +C_LINKAGE_BEGIN +extern Rng1U64 d_cmd_param_slot_range_table[24]; +extern DF_IconKind d_entity_kind_icon_kind_table[28]; +extern String8 d_entity_kind_display_string_table[28]; +extern String8 d_entity_kind_name_lower_table[28]; +extern String8 d_entity_kind_name_lower_plural_table[28]; +extern String8 d_entity_kind_name_label_table[28]; +extern D_EntityKindFlags d_entity_kind_flags_table[28]; +extern String8 d_cfg_src_string_table[4]; +extern D_CmdKind d_cfg_src_load_cmd_kind_table[4]; +extern D_CmdKind d_cfg_src_write_cmd_kind_table[4]; +extern D_CmdKind d_cfg_src_apply_cmd_kind_table[4]; +extern String8 df_g_icon_kind_text_table[69]; + +C_LINKAGE_END + +#endif // DBG_ENGINE_META_H diff --git a/src/df/gfx/df_gfx.mdesk b/src/dbg_gfx/dbg_gfx.mdesk similarity index 98% rename from src/df/gfx/df_gfx.mdesk rename to src/dbg_gfx/dbg_gfx.mdesk index 0ccef4c5..58669238 100644 --- a/src/df/gfx/df_gfx.mdesk +++ b/src/dbg_gfx/dbg_gfx.mdesk @@ -286,7 +286,7 @@ DF_GfxViewTable: //~ rjf: Command Parameter Slot -> View @table(slot view_spec opt_cmd_spec) -DF_CmdParamSlot2ViewSpecMap: +D_CmdParamSlot2ViewSpecMap: { {Entity "entity_lister" "" } {EntityList "entity_lister" "" } @@ -297,19 +297,19 @@ DF_CmdParamSlot2ViewSpecMap: {String "symbol_lister" "add_function_breakpoint" } } -@data(DF_CmdParamSlot) df_g_cmd_param_slot_2_view_spec_src_map: +@data(D_CmdParamSlot) df_g_cmd_param_slot_2_view_spec_src_map: { - @expand(DF_CmdParamSlot2ViewSpecMap a) `DF_CmdParamSlot_$(a.slot)` + @expand(D_CmdParamSlot2ViewSpecMap a) `D_CmdParamSlot_$(a.slot)` } @data(String8) df_g_cmd_param_slot_2_view_spec_dst_map: { - @expand(DF_CmdParamSlot2ViewSpecMap a) `str8_lit_comp("$(a.view_spec)")` + @expand(D_CmdParamSlot2ViewSpecMap a) `str8_lit_comp("$(a.view_spec)")` } @data(String8) df_g_cmd_param_slot_2_view_spec_cmd_map: { - @expand(DF_CmdParamSlot2ViewSpecMap a) `str8_lit_comp("$(a.opt_cmd_spec)")` + @expand(D_CmdParamSlot2ViewSpecMap a) `str8_lit_comp("$(a.opt_cmd_spec)")` } //////////////////////////////// @@ -700,7 +700,7 @@ raddbg_readme: @p "A list of commands and their descriptions are below:"; @unordered_list { - @expand(DF_CoreCmdTable a) @p "$(a.ipc_docs_vis == 1 -> '`'..a.display_name..'` '..'(`'..a.string..'`) '..a.desc)"; + @expand(D_CoreCmdTable a) @p "$(a.ipc_docs_vis == 1 -> '`'..a.display_name..'` '..'(`'..a.string..'`) '..a.desc)"; } @subtitle "Targets"; @@ -716,7 +716,7 @@ raddbg_readme: @p "A list of currently-supported view rules are below:"; @unordered_list { - @expand(DF_CoreViewRuleTable a) @p "$(a.docs == 'x' -> '`'..a.string..'` ('..a.display_name..') '..a.description)"; + @expand(D_ViewRuleTable a) @p "$(a.docs == 'x' -> '`'..a.string..'` ('..a.display_name..') '..a.description)"; } @subtitle "Breakpoints"; diff --git a/src/df/gfx/df_gfx.c b/src/dbg_gfx/dbg_gfx_core.c similarity index 81% rename from src/df/gfx/df_gfx.c rename to src/dbg_gfx/dbg_gfx_core.c index 1009ba83..404dda9e 100644 --- a/src/df/gfx/df_gfx.c +++ b/src/dbg_gfx/dbg_gfx_core.c @@ -1,13 +1,13 @@ // Copyright (c) 2024 Epic Games Tools // Licensed under the MIT license (https://opensource.org/license/mit/) -#undef RADDBG_LAYER_COLOR -#define RADDBG_LAYER_COLOR 0.10f, 0.20f, 0.25f +#undef MARKUP_LAYER_COLOR +#define MARKUP_LAYER_COLOR 0.10f, 0.20f, 0.25f //////////////////////////////// //~ rjf: Generated Code -#include "generated/df_gfx.meta.c" +#include "generated/dbg_gfx.meta.c" //////////////////////////////// //~ rjf: Basic Helpers @@ -81,16 +81,16 @@ df_view_is_project_filtered(DF_View *view) String8 view_project = view->project_path; if(view_project.size != 0) { - String8 current_project = df_cfg_path_from_src(DF_CfgSrc_Project); + String8 current_project = d_cfg_path_from_src(D_CfgSrc_Project); result = !path_match_normalized(view_project, current_project); } return result; } -internal DF_Handle +internal D_Handle df_handle_from_view(DF_View *view) { - DF_Handle handle = df_handle_zero(); + D_Handle handle = d_handle_zero(); if(!df_view_is_nil(view)) { handle.u64[0] = (U64)view; @@ -100,7 +100,7 @@ df_handle_from_view(DF_View *view) } internal DF_View * -df_view_from_handle(DF_Handle handle) +df_view_from_handle(D_Handle handle) { DF_View *result = (DF_View *)handle.u64[0]; if(df_view_is_nil(result) || result->generation != handle.u64[1]) @@ -139,17 +139,17 @@ df_panel_is_nil(DF_Panel *panel) return panel == 0 || panel == &df_g_nil_panel; } -internal DF_Handle +internal D_Handle df_handle_from_panel(DF_Panel *panel) { - DF_Handle h = {0}; + D_Handle h = {0}; h.u64[0] = (U64)panel; h.u64[1] = panel->generation; return h; } internal DF_Panel * -df_panel_from_handle(DF_Handle handle) +df_panel_from_handle(D_Handle handle) { DF_Panel *panel = (DF_Panel *)handle.u64[0]; if(panel == 0 || panel->generation != handle.u64[1]) @@ -171,9 +171,9 @@ df_ui_key_from_panel(DF_Panel *panel) internal void df_panel_notify_mutation(DF_Window *window, DF_Panel *panel) { - DF_CmdParams p = df_cmd_params_from_panel(window, panel); - DF_CfgSrc src = window->cfg_src; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(df_g_cfg_src_write_cmd_kind_table[src])); + D_CmdParams p = df_cmd_params_from_panel(window, panel); + D_CfgSrc src = window->cfg_src; + d_push_cmd__root(&p, d_cmd_spec_from_kind(d_cfg_src_write_cmd_kind_table[src])); } //- rjf: tree construction @@ -318,8 +318,8 @@ df_panel_remove_tab_view(DF_Panel *panel, DF_View *view) { if(df_view_from_handle(panel->selected_tab_view) == view) { - panel->selected_tab_view = df_handle_zero(); - if(df_handle_match(df_handle_zero(), panel->selected_tab_view)) + panel->selected_tab_view = d_handle_zero(); + if(d_handle_match(d_handle_zero(), panel->selected_tab_view)) { for(DF_View *v = view->order_next; !df_view_is_nil(v); v = v->order_next) { @@ -330,7 +330,7 @@ df_panel_remove_tab_view(DF_Panel *panel, DF_View *view) } } } - if(df_handle_match(df_handle_zero(), panel->selected_tab_view)) + if(d_handle_match(d_handle_zero(), panel->selected_tab_view)) { for(DF_View *v = view->order_prev; !df_view_is_nil(v); v = v->order_prev) { @@ -366,52 +366,52 @@ df_icon_kind_from_view(DF_View *view) return result; } -internal D_FancyStringList +internal DR_FancyStringList df_title_fstrs_from_view(Arena *arena, DF_View *view, Vec4F32 primary_color, Vec4F32 secondary_color, F32 size) { - D_FancyStringList result = {0}; + DR_FancyStringList result = {0}; Temp scratch = scratch_begin(&arena, 1); String8 query = str8(view->query_buffer, view->query_string_size); - String8 file_path = df_file_path_from_eval_string(scratch.arena, query); + String8 file_path = d_file_path_from_eval_string(scratch.arena, query); if(file_path.size != 0) { - D_FancyString fstr = + DR_FancyString fstr = { df_font_from_slot(DF_FontSlot_Main), push_str8_copy(arena, str8_skip_last_slash(file_path)), primary_color, size, }; - d_fancy_string_list_push(arena, &result, &fstr); + dr_fancy_string_list_push(arena, &result, &fstr); } else { - D_FancyString fstr1 = + DR_FancyString fstr1 = { df_font_from_slot(DF_FontSlot_Main), view->spec->info.display_string, primary_color, size, }; - d_fancy_string_list_push(arena, &result, &fstr1); + dr_fancy_string_list_push(arena, &result, &fstr1); if(query.size != 0) { - D_FancyString fstr2 = + DR_FancyString fstr2 = { df_font_from_slot(DF_FontSlot_Code), str8_lit(" "), primary_color, size, }; - d_fancy_string_list_push(arena, &result, &fstr2); - D_FancyString fstr3 = + dr_fancy_string_list_push(arena, &result, &fstr2); + DR_FancyString fstr3 = { df_font_from_slot(DF_FontSlot_Code), push_str8_copy(arena, query), secondary_color, size*0.8f, }; - d_fancy_string_list_push(arena, &result, &fstr3); + dr_fancy_string_list_push(arena, &result, &fstr3); } } scratch_end(scratch); @@ -421,10 +421,10 @@ df_title_fstrs_from_view(Arena *arena, DF_View *view, Vec4F32 primary_color, Vec //////////////////////////////// //~ rjf: Window Type Functions -internal DF_Handle +internal D_Handle df_handle_from_window(DF_Window *window) { - DF_Handle handle = {0}; + D_Handle handle = {0}; if(window != 0) { handle.u64[0] = (U64)window; @@ -434,7 +434,7 @@ df_handle_from_window(DF_Window *window) } internal DF_Window * -df_window_from_handle(DF_Handle handle) +df_window_from_handle(D_Handle handle) { DF_Window *window = (DF_Window *)handle.u64[0]; if(window != 0 && window->gen != handle.u64[1]) @@ -447,10 +447,10 @@ df_window_from_handle(DF_Handle handle) //////////////////////////////// //~ rjf: Command Parameters From Context -internal DF_CmdParams +internal D_CmdParams df_cmd_params_from_gfx(void) { - DF_CmdParams p = df_cmd_params_zero(); + D_CmdParams p = d_cmd_params_zero(); DF_Window *window = 0; for(DF_Window *w = df_gfx_state->first_window; w != 0; w = w->next) { @@ -507,79 +507,79 @@ df_prefer_dasm_from_window(DF_Window *window) return result; } -internal DF_CmdParams +internal D_CmdParams df_cmd_params_from_window(DF_Window *window) { - DF_CmdParams p = df_cmd_params_zero(); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Window); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Panel); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_View); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_PreferDisassembly); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_UnwindIndex); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_InlineDepth); + D_CmdParams p = d_cmd_params_zero(); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Window); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Panel); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_View); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_PreferDisassembly); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_UnwindIndex); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_InlineDepth); p.window = df_handle_from_window(window); p.panel = df_handle_from_panel(window->focused_panel); p.view = df_handle_from_view(df_selected_tab_from_panel(window->focused_panel)); p.prefer_dasm = df_prefer_dasm_from_window(window); - p.entity = df_interact_regs()->thread; - p.unwind_index = df_interact_regs()->unwind_count; - p.inline_depth = df_interact_regs()->inline_depth; + p.entity = d_interact_regs()->thread; + p.unwind_index = d_interact_regs()->unwind_count; + p.inline_depth = d_interact_regs()->inline_depth; return p; } -internal DF_CmdParams +internal D_CmdParams df_cmd_params_from_panel(DF_Window *window, DF_Panel *panel) { - DF_CmdParams p = df_cmd_params_zero(); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Window); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Panel); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_View); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_PreferDisassembly); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_UnwindIndex); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_InlineDepth); + D_CmdParams p = d_cmd_params_zero(); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Window); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Panel); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_View); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_PreferDisassembly); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_UnwindIndex); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_InlineDepth); p.window = df_handle_from_window(window); p.panel = df_handle_from_panel(panel); p.view = df_handle_from_view(df_selected_tab_from_panel(panel)); p.prefer_dasm = df_prefer_dasm_from_window(window); - p.entity = df_interact_regs()->thread; - p.unwind_index = df_interact_regs()->unwind_count; - p.inline_depth = df_interact_regs()->inline_depth; + p.entity = d_interact_regs()->thread; + p.unwind_index = d_interact_regs()->unwind_count; + p.inline_depth = d_interact_regs()->inline_depth; return p; } -internal DF_CmdParams +internal D_CmdParams df_cmd_params_from_view(DF_Window *window, DF_Panel *panel, DF_View *view) { - DF_CmdParams p = df_cmd_params_zero(); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Window); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Panel); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_View); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_PreferDisassembly); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_UnwindIndex); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_InlineDepth); + D_CmdParams p = d_cmd_params_zero(); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Window); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Panel); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_View); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_PreferDisassembly); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_UnwindIndex); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_InlineDepth); p.window = df_handle_from_window(window); p.panel = df_handle_from_panel(panel); p.view = df_handle_from_view(view); p.prefer_dasm = df_prefer_dasm_from_window(window); - p.entity = df_interact_regs()->thread; - p.unwind_index = df_interact_regs()->unwind_count; - p.inline_depth = df_interact_regs()->inline_depth; + p.entity = d_interact_regs()->thread; + p.unwind_index = d_interact_regs()->unwind_count; + p.inline_depth = d_interact_regs()->inline_depth; return p; } -internal DF_CmdParams -df_cmd_params_copy(Arena *arena, DF_CmdParams *src) +internal D_CmdParams +df_cmd_params_copy(Arena *arena, D_CmdParams *src) { - DF_CmdParams dst = {0}; + D_CmdParams dst = {0}; MemoryCopyStruct(&dst, src); - dst.entity_list = df_push_handle_list_copy(arena, src->entity_list); + dst.entity_list = d_push_handle_list_copy(arena, src->entity_list); dst.string = push_str8_copy(arena, src->string); dst.file_path = push_str8_copy(arena, src->file_path); if(src->params_tree != 0) {dst.params_tree = md_tree_copy(arena, src->params_tree);} - if(dst.cmd_spec == 0) {dst.cmd_spec = &df_g_nil_cmd_spec;} + if(dst.cmd_spec == 0) {dst.cmd_spec = &d_nil_cmd_spec;} if(dst.view_spec == 0) {dst.view_spec = &df_g_nil_view_spec;} if(dst.params_tree == 0) {dst.params_tree= &md_nil_node;} return dst; @@ -656,7 +656,7 @@ df_register_view_specs(DF_ViewSpecInfoArray specs) for(U64 idx = 0; idx < specs.count; idx += 1) { DF_ViewSpecInfo *src_info = &specs.v[idx]; - U64 hash = df_hash_from_string(src_info->name); + U64 hash = d_hash_from_string(src_info->name); U64 slot_idx = hash%df_gfx_state->view_spec_table_size; DF_ViewSpec *spec = push_array(df_gfx_state->arena, DF_ViewSpec, 1); SLLStackPush_N(df_gfx_state->view_spec_table[slot_idx], spec, hash_next); @@ -670,7 +670,7 @@ internal DF_ViewSpec * df_view_spec_from_string(String8 string) { DF_ViewSpec *spec = &df_g_nil_view_spec; - U64 hash = df_hash_from_string(string); + U64 hash = d_hash_from_string(string); U64 slot_idx = hash%df_gfx_state->view_spec_table_size; for(DF_ViewSpec *s = df_gfx_state->view_spec_table[slot_idx]; s != 0; @@ -693,17 +693,17 @@ df_view_spec_from_gfx_view_kind(DF_GfxViewKind gfx_view_kind) } internal DF_ViewSpec * -df_view_spec_from_cmd_param_slot_spec(DF_CmdParamSlot slot, DF_CmdSpec *cmd_spec) +df_view_spec_from_cmd_param_slot_spec(D_CmdParamSlot slot, D_CmdSpec *cmd_spec) { DF_ViewSpec *spec = &df_g_nil_view_spec; - for(DF_CmdParamSlotViewSpecRuleNode *n = df_gfx_state->cmd_param_slot_view_spec_table[slot].first; + for(D_CmdParamSlotViewSpecRuleNode *n = df_gfx_state->cmd_param_slot_view_spec_table[slot].first; n != 0; n = n->next) { - if(cmd_spec == n->cmd_spec || df_cmd_spec_is_nil(n->cmd_spec)) + if(cmd_spec == n->cmd_spec || d_cmd_spec_is_nil(n->cmd_spec)) { spec = n->view_spec; - if(!df_cmd_spec_is_nil(n->cmd_spec)) + if(!d_cmd_spec_is_nil(n->cmd_spec)) { break; } @@ -730,7 +730,7 @@ df_register_gfx_view_rule_specs(DF_GfxViewRuleSpecInfoArray specs) } // rjf: determine hash/slot - U64 hash = df_hash_from_string(info->string); + U64 hash = d_hash_from_string(info->string); U64 slot_idx = hash%df_gfx_state->view_rule_spec_table_size; // rjf: allocate node & push @@ -749,7 +749,7 @@ df_gfx_view_rule_spec_from_string(String8 string) { DF_GfxViewRuleSpec *spec = &df_g_nil_gfx_view_rule_spec; { - U64 hash = df_hash_from_string(string); + U64 hash = d_hash_from_string(string); U64 slot_idx = hash%df_gfx_state->view_rule_spec_table_size; for(DF_GfxViewRuleSpec *s = df_gfx_state->view_rule_spec_table[slot_idx]; s != 0; s = s->hash_next) { @@ -875,7 +875,7 @@ df_view_equip_spec(DF_Window *window, DF_View *view, DF_ViewSpec *spec, String8 if(spec->info.flags & DF_ViewSpecFlag_ProjectSpecific) { arena_clear(view->project_path_arena); - view->project_path = push_str8_copy(view->project_path_arena, df_cfg_path_from_src(DF_CfgSrc_Project)); + view->project_path = push_str8_copy(view->project_path_arena, d_cfg_path_from_src(D_CfgSrc_Project)); } else { @@ -981,7 +981,7 @@ df_view_store_paramf(DF_View *view, String8 key, char *fmt, ...) //~ rjf: Expand-Keyed Transient View Functions internal DF_TransientViewNode * -df_transient_view_node_from_expand_key(DF_View *owner_view, DF_ExpandKey key) +df_transient_view_node_from_expand_key(DF_View *owner_view, D_ExpandKey key) { if(owner_view->transient_view_slots_count == 0) { @@ -994,10 +994,10 @@ df_transient_view_node_from_expand_key(DF_View *owner_view, DF_ExpandKey key) DF_TransientViewNode *node = 0; for(DF_TransientViewNode *n = slot->first; n != 0; n = n->next) { - if(df_expand_key_match(n->key, key)) + if(d_expand_key_match(n->key, key)) { node = n; - n->last_frame_index_touched = df_frame_index(); + n->last_frame_index_touched = d_frame_index(); break; } } @@ -1013,7 +1013,7 @@ df_transient_view_node_from_expand_key(DF_View *owner_view, DF_ExpandKey key) node->key = key; node->view = df_view_alloc(); node->initial_params_arena = arena_alloc(); - node->first_frame_index_touched = node->last_frame_index_touched = df_frame_index(); + node->first_frame_index_touched = node->last_frame_index_touched = d_frame_index(); DLLPushBack_NPZ(&df_g_nil_view, owner_view->first_transient, owner_view->last_transient, node->view, order_next, order_prev); } return node; @@ -1023,7 +1023,7 @@ df_transient_view_node_from_expand_key(DF_View *owner_view, DF_ExpandKey key) //~ rjf: View Rule Instance State Functions internal void * -df_view_rule_block_get_or_push_user_state(DF_ExpandKey key, U64 size) +df_view_rule_block_get_or_push_user_state(D_ExpandKey key, U64 size) { U64 hash = df_hash_from_expand_key(key); U64 slot_idx = hash%df_gfx_state->view_rule_block_slots_count; @@ -1031,7 +1031,7 @@ df_view_rule_block_get_or_push_user_state(DF_ExpandKey key, U64 size) DF_ViewRuleBlockNode *node = 0; for(DF_ViewRuleBlockNode *n = slot->first; n != 0; n = n->next) { - if(df_expand_key_match(n->key, key)) + if(d_expand_key_match(n->key, key)) { node = n; break; @@ -1063,7 +1063,7 @@ df_view_rule_block_get_or_push_user_state(DF_ExpandKey key, U64 size) } internal Arena * -df_view_rule_block_push_arena_ext(DF_ExpandKey key) +df_view_rule_block_push_arena_ext(D_ExpandKey key) { // TODO(rjf) return 0; @@ -1111,7 +1111,7 @@ df_panel_release_all_views(DF_Panel *panel) df_view_release(view); } panel->first_tab_view = panel->last_tab_view = &df_g_nil_view; - panel->selected_tab_view = df_handle_zero(); + panel->selected_tab_view = d_handle_zero(); panel->tab_view_count = 0; } @@ -1119,7 +1119,7 @@ df_panel_release_all_views(DF_Panel *panel) //~ rjf: Window State Functions internal DF_Window * -df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src) +df_window_open(Vec2F32 size, OS_Handle preferred_monitor, D_CfgSrc cfg_src) { DF_Window *window = df_gfx_state->free_window; if(window != 0) @@ -1143,7 +1143,7 @@ df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src) } window->r = r_window_equip(window->os); window->ui = ui_state_alloc(); - window->view_state_hist = df_state_delta_history_alloc(); + window->view_state_hist = d_state_delta_history_alloc(); window->code_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_code_ctx_menu_")); window->entity_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_entity_ctx_menu_")); window->tab_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_tab_ctx_menu_")); @@ -1154,7 +1154,7 @@ df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src) window->root_panel = df_panel_alloc(window); window->focused_panel = window->root_panel; window->query_cmd_arena = arena_alloc(); - window->query_cmd_spec = &df_g_nil_cmd_spec; + window->query_cmd_spec = &d_nil_cmd_spec; window->query_view_stack_top = &df_g_nil_view; window->last_dpi = os_dpi_from_window(window->os); for(EachEnumVal(DF_SettingCode, code)) @@ -1236,7 +1236,7 @@ df_window_from_os_handle(OS_Handle os) #endif internal void -df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) +df_window_update_and_render(Arena *arena, DF_Window *ws, D_CmdList *cmds) { ProfBeginFunction(); @@ -1249,7 +1249,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) B32 hover_eval_is_open = (!confirm_open && ws->hover_eval_string.size != 0 && ws->hover_eval_first_frame_idx+20 < ws->hover_eval_last_frame_idx && - df_frame_index()-ws->hover_eval_last_frame_idx < 20); + d_frame_index()-ws->hover_eval_last_frame_idx < 20); if(!window_is_focused || confirm_open) { ws->menu_bar_key_held = 0; @@ -1268,12 +1268,12 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) !df_view_is_nil(view); view = view->order_next) { - DF_Entity *entity = df_entity_from_eval_string(str8(view->query_buffer, view->query_string_size)); - if(entity->flags & DF_EntityFlag_MarkedForDeletion || - (df_entity_is_nil(entity) && view->spec->info.flags & DF_ViewSpecFlag_ParameterizedByEntity)) + D_Entity *entity = d_entity_from_eval_string(str8(view->query_buffer, view->query_string_size)); + if(entity->flags & D_EntityFlag_MarkedForDeletion || + (d_entity_is_nil(entity) && view->spec->info.flags & DF_ViewSpecFlag_ParameterizedByEntity)) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseTab)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_CloseTab)); } } } @@ -1286,16 +1286,16 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) ProfScope("do commands") { Temp scratch = scratch_begin(&arena, 1); - for(DF_CmdNode *cmd_node = cmds->first; + for(D_CmdNode *cmd_node = cmds->first; cmd_node != 0; cmd_node = cmd_node->next) { temp_end(scratch); // rjf: get command info - DF_Cmd *cmd = &cmd_node->cmd; - DF_CmdParams params = cmd->params; - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); + D_Cmd *cmd = &cmd_node->cmd; + D_CmdParams params = cmd->params; + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); // rjf: mismatched window => skip if(df_window_from_handle(params.window) != ws) @@ -1320,15 +1320,15 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_ViewSpec *view_spec = df_view_spec_from_string(name); if(view_spec != &df_g_nil_view_spec) { - DF_CmdParams p = params; + D_CmdParams p = params; p.view_spec = view_spec; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_ViewSpec); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_OpenTab)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_ViewSpec); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_OpenTab)); } }break; //- rjf: OS events - case DF_CoreCmdKind_OSEvent: + case D_CmdKind_OSEvent: { OS_Event *os_event = params.os_event; if(os_event != 0 && os_handle_match(os_event->window, ws->os)) @@ -1360,14 +1360,14 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: command fast path - case DF_CoreCmdKind_RunCommand: + case D_CmdKind_RunCommand: { - DF_CmdSpec *spec = params.cmd_spec; + D_CmdSpec *spec = params.cmd_spec; // rjf: command simply executes - just no-op in this layer - if(!(spec->info.query.flags & DF_CmdQueryFlag_Required) && - !df_cmd_spec_is_nil(spec) && - (spec->info.query.slot == DF_CmdParamSlot_Null || df_cmd_params_has_slot(¶ms, spec->info.query.slot))) + if(!(spec->info.query.flags & D_CmdQueryFlag_Required) && + !d_cmd_spec_is_nil(spec) && + (spec->info.query.slot == D_CmdParamSlot_Null || d_cmd_params_has_slot(¶ms, spec->info.query.slot))) { } @@ -1375,14 +1375,14 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) else { arena_clear(ws->query_cmd_arena); - ws->query_cmd_spec = df_cmd_spec_is_nil(spec) ? cmd->spec : spec; + ws->query_cmd_spec = d_cmd_spec_is_nil(spec) ? cmd->spec : spec; ws->query_cmd_params = df_cmd_params_copy(ws->query_cmd_arena, ¶ms); ws->query_view_selected = 1; } }break; //- rjf: notifications - case DF_CoreCmdKind_Error: + case D_CmdKind_Error: { String8 error_string = params.string; ws->error_string_size = error_string.size; @@ -1391,33 +1391,33 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: debug control context management operations - case DF_CoreCmdKind_SelectThread:goto thread_locator; - case DF_CoreCmdKind_SelectUnwind: + case D_CmdKind_SelectThread:goto thread_locator; + case D_CmdKind_SelectUnwind: thread_locator:; { - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindThread)); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_FindThread)); }break; //- rjf: font sizes - case DF_CoreCmdKind_IncUIFontScale: + case D_CmdKind_IncUIFontScale: { ws->setting_vals[DF_SettingCode_MainFontSize].set = 1; ws->setting_vals[DF_SettingCode_MainFontSize].s32 += 1; ws->setting_vals[DF_SettingCode_MainFontSize].s32 = clamp_1s32(df_g_setting_code_s32_range_table[DF_SettingCode_MainFontSize], ws->setting_vals[DF_SettingCode_MainFontSize].s32); }break; - case DF_CoreCmdKind_DecUIFontScale: + case D_CmdKind_DecUIFontScale: { ws->setting_vals[DF_SettingCode_MainFontSize].set = 1; ws->setting_vals[DF_SettingCode_MainFontSize].s32 -= 1; ws->setting_vals[DF_SettingCode_MainFontSize].s32 = clamp_1s32(df_g_setting_code_s32_range_table[DF_SettingCode_MainFontSize], ws->setting_vals[DF_SettingCode_MainFontSize].s32); }break; - case DF_CoreCmdKind_IncCodeFontScale: + case D_CmdKind_IncCodeFontScale: { ws->setting_vals[DF_SettingCode_CodeFontSize].set = 1; ws->setting_vals[DF_SettingCode_CodeFontSize].s32 += 1; ws->setting_vals[DF_SettingCode_CodeFontSize].s32 = clamp_1s32(df_g_setting_code_s32_range_table[DF_SettingCode_CodeFontSize], ws->setting_vals[DF_SettingCode_CodeFontSize].s32); }break; - case DF_CoreCmdKind_DecCodeFontScale: + case D_CmdKind_DecCodeFontScale: { ws->setting_vals[DF_SettingCode_CodeFontSize].set = 1; ws->setting_vals[DF_SettingCode_CodeFontSize].s32 -= 1; @@ -1425,11 +1425,11 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: panel creation - case DF_CoreCmdKind_NewPanelLeft: {split_dir = Dir2_Left;}goto split; - case DF_CoreCmdKind_NewPanelUp: {split_dir = Dir2_Up;}goto split; - case DF_CoreCmdKind_NewPanelRight:{split_dir = Dir2_Right;}goto split; - case DF_CoreCmdKind_NewPanelDown: {split_dir = Dir2_Down;}goto split; - case DF_CoreCmdKind_SplitPanel: + case D_CmdKind_NewPanelLeft: {split_dir = Dir2_Left;}goto split; + case D_CmdKind_NewPanelUp: {split_dir = Dir2_Up;}goto split; + case D_CmdKind_NewPanelRight:{split_dir = Dir2_Right;}goto split; + case D_CmdKind_NewPanelDown: {split_dir = Dir2_Down;}goto split; + case D_CmdKind_SplitPanel: { split_dir = params.dir2; split_panel = df_panel_from_handle(params.dest_panel); @@ -1501,7 +1501,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_Panel *move_tab_panel = df_panel_from_handle(params.panel); DF_View *move_tab = df_view_from_handle(params.view); if(!df_panel_is_nil(new_panel) && !df_view_is_nil(move_tab) && !df_panel_is_nil(move_tab_panel) && - core_cmd_kind == DF_CoreCmdKind_SplitPanel) + core_cmd_kind == D_CmdKind_SplitPanel) { df_panel_remove_tab_view(move_tab_panel, move_tab); df_panel_insert_tab_view(new_panel, new_panel->last_tab_view, move_tab); @@ -1518,14 +1518,14 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) if(move_tab_panel_is_empty && move_tab_panel != ws->root_panel && move_tab_panel != new_panel->prev && move_tab_panel != new_panel->next) { - DF_CmdParams p = df_cmd_params_from_panel(ws, move_tab_panel); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ClosePanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, move_tab_panel); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_ClosePanel)); } } df_panel_notify_mutation(ws, panel); }break; - case DF_CoreCmdKind_ResetToDefaultPanels: - case DF_CoreCmdKind_ResetToCompactPanels: + case D_CmdKind_ResetToDefaultPanels: + case D_CmdKind_ResetToCompactPanels: { panel_reset_done = 1; @@ -1539,14 +1539,14 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) switch(core_cmd_kind) { default:{}break; - case DF_CoreCmdKind_ResetToDefaultPanels:{layout = Layout_Default;}break; - case DF_CoreCmdKind_ResetToCompactPanels:{layout = Layout_Compact;}break; + case D_CmdKind_ResetToDefaultPanels:{layout = Layout_Default;}break; + case D_CmdKind_ResetToCompactPanels:{layout = Layout_Compact;}break; } //- rjf: gather all panels in the panel tree - remove & gather views // we'd like to keep in the next layout - DF_HandleList panels_to_close = {0}; - DF_HandleList views_to_close = {0}; + D_HandleList panels_to_close = {0}; + D_HandleList views_to_close = {0}; DF_View *watch = &df_g_nil_view; DF_View *locals = &df_g_nil_view; DF_View *regs = &df_g_nil_view; @@ -1564,11 +1564,11 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_View *disasm = &df_g_nil_view; DF_View *memory = &df_g_nil_view; DF_View *getting_started = &df_g_nil_view; - DF_HandleList code_views = {0}; + D_HandleList code_views = {0}; for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) { - DF_Handle handle = df_handle_from_panel(panel); - df_handle_list_push(scratch.arena, &panels_to_close, handle); + D_Handle handle = df_handle_from_panel(panel); + d_handle_list_push(scratch.arena, &panels_to_close, handle); for(DF_View *view = panel->first_tab_view, *next = 0; !df_view_is_nil(view); view = next) { next = view->order_next; @@ -1597,7 +1597,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) case DF_GfxViewKind_Text: { needs_delete = 0; - df_handle_list_push(scratch.arena, &code_views, df_handle_from_view(view)); + d_handle_list_push(scratch.arena, &code_views, df_handle_from_view(view)); }break; } if(!needs_delete) @@ -1608,7 +1608,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } //- rjf: close all panels/views - for(DF_HandleNode *n = panels_to_close.first; n != 0; n = n->next) + for(D_HandleNode *n = panels_to_close.first; n != 0; n = n->next) { DF_Panel *panel = df_panel_from_handle(n->handle); if(panel != ws->root_panel) @@ -1623,7 +1623,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } //- rjf: allocate any missing views - DF_CmdParams blank_params = df_cmd_params_from_window(ws); + D_CmdParams blank_params = df_cmd_params_from_window(ws); if(df_view_is_nil(watch)) { watch = df_view_alloc(); @@ -1800,7 +1800,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { df_panel_insert_tab_view(root_0_0_1, root_0_0_1->last_tab_view, getting_started); } - for(DF_HandleNode *n = code_views.first; n != 0; n = n->next) + for(D_HandleNode *n = code_views.first; n != 0; n = n->next) { DF_View *view = df_view_from_handle(n->handle); if(!df_view_is_nil(view)) @@ -1867,7 +1867,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { df_panel_insert_tab_view(root_1, root_1->last_tab_view, getting_started); } - for(DF_HandleNode *n = code_views.first; n != 0; n = n->next) + for(D_HandleNode *n = code_views.first; n != 0; n = n->next) { DF_View *view = df_view_from_handle(n->handle); if(!df_view_is_nil(view)) @@ -1882,18 +1882,18 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } // rjf: dispatch cfg saves - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) { - DF_CoreCmdKind write_cmd = df_g_cfg_src_write_cmd_kind_table[src]; - DF_CmdParams p = df_cmd_params_zero(); - p.file_path = df_cfg_path_from_src(src); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_FilePath); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(write_cmd)); + D_CmdKind write_cmd = d_cfg_src_write_cmd_kind_table[src]; + D_CmdParams p = d_cmd_params_zero(); + p.file_path = d_cfg_path_from_src(src); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_FilePath); + d_push_cmd__root(&p, d_cmd_spec_from_kind(write_cmd)); } }break; //- rjf: panel rotation - case DF_CoreCmdKind_RotatePanelColumns: + case D_CmdKind_RotatePanelColumns: { DF_Panel *panel = ws->focused_panel; DF_Panel *parent = &df_g_nil_panel; @@ -1920,8 +1920,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: focused panel cycling - case DF_CoreCmdKind_NextPanel: panel_sib_off = OffsetOf(DF_Panel, next); panel_child_off = OffsetOf(DF_Panel, first); goto cycle; - case DF_CoreCmdKind_PrevPanel: panel_sib_off = OffsetOf(DF_Panel, prev); panel_child_off = OffsetOf(DF_Panel, last); goto cycle; + case D_CmdKind_NextPanel: panel_sib_off = OffsetOf(DF_Panel, next); panel_child_off = OffsetOf(DF_Panel, first); goto cycle; + case D_CmdKind_PrevPanel: panel_sib_off = OffsetOf(DF_Panel, prev); panel_child_off = OffsetOf(DF_Panel, last); goto cycle; cycle:; { for(DF_Panel *panel = ws->focused_panel; !df_panel_is_nil(panel);) @@ -1934,14 +1934,14 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(df_panel_is_nil(panel->first)) { - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.panel = df_handle_from_panel(panel); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); break; } } }break; - case DF_CoreCmdKind_FocusPanel: + case D_CmdKind_FocusPanel: { DF_Panel *panel = df_panel_from_handle(params.panel); if(!df_panel_is_nil(panel)) @@ -1953,10 +1953,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: directional panel focus changing - case DF_CoreCmdKind_FocusPanelRight: panel_change_dir = v2s32(+1, +0); goto focus_panel_dir; - case DF_CoreCmdKind_FocusPanelLeft: panel_change_dir = v2s32(-1, +0); goto focus_panel_dir; - case DF_CoreCmdKind_FocusPanelUp: panel_change_dir = v2s32(+0, -1); goto focus_panel_dir; - case DF_CoreCmdKind_FocusPanelDown: panel_change_dir = v2s32(+0, +1); goto focus_panel_dir; + case D_CmdKind_FocusPanelRight: panel_change_dir = v2s32(+1, +0); goto focus_panel_dir; + case D_CmdKind_FocusPanelLeft: panel_change_dir = v2s32(-1, +0); goto focus_panel_dir; + case D_CmdKind_FocusPanelUp: panel_change_dir = v2s32(+0, -1); goto focus_panel_dir; + case D_CmdKind_FocusPanelDown: panel_change_dir = v2s32(+0, +1); goto focus_panel_dir; focus_panel_dir:; { DF_Panel *src_panel = ws->focused_panel; @@ -1990,24 +1990,24 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) break; } } - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.panel = df_handle_from_panel(dst_panel); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } }break; //- rjf: focus history - case DF_CoreCmdKind_GoBack: + case D_CmdKind_GoBack: { - df_state_delta_history_wind(ws->view_state_hist, Side_Min); + d_state_delta_history_wind(ws->view_state_hist, Side_Min); }break; - case DF_CoreCmdKind_GoForward: + case D_CmdKind_GoForward: { - df_state_delta_history_wind(ws->view_state_hist, Side_Max); + d_state_delta_history_wind(ws->view_state_hist, Side_Max); }break; //- rjf: panel removal - case DF_CoreCmdKind_ClosePanel: + case D_CmdKind_ClosePanel: { DF_Panel *panel = df_panel_from_handle(params.panel); DF_Panel *parent = panel->parent; @@ -2100,7 +2100,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: panel tab controls - case DF_CoreCmdKind_NextTab: + case D_CmdKind_NextTab: { DF_Panel *panel = df_panel_from_handle(params.panel); DF_View *view = df_selected_tab_from_panel(panel); @@ -2116,7 +2116,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) view = next_view; panel->selected_tab_view = df_handle_from_view(view); }break; - case DF_CoreCmdKind_PrevTab: + case D_CmdKind_PrevTab: { DF_Panel *panel = df_panel_from_handle(params.panel); DF_View *view = df_selected_tab_from_panel(panel); @@ -2132,42 +2132,42 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) view = next_view; panel->selected_tab_view = df_handle_from_view(view); }break; - case DF_CoreCmdKind_MoveTabRight: - case DF_CoreCmdKind_MoveTabLeft: + case D_CmdKind_MoveTabRight: + case D_CmdKind_MoveTabLeft: { DF_Panel *panel = ws->focused_panel; DF_View *view = df_selected_tab_from_panel(panel); - DF_View *prev_view = core_cmd_kind == DF_CoreCmdKind_MoveTabRight ? view->order_next : view->order_prev->order_prev; - if(!df_view_is_nil(prev_view) || core_cmd_kind == DF_CoreCmdKind_MoveTabLeft) + DF_View *prev_view = core_cmd_kind == D_CmdKind_MoveTabRight ? view->order_next : view->order_prev->order_prev; + if(!df_view_is_nil(prev_view) || core_cmd_kind == D_CmdKind_MoveTabLeft) { - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.panel = df_handle_from_panel(panel); p.dest_panel = df_handle_from_panel(panel); p.view = df_handle_from_view(view); p.prev_view = df_handle_from_view(prev_view); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_MoveTab)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_MoveTab)); } }break; - case DF_CoreCmdKind_OpenTab: + case D_CmdKind_OpenTab: { DF_Panel *panel = df_panel_from_handle(params.panel); DF_ViewSpec *spec = params.view_spec; - DF_Entity *entity = &df_g_nil_entity; + D_Entity *entity = &d_nil_entity; if(spec->info.flags & DF_ViewSpecFlag_ParameterizedByEntity) { - entity = df_entity_from_handle(params.entity); + entity = d_entity_from_handle(params.entity); } if(!df_panel_is_nil(panel) && spec != &df_g_nil_view_spec) { DF_View *view = df_view_alloc(); String8 query = {0}; - if(!df_entity_is_nil(entity)) + if(!d_entity_is_nil(entity)) { - query = df_eval_string_from_entity(scratch.arena, entity); + query = d_eval_string_from_entity(scratch.arena, entity); } else if(params.file_path.size != 0) { - query = df_eval_string_from_file_path(scratch.arena, params.file_path); + query = d_eval_string_from_file_path(scratch.arena, params.file_path); } else if(params.string.size != 0) { @@ -2178,7 +2178,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) df_panel_notify_mutation(ws, panel); } }break; - case DF_CoreCmdKind_CloseTab: + case D_CmdKind_CloseTab: { DF_Panel *panel = df_panel_from_handle(params.panel); DF_View *view = df_view_from_handle(params.view); @@ -2189,7 +2189,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) df_panel_notify_mutation(ws, panel); } }break; - case DF_CoreCmdKind_MoveTab: + case D_CmdKind_MoveTab: { DF_Panel *src_panel = df_panel_from_handle(params.panel); DF_View *view = df_view_from_handle(params.view); @@ -2213,19 +2213,19 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(src_panel_is_empty && src_panel != ws->root_panel) { - DF_CmdParams p = df_cmd_params_from_panel(ws, src_panel); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ClosePanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, src_panel); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_ClosePanel)); } df_panel_notify_mutation(ws, dst_panel); } }break; - case DF_CoreCmdKind_TabBarTop: + case D_CmdKind_TabBarTop: { DF_Panel *panel = df_panel_from_handle(params.panel); panel->tab_side = Side_Min; df_panel_notify_mutation(ws, panel); }break; - case DF_CoreCmdKind_TabBarBottom: + case D_CmdKind_TabBarBottom: { DF_Panel *panel = df_panel_from_handle(params.panel); panel->tab_side = Side_Max; @@ -2233,25 +2233,25 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: files - case DF_CoreCmdKind_Open: + case D_CmdKind_Open: { String8 path = params.file_path; FileProperties props = os_properties_from_file_path(path); if(props.created != 0) { - DF_CmdParams p = params; + D_CmdParams p = params; p.window = df_handle_from_window(ws); p.panel = df_handle_from_panel(ws->focused_panel); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PendingFile)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_PendingFile)); } else { - DF_CmdParams p = df_cmd_params_zero(); + D_CmdParams p = d_cmd_params_zero(); p.string = push_str8f(scratch.arena, "Couldn't open file at \"%S\".", path); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Error)); } }break; - case DF_CoreCmdKind_Switch: + case D_CmdKind_Switch: { // TODO(rjf): @viz_merge #if 0 @@ -2260,8 +2260,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) for(DF_View *v = panel->first_tab_view; !df_view_is_nil(v); v = v->next) { if(df_view_is_project_filtered(v)) { continue; } - DF_Entity *v_param_entity = df_entity_from_handle(v->params_entity); - if(v_param_entity == df_entity_from_handle(params.entity)) + D_Entity *v_param_entity = d_entity_from_handle(v->params_entity); + if(v_param_entity == d_entity_from_handle(params.entity)) { panel->selected_tab_view = df_handle_from_view(v); already_opened = 1; @@ -2270,25 +2270,25 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(already_opened == 0) { - DF_CmdParams p = params; + D_CmdParams p = params; p.window = df_handle_from_window(ws); p.panel = df_handle_from_panel(ws->focused_panel); p.entity = params.entity; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Window); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Panel); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Entity); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PendingFile)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Window); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Panel); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Entity); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_PendingFile)); } #endif }break; - case DF_CoreCmdKind_SwitchToPartnerFile: + case D_CmdKind_SwitchToPartnerFile: { DF_Panel *panel = df_panel_from_handle(params.panel); DF_View *view = df_selected_tab_from_panel(panel); DF_GfxViewKind view_kind = df_gfx_view_kind_from_string(view->spec->info.name); if(view_kind == DF_GfxViewKind_Text) { - String8 file_path = df_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); + String8 file_path = d_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); String8 file_full_path = path_normalized_from_string(scratch.arena, file_path); String8 file_folder = str8_chop_last_slash(file_full_path); String8 file_name = str8_skip_last_slash(str8_chop_last_dot(file_full_path)); @@ -2313,9 +2313,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) if(candidate_props.modified != 0) { // TODO(rjf): - //DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - //p.entity = df_handle_from_entity(candidate); - //df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Switch)); + //D_CmdParams p = df_cmd_params_from_panel(ws, panel); + //p.entity = d_handle_from_entity(candidate); + //d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Switch)); break; } } @@ -2324,21 +2324,21 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: meta controls - case DF_CoreCmdKind_Edit: + case D_CmdKind_Edit: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Press; evt.slot = UI_EventActionSlot_Edit; ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_Accept: + case D_CmdKind_Accept: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Press; evt.slot = UI_EventActionSlot_Accept; ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_Cancel: + case D_CmdKind_Cancel: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Press; @@ -2352,7 +2352,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // can be used by the UI build phase for navigation and stuff, as well // as builder codepaths that want to use these controls to modify text. // - case DF_CoreCmdKind_MoveLeft: + case D_CmdKind_MoveLeft: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2361,7 +2361,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveRight: + case D_CmdKind_MoveRight: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2370,7 +2370,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveUp: + case D_CmdKind_MoveUp: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2379,7 +2379,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveDown: + case D_CmdKind_MoveDown: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2388,7 +2388,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveLeftSelect: + case D_CmdKind_MoveLeftSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2397,7 +2397,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveRightSelect: + case D_CmdKind_MoveRightSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2406,7 +2406,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveUpSelect: + case D_CmdKind_MoveUpSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2415,7 +2415,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveDownSelect: + case D_CmdKind_MoveDownSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2424,7 +2424,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveLeftChunk: + case D_CmdKind_MoveLeftChunk: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2433,7 +2433,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveRightChunk: + case D_CmdKind_MoveRightChunk: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2442,7 +2442,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveUpChunk: + case D_CmdKind_MoveUpChunk: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2451,7 +2451,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveDownChunk: + case D_CmdKind_MoveDownChunk: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2460,7 +2460,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveUpPage: + case D_CmdKind_MoveUpPage: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2468,7 +2468,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveDownPage: + case D_CmdKind_MoveDownPage: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2476,7 +2476,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveUpWhole: + case D_CmdKind_MoveUpWhole: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2484,7 +2484,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveDownWhole: + case D_CmdKind_MoveDownWhole: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2492,7 +2492,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveLeftChunkSelect: + case D_CmdKind_MoveLeftChunkSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2501,7 +2501,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveRightChunkSelect: + case D_CmdKind_MoveRightChunkSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2510,7 +2510,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveUpChunkSelect: + case D_CmdKind_MoveUpChunkSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2519,7 +2519,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveDownChunkSelect: + case D_CmdKind_MoveDownChunkSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2528,7 +2528,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveUpPageSelect: + case D_CmdKind_MoveUpPageSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2537,7 +2537,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveDownPageSelect: + case D_CmdKind_MoveDownPageSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2546,7 +2546,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveUpWholeSelect: + case D_CmdKind_MoveUpWholeSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2555,7 +2555,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveDownWholeSelect: + case D_CmdKind_MoveDownWholeSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2564,7 +2564,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveUpReorder: + case D_CmdKind_MoveUpReorder: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2573,7 +2573,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveDownReorder: + case D_CmdKind_MoveDownReorder: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2582,7 +2582,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveHome: + case D_CmdKind_MoveHome: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2590,7 +2590,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveEnd: + case D_CmdKind_MoveEnd: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2598,7 +2598,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveHomeSelect: + case D_CmdKind_MoveHomeSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2607,7 +2607,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_MoveEndSelect: + case D_CmdKind_MoveEndSelect: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; @@ -2616,7 +2616,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_SelectAll: + case D_CmdKind_SelectAll: { UI_Event evt1 = zero_struct; evt1.kind = UI_EventKind_Navigate; @@ -2630,7 +2630,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt2.delta_2s32 = v2s32(+1, +0); ui_event_list_push(ui_build_arena(), &events, &evt2); }break; - case DF_CoreCmdKind_DeleteSingle: + case D_CmdKind_DeleteSingle: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; @@ -2639,7 +2639,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_DeleteChunk: + case D_CmdKind_DeleteChunk: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; @@ -2648,7 +2648,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_BackspaceSingle: + case D_CmdKind_BackspaceSingle: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; @@ -2657,7 +2657,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_BackspaceChunk: + case D_CmdKind_BackspaceChunk: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; @@ -2666,28 +2666,28 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_Copy: + case D_CmdKind_Copy: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; evt.flags = UI_EventFlag_Copy|UI_EventFlag_KeepMark; ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_Cut: + case D_CmdKind_Cut: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; evt.flags = UI_EventFlag_Copy|UI_EventFlag_Delete; ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_Paste: + case D_CmdKind_Paste: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Text; evt.string = os_get_clipboard_text(ui_build_arena()); ui_event_list_push(ui_build_arena(), &events, &evt); }break; - case DF_CoreCmdKind_InsertText: + case D_CmdKind_InsertText: { UI_Event evt = zero_struct; evt.kind = UI_EventKind_Text; @@ -2696,34 +2696,34 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: address finding - case DF_CoreCmdKind_GoToAddress: + case D_CmdKind_GoToAddress: { U64 vaddr = params.vaddr; }break; //- rjf: thread finding - case DF_CoreCmdKind_FindThread: + case D_CmdKind_FindThread: { DI_Scope *scope = di_scope_open(); - DF_Entity *thread = df_entity_from_handle(params.entity); + D_Entity *thread = d_entity_from_handle(params.entity); U64 unwind_index = params.unwind_index; U64 inline_depth = params.inline_depth; - if(thread->kind == DF_EntityKind_Thread) + if(thread->kind == D_EntityKind_Thread) { // rjf: grab rip - U64 rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, unwind_index); + U64 rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_index); // rjf: extract thread/rip info - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - DF_Entity *module = df_module_from_process_vaddr(process, rip_vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); RDI_Parsed *rdi = di_rdi_from_key(scope, &dbgi_key, 0); - U64 rip_voff = df_voff_from_vaddr(module, rip_vaddr); - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff); - DF_Line line = {0}; + U64 rip_voff = d_voff_from_vaddr(module, rip_vaddr); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff); + D_Line line = {0}; { U64 idx = 0; - for(DF_LineNode *n = lines.first; n != 0; n = n->next, idx += 1) + for(D_LineNode *n = lines.first; n != 0; n = n->next, idx += 1) { line = n->v; if(idx == inline_depth) @@ -2738,71 +2738,71 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) B32 dbgi_missing = (dbgi_key.min_timestamp == 0 || dbgi_key.path.size == 0); B32 dbgi_pending = !dbgi_missing && rdi == &di_rdi_parsed_nil; B32 has_line_info = (line.voff_range.max != 0); - B32 has_module = !df_entity_is_nil(module); + B32 has_module = !d_entity_is_nil(module); B32 has_dbg_info = has_module && !dbgi_missing; if(!dbgi_pending && (has_line_info || has_module)) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); if(has_line_info) { params.file_path = line.file_path; params.text_point = line.pt; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_TextPoint); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_TextPoint); } - params.entity = df_handle_from_entity(thread); + params.entity = d_handle_from_entity(thread); params.voff = rip_voff; params.vaddr = rip_vaddr; params.unwind_index = unwind_index; params.inline_depth = inline_depth; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_VirtualOff); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_VirtualAddr); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_UnwindIndex); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_InlineDepth); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_VirtualOff); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_VirtualAddr); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_UnwindIndex); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_InlineDepth); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); } // rjf: snap to resolved address w/o line info if(!missing_rip && !dbgi_pending && !has_line_info && !has_module) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(thread); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(thread); params.voff = rip_voff; params.vaddr = rip_vaddr; params.unwind_index = unwind_index; params.inline_depth = inline_depth; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_VirtualOff); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_VirtualAddr); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_UnwindIndex); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_InlineDepth); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_VirtualOff); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_VirtualAddr); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_UnwindIndex); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_InlineDepth); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); } // rjf: retry on stopped, pending debug info - if(!df_ctrl_targets_running() && (dbgi_pending || missing_rip)) + if(!d_ctrl_targets_running() && (dbgi_pending || missing_rip)) { - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindThread)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_FindThread)); } } di_scope_close(scope); }break; - case DF_CoreCmdKind_FindSelectedThread: + case D_CmdKind_FindSelectedThread: { - DF_Entity *selected_thread = df_entity_from_handle(df_base_interact_regs()->thread); - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(selected_thread); - params.unwind_index = df_base_interact_regs()->unwind_count; - params.inline_depth = df_base_interact_regs()->inline_depth; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_UnwindIndex); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_InlineDepth); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindThread)); + D_Entity *selected_thread = d_entity_from_handle(d_base_interact_regs()->thread); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(selected_thread); + params.unwind_index = d_base_interact_regs()->unwind_count; + params.inline_depth = d_base_interact_regs()->inline_depth; + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_UnwindIndex); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_InlineDepth); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_FindThread)); }break; //- rjf: name finding - case DF_CoreCmdKind_GoToName: + case D_CmdKind_GoToName: { String8 name = params.string; if(name.size != 0) @@ -2814,10 +2814,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DI_Key voff_dbgi_key = {0}; if(name_resolved == 0) { - DI_KeyList keys = df_push_active_dbgi_key_list(scratch.arena); + DI_KeyList keys = d_push_active_dbgi_key_list(scratch.arena); for(DI_KeyNode *n = keys.first; n != 0; n = n->next) { - U64 binary_voff = df_voff_from_dbgi_key_symbol_name(&n->v, name); + U64 binary_voff = d_voff_from_dbgi_key_symbol_name(&n->v, name); if(binary_voff != 0) { voff = binary_voff; @@ -2829,10 +2829,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } // rjf: try to resolve name as a file - DF_Entity *file = &df_g_nil_entity; + D_Entity *file = &d_nil_entity; if(name_resolved == 0) { - DF_Entity *src_entity = df_entity_from_handle(params.entity); + D_Entity *src_entity = d_entity_from_handle(params.entity); String8 file_part_of_name = name; U64 quote_pos = str8_find_needle(name, 0, str8_lit("\""), 0); if(quote_pos < name.size) @@ -2851,32 +2851,32 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) if(folders.node_count != 0) { String8 first_folder_name = folders.first->string; - DF_Entity *root_folder = &df_g_nil_entity; + D_Entity *root_folder = &d_nil_entity; // rjf: try to find root folder as if it's an absolute path - if(df_entity_is_nil(root_folder)) + if(d_entity_is_nil(root_folder)) { - root_folder = df_entity_from_path(first_folder_name, DF_EntityFromPathFlag_OpenAsNeeded); + root_folder = d_entity_from_path(first_folder_name, D_EntityFromPathFlag_OpenAsNeeded); } // rjf: try to find root folder as if it's a path we've already loaded - if(df_entity_is_nil(root_folder)) + if(d_entity_is_nil(root_folder)) { - root_folder = df_entity_from_name_and_kind(first_folder_name, DF_EntityKind_File); + root_folder = d_entity_from_name_and_kind(first_folder_name, D_EntityKind_File); } // rjf: try to find root folder as if it's inside of a path we've already loaded - if(df_entity_is_nil(root_folder)) + if(d_entity_is_nil(root_folder)) { - DF_EntityList all_files = df_query_cached_entity_list_with_kind(DF_EntityKind_File); - for(DF_EntityNode *n = all_files.first; n != 0; n = n->next) + D_EntityList all_files = d_query_cached_entity_list_with_kind(D_EntityKind_File); + for(D_EntityNode *n = all_files.first; n != 0; n = n->next) { - if(n->entity->flags & DF_EntityFlag_IsFolder) + if(n->entity->flags & D_EntityFlag_IsFolder) { - String8 n_entity_path = df_full_path_from_entity(scratch.arena, n->entity); + String8 n_entity_path = d_full_path_from_entity(scratch.arena, n->entity); String8 estimated_full_path = push_str8f(scratch.arena, "%S/%S", n_entity_path, first_folder_name); - root_folder = df_entity_from_path(estimated_full_path, DF_EntityFromPathFlag_OpenAsNeeded); - if(!df_entity_is_nil(root_folder)) + root_folder = d_entity_from_path(estimated_full_path, D_EntityFromPathFlag_OpenAsNeeded); + if(!d_entity_is_nil(root_folder)) { break; } @@ -2885,9 +2885,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } // rjf: has root folder -> descend downwards - if(!df_entity_is_nil(root_folder)) + if(!d_entity_is_nil(root_folder)) { - String8 root_folder_path = df_full_path_from_entity(scratch.arena, root_folder); + String8 root_folder_path = d_full_path_from_entity(scratch.arena, root_folder); String8List full_file_path_parts = {0}; str8_list_push(scratch.arena, &full_file_path_parts, root_folder_path); for(String8Node *n = folders.first->next; n != 0; n = n->next) @@ -2898,157 +2898,157 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) StringJoin join = {0}; join.sep = str8_lit("/"); String8 full_file_path = str8_list_join(scratch.arena, &full_file_path_parts, &join); - file = df_entity_from_path(full_file_path, DF_EntityFromPathFlag_AllowOverrides|DF_EntityFromPathFlag_OpenAsNeeded|DF_EntityFromPathFlag_OpenMissing); + file = d_entity_from_path(full_file_path, D_EntityFromPathFlag_AllowOverrides|D_EntityFromPathFlag_OpenAsNeeded|D_EntityFromPathFlag_OpenMissing); } } // rjf: no folders specified => just try the local folder, then try globally - else if(src_entity->kind == DF_EntityKind_File) + else if(src_entity->kind == D_EntityKind_File) { - file = df_entity_from_name_and_kind(file_name, DF_EntityKind_File); - if(df_entity_is_nil(file)) + file = d_entity_from_name_and_kind(file_name, D_EntityKind_File); + if(d_entity_is_nil(file)) { - String8 src_entity_full_path = df_full_path_from_entity(scratch.arena, src_entity); + String8 src_entity_full_path = d_full_path_from_entity(scratch.arena, src_entity); String8 src_entity_folder = str8_chop_last_slash(src_entity_full_path); String8 estimated_full_path = push_str8f(scratch.arena, "%S/%S", src_entity_folder, file_name); - file = df_entity_from_path(estimated_full_path, DF_EntityFromPathFlag_All); + file = d_entity_from_path(estimated_full_path, D_EntityFromPathFlag_All); } } } - name_resolved = !df_entity_is_nil(file) && !(file->flags & DF_EntityFlag_IsMissing) && !(file->flags & DF_EntityFlag_IsFolder); + name_resolved = !d_entity_is_nil(file) && !(file->flags & D_EntityFlag_IsMissing) && !(file->flags & D_EntityFlag_IsFolder); } // rjf: process resolved info if(name_resolved == 0) { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = push_str8f(scratch.arena, "`%S` could not be found.", name); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Error)); } // rjf: name resolved to voff * dbg info if(name_resolved != 0 && voff != 0) { - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &voff_dbgi_key, voff); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &voff_dbgi_key, voff); if(lines.first != 0) { - DF_CmdParams p = params; + D_CmdParams p = params; { p.file_path = lines.first->v.file_path; p.text_point = lines.first->v.pt; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_FilePath); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_TextPoint); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_FilePath); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_TextPoint); if(voff_dbgi_key.path.size != 0) { - DF_EntityList modules = df_modules_from_dbgi_key(scratch.arena, &voff_dbgi_key); - DF_Entity *module = df_first_entity_from_list(&modules); - DF_Entity *process = df_entity_ancestor_from_kind(module, DF_EntityKind_Process); - if(!df_entity_is_nil(process)) + D_EntityList modules = d_modules_from_dbgi_key(scratch.arena, &voff_dbgi_key); + D_Entity *module = d_first_entity_from_list(&modules); + D_Entity *process = d_entity_ancestor_from_kind(module, D_EntityKind_Process); + if(!d_entity_is_nil(process)) { - p.entity = df_handle_from_entity(process); + p.entity = d_handle_from_entity(process); p.vaddr = module->vaddr_rng.min + lines.first->v.voff_range.min; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_VirtualAddr); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_VirtualAddr); } } } - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); } } // rjf: name resolved to a file - if(name_resolved != 0 && !df_entity_is_nil(file)) + if(name_resolved != 0 && !d_entity_is_nil(file)) { - String8 path = df_full_path_from_entity(scratch.arena, file); - DF_CmdParams p = params; + String8 path = d_full_path_from_entity(scratch.arena, file); + D_CmdParams p = params; p.file_path = path; p.text_point = txt_pt(1, 1); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_FilePath); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_TextPoint); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_FilePath); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_TextPoint); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); } } }break; //- rjf: editors - case DF_CoreCmdKind_EditEntity: + case D_CmdKind_EditEntity: { - DF_Entity *entity = df_entity_from_handle(params.entity); + D_Entity *entity = d_entity_from_handle(params.entity); switch(entity->kind) { default: break; - case DF_EntityKind_Target: + case D_EntityKind_Target: { - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_EditTarget)); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_EditTarget)); }break; } }break; //- rjf: targets - case DF_CoreCmdKind_EditTarget: + case D_CmdKind_EditTarget: { - DF_Entity *entity = df_entity_from_handle(params.entity); - if(!df_entity_is_nil(entity) && entity->kind == DF_EntityKind_Target) + D_Entity *entity = d_entity_from_handle(params.entity); + if(!d_entity_is_nil(entity) && entity->kind == D_EntityKind_Target) { - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Target)); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_Target)); } else { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.string = str8_lit("Invalid target."); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Error)); } }break; //- rjf: catchall general entity activation paths (drag/drop, clicking) - case DF_CoreCmdKind_EntityRefFastPath: + case D_CmdKind_EntityRefFastPath: { - DF_Entity *entity = df_entity_from_handle(params.entity); + D_Entity *entity = d_entity_from_handle(params.entity); switch(entity->kind) { default: { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SpawnEntityView)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_SpawnEntityView)); }break; - case DF_EntityKind_Thread: + case D_EntityKind_Thread: { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SelectThread)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_SelectThread)); }break; - case DF_EntityKind_Target: + case D_EntityKind_Target: { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SelectTarget)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_SelectTarget)); }break; } }break; - case DF_CoreCmdKind_SpawnEntityView: + case D_CmdKind_SpawnEntityView: { DF_Panel *panel = df_panel_from_handle(params.panel); - DF_Entity *entity = df_entity_from_handle(params.entity); + D_Entity *entity = d_entity_from_handle(params.entity); switch(entity->kind) { default:{}break; - case DF_EntityKind_Target: + case D_EntityKind_Target: { - DF_CmdParams params = df_cmd_params_from_panel(ws, panel); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_EditTarget)); + D_CmdParams params = df_cmd_params_from_panel(ws, panel); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_EditTarget)); }break; } }break; - case DF_CoreCmdKind_FindCodeLocation: + case D_CmdKind_FindCodeLocation: { // NOTE(rjf): This command is where a lot of high-level flow things // in the debugger come together. It's that codepath that runs any @@ -3095,27 +3095,27 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: grab things to find. path * point, process * address, etc. String8 file_path = {0}; TxtPt point = {0}; - DF_Entity *thread = &df_g_nil_entity; - DF_Entity *process = &df_g_nil_entity; + D_Entity *thread = &d_nil_entity; + D_Entity *process = &d_nil_entity; U64 vaddr = 0; { file_path = params.file_path; point = params.text_point; - thread = df_entity_from_handle(df_interact_regs()->thread); - process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); + thread = d_entity_from_handle(d_interact_regs()->thread); + process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); vaddr = params.vaddr; } // rjf: given a src code location, and a process, if no vaddr is specified, // try to map the src coordinates to a vaddr via line info - if(vaddr == 0 && file_path.size != 0 && !df_entity_is_nil(process)) + if(vaddr == 0 && file_path.size != 0 && !d_entity_is_nil(process)) { - DF_LineList lines = df_lines_from_file_path_line_num(scratch.arena, file_path, point.line); - for(DF_LineNode *n = lines.first; n != 0; n = n->next) + D_LineList lines = d_lines_from_file_path_line_num(scratch.arena, file_path, point.line); + for(D_LineNode *n = lines.first; n != 0; n = n->next) { - DF_EntityList modules = df_modules_from_dbgi_key(scratch.arena, &n->v.dbgi_key); - DF_Entity *module = df_module_from_thread_candidates(thread, &modules); - vaddr = df_vaddr_from_voff(module, n->v.voff_range.min); + D_EntityList modules = d_modules_from_dbgi_key(scratch.arena, &n->v.dbgi_key); + D_Entity *module = d_module_from_thread_candidates(thread, &modules); + vaddr = d_vaddr_from_voff(module, n->v.voff_range.min); break; } } @@ -3132,7 +3132,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->order_next) { if(df_view_is_project_filtered(view)) { continue; } - String8 view_file_path = df_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); + String8 view_file_path = d_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); DF_GfxViewKind view_kind = df_gfx_view_kind_from_string(view->spec->info.name); if((view_kind == DF_GfxViewKind_Text || view_kind == DF_GfxViewKind_PendingFile) && path_match_normalized(view_file_path, file_path)) @@ -3264,17 +3264,17 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) if(!df_panel_is_nil(dst_panel) && df_view_is_nil(view_w_this_src_code)) { DF_View *view = df_view_alloc(); - String8 file_path_query = df_eval_string_from_file_path(scratch.arena, file_path); + String8 file_path_query = d_eval_string_from_file_path(scratch.arena, file_path); df_view_equip_spec(ws, view, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_Text), file_path_query, &md_nil_node); df_panel_insert_tab_view(dst_panel, dst_panel->last_tab_view, view); dst_view = view; } // rjf: determine if we need a contain or center - DF_CoreCmdKind cursor_snap_kind = DF_CoreCmdKind_CenterCursor; + D_CmdKind cursor_snap_kind = D_CmdKind_CenterCursor; if(!df_panel_is_nil(dst_panel) && dst_view == view_w_this_src_code && df_selected_tab_from_panel(dst_panel) == dst_view) { - cursor_snap_kind = DF_CoreCmdKind_ContainCursor; + cursor_snap_kind = D_CmdKind_ContainCursor; } // rjf: move cursor & snap-to-cursor @@ -3282,17 +3282,17 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { disasm_view_prioritized = (df_selected_tab_from_panel(dst_panel) == view_w_disasm); dst_panel->selected_tab_view = df_handle_from_view(dst_view); - DF_CmdParams params = df_cmd_params_from_view(ws, dst_panel, dst_view); + D_CmdParams params = df_cmd_params_from_view(ws, dst_panel, dst_view); params.text_point = point; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_TextPoint); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_GoToLine)); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(cursor_snap_kind)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_TextPoint); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_GoToLine)); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(cursor_snap_kind)); panel_used_for_src_code = dst_panel; } } // rjf: given the above, find disassembly location. - if(!df_entity_is_nil(process) && vaddr != 0) + if(!d_entity_is_nil(process) && vaddr != 0) { // rjf: determine which panel we will use to find the disasm loc - // we *cannot* use the same panel we used for source code, if any. @@ -3319,29 +3319,29 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } // rjf: determine if we need a contain or center - DF_CoreCmdKind cursor_snap_kind = DF_CoreCmdKind_CenterCursor; + D_CmdKind cursor_snap_kind = D_CmdKind_CenterCursor; if(dst_view == view_w_disasm && df_selected_tab_from_panel(dst_panel) == dst_view) { - cursor_snap_kind = DF_CoreCmdKind_ContainCursor; + cursor_snap_kind = D_CmdKind_ContainCursor; } // rjf: move cursor & snap-to-cursor if(!df_panel_is_nil(dst_panel)) { dst_panel->selected_tab_view = df_handle_from_view(dst_view); - DF_CmdParams params = df_cmd_params_from_view(ws, dst_panel, dst_view); - params.entity = df_handle_from_entity(process); + D_CmdParams params = df_cmd_params_from_view(ws, dst_panel, dst_view); + params.entity = d_handle_from_entity(process); params.vaddr = vaddr; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_VirtualAddr); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_GoToAddress)); - df_cmd_list_push(arena, cmds, ¶ms, df_cmd_spec_from_core_cmd_kind(cursor_snap_kind)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_VirtualAddr); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(D_CmdKind_GoToAddress)); + d_cmd_list_push(arena, cmds, ¶ms, d_cmd_spec_from_kind(cursor_snap_kind)); } } }break; //- rjf: filtering - case DF_CoreCmdKind_Filter: + case D_CmdKind_Filter: { DF_View *view = df_view_from_handle(params.view); DF_Panel *panel = df_panel_from_handle(params.panel); @@ -3362,7 +3362,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) view->query_mark = txt_pt(1, 1); } }break; - case DF_CoreCmdKind_ClearFilter: + case D_CmdKind_ClearFilter: { DF_View *view = df_view_from_handle(params.view); if(!df_view_is_nil(view)) @@ -3372,7 +3372,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) view->query_cursor = view->query_mark = txt_pt(1, 1); } }break; - case DF_CoreCmdKind_ApplyFilter: + case D_CmdKind_ApplyFilter: { DF_View *view = df_view_from_handle(params.view); if(!df_view_is_nil(view)) @@ -3382,45 +3382,45 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: query completion - case DF_CoreCmdKind_CompleteQuery: + case D_CmdKind_CompleteQuery: { // rjf: compound command parameters - if(ws->query_cmd_spec->info.query.slot != DF_CmdParamSlot_Null && - df_cmd_params_has_slot(¶ms, ws->query_cmd_spec->info.query.slot)) + if(ws->query_cmd_spec->info.query.slot != D_CmdParamSlot_Null && + d_cmd_params_has_slot(¶ms, ws->query_cmd_spec->info.query.slot)) { - DF_CmdParams params_copy = df_cmd_params_copy(ws->query_cmd_arena, ¶ms); - Rng1U64 offset_range_in_params = df_g_cmd_param_slot_range_table[ws->query_cmd_spec->info.query.slot]; + D_CmdParams params_copy = df_cmd_params_copy(ws->query_cmd_arena, ¶ms); + Rng1U64 offset_range_in_params = d_cmd_param_slot_range_table[ws->query_cmd_spec->info.query.slot]; MemoryCopy((U8 *)(&ws->query_cmd_params) + offset_range_in_params.min, (U8 *)(¶ms_copy) + offset_range_in_params.min, dim_1u64(offset_range_in_params)); - df_cmd_params_mark_slot(&ws->query_cmd_params, ws->query_cmd_spec->info.query.slot); + d_cmd_params_mark_slot(&ws->query_cmd_params, ws->query_cmd_spec->info.query.slot); } // rjf: determine if command is ready to run B32 command_ready = 1; - if(ws->query_cmd_spec->info.query.slot != DF_CmdParamSlot_Null && - !df_cmd_params_has_slot(&ws->query_cmd_params, ws->query_cmd_spec->info.query.slot)) + if(ws->query_cmd_spec->info.query.slot != D_CmdParamSlot_Null && + !d_cmd_params_has_slot(&ws->query_cmd_params, ws->query_cmd_spec->info.query.slot)) { command_ready = 0; } // rjf: end this query - if(!(ws->query_cmd_spec->info.query.flags & DF_CmdQueryFlag_KeepOldInput)) + if(!(ws->query_cmd_spec->info.query.flags & D_CmdQueryFlag_KeepOldInput)) { - DF_CmdParams p = df_cmd_params_from_window(ws); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CancelQuery)); + D_CmdParams p = df_cmd_params_from_window(ws); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_CancelQuery)); } // rjf: push command if possible if(command_ready) { - df_push_cmd__root(&ws->query_cmd_params, ws->query_cmd_spec); + d_push_cmd__root(&ws->query_cmd_params, ws->query_cmd_spec); } }break; - case DF_CoreCmdKind_CancelQuery: + case D_CmdKind_CancelQuery: { arena_clear(ws->query_cmd_arena); - ws->query_cmd_spec = &df_g_nil_cmd_spec; + ws->query_cmd_spec = &d_nil_cmd_spec; MemoryZeroStruct(&ws->query_cmd_params); for(DF_View *v = ws->query_view_stack_top, *next = 0; !df_view_is_nil(v); v = next) { @@ -3431,7 +3431,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) }break; //- rjf: developer commands - case DF_CoreCmdKind_ToggleDevMenu: + case D_CmdKind_ToggleDevMenu: { ws->dev_menu_is_open ^= 1; }break; @@ -3477,7 +3477,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(!found) { - panel->selected_tab_view = df_handle_zero(); + panel->selected_tab_view = d_handle_zero(); } } } @@ -3485,9 +3485,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) ////////////////////////////// //- rjf: fill window/panel/view interaction registers // - df_interact_regs()->window = df_handle_from_window(ws); - df_interact_regs()->panel = df_handle_from_panel(ws->focused_panel); - df_interact_regs()->view = ws->focused_panel->selected_tab_view; + d_interact_regs()->window = df_handle_from_window(ws); + d_interact_regs()->panel = df_handle_from_panel(ws->focused_panel); + d_interact_regs()->view = ws->focused_panel->selected_tab_view; ////////////////////////////// //- rjf: process view-level commands on leaf panels @@ -3505,13 +3505,13 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_View *view = df_selected_tab_from_panel(panel); if(!df_view_is_nil(view)) { - df_push_interact_regs(); + d_push_interact_regs(); DF_ViewCmdFunctionType *do_view_cmds_function = view->spec->info.cmd_hook; do_view_cmds_function(ws, panel, view, view->params_roots[view->params_read_gen%ArrayCount(view->params_roots)], str8(view->query_buffer, view->query_string_size), cmds); - DF_InteractRegs *view_regs = df_pop_interact_regs(); + D_InteractRegs *view_regs = d_pop_interact_regs(); if(panel == ws->focused_panel) { - MemoryCopyStruct(df_interact_regs(), view_regs); + MemoryCopyStruct(d_interact_regs(), view_regs); } } } @@ -3642,7 +3642,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } // rjf: begin & push initial stack values - ui_begin_build(ws->os, &events, &icon_info, &widget_palette_info, &animation_info, df_dt(), df_dt()); + ui_begin_build(ws->os, &events, &icon_info, &widget_palette_info, &animation_info, d_dt(), d_dt()); ui_push_font(main_font); ui_push_font_size(main_font_size); ui_push_text_padding(main_font_size*0.3f); @@ -3674,7 +3674,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { Temp scratch = scratch_begin(&arena, 1); String8 string = ui_string_hover_string(scratch.arena); - D_FancyRunList runs = ui_string_hover_runs(scratch.arena); + DR_FancyRunList runs = ui_string_hover_runs(scratch.arena); UI_Box *box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); ui_box_equip_display_string_fancy_runs(box, string, &runs); scratch_end(scratch); @@ -3689,7 +3689,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) Temp scratch = scratch_begin(&arena, 1); DF_DragDropPayload *payload = &df_g_drag_drop_payload; DF_Panel *panel = df_panel_from_handle(payload->panel); - DF_Entity *entity = df_entity_from_handle(payload->entity); + D_Entity *entity = d_entity_from_handle(payload->entity); DF_View *view = df_view_from_handle(payload->view); { //- rjf: tab dragging @@ -3713,7 +3713,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_Row { DF_IconKind icon_kind = df_icon_kind_from_view(view); - D_FancyStringList fstrs = df_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); + DR_FancyStringList fstrs = df_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); DF_Font(ws, DF_FontSlot_Icons) UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons)) UI_PrefWidth(ui_em(2.5f, 1.f)) @@ -3740,13 +3740,13 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } //- rjf: entity dragging - else if(!df_entity_is_nil(entity)) UI_Tooltip + else if(!d_entity_is_nil(entity)) UI_Tooltip { ui_set_next_pref_width(ui_children_sum(1)); UI_Row UI_HeightFill { - String8 display_name = df_display_string_from_entity(scratch.arena, entity); - DF_IconKind icon_kind = df_g_entity_kind_icon_kind_table[entity->kind]; + String8 display_name = d_display_string_from_entity(scratch.arena, entity); + DF_IconKind icon_kind = d_entity_kind_icon_kind_table[entity->kind]; DF_Font(ws, DF_FontSlot_Icons) UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) @@ -3779,7 +3779,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //- rjf: draw current interaction regs { - DF_InteractRegs *regs = df_interact_regs(); + D_InteractRegs *regs = d_interact_regs(); #define Handle(name) ui_labelf("%s: [0x%I64x, 0x%I64x]", #name, (regs->name).u64[0], (regs->name).u64[1]) Handle(window); Handle(panel); @@ -3824,7 +3824,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } avg_ui_hash_chain_length = chain_length_sum / chain_count; } - ui_labelf("Target Hz: %.2f", 1.f/df_dt()); + ui_labelf("Target Hz: %.2f", 1.f/d_dt()); ui_labelf("Ctrl Run Index: %I64u", ctrl_run_gen()); ui_labelf("Ctrl Mem Gen Index: %I64u", ctrl_mem_gen()); ui_labelf("Window %p", window); @@ -3847,27 +3847,27 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) ui_divider(ui_em(1.f, 1.f)); //- rjf: draw entity tree - DF_EntityRec rec = {0}; + D_EntityRec rec = {0}; S32 indent = 0; UI_PrefWidth(ui_text_dim(10, 1)) ui_labelf("Entity Tree:"); - for(DF_Entity *e = df_entity_root(); !df_entity_is_nil(e); e = rec.next) + for(D_Entity *e = d_entity_root(); !d_entity_is_nil(e); e = rec.next) { ui_set_next_pref_width(ui_children_sum(1)); ui_set_next_pref_height(ui_children_sum(1)); UI_Row { ui_spacer(ui_em(2.f*indent, 1.f)); - DF_Entity *dst = df_entity_from_handle(e->entity_handle); - if(!df_entity_is_nil(dst)) + D_Entity *dst = d_entity_from_handle(e->entity_handle); + if(!d_entity_is_nil(dst)) { ui_labelf("[link] %S -> %S", e->name, dst->name); } else { - ui_labelf("%S: %S", df_g_entity_kind_display_string_table[e->kind], e->name); + ui_labelf("%S: %S", d_entity_kind_display_string_table[e->kind], e->name); } } - rec = df_entity_rec_df_pre(e, df_entity_root()); + rec = d_entity_rec_df_pre(e, d_entity_root()); indent += rec.push_count; indent -= rec.pop_count; } @@ -3884,8 +3884,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //- rjf: auto-close entity ctx menu if(ui_ctx_menu_is_open(ws->entity_ctx_menu_key)) { - DF_Entity *entity = df_entity_from_handle(ws->entity_ctx_menu_entity); - if(df_entity_is_nil(entity)) + D_Entity *entity = d_entity_from_handle(ws->entity_ctx_menu_entity); + if(d_entity_is_nil(entity)) { ui_ctx_menu_close(); } @@ -3899,8 +3899,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) TXT_Scope *txt_scope = txt_scope_open(); HS_Scope *hs_scope = hs_scope_open(); TxtRng range = ws->code_ctx_menu_range; - DF_LineList lines = ws->code_ctx_menu_lines; - if(!txt_pt_match(range.min, range.max) && ui_clicked(df_cmd_spec_button(ws, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Copy)))) + D_LineList lines = ws->code_ctx_menu_lines; + if(!txt_pt_match(range.min, range.max) && ui_clicked(df_cmd_spec_button(ws, d_cmd_spec_from_kind(D_CmdKind_Copy)))) { U128 hash = {0}; TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, ws->code_ctx_menu_text_key, ws->code_ctx_menu_lang_kind, &hash); @@ -3911,41 +3911,41 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(range.min.line == range.max.line && ui_clicked(df_icon_buttonf(ws, DF_IconKind_RightArrow, 0, "Set Next Statement"))) { - DF_Entity *thread = df_entity_from_handle(df_interact_regs()->thread); + D_Entity *thread = d_entity_from_handle(d_interact_regs()->thread); U64 new_rip_vaddr = ws->code_ctx_menu_vaddr; if(ws->code_ctx_menu_file_path.size != 0) { - for(DF_LineNode *n = lines.first; n != 0; n = n->next) + for(D_LineNode *n = lines.first; n != 0; n = n->next) { - DF_EntityList modules = df_modules_from_dbgi_key(scratch.arena, &n->v.dbgi_key); - DF_Entity *module = df_module_from_thread_candidates(thread, &modules); - if(!df_entity_is_nil(module)) + D_EntityList modules = d_modules_from_dbgi_key(scratch.arena, &n->v.dbgi_key); + D_Entity *module = d_module_from_thread_candidates(thread, &modules); + if(!d_entity_is_nil(module)) { - new_rip_vaddr = df_vaddr_from_voff(module, n->v.voff_range.min); + new_rip_vaddr = d_vaddr_from_voff(module, n->v.voff_range.min); break; } } } - DF_CmdParams p = df_cmd_params_from_window(ws); - p.entity = df_handle_from_entity(thread); + D_CmdParams p = df_cmd_params_from_window(ws); + p.entity = d_handle_from_entity(thread); p.vaddr = new_rip_vaddr; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SetThreadIP)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_SetThreadIP)); ui_ctx_menu_close(); } if(range.min.line == range.max.line && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Play, 0, "Run To Line"))) { if(ws->code_ctx_menu_file_path.size != 0) { - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.file_path = ws->code_ctx_menu_file_path; p.text_point = range.min; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunToLine)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_RunToLine)); } else { - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.vaddr = ws->code_ctx_menu_vaddr; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunToAddress)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_RunToAddress)); } ui_ctx_menu_close(); } @@ -3964,18 +3964,18 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) expr_off_range = txt_expr_off_range_from_info_data_pt(&info, data, range.min); } String8 expr = str8_substr(data, expr_off_range); - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.string = expr; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_GoToName)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_GoToName)); ui_ctx_menu_close(); } if(range.min.line == range.max.line && ui_clicked(df_icon_buttonf(ws, DF_IconKind_CircleFilled, 0, "Toggle Breakpoint"))) { - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.file_path = ws->code_ctx_menu_file_path; p.text_point = range.min; p.vaddr = ws->code_ctx_menu_vaddr; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ToggleBreakpoint)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_ToggleBreakpoint)); ui_ctx_menu_close(); } if(range.min.line == range.max.line && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Binoculars, 0, "Toggle Watch Expression"))) @@ -3993,44 +3993,44 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) expr_off_range = txt_expr_off_range_from_info_data_pt(&info, data, range.min); } String8 expr = str8_substr(data, expr_off_range); - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.string = expr; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ToggleWatchExpression)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_ToggleWatchExpression)); ui_ctx_menu_close(); } if(ws->code_ctx_menu_file_path.size == 0 && range.min.line == range.max.line && ui_clicked(df_icon_buttonf(ws, DF_IconKind_FileOutline, 0, "Go To Source"))) { if(lines.first != 0) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.file_path = lines.first->v.file_path; params.text_point = lines.first->v.pt; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_TextPoint); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_TextPoint); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); } ui_ctx_menu_close(); } if(ws->code_ctx_menu_file_path.size != 0 && range.min.line == range.max.line && ui_clicked(df_icon_buttonf(ws, DF_IconKind_FileOutline, 0, "Go To Disassembly"))) { - DF_Entity *thread = df_entity_from_handle(df_interact_regs()->thread); + D_Entity *thread = d_entity_from_handle(d_interact_regs()->thread); U64 vaddr = 0; - for(DF_LineNode *n = lines.first; n != 0; n = n->next) + for(D_LineNode *n = lines.first; n != 0; n = n->next) { - DF_EntityList modules = df_modules_from_dbgi_key(scratch.arena, &n->v.dbgi_key); - DF_Entity *module = df_module_from_thread_candidates(thread, &modules); - if(!df_entity_is_nil(module)) + D_EntityList modules = d_modules_from_dbgi_key(scratch.arena, &n->v.dbgi_key); + D_Entity *module = d_module_from_thread_candidates(thread, &modules); + if(!d_entity_is_nil(module)) { - vaddr = df_vaddr_from_voff(module, n->v.voff_range.min); + vaddr = d_vaddr_from_voff(module, n->v.voff_range.min); break; } } - DF_CmdParams params = df_cmd_params_from_window(ws); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_VirtualAddr); - params.entity = df_handle_from_entity(thread); + D_CmdParams params = df_cmd_params_from_window(ws); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_VirtualAddr); + params.entity = d_handle_from_entity(thread); params.vaddr = vaddr; - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); ui_ctx_menu_close(); } hs_scope_close(hs_scope); @@ -4042,10 +4042,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_PrefWidth(ui_em(40.f, 1.f)) DF_Palette(ws, DF_PaletteCode_ImplicitButton) { - DF_Entity *entity = df_entity_from_handle(ws->entity_ctx_menu_entity); - DF_IconKind entity_icon = df_g_entity_kind_icon_kind_table[entity->kind]; - DF_EntityKindFlags kind_flags = df_g_entity_kind_flags_table[entity->kind]; - String8 display_name = df_display_string_from_entity(scratch.arena, entity); + D_Entity *entity = d_entity_from_handle(ws->entity_ctx_menu_entity); + DF_IconKind entity_icon = d_entity_kind_icon_kind_table[entity->kind]; + D_EntityKindFlags kind_flags = d_entity_kind_flags_table[entity->kind]; + String8 display_name = d_display_string_from_entity(scratch.arena, entity); // rjf: title UI_Row @@ -4060,16 +4060,16 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) ui_label(df_g_icon_kind_text_table[entity_icon]); UI_PrefWidth(ui_text_dim(10, 1)) UI_Flags(UI_BoxFlag_DrawTextWeak) - ui_label(df_g_entity_kind_display_string_table[entity->kind]); + ui_label(d_entity_kind_display_string_table[entity->kind]); { UI_Palette *palette = ui_top_palette(); - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & D_EntityFlag_HasColor) { - palette = ui_build_palette(ui_top_palette(), .text = df_rgba_from_entity(entity)); + palette = ui_build_palette(ui_top_palette(), .text = d_rgba_from_entity(entity)); } UI_Palette(palette) UI_PrefWidth(ui_text_dim(10, 1)) - DF_Font(ws, (kind_flags & DF_EntityKindFlag_NameIsCode) ? DF_FontSlot_Code : DF_FontSlot_Main) + DF_Font(ws, (kind_flags & D_EntityKindFlag_NameIsCode) ? DF_FontSlot_Code : DF_FontSlot_Main) ui_label(display_name); } } @@ -4077,102 +4077,102 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_Palette(ws, DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); // rjf: name editor - if(kind_flags & DF_EntityKindFlag_CanRename) UI_TextPadding(ui_top_font_size()*1.5f) + if(kind_flags & D_EntityKindFlag_CanRename) UI_TextPadding(ui_top_font_size()*1.5f) { - UI_Signal sig = df_line_editf(ws, DF_LineEditFlag_Border, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, entity->name, "%S###entity_name_edit_%p", df_g_entity_kind_name_label_table[entity->kind], entity); + UI_Signal sig = df_line_editf(ws, DF_LineEditFlag_Border, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, entity->name, "%S###entity_name_edit_%p", d_entity_kind_name_label_table[entity->kind], entity); if(ui_committed(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); params.string = str8(ws->entity_ctx_menu_input_buffer, ws->entity_ctx_menu_input_size); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_NameEntity)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_NameEntity)); } } // rjf: condition editor - if(kind_flags & DF_EntityKindFlag_CanCondition) + if(kind_flags & D_EntityKindFlag_CanCondition) DF_Font(ws, DF_FontSlot_Code) UI_TextPadding(ui_top_font_size()*1.5f) { - DF_Entity *condition = df_entity_child_from_kind(entity, DF_EntityKind_Condition); + D_Entity *condition = d_entity_child_from_kind(entity, D_EntityKind_Condition); UI_Signal sig = df_line_editf(ws, DF_LineEditFlag_Border|DF_LineEditFlag_CodeContents, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, condition->name, "Condition###entity_cond_edit_%p", entity); if(ui_committed(sig)) { String8 new_string = str8(ws->entity_ctx_menu_input_buffer, ws->entity_ctx_menu_input_size); if(new_string.size != 0) { - if(df_entity_is_nil(condition)) + if(d_entity_is_nil(condition)) { - condition = df_entity_alloc(entity, DF_EntityKind_Condition); + condition = d_entity_alloc(entity, D_EntityKind_Condition); } - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(condition); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(condition); params.string = new_string; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_NameEntity)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_NameEntity)); } - else if(!df_entity_is_nil(condition)) + else if(!d_entity_is_nil(condition)) { - df_entity_mark_for_deletion(condition); + d_entity_mark_for_deletion(condition); } } } // rjf: exe editor - if(entity->kind == DF_EntityKind_Target) UI_TextPadding(ui_top_font_size()*1.5f) + if(entity->kind == D_EntityKind_Target) UI_TextPadding(ui_top_font_size()*1.5f) { - DF_Entity *exe = df_entity_child_from_kind(entity, DF_EntityKind_Executable); + D_Entity *exe = d_entity_child_from_kind(entity, D_EntityKind_Executable); UI_Signal sig = df_line_editf(ws, DF_LineEditFlag_Border, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, exe->name, "Executable###entity_exe_edit_%p", entity); if(ui_committed(sig)) { String8 new_string = str8(ws->entity_ctx_menu_input_buffer, ws->entity_ctx_menu_input_size); if(new_string.size != 0) { - if(df_entity_is_nil(exe)) + if(d_entity_is_nil(exe)) { - exe = df_entity_alloc(entity, DF_EntityKind_Executable); + exe = d_entity_alloc(entity, D_EntityKind_Executable); } - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(exe); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(exe); params.string = new_string; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_NameEntity)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_NameEntity)); } - else if(!df_entity_is_nil(exe)) + else if(!d_entity_is_nil(exe)) { - df_entity_mark_for_deletion(exe); + d_entity_mark_for_deletion(exe); } } } // rjf: arguments editors - if(entity->kind == DF_EntityKind_Target) UI_TextPadding(ui_top_font_size()*1.5f) + if(entity->kind == D_EntityKind_Target) UI_TextPadding(ui_top_font_size()*1.5f) { - DF_Entity *args = df_entity_child_from_kind(entity, DF_EntityKind_Arguments); + D_Entity *args = d_entity_child_from_kind(entity, D_EntityKind_Arguments); UI_Signal sig = df_line_editf(ws, DF_LineEditFlag_Border, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, args->name, "Arguments###entity_args_edit_%p", entity); if(ui_committed(sig)) { String8 new_string = str8(ws->entity_ctx_menu_input_buffer, ws->entity_ctx_menu_input_size); if(new_string.size != 0) { - if(df_entity_is_nil(args)) + if(d_entity_is_nil(args)) { - args = df_entity_alloc(entity, DF_EntityKind_Arguments); + args = d_entity_alloc(entity, D_EntityKind_Arguments); } - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(args); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(args); params.string = new_string; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_NameEntity)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_NameEntity)); } - else if(!df_entity_is_nil(args)) + else if(!d_entity_is_nil(args)) { - df_entity_mark_for_deletion(args); + d_entity_mark_for_deletion(args); } } } @@ -4185,92 +4185,92 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } // rjf: is command line only? -> make permanent - if(entity->cfg_src == DF_CfgSrc_CommandLine && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Save, 0, "Save To Project"))) + if(entity->cfg_src == D_CfgSrc_CommandLine && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Save, 0, "Save To Project"))) { - df_entity_equip_cfg_src(entity, DF_CfgSrc_Project); + d_entity_equip_cfg_src(entity, D_CfgSrc_Project); } // rjf: duplicate - if(kind_flags & DF_EntityKindFlag_CanDuplicate && ui_clicked(df_icon_buttonf(ws, DF_IconKind_XSplit, 0, "Duplicate"))) + if(kind_flags & D_EntityKindFlag_CanDuplicate && ui_clicked(df_icon_buttonf(ws, DF_IconKind_XSplit, 0, "Duplicate"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_DuplicateEntity)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_DuplicateEntity)); ui_ctx_menu_close(); } // rjf: edit - if(kind_flags & DF_EntityKindFlag_CanEdit && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Pencil, 0, "Edit"))) + if(kind_flags & D_EntityKindFlag_CanEdit && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Pencil, 0, "Edit"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_EditEntity)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_EditEntity)); ui_ctx_menu_close(); } // rjf: deletion - if(kind_flags & DF_EntityKindFlag_CanDelete && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Trash, 0, "Delete"))) + if(kind_flags & D_EntityKindFlag_CanDelete && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Trash, 0, "Delete"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RemoveEntity)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RemoveEntity)); ui_ctx_menu_close(); } // rjf: enabling - if(kind_flags & DF_EntityKindFlag_CanEnable) + if(kind_flags & D_EntityKindFlag_CanEnable) { B32 is_enabled = !entity->disabled; if(!is_enabled && ui_clicked(df_icon_buttonf(ws, DF_IconKind_CheckHollow, 0, "Enable###enabler"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_EnableEntity)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_EnableEntity)); } if(is_enabled && ui_clicked(df_icon_buttonf(ws, DF_IconKind_CheckFilled, 0, "Disable###enabler"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_DisableEntity)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_DisableEntity)); } } // rjf: freezing - if(kind_flags & DF_EntityKindFlag_CanFreeze) + if(kind_flags & D_EntityKindFlag_CanFreeze) { - B32 is_frozen = df_entity_is_frozen(entity); + B32 is_frozen = d_entity_is_frozen(entity); ui_set_next_palette(df_palette_from_code(ws, is_frozen ? DF_PaletteCode_NegativePopButton : DF_PaletteCode_PositivePopButton)); if(is_frozen && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Locked, 0, "Thaw###freeze_thaw"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ThawEntity)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_ThawEntity)); } if(!is_frozen && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Unlocked, 0, "Freeze###freeze_thaw"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FreezeEntity)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_FreezeEntity)); } } // rjf: go-to-location { - DF_Entity *loc = df_entity_child_from_kind(entity, DF_EntityKind_Location); - if(!df_entity_is_nil(loc) && ui_clicked(df_icon_buttonf(ws, DF_IconKind_FileOutline, 0, "Go To Location"))) + D_Entity *loc = d_entity_child_from_kind(entity, D_EntityKind_Location); + if(!d_entity_is_nil(loc) && ui_clicked(df_icon_buttonf(ws, DF_IconKind_FileOutline, 0, "Go To Location"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.file_path = loc->name; params.text_point = loc->text_point; params.vaddr = loc->vaddr; - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); ui_ctx_menu_close(); } } @@ -4282,57 +4282,57 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { }break; - case DF_EntityKind_File: + case D_EntityKind_File: { - if(entity->flags & DF_EntityFlag_IsFolder && + if(entity->flags & D_EntityFlag_IsFolder && ui_clicked(df_icon_buttonf(ws, DF_IconKind_FolderOpenOutline, 0, "Open File In Folder"))) { - String8 path = df_full_path_from_entity(scratch.arena, entity); + String8 path = d_full_path_from_entity(scratch.arena, entity); String8 path_w_slash = push_str8f(scratch.arena, "%S/", path); { - DF_CmdParams p = df_cmd_params_zero(); + D_CmdParams p = d_cmd_params_zero(); p.file_path = path_w_slash; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_FilePath); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SetCurrentPath)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_FilePath); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_SetCurrentPath)); } { - DF_CmdParams p = df_cmd_params_from_window(ws); - p.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Open); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); + D_CmdParams p = df_cmd_params_from_window(ws); + p.cmd_spec = d_cmd_spec_from_kind(D_CmdKind_Open); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); } ui_ctx_menu_close(); } - if(!(entity->flags & DF_EntityFlag_IsFolder) && - !(entity->flags & DF_EntityFlag_IsMissing) && + if(!(entity->flags & D_EntityFlag_IsFolder) && + !(entity->flags & D_EntityFlag_IsMissing) && ui_clicked(df_icon_buttonf(ws, DF_IconKind_FileOutline, 0, "Go To File"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.file_path = df_full_path_from_entity(scratch.arena, entity); + D_CmdParams params = df_cmd_params_from_window(ws); + params.file_path = d_full_path_from_entity(scratch.arena, entity); params.text_point = txt_pt(1, 1); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_TextPoint); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_TextPoint); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); ui_ctx_menu_close(); } }break; - case DF_EntityKind_Process: - case DF_EntityKind_Thread: + case D_EntityKind_Process: + case D_EntityKind_Thread: { - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == D_EntityKind_Thread) { - B32 is_selected = df_handle_match(df_base_interact_regs()->thread, df_handle_from_entity(entity)); + B32 is_selected = d_handle_match(d_base_interact_regs()->thread, d_handle_from_entity(entity)); if(is_selected) { df_icon_buttonf(ws, DF_IconKind_Thread, 0, "[Selected]###select_entity"); } else if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_Thread, 0, "Select###select_entity"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SelectThread)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_SelectThread)); ui_ctx_menu_close(); } } @@ -4345,49 +4345,49 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) ui_ctx_menu_close(); } - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == D_EntityKind_Thread) { if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_Clipboard, 0, "Copy Instruction Pointer Address"))) { - U64 rip = df_query_cached_rip_from_thread(entity); + U64 rip = d_query_cached_rip_from_thread(entity); String8 string = push_str8f(scratch.arena, "0x%I64x", rip); os_set_clipboard_text(string); ui_ctx_menu_close(); } } - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == D_EntityKind_Thread) { if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_Clipboard, 0, "Copy Call Stack"))) { DI_Scope *di_scope = di_scope_open(); - DF_Entity *process = df_entity_ancestor_from_kind(entity, DF_EntityKind_Process); - CTRL_Unwind base_unwind = df_query_cached_unwind_from_thread(entity); - DF_Unwind rich_unwind = df_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); + D_Entity *process = d_entity_ancestor_from_kind(entity, D_EntityKind_Process); + CTRL_Unwind base_unwind = d_query_cached_unwind_from_thread(entity); + D_Unwind rich_unwind = d_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); String8List lines = {0}; for(U64 frame_idx = 0; frame_idx < rich_unwind.frames.concrete_frame_count; frame_idx += 1) { - DF_UnwindFrame *concrete_frame = &rich_unwind.frames.v[frame_idx]; + D_UnwindFrame *concrete_frame = &rich_unwind.frames.v[frame_idx]; U64 rip_vaddr = regs_rip_from_arch_block(entity->arch, concrete_frame->regs); - DF_Entity *module = df_module_from_process_vaddr(process, rip_vaddr); + D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr); RDI_Parsed *rdi = concrete_frame->rdi; RDI_Procedure *procedure = concrete_frame->procedure; - for(DF_UnwindInlineFrame *inline_frame = concrete_frame->last_inline_frame; + for(D_UnwindInlineFrame *inline_frame = concrete_frame->last_inline_frame; inline_frame != 0; inline_frame = inline_frame->prev) { RDI_InlineSite *inline_site = inline_frame->inline_site; String8 name = {0}; name.str = rdi_string_from_idx(rdi, inline_site->name_string_idx, &name.size); - str8_list_pushf(scratch.arena, &lines, "0x%I64x: [inlined] \"%S\"%s%S", rip_vaddr, name, df_entity_is_nil(module) ? "" : " in ", module->name); + str8_list_pushf(scratch.arena, &lines, "0x%I64x: [inlined] \"%S\"%s%S", rip_vaddr, name, d_entity_is_nil(module) ? "" : " in ", module->name); } if(procedure != 0) { String8 name = {0}; name.str = rdi_name_from_procedure(rdi, procedure, &name.size); - str8_list_pushf(scratch.arena, &lines, "0x%I64x: \"%S\"%s%S", rip_vaddr, name, df_entity_is_nil(module) ? "" : " in ", module->name); + str8_list_pushf(scratch.arena, &lines, "0x%I64x: \"%S\"%s%S", rip_vaddr, name, d_entity_is_nil(module) ? "" : " in ", module->name); } - else if(!df_entity_is_nil(module)) + else if(!d_entity_is_nil(module)) { str8_list_pushf(scratch.arena, &lines, "0x%I64x: [??? in %S]", rip_vaddr, module->name); } @@ -4405,20 +4405,20 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } } - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == D_EntityKind_Thread) { if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_FileOutline, 0, "Find"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindThread)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_FindThread)); ui_ctx_menu_close(); } } }break; - case DF_EntityKind_Module: + case D_EntityKind_Module: { UI_Signal copy_full_path_sig = df_icon_buttonf(ws, DF_IconKind_Clipboard, 0, "Copy Full Path"); if(ui_clicked(copy_full_path_sig)) @@ -4448,22 +4448,22 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } }break; - case DF_EntityKind_Target: + case D_EntityKind_Target: { if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_Play, 0, "Launch And Run"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_LaunchAndRun)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_LaunchAndRun)); ui_ctx_menu_close(); } if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_PlayStepForward, 0, "Launch And Initialize"))) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_LaunchAndInit)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_LaunchAndInit)); ui_ctx_menu_close(); } }break; @@ -4473,7 +4473,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: color editor { - B32 entity_has_color = entity->flags & DF_EntityFlag_HasColor; + B32 entity_has_color = entity->flags & D_EntityFlag_HasColor; if(entity_has_color) { UI_Padding(ui_em(1.5f, 1.f)) @@ -4534,10 +4534,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_Trash, 0, "Remove Color###color_toggle"))) { - DF_StateDeltaHistoryBatch(df_state_delta_history()) + D_StateDeltaHistoryBatch(d_state_delta_history()) { - df_state_delta_history_push_struct_delta(df_state_delta_history(), &entity->flags, .guard_entity = entity); - entity->flags &= ~DF_EntityFlag_HasColor; + d_state_delta_history_push_struct_delta(d_state_delta_history(), &entity->flags, .guard_entity = entity); + entity->flags &= ~D_EntityFlag_HasColor; } } } @@ -4546,9 +4546,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(!entity_has_color && ui_clicked(df_icon_buttonf(ws, DF_IconKind_Palette, 0, "Apply Color###color_toggle"))) { - DF_StateDeltaHistoryBatch(df_state_delta_history()) + D_StateDeltaHistoryBatch(d_state_delta_history()) { - df_entity_equip_color_rgba(entity, v4f32(1, 1, 1, 1)); + d_entity_equip_color_rgba(entity, v4f32(1, 1, 1, 1)); } } } @@ -4571,8 +4571,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_Panel *panel = df_panel_from_handle(ws->tab_ctx_menu_panel); DF_View *view = df_view_from_handle(ws->tab_ctx_menu_view); DF_IconKind view_icon = df_icon_kind_from_view(view); - D_FancyStringList fstrs = df_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); - String8 file_path = df_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); + DR_FancyStringList fstrs = df_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); + String8 file_path = d_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); // rjf: title UI_Row @@ -4597,7 +4597,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: copy name if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_Clipboard, 0, "Copy Name"))) { - os_set_clipboard_text(d_string_from_fancy_string_list(scratch.arena, &fstrs)); + os_set_clipboard_text(dr_string_from_fancy_string_list(scratch.arena, &fstrs)); ui_ctx_menu_close(); } @@ -4632,24 +4632,24 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: filter controls if(view->spec->info.flags & DF_ViewSpecFlag_CanFilter) { - if(ui_clicked(df_cmd_spec_button(ws, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Filter)))) + if(ui_clicked(df_cmd_spec_button(ws, d_cmd_spec_from_kind(D_CmdKind_Filter)))) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); { params.view = df_handle_from_view(view); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_View); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_View); } - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Filter)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Filter)); ui_ctx_menu_close(); } - if(ui_clicked(df_cmd_spec_button(ws, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ClearFilter)))) + if(ui_clicked(df_cmd_spec_button(ws, d_cmd_spec_from_kind(D_CmdKind_ClearFilter)))) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); { params.view = df_handle_from_view(view); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_View); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_View); } - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ClearFilter)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_ClearFilter)); ui_ctx_menu_close(); } } @@ -4657,8 +4657,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: close tab if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_X, 0, "Close Tab"))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseTab)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CloseTab)); ui_ctx_menu_close(); } @@ -4707,15 +4707,15 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_Palette(ws, DF_PaletteCode_NeutralPopButton) if(ui_clicked(ui_buttonf("OK")) || (ui_key_match(bg_box->default_nav_focus_hot_key, ui_key_zero()) && ui_slot_press(UI_EventActionSlot_Accept))) { - DF_CmdParams p = df_cmd_params_zero(); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ConfirmAccept)); + D_CmdParams p = d_cmd_params_zero(); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_ConfirmAccept)); } UI_CornerRadius10(ui_top_font_size()*0.25f) UI_CornerRadius11(ui_top_font_size()*0.25f) if(ui_clicked(ui_buttonf("Cancel")) || ui_slot_press(UI_EventActionSlot_Cancel)) { - DF_CmdParams p = df_cmd_params_zero(); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ConfirmCancel)); + D_CmdParams p = d_cmd_params_zero(); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_ConfirmCancel)); } } ui_spacer(ui_em(3.f, 1.f)); @@ -4729,7 +4729,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //- rjf: build auto-complete lister // ProfScope("build autocomplete lister") - if(!ws->autocomp_force_closed && !ui_key_match(ws->autocomp_root_key, ui_key_zero()) && ws->autocomp_last_frame_idx+1 >= df_frame_index()) + if(!ws->autocomp_force_closed && !ui_key_match(ws->autocomp_root_key, ui_key_zero()) && ws->autocomp_last_frame_idx+1 >= d_frame_index()) { String8 query = str8(ws->autocomp_lister_query_buffer, ws->autocomp_lister_query_size); UI_Box *autocomp_root_box = ui_box_from_key(ws->autocomp_root_key); @@ -4738,12 +4738,12 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) Temp scratch = scratch_begin(&arena, 1); //- rjf: unpack lister params - DF_Entity *thread = df_entity_from_handle(df_base_interact_regs()->thread); - U64 thread_rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, df_base_interact_regs()->unwind_count); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - DF_Entity *module = df_module_from_process_vaddr(process, thread_rip_vaddr); - U64 thread_rip_voff = df_voff_from_vaddr(module, thread_rip_vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); + D_Entity *thread = d_entity_from_handle(d_base_interact_regs()->thread); + U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, d_base_interact_regs()->unwind_count); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + D_Entity *module = d_module_from_process_vaddr(process, thread_rip_vaddr); + U64 thread_rip_voff = d_voff_from_vaddr(module, thread_rip_vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); //- rjf: gather lister items DF_AutoCompListerItemChunkList item_list = {0}; @@ -4751,8 +4751,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //- rjf: gather locals if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_Locals) { - E_String2NumMap *locals_map = df_query_cached_locals_map_from_dbgi_key_voff(&dbgi_key, thread_rip_voff); - E_String2NumMap *member_map = df_query_cached_member_map_from_dbgi_key_voff(&dbgi_key, thread_rip_voff); + E_String2NumMap *locals_map = d_query_cached_locals_map_from_dbgi_key_voff(&dbgi_key, thread_rip_voff); + E_String2NumMap *member_map = d_query_cached_member_map_from_dbgi_key_voff(&dbgi_key, thread_rip_voff); for(E_String2NumMapNode *n = locals_map->first; n != 0; n = n->order_next) { DF_AutoCompListerItem item = {0}; @@ -4784,7 +4784,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //- rjf: gather registers if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_Registers) { - Architecture arch = df_architecture_from_entity(thread); + Architecture arch = d_architecture_from_entity(thread); U64 reg_names_count = regs_reg_code_count_from_architecture(arch); U64 alias_names_count = regs_alias_code_count_from_architecture(arch); String8 *reg_names = regs_reg_code_string_table_from_architecture(arch); @@ -4826,9 +4826,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //- rjf: gather view rules if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_ViewRules) { - for(U64 slot_idx = 0; slot_idx < df_state->view_rule_spec_table_size; slot_idx += 1) + for(U64 slot_idx = 0; slot_idx < d_state->view_rule_spec_table_size; slot_idx += 1) { - for(DF_CoreViewRuleSpec *spec = df_state->view_rule_spec_table[slot_idx]; spec != 0 && spec != &df_g_nil_core_view_rule_spec; spec = spec->hash_next) + for(D_ViewRuleSpec *spec = d_state->view_rule_spec_table[slot_idx]; spec != 0 && spec != &d_nil_core_view_rule_spec; spec = spec->hash_next) { DF_AutoCompListerItem item = {0}; { @@ -4932,7 +4932,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { // rjf: animate target # of rows { - F32 rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? (1 - pow_f32(2, (-60.f * df_dt()))) : 1.f; + F32 rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? (1 - pow_f32(2, (-60.f * d_dt()))) : 1.f; F32 target = Min((F32)item_array.count, 16.f); if(abs_f32(target - ws->autocomp_num_visible_rows_t) > 0.01f) { @@ -4947,7 +4947,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: animate open { - F32 rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * df_dt())) : 1.f; + F32 rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * d_dt())) : 1.f; F32 diff = 1.f-ws->autocomp_open_t; ws->autocomp_open_t += diff*rate; if(abs_f32(diff) < 0.05f) @@ -5095,13 +5095,13 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_PrefWidth(ui_em(50.f, 1.f)) DF_Palette(ws, DF_PaletteCode_ImplicitButton) { - DF_CoreCmdKind cmds[] = + D_CmdKind cmds[] = { - DF_CoreCmdKind_Open, - DF_CoreCmdKind_OpenUser, - DF_CoreCmdKind_OpenProject, - DF_CoreCmdKind_OpenRecentProject, - DF_CoreCmdKind_Exit, + D_CmdKind_Open, + D_CmdKind_OpenUser, + D_CmdKind_OpenProject, + D_CmdKind_OpenRecentProject, + D_CmdKind_Exit, }; U32 codepoints[] = { @@ -5122,11 +5122,11 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_PrefWidth(ui_em(50.f, 1.f)) DF_Palette(ws, DF_PaletteCode_ImplicitButton) { - DF_CoreCmdKind cmds[] = + D_CmdKind cmds[] = { - DF_CoreCmdKind_OpenWindow, - DF_CoreCmdKind_CloseWindow, - DF_CoreCmdKind_ToggleFullscreen, + D_CmdKind_OpenWindow, + D_CmdKind_CloseWindow, + D_CmdKind_ToggleFullscreen, }; U32 codepoints[] = { @@ -5145,21 +5145,21 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_PrefWidth(ui_em(50.f, 1.f)) DF_Palette(ws, DF_PaletteCode_ImplicitButton) { - DF_CoreCmdKind cmds[] = + D_CmdKind cmds[] = { - DF_CoreCmdKind_NewPanelRight, - DF_CoreCmdKind_NewPanelDown, - DF_CoreCmdKind_ClosePanel, - DF_CoreCmdKind_RotatePanelColumns, - DF_CoreCmdKind_NextPanel, - DF_CoreCmdKind_PrevPanel, - DF_CoreCmdKind_CloseTab, - DF_CoreCmdKind_NextTab, - DF_CoreCmdKind_PrevTab, - DF_CoreCmdKind_TabBarTop, - DF_CoreCmdKind_TabBarBottom, - DF_CoreCmdKind_ResetToDefaultPanels, - DF_CoreCmdKind_ResetToCompactPanels, + D_CmdKind_NewPanelRight, + D_CmdKind_NewPanelDown, + D_CmdKind_ClosePanel, + D_CmdKind_RotatePanelColumns, + D_CmdKind_NextPanel, + D_CmdKind_PrevPanel, + D_CmdKind_CloseTab, + D_CmdKind_NextTab, + D_CmdKind_PrevTab, + D_CmdKind_TabBarTop, + D_CmdKind_TabBarBottom, + D_CmdKind_ResetToDefaultPanels, + D_CmdKind_ResetToCompactPanels, }; U32 codepoints[] = { @@ -5188,28 +5188,28 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_PrefWidth(ui_em(50.f, 1.f)) DF_Palette(ws, DF_PaletteCode_ImplicitButton) { - DF_CoreCmdKind cmds[] = + D_CmdKind cmds[] = { - DF_CoreCmdKind_Targets, - DF_CoreCmdKind_Scheduler, - DF_CoreCmdKind_CallStack, - DF_CoreCmdKind_Modules, - DF_CoreCmdKind_Output, - DF_CoreCmdKind_Memory, - DF_CoreCmdKind_Disassembly, - DF_CoreCmdKind_Watch, - DF_CoreCmdKind_Locals, - DF_CoreCmdKind_Registers, - DF_CoreCmdKind_Globals, - DF_CoreCmdKind_ThreadLocals, - DF_CoreCmdKind_Types, - DF_CoreCmdKind_Procedures, - DF_CoreCmdKind_Breakpoints, - DF_CoreCmdKind_WatchPins, - DF_CoreCmdKind_FilePathMap, - DF_CoreCmdKind_Settings, - DF_CoreCmdKind_ExceptionFilters, - DF_CoreCmdKind_GettingStarted, + D_CmdKind_Targets, + D_CmdKind_Scheduler, + D_CmdKind_CallStack, + D_CmdKind_Modules, + D_CmdKind_Output, + D_CmdKind_Memory, + D_CmdKind_Disassembly, + D_CmdKind_Watch, + D_CmdKind_Locals, + D_CmdKind_Registers, + D_CmdKind_Globals, + D_CmdKind_ThreadLocals, + D_CmdKind_Types, + D_CmdKind_Procedures, + D_CmdKind_Breakpoints, + D_CmdKind_WatchPins, + D_CmdKind_FilePathMap, + D_CmdKind_Settings, + D_CmdKind_ExceptionFilters, + D_CmdKind_GettingStarted, }; U32 codepoints[] = { @@ -5246,11 +5246,11 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_Palette(ws, DF_PaletteCode_ImplicitButton) { Temp scratch = scratch_begin(&arena, 1); - DF_CoreCmdKind cmds[] = + D_CmdKind cmds[] = { - DF_CoreCmdKind_AddTarget, - DF_CoreCmdKind_EditTarget, - DF_CoreCmdKind_RemoveTarget, + D_CmdKind_AddTarget, + D_CmdKind_EditTarget, + D_CmdKind_RemoveTarget, }; U32 codepoints[] = { @@ -5261,24 +5261,24 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) Assert(ArrayCount(codepoints) == ArrayCount(cmds)); df_cmd_list_menu_buttons(ws, ArrayCount(cmds), cmds, codepoints); DF_Palette(ws, DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); - DF_EntityList targets_list = df_query_cached_entity_list_with_kind(DF_EntityKind_Target); - for(DF_EntityNode *n = targets_list.first; n != 0; n = n->next) + D_EntityList targets_list = d_query_cached_entity_list_with_kind(D_EntityKind_Target); + for(D_EntityNode *n = targets_list.first; n != 0; n = n->next) { - DF_Entity *target = n->entity; + D_Entity *target = n->entity; UI_Palette *palette = ui_top_palette(); - if(target->flags & DF_EntityFlag_HasColor) + if(target->flags & D_EntityFlag_HasColor) { - palette = ui_build_palette(ui_top_palette(), .text = df_rgba_from_entity(target)); + palette = ui_build_palette(ui_top_palette(), .text = d_rgba_from_entity(target)); } - String8 target_name = df_display_string_from_entity(scratch.arena, target); + String8 target_name = d_display_string_from_entity(scratch.arena, target); UI_Signal sig = {0}; UI_Palette(palette) sig = df_icon_buttonf(ws, DF_IconKind_Target, 0, "%S##%p", target_name, target); if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(target); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_EditTarget)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(target); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_EditTarget)); ui_ctx_menu_close(); ws->menu_bar_focused = 0; } @@ -5293,17 +5293,17 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_PrefWidth(ui_em(50.f, 1.f)) DF_Palette(ws, DF_PaletteCode_ImplicitButton) { - DF_CoreCmdKind cmds[] = + D_CmdKind cmds[] = { - DF_CoreCmdKind_Run, - DF_CoreCmdKind_KillAll, - DF_CoreCmdKind_Restart, - DF_CoreCmdKind_Halt, - DF_CoreCmdKind_SoftHaltRefresh, - DF_CoreCmdKind_StepInto, - DF_CoreCmdKind_StepOver, - DF_CoreCmdKind_StepOut, - DF_CoreCmdKind_Attach, + D_CmdKind_Run, + D_CmdKind_KillAll, + D_CmdKind_Restart, + D_CmdKind_Halt, + D_CmdKind_SoftHaltRefresh, + D_CmdKind_StepInto, + D_CmdKind_StepOver, + D_CmdKind_StepOut, + D_CmdKind_Attach, }; U32 codepoints[] = { @@ -5345,7 +5345,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_Padding(ui_pct(1, 0)) { ui_labelf("Search for commands by pressing "); - DF_CmdSpec *spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand); + D_CmdSpec *spec = d_cmd_spec_from_kind(D_CmdKind_RunCommand); UI_Flags(UI_BoxFlag_DrawBorder) UI_TextAlignment(UI_TextAlign_Center) df_cmd_binding_buttons(ws, spec); @@ -5470,10 +5470,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_Palette(ws, DF_PaletteCode_NeutralPopButton) { Temp scratch = scratch_begin(&arena, 1); - DF_EntityList tasks = df_query_cached_entity_list_with_kind(DF_EntityKind_ConversionTask); - for(DF_EntityNode *n = tasks.first; n != 0; n = n->next) + D_EntityList tasks = d_query_cached_entity_list_with_kind(D_EntityKind_ConversionTask); + for(D_EntityNode *n = tasks.first; n != 0; n = n->next) { - DF_Entity *task = n->entity; + D_Entity *task = n->entity; if(task->alloc_time_us + 500000 < os_now_microseconds()) { String8 rdi_path = task->name; @@ -5501,11 +5501,11 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_FontSize(ui_top_font_size()*0.85f) { Temp scratch = scratch_begin(&arena, 1); - DF_EntityList targets = df_push_active_target_list(scratch.arena); - DF_EntityList processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); + D_EntityList targets = d_push_active_target_list(scratch.arena); + D_EntityList processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); B32 have_targets = targets.count != 0; - B32 can_send_signal = !df_ctrl_targets_running(); - B32 can_play = (have_targets && (can_send_signal || df_ctrl_last_run_frame_idx()+4 > df_frame_index())); + B32 can_send_signal = !d_ctrl_targets_running(); + B32 can_play = (have_targets && (can_send_signal || d_ctrl_last_run_frame_idx()+4 > d_frame_index())); B32 can_pause = (!can_send_signal); B32 can_stop = (processes.count != 0); B32 can_step = (processes.count != 0 && can_send_signal); @@ -5538,9 +5538,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) else { ui_labelf("Launch all active targets:"); - for(DF_EntityNode *n = targets.first; n != 0; n = n->next) + for(D_EntityNode *n = targets.first; n != 0; n = n->next) { - String8 target_display_name = df_display_string_from_entity(scratch.arena, n->entity); + String8 target_display_name = d_display_string_from_entity(scratch.arena, n->entity); ui_label(target_display_name); } } @@ -5548,8 +5548,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Run)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Run)); } } @@ -5567,14 +5567,14 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { ui_labelf("Restart all running targets:"); { - DF_EntityList processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); - for(DF_EntityNode *n = processes.first; n != 0; n = n->next) + D_EntityList processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); + for(D_EntityNode *n = processes.first; n != 0; n = n->next) { - DF_Entity *process = n->entity; - DF_Entity *target = df_entity_from_handle(process->entity_handle); - if(!df_entity_is_nil(target)) + D_Entity *process = n->entity; + D_Entity *target = d_entity_from_handle(process->entity_handle); + if(!d_entity_is_nil(target)) { - String8 target_display_name = df_display_string_from_entity(scratch.arena, target); + String8 target_display_name = d_display_string_from_entity(scratch.arena, target); ui_label(target_display_name); } } @@ -5583,8 +5583,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Restart)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Restart)); } } @@ -5610,8 +5610,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Halt)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Halt)); } } @@ -5640,8 +5640,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Kill)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Kill)); } } @@ -5673,8 +5673,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_StepOver)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_StepOver)); } } @@ -5706,8 +5706,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_StepInto)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_StepInto)); } } @@ -5739,8 +5739,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_StepOut)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_StepOut)); } } @@ -5769,7 +5769,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) os_window_push_custom_title_bar_client_area(ws->os, user_box->rect); UI_Parent(user_box) UI_PrefWidth(ui_text_dim(10, 0)) UI_TextAlignment(UI_TextAlign_Center) { - String8 user_path = df_cfg_path_from_src(DF_CfgSrc_User); + String8 user_path = d_cfg_path_from_src(D_CfgSrc_User); user_path = str8_chop_last_dot(user_path); DF_Font(ws, DF_FontSlot_Icons) UI_TextRasterFlags(df_raster_flags_from_slot(ws, DF_FontSlot_Icons)) @@ -5779,10 +5779,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_Signal user_sig = ui_signal_from_box(user_box); if(ui_clicked(user_sig)) { - DF_CmdParams p = df_cmd_params_from_window(ws); - p.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_OpenUser); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); + D_CmdParams p = df_cmd_params_from_window(ws); + p.cmd_spec = d_cmd_spec_from_kind(D_CmdKind_OpenUser); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); } } @@ -5806,7 +5806,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) os_window_push_custom_title_bar_client_area(ws->os, prof_box->rect); UI_Parent(prof_box) UI_PrefWidth(ui_text_dim(10, 0)) UI_TextAlignment(UI_TextAlign_Center) { - String8 prof_path = df_cfg_path_from_src(DF_CfgSrc_Project); + String8 prof_path = d_cfg_path_from_src(D_CfgSrc_Project); prof_path = str8_chop_last_dot(prof_path); DF_Font(ws, DF_FontSlot_Icons) ui_label(df_g_icon_kind_text_table[DF_IconKind_Briefcase]); @@ -5815,10 +5815,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_Signal prof_sig = ui_signal_from_box(prof_box); if(ui_clicked(prof_sig)) { - DF_CmdParams p = df_cmd_params_from_window(ws); - p.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_OpenProject); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); + D_CmdParams p = df_cmd_params_from_window(ws); + p.cmd_spec = d_cmd_spec_from_kind(D_CmdKind_OpenProject); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); } } @@ -5854,8 +5854,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(ui_clicked(cls_sig)) { - DF_CmdParams p = df_cmd_params_from_window(ws); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseWindow)); + D_CmdParams p = df_cmd_params_from_window(ws); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_CloseWindow)); } os_window_push_custom_title_bar_client_area(ws->os, min_sig.box->rect); os_window_push_custom_title_bar_client_area(ws->os, max_sig.box->rect); @@ -5870,8 +5870,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // ProfScope("build bottom bar") { - B32 is_running = df_ctrl_targets_running() && df_ctrl_last_run_frame_idx() < df_frame_index(); - CTRL_Event stop_event = df_ctrl_last_stop_event(); + B32 is_running = d_ctrl_targets_running() && d_ctrl_last_run_frame_idx() < d_frame_index(); + CTRL_Event stop_event = d_ctrl_last_stop_event(); UI_Palette *positive_scheme = df_palette_from_code(ws, DF_PaletteCode_PositivePopButton); UI_Palette *running_scheme = df_palette_from_code(ws, DF_PaletteCode_NeutralPopButton); UI_Palette *negative_scheme = df_palette_from_code(ws, DF_PaletteCode_NegativePopButton); @@ -5915,7 +5915,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: developer frame-time indicator if(DEV_updating_indicator) { - F32 animation_t = pow_f32(sin_f32(df_time_in_seconds()/2.f), 2.f); + F32 animation_t = pow_f32(sin_f32(d_time_in_seconds()/2.f), 2.f); ui_spacer(ui_em(0.3f, 1.f)); ui_spacer(ui_em(1.5f*animation_t, 1.f)); UI_PrefWidth(ui_text_dim(10, 1)) ui_labelf("*"); @@ -5968,7 +5968,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: error visualization else if(ws->error_t >= 0.01f) { - ws->error_t -= df_dt()/8.f; + ws->error_t -= d_dt()/8.f; df_gfx_request_frame(); String8 error_string = str8(ws->error_buffer, ws->error_string_size); if(error_string.size != 0) @@ -5992,10 +5992,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //////////////////////////// //- rjf: prepare query view stack for the in-progress command // - if(!df_cmd_spec_is_nil(ws->query_cmd_spec)) + if(!d_cmd_spec_is_nil(ws->query_cmd_spec)) { - DF_CmdSpec *cmd_spec = ws->query_cmd_spec; - DF_CmdParamSlot first_missing_slot = cmd_spec->info.query.slot; + D_CmdSpec *cmd_spec = ws->query_cmd_spec; + D_CmdParamSlot first_missing_slot = cmd_spec->info.query.slot; DF_ViewSpec *view_spec = df_view_spec_from_cmd_param_slot_spec(first_missing_slot, cmd_spec); if(ws->query_view_stack_top->spec != view_spec || df_view_is_nil(ws->query_view_stack_top)) @@ -6016,13 +6016,13 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) switch(first_missing_slot) { default: - if(cmd_spec->info.query.flags & DF_CmdQueryFlag_KeepOldInput) + if(cmd_spec->info.query.flags & D_CmdQueryFlag_KeepOldInput) { default_query = df_push_search_string(scratch.arena); }break; - case DF_CmdParamSlot_FilePath: + case D_CmdParamSlot_FilePath: { - default_query = path_normalized_from_string(scratch.arena, df_current_path()); + default_query = path_normalized_from_string(scratch.arena, d_current_path()); default_query = push_str8f(scratch.arena, "%S/", default_query); }break; } @@ -6030,7 +6030,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: construct & push new view DF_View *view = df_view_alloc(); df_view_equip_spec(ws, view, view_spec, default_query, &md_nil_node); - if(cmd_spec->info.query.flags & DF_CmdQueryFlag_SelectOldInput) + if(cmd_spec->info.query.flags & D_CmdQueryFlag_SelectOldInput) { view->query_mark = txt_pt(1, 1); } @@ -6046,7 +6046,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //- rjf: animate query info // { - F32 rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * df_dt())) : 1.f; + F32 rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * d_dt())) : 1.f; // rjf: animate query view selection transition { @@ -6087,8 +6087,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_Palette(ws, DF_PaletteCode_Floating) { DF_View *view = ws->query_view_stack_top; - DF_CmdSpec *cmd_spec = ws->query_cmd_spec; - DF_CmdQuery *query = &cmd_spec->info.query; + D_CmdSpec *cmd_spec = ws->query_cmd_spec; + D_CmdQuery *query = &cmd_spec->info.query; //- rjf: calculate rectangles Vec2F32 window_center = center_2f32(window_rect); @@ -6148,11 +6148,11 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } ui_labelf("%S", ws->query_cmd_spec->info.display_name); } - DF_Font(ws, (query->flags & DF_CmdQueryFlag_CodeInput) ? DF_FontSlot_Code : DF_FontSlot_Main) + DF_Font(ws, (query->flags & D_CmdQueryFlag_CodeInput) ? DF_FontSlot_Code : DF_FontSlot_Main) UI_TextPadding(ui_top_font_size()*0.5f) { UI_Signal sig = df_line_edit(ws, DF_LineEditFlag_Border| - (DF_LineEditFlag_CodeContents * !!(query->flags & DF_CmdQueryFlag_CodeInput)), + (DF_LineEditFlag_CodeContents * !!(query->flags & D_CmdQueryFlag_CodeInput)), 0, 0, &view->query_cursor, @@ -6197,22 +6197,22 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) if(((ui_is_focus_active() || (window_is_focused && !ui_any_ctx_menu_is_open() && !ws->menu_bar_focused && !ws->query_view_selected)) && ui_slot_press(UI_EventActionSlot_Cancel)) || query_cancelled) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CancelQuery)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CancelQuery)); } if((ui_is_focus_active() && ui_slot_press(UI_EventActionSlot_Accept)) || query_completed) { Temp scratch = scratch_begin(&arena, 1); DF_View *view = ws->query_view_stack_top; - DF_CmdParams params = df_cmd_params_from_window(ws); - String8 error = df_cmd_params_apply_spec_query(scratch.arena, ¶ms, ws->query_cmd_spec, str8(view->query_buffer, view->query_string_size)); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + D_CmdParams params = df_cmd_params_from_window(ws); + String8 error = d_cmd_params_apply_spec_query(scratch.arena, ¶ms, ws->query_cmd_spec, str8(view->query_buffer, view->query_string_size)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); if(error.size != 0) { - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.string = error; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Error)); } scratch_end(scratch); } @@ -6261,7 +6261,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) abs_f32(view->scroll_pos.y.off) > 0.01f)) { build_hover_eval = 0; - ws->hover_eval_first_frame_idx = df_frame_index(); + ws->hover_eval_first_frame_idx = d_frame_index(); } } } @@ -6274,7 +6274,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } // rjf: reset animation, but request frames if we're waiting to open - if(ws->hover_eval_string.size != 0 && !hover_eval_is_open && ws->hover_eval_last_frame_idx < ws->hover_eval_first_frame_idx+20 && df_frame_index()-ws->hover_eval_last_frame_idx < 50) + if(ws->hover_eval_string.size != 0 && !hover_eval_is_open && ws->hover_eval_last_frame_idx < ws->hover_eval_first_frame_idx+20 && d_frame_index()-ws->hover_eval_last_frame_idx < 50) { df_gfx_request_frame(); ws->hover_eval_num_visible_rows_t = 0; @@ -6289,12 +6289,12 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { Temp scratch = scratch_begin(&arena, 1); DI_Scope *scope = di_scope_open(); - DF_Entity *thread = df_entity_from_handle(df_base_interact_regs()->thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - U64 thread_unwind_rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, df_base_interact_regs()->unwind_count); + D_Entity *thread = d_entity_from_handle(d_base_interact_regs()->thread); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + U64 thread_unwind_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, d_base_interact_regs()->unwind_count); String8 expr = ws->hover_eval_string; E_Eval eval = e_eval_from_string(scratch.arena, expr); - DF_CfgTable top_level_cfg_table = {0}; + D_CfgTable top_level_cfg_table = {0}; //- rjf: build if good if(!e_type_key_match(eval.type_key, e_type_key_zero()) && !ui_any_ctx_menu_is_open()) @@ -6302,22 +6302,22 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { //- rjf: eval -> viz artifacts F32 row_height = floor_f32(ui_top_font_size()*2.8f); - DF_CfgTable cfg_table = {0}; - U64 expr_hash = df_hash_from_string(expr); - DF_EvalViewKey eval_view_key = df_eval_view_key_from_stringf("eval_hover_%I64x", expr_hash); - DF_EvalView *eval_view = df_eval_view_from_key(eval_view_key); - DF_ExpandKey parent_key = df_expand_key_make(5381, 1); - DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(parent_key), 1); - DF_EvalVizBlockList viz_blocks = df_eval_viz_block_list_from_eval_view_expr_keys(scratch.arena, eval_view, &top_level_cfg_table, expr, parent_key, key); - DF_Entity *entity = df_entity_from_eval_space(eval.space); - U32 default_radix = (entity->kind == DF_EntityKind_Thread ? 16 : 10); - DF_EvalVizWindowedRowList viz_rows = df_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(0, 50), &viz_blocks); + D_CfgTable cfg_table = {0}; + U64 expr_hash = d_hash_from_string(expr); + D_EvalViewKey eval_view_key = d_eval_view_key_from_stringf("eval_hover_%I64x", expr_hash); + D_EvalView *eval_view = d_eval_view_from_key(eval_view_key); + D_ExpandKey parent_key = d_expand_key_make(5381, 1); + D_ExpandKey key = d_expand_key_make(df_hash_from_expand_key(parent_key), 1); + D_EvalVizBlockList viz_blocks = d_eval_viz_block_list_from_eval_view_expr_keys(scratch.arena, eval_view, &top_level_cfg_table, expr, parent_key, key); + D_Entity *entity = d_entity_from_eval_space(eval.space); + U32 default_radix = (entity->kind == D_EntityKind_Thread ? 16 : 10); + D_EvalVizWindowedRowList viz_rows = d_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(0, 50), &viz_blocks); //- rjf: animate { // rjf: animate height { - F32 fish_rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * df_dt())) : 1.f; + F32 fish_rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * d_dt())) : 1.f; F32 hover_eval_container_height_target = row_height * Min(30, viz_blocks.total_visual_row_count); ws->hover_eval_num_visible_rows_t += (hover_eval_container_height_target - ws->hover_eval_num_visible_rows_t) * fish_rate; if(abs_f32(hover_eval_container_height_target - ws->hover_eval_num_visible_rows_t) > 0.5f) @@ -6332,7 +6332,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: animate open { - F32 fish_rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * df_dt())) : 1.f; + F32 fish_rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * d_dt())) : 1.f; F32 diff = 1.f - ws->hover_eval_open_t; ws->hover_eval_open_t += diff*fish_rate; if(abs_f32(diff) < 0.01f) @@ -6352,10 +6352,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) F32 value_column_width_px = 30.f*ui_top_font_size(); if(viz_rows.first != 0) { - DF_EvalVizRow *row = viz_rows.first; + D_EvalVizRow *row = viz_rows.first; E_Eval row_eval = e_eval_from_expr(scratch.arena, row->expr); - String8 row_expr_string = df_expr_string_from_viz_row(scratch.arena, row); - String8 row_display_value = df_value_string_from_eval(scratch.arena, DF_EvalVizStringFlag_ReadOnlyDisplayRules, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->cfg_table); + String8 row_expr_string = d_expr_string_from_viz_row(scratch.arena, row); + String8 row_display_value = df_value_string_from_eval(scratch.arena, D_EvalVizStringFlag_ReadOnlyDisplayRules, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->cfg_table); expr_column_width_px = fnt_dim_from_tag_size_string(ui_top_font(), ui_top_font_size(), 0, 0, row_expr_string).x + ui_top_font_size()*5.f; value_column_width_px = fnt_dim_from_tag_size_string(ui_top_font(), ui_top_font_size(), 0, 0, row_display_value).x + ui_top_font_size()*5.f; F32 total_dim_px = (expr_column_width_px + value_column_width_px); @@ -6398,15 +6398,15 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_Parent(hover_eval_box) UI_PrefHeight(ui_px(row_height, 1.f)) { //- rjf: build rows - for(DF_EvalVizRow *row = viz_rows.first; row != 0; row = row->next) + for(D_EvalVizRow *row = viz_rows.first; row != 0; row = row->next) { //- rjf: unpack row E_Eval row_eval = e_eval_from_expr(scratch.arena, row->expr); - String8 row_expr_string = df_expr_string_from_viz_row(scratch.arena, row); + String8 row_expr_string = d_expr_string_from_viz_row(scratch.arena, row); String8 row_edit_value = df_value_string_from_eval(scratch.arena, 0, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->cfg_table); - String8 row_display_value = df_value_string_from_eval(scratch.arena, DF_EvalVizStringFlag_ReadOnlyDisplayRules, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->cfg_table); - B32 row_is_editable = df_type_key_is_editable(row_eval.type_key); - B32 row_is_expandable = df_type_key_is_expandable(row_eval.type_key); + String8 row_display_value = df_value_string_from_eval(scratch.arena, D_EvalVizStringFlag_ReadOnlyDisplayRules, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->cfg_table); + B32 row_is_editable = d_type_key_is_editable(row_eval.type_key); + B32 row_is_expandable = d_type_key_is_expandable(row_eval.type_key); //- rjf: determine if row's data is fresh and/or bad B32 row_is_fresh = 0; @@ -6416,8 +6416,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) default:{}break; case E_Mode_Offset: { - DF_Entity *space_entity = df_entity_from_eval_space(row_eval.space); - if(space_entity->kind == DF_EntityKind_Process) + D_Entity *space_entity = d_entity_from_eval_space(row_eval.space); + if(space_entity->kind == D_EntityKind_Process) { U64 size = e_type_byte_size_from_key(row_eval.type_key); size = Min(size, 64); @@ -6451,12 +6451,12 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } } U64 row_hash = df_hash_from_expand_key(row->key); - B32 row_is_expanded = df_expand_key_is_set(&eval_view->expand_tree_table, row->key); + B32 row_is_expanded = d_expand_key_is_set(&eval_view->expand_tree_table, row->key); if(row_is_expandable) UI_PrefWidth(ui_em(1.5f, 1)) if(ui_pressed(ui_expanderf(row_is_expanded, "###%I64x_%I64x_is_expanded", row->key.parent_hash, row->key.child_num))) { - df_expand_set_expansion(eval_view->arena, &eval_view->expand_tree_table, row->parent_key, row->key, !row_is_expanded); + d_expand_set_expansion(eval_view->arena, &eval_view->expand_tree_table, row->parent_key, row->key, !row_is_expanded); } if(!row_is_expandable) { @@ -6488,13 +6488,13 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) if(ui_committed(sig)) { String8 commit_string = str8(ws->hover_eval_txt_buffer, ws->hover_eval_txt_size); - B32 success = df_commit_eval_value_string(row_eval, commit_string); + B32 success = d_commit_eval_value_string(row_eval, commit_string); if(success == 0) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.string = str8_lit("Could not commit value successfully."); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Error)); } } } @@ -6524,10 +6524,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(ui_clicked(watch_sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.string = expr; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ToggleWatchExpression)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_ToggleWatchExpression)); } } if(ws->hover_eval_file_path.size != 0 || ws->hover_eval_vaddr != 0) @@ -6546,12 +6546,12 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } if(ui_clicked(pin_sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.file_path = ws->hover_eval_file_path; params.text_point = ws->hover_eval_file_pt; params.vaddr = ws->hover_eval_vaddr; params.string = expr; - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ToggleWatchPin)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_ToggleWatchPin)); } } } @@ -6565,9 +6565,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_Signal hover_eval_sig = ui_signal_from_box(hover_eval_box); if(ui_mouse_over(hover_eval_sig)) { - ws->hover_eval_last_frame_idx = df_frame_index(); + ws->hover_eval_last_frame_idx = d_frame_index(); } - else if(ws->hover_eval_last_frame_idx+2 < df_frame_index()) + else if(ws->hover_eval_last_frame_idx+2 < d_frame_index()) { df_gfx_request_frame(); } @@ -6696,12 +6696,12 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) if(dir != Dir2_Invalid) { DF_Panel *split_panel = panel; - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.dest_panel = df_handle_from_panel(split_panel); p.panel = payload.panel; p.view = payload.view; p.dir2 = dir; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SplitPanel)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_SplitPanel)); } } } @@ -6782,12 +6782,12 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) split_panel = panel->last; dir = (panel->split_axis == Axis2_X ? Dir2_Right : Dir2_Down); } - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.dest_panel = df_handle_from_panel(split_panel); p.panel = payload.panel; p.view = payload.view; p.dir2 = dir; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SplitPanel)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_SplitPanel)); } // rjf: exit on opl child @@ -6873,7 +6873,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //- rjf: animate panels // { - F32 rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-50.f * df_dt())) : 1.f; + F32 rate = df_setting_val_from_code(ws, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-50.f * d_dt())) : 1.f; Vec2F32 content_rect_dim = dim_2f32(content_rect); for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) { @@ -7081,21 +7081,21 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { if(dir != Dir2_Invalid) { - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.dest_panel = df_handle_from_panel(panel); p.panel = payload.panel; p.view = payload.view; p.dir2 = dir; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SplitPanel)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_SplitPanel)); } else { - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.dest_panel = df_handle_from_panel(panel); p.panel = payload.panel; p.view = payload.view; p.prev_view = df_handle_from_view(panel->last_tab_view); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_MoveTab)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_MoveTab)); } } } @@ -7145,8 +7145,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { if(view->is_filtering && ui_is_focus_active() && ui_slot_press(UI_EventActionSlot_Accept)) { - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ApplyFilter)); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_ApplyFilter)); } if(view->is_filtering || view->is_filtering_t > 0.01f) { @@ -7186,8 +7186,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) str8_lit("###filter_text_input")); if(ui_pressed(sig)) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } } } @@ -7240,10 +7240,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_WidthFill { //- rjf: push interaction registers, fill with per-view states - df_push_interact_regs(); + d_push_interact_regs(); { DF_View *view = df_selected_tab_from_panel(panel); - df_interact_regs()->file_path = df_file_path_from_eval_string(df_frame_arena(), str8(view->query_buffer, view->query_string_size)); + d_interact_regs()->file_path = d_file_path_from_eval_string(d_frame_arena(), str8(view->query_buffer, view->query_string_size)); } //- rjf: build view container @@ -7270,10 +7270,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } //- rjf: pop interaction registers; commit if this is the selected view - DF_InteractRegs *view_regs = df_pop_interact_regs(); + D_InteractRegs *view_regs = d_pop_interact_regs(); if(ws->focused_panel == panel) { - MemoryCopyStruct(df_interact_regs(), view_regs); + MemoryCopyStruct(d_interact_regs(), view_regs); } } @@ -7285,28 +7285,28 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_View *view = df_selected_tab_from_panel(panel); if(ui_is_focus_active() && view->spec->info.flags & DF_ViewSpecFlag_TypingAutomaticallyFilters && !view->is_filtering) { - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); for(UI_Event *evt = 0; ui_next_event(&evt);) { if(evt->flags & UI_EventFlag_Paste) { ui_eat_event(evt); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Filter)); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Paste)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Filter)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Paste)); } else if(evt->string.size != 0 && evt->kind == UI_EventKind_Text) { ui_eat_event(evt); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Filter)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Filter)); p.string = evt->string; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_InsertText)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_InsertText)); } } } if(view->spec->info.flags & DF_ViewSpecFlag_CanFilter && (view->query_string_size != 0 || view->is_filtering) && ui_is_focus_active() && ui_slot_press(UI_EventActionSlot_Cancel)) { - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ClearFilter)); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_ClearFilter)); } } @@ -7316,8 +7316,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_Signal panel_sig = ui_signal_from_box(panel_box); if(ui_pressed(panel_sig)) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } ////////////////////////// @@ -7406,7 +7406,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: gather info for this tab B32 view_is_selected = (view == df_selected_tab_from_panel(panel)); DF_IconKind icon_kind = df_icon_kind_from_view(view); - D_FancyStringList title_fstrs = df_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); + DR_FancyStringList title_fstrs = df_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); // rjf: begin vertical region for this tab ui_set_next_child_layout_axis(Axis2_Y); @@ -7464,8 +7464,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_Signal sig = ui_buttonf("%S###close_view_%p", df_g_icon_kind_text_table[DF_IconKind_X], view); if(ui_clicked(sig) || ui_middle_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseTab)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CloseTab)); } } } @@ -7476,8 +7476,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) if(ui_pressed(sig)) { next_selected_tab_view = view; - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } else if(ui_dragging(sig) && !df_drag_is_active() && length_2f32(ui_drag_delta()) > 10.f) { @@ -7497,8 +7497,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } else if(ui_middle_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseTab)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CloseTab)); } if(ui_released(sig)) { @@ -7555,8 +7555,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_Signal sig = ui_signal_from_box(add_new_box); if(ui_clicked(sig)) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); UI_Key view_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_view_menu_key_")); ui_ctx_menu_open(view_menu_key, add_new_box->key, v2f32(0, tab_bar_vheight)); } @@ -7604,7 +7604,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } else { - df_g_last_drag_drop_prev_tab = df_handle_zero(); + df_g_last_drag_drop_prev_tab = d_handle_zero(); } // rjf: vis @@ -7623,16 +7623,16 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) DF_Panel *src_panel = df_panel_from_handle(payload.panel); if(!df_panel_is_nil(panel) && !df_view_is_nil(view)) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.panel = df_handle_from_panel(src_panel); params.dest_panel = df_handle_from_panel(panel); params.view = df_handle_from_view(view); params.prev_view = df_handle_from_view(active_drop_site->prev_view); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Panel); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_DestPanel); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_View); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_PrevView); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_MoveTab)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Panel); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_DestPanel); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_View); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_PrevView); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_MoveTab)); } } } @@ -7681,35 +7681,35 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { DF_Panel *src_panel = df_panel_from_handle(payload.panel); DF_View *view = df_view_from_handle(payload.view); - DF_Entity *entity = df_entity_from_handle(payload.entity); + D_Entity *entity = d_entity_from_handle(payload.entity); // rjf: view drop if(!df_view_is_nil(view)) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.prev_view = df_handle_from_view(panel->last_tab_view); params.panel = df_handle_from_panel(src_panel); params.dest_panel = df_handle_from_panel(panel); params.view = df_handle_from_view(view); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_PrevView); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Panel); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_DestPanel); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_View); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_MoveTab)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_PrevView); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Panel); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_DestPanel); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_View); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_MoveTab)); df_panel_notify_mutation(ws, panel); } // rjf: entity drop - if(!df_entity_is_nil(entity)) + if(!d_entity_is_nil(entity)) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.panel = df_handle_from_panel(panel); params.text_point = payload.text_point; - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Panel); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_TextPoint); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SpawnEntityView)); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Panel); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_TextPoint); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_SpawnEntityView)); } } } @@ -7726,9 +7726,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) for(String8Node *n = evt->paths.first; n != 0; n = n->next) { Temp scratch = scratch_begin(0, 0); - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); p.file_path = path_normalized_from_string(scratch.arena, n->string); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Open)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Open)); scratch_end(scratch); } ui_eat_event(evt); @@ -7753,8 +7753,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) Task start_task = {0, &df_g_nil_panel, ws->query_view_stack_top}; Task *first_task = &start_task; Task *last_task = first_task; - F32 rate = 1 - pow_f32(2, (-10.f * df_dt())); - F32 fast_rate = 1 - pow_f32(2, (-40.f * df_dt())); + F32 rate = 1 - pow_f32(2, (-10.f * d_dt())); + F32 fast_rate = 1 - pow_f32(2, (-40.f * d_dt())); for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) @@ -7837,13 +7837,13 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) ui_eat_event(evt); if(evt->delta_2f32.y < 0) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_IncUIFontScale)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_IncUIFontScale)); } else if(evt->delta_2f32.y > 0) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_DecUIFontScale)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_DecUIFontScale)); } } } @@ -7880,7 +7880,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) ////////////////////////////// //- rjf: attach autocomp box to root, or hide if it has not been renewed // - if(!ui_box_is_nil(autocomp_box) && ws->autocomp_last_frame_idx+1 >= df_frame_index()+1) + if(!ui_box_is_nil(autocomp_box) && ws->autocomp_last_frame_idx+1 >= d_frame_index()+1) { UI_Box *autocomp_root_box = ui_box_from_key(ws->autocomp_root_key); if(!ui_box_is_nil(autocomp_root_box)) @@ -7898,7 +7898,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } } } - else if(!ui_box_is_nil(autocomp_box) && ws->autocomp_last_frame_idx+1 < df_frame_index()+1) + else if(!ui_box_is_nil(autocomp_box) && ws->autocomp_last_frame_idx+1 < d_frame_index()+1) { UI_Box *autocomp_root_box = ui_box_from_key(ws->autocomp_root_key); if(!ui_box_is_nil(autocomp_root_box)) @@ -7931,7 +7931,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) ////////////////////////////// //- rjf: draw UI // - ws->draw_bucket = d_bucket_make(); + ws->draw_bucket = dr_bucket_make(); D_BucketScope(ws->draw_bucket) ProfScope("draw UI") { @@ -7955,13 +7955,13 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //- rjf: draw background color { Vec4F32 bg_color = df_rgba_from_theme_color(DF_ThemeColor_BaseBackground); - d_rect(os_client_rect_from_window(ws->os), bg_color, 0, 0, 0); + dr_rect(os_client_rect_from_window(ws->os), bg_color, 0, 0, 0); } //- rjf: draw window border { Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_BaseBorder); - d_rect(os_client_rect_from_window(ws->os), color, 0, 1.f, 0.5f); + dr_rect(os_client_rect_from_window(ws->os), color, 0, 1.f, 0.5f); } //- rjf: recurse & draw @@ -7987,7 +7987,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: push transparency if(box->transparency != 0) { - d_push_transparency(box->transparency); + dr_push_transparency(box->transparency); } // rjf: push squish @@ -7998,8 +7998,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) Mat3x3F32 scale_xform = make_scale_3x3f32(v2f32(1-box->squish, 1-box->squish)); Mat3x3F32 origin2box_xform = make_translate_3x3f32(v2f32(box->rect.x0 + box_dim.x/8, box->rect.y0)); Mat3x3F32 xform = mul_3x3f32(origin2box_xform, mul_3x3f32(scale_xform, box2origin_xform)); - d_push_xform2d(xform); - d_push_tex2d_sample_kind(R_Tex2DSampleKind_Linear); + dr_push_xform2d(xform); + dr_push_tex2d_sample_kind(R_Tex2DSampleKind_Linear); } // rjf: draw drop shadow @@ -8007,13 +8007,13 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { Rng2F32 drop_shadow_rect = shift_2f32(pad_2f32(box->rect, 8), v2f32(4, 4)); Vec4F32 drop_shadow_color = df_rgba_from_theme_color(DF_ThemeColor_DropShadow); - d_rect(drop_shadow_rect, drop_shadow_color, 0.8f, 0, 8.f); + dr_rect(drop_shadow_rect, drop_shadow_color, 0.8f, 0, 8.f); } // rjf: blur background if(box->flags & UI_BoxFlag_DrawBackgroundBlur && df_setting_val_from_code(ws, DF_SettingCode_BackgroundBlur).s32) { - R_PassParams_Blur *params = d_blur(box->rect, box->blur_size*(1-box->transparency), 0); + R_PassParams_Blur *params = dr_blur(box->rect, box->blur_size*(1-box->transparency), 0); MemoryCopyArray(params->corner_radii, box->corner_radii); } @@ -8022,7 +8022,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { // rjf: main rectangle { - R_Rect2DInst *inst = d_rect(pad_2f32(box->rect, 1), box->palette->colors[UI_ColorCode_Background], 0, 0, 1.f); + R_Rect2DInst *inst = dr_rect(pad_2f32(box->rect, 1), box->palette->colors[UI_ColorCode_Background], 0, 0, 1.f); MemoryCopyArray(inst->corner_radii, box->corner_radii); } @@ -8038,7 +8038,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: brighten { - R_Rect2DInst *inst = d_rect(box->rect, v4f32(0, 0, 0, 0), 0, 0, 1.f); + R_Rect2DInst *inst = dr_rect(box->rect, v4f32(0, 0, 0, 0), 0, 0, 1.f); Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Hover); color.w *= t*0.2f; inst->colors[Corner_00] = color; @@ -8057,7 +8057,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) box->rect.y0, box->rect.x1, box->rect.y1); - R_Rect2DInst *inst = d_rect(rect, v4f32(0, 0, 0, 0), 0, 0, 1.f); + R_Rect2DInst *inst = dr_rect(rect, v4f32(0, 0, 0, 0), 0, 0, 1.f); inst->colors[Corner_00] = v4f32(0.f, 0.f, 0.f, 0.0f*t); inst->colors[Corner_01] = v4f32(0.f, 0.f, 0.f, 0.3f*t); inst->colors[Corner_10] = v4f32(0.f, 0.f, 0.f, 0.0f*t); @@ -8084,7 +8084,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: top -> bottom dark effect { - R_Rect2DInst *inst = d_rect(r2f32p(box->rect.x0, box->rect.y0, box->rect.x1, box->rect.y0 + shadow_size.y), v4f32(0, 0, 0, 0), 0, 0, 1.f); + R_Rect2DInst *inst = dr_rect(r2f32p(box->rect.x0, box->rect.y0, box->rect.x1, box->rect.y0 + shadow_size.y), v4f32(0, 0, 0, 0), 0, 0, 1.f); inst->colors[Corner_00] = inst->colors[Corner_10] = shadow_color; inst->colors[Corner_01] = inst->colors[Corner_11] = v4f32(0.f, 0.f, 0.f, 0.0f); MemoryCopyArray(inst->corner_radii, box->corner_radii); @@ -8092,7 +8092,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: bottom -> top light effect { - R_Rect2DInst *inst = d_rect(r2f32p(box->rect.x0, box->rect.y1 - shadow_size.y, box->rect.x1, box->rect.y1), v4f32(0, 0, 0, 0), 0, 0, 1.f); + R_Rect2DInst *inst = dr_rect(r2f32p(box->rect.x0, box->rect.y1 - shadow_size.y, box->rect.x1, box->rect.y1), v4f32(0, 0, 0, 0), 0, 0, 1.f); inst->colors[Corner_00] = inst->colors[Corner_10] = v4f32(0, 0, 0, 0); inst->colors[Corner_01] = inst->colors[Corner_11] = v4f32(0.4f, 0.4f, 0.4f, 0.4f*box->active_t); MemoryCopyArray(inst->corner_radii, box->corner_radii); @@ -8100,7 +8100,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: left -> right dark effect { - R_Rect2DInst *inst = d_rect(r2f32p(box->rect.x0, box->rect.y0, box->rect.x0 + shadow_size.x, box->rect.y1), v4f32(0, 0, 0, 0), 0, 0, 1.f); + R_Rect2DInst *inst = dr_rect(r2f32p(box->rect.x0, box->rect.y0, box->rect.x0 + shadow_size.x, box->rect.y1), v4f32(0, 0, 0, 0), 0, 0, 1.f); inst->colors[Corner_10] = inst->colors[Corner_11] = v4f32(0.f, 0.f, 0.f, 0.f); inst->colors[Corner_00] = shadow_color; inst->colors[Corner_01] = shadow_color; @@ -8109,7 +8109,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: right -> left dark effect { - R_Rect2DInst *inst = d_rect(r2f32p(box->rect.x1 - shadow_size.x, box->rect.y0, box->rect.x1, box->rect.y1), v4f32(0, 0, 0, 0), 0, 0, 1.f); + R_Rect2DInst *inst = dr_rect(r2f32p(box->rect.x1 - shadow_size.x, box->rect.y0, box->rect.x1, box->rect.y1), v4f32(0, 0, 0, 0), 0, 0, 1.f); inst->colors[Corner_00] = inst->colors[Corner_01] = v4f32(0.f, 0.f, 0.f, 0.f); inst->colors[Corner_10] = shadow_color; inst->colors[Corner_11] = shadow_color; @@ -8124,8 +8124,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) Vec2F32 text_position = ui_box_text_position(box); if(DEV_draw_ui_text_pos) { - d_rect(r2f32p(text_position.x-4, text_position.y-4, text_position.x+4, text_position.y+4), - v4f32(1, 0, 1, 1), 1, 0, 1); + dr_rect(r2f32p(text_position.x-4, text_position.y-4, text_position.x+4, text_position.y+4), + v4f32(1, 0, 1, 1), 1, 0, 1); } F32 max_x = 100000.f; FNT_Run ellipses_run = {0}; @@ -8134,11 +8134,11 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) max_x = (box->rect.x1-text_position.x); ellipses_run = fnt_push_run_from_string(scratch.arena, box->font, box->font_size, 0, box->tab_size, 0, str8_lit("...")); } - d_truncated_fancy_run_list(text_position, &box->display_string_runs, max_x, ellipses_run); + dr_truncated_fancy_run_list(text_position, &box->display_string_runs, max_x, ellipses_run); if(box->flags & UI_BoxFlag_HasFuzzyMatchRanges) { Vec4F32 match_color = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay); - d_truncated_fancy_run_fuzzy_matches(text_position, &box->display_string_runs, max_x, &box->fuzzy_match_ranges, match_color); + dr_truncated_fancy_run_fuzzy_matches(text_position, &box->display_string_runs, max_x, &box->fuzzy_match_ranges, match_color); } } @@ -8163,18 +8163,18 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { color = v4f32(0.8f, 0.3f, 0.3f, 1.f); } - d_rect(r2f32p(box->rect.x0-6, box->rect.y0-6, box->rect.x0+6, box->rect.y0+6), color, 2, 0, 1); - d_rect(box->rect, color, 2, 2, 1); + dr_rect(r2f32p(box->rect.x0-6, box->rect.y0-6, box->rect.x0+6, box->rect.y0+6), color, 2, 0, 1); + dr_rect(box->rect, color, 2, 2, 1); } if(box->flags & (UI_BoxFlag_FocusHot|UI_BoxFlag_FocusActive)) { if(box->flags & (UI_BoxFlag_FocusHotDisabled|UI_BoxFlag_FocusActiveDisabled)) { - d_rect(r2f32p(box->rect.x0-6, box->rect.y0-6, box->rect.x0+6, box->rect.y0+6), v4f32(1, 0, 0, 0.2f), 2, 0, 1); + dr_rect(r2f32p(box->rect.x0-6, box->rect.y0-6, box->rect.x0+6, box->rect.y0+6), v4f32(1, 0, 0, 0.2f), 2, 0, 1); } else { - d_rect(r2f32p(box->rect.x0-6, box->rect.y0-6, box->rect.x0+6, box->rect.y0+6), v4f32(0, 1, 0, 0.2f), 2, 0, 1); + dr_rect(r2f32p(box->rect.x0-6, box->rect.y0-6, box->rect.x0+6, box->rect.y0+6), v4f32(0, 1, 0, 0.2f), 2, 0, 1); } } } @@ -8182,22 +8182,22 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: push clip if(box->flags & UI_BoxFlag_Clip) { - Rng2F32 top_clip = d_top_clip(); + Rng2F32 top_clip = dr_top_clip(); Rng2F32 new_clip = pad_2f32(box->rect, -1); if(top_clip.x1 != 0 || top_clip.y1 != 0) { new_clip = intersect_2f32(new_clip, top_clip); } - d_push_clip(new_clip); + dr_push_clip(new_clip); } // rjf: custom draw list if(box->flags & UI_BoxFlag_DrawBucket) { Mat3x3F32 xform = make_translate_3x3f32(box->position_delta); - D_XForm2DScope(xform) + DR_XForm2DScope(xform) { - d_sub_bucket(box->draw_bucket); + dr_sub_bucket(box->draw_bucket); } } @@ -8221,13 +8221,13 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: pop clips if(b->flags & UI_BoxFlag_Clip) { - d_pop_clip(); + dr_pop_clip(); } // rjf: draw border if(b->flags & UI_BoxFlag_DrawBorder) { - R_Rect2DInst *inst = d_rect(pad_2f32(b->rect, 1), b->palette->colors[UI_ColorCode_Border], 0, 1.f, 1.f); + R_Rect2DInst *inst = dr_rect(pad_2f32(b->rect, 1), b->palette->colors[UI_ColorCode_Border], 0, 1.f, 1.f); MemoryCopyArray(inst->corner_radii, b->corner_radii); // rjf: hover effect @@ -8235,7 +8235,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Hover); color.w *= b->hot_t; - R_Rect2DInst *inst = d_rect(pad_2f32(b->rect, 1), color, 0, 1.f, 1.f); + R_Rect2DInst *inst = dr_rect(pad_2f32(b->rect, 1), color, 0, 1.f, 1.f); MemoryCopyArray(inst->corner_radii, b->corner_radii); } } @@ -8243,7 +8243,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) // rjf: debug border rendering if(0) { - R_Rect2DInst *inst = d_rect(pad_2f32(b->rect, 1), v4f32(1, 0, 1, 0.25f), 0, 1.f, 1.f); + R_Rect2DInst *inst = dr_rect(pad_2f32(b->rect, 1), v4f32(1, 0, 1, 0.25f), 0, 1.f, 1.f); MemoryCopyArray(inst->corner_radii, b->corner_radii); } @@ -8254,19 +8254,19 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) F32 softness = 0.5f; if(b->flags & UI_BoxFlag_DrawSideTop) { - d_rect(r2f32p(r.x0, r.y0-half_thickness, r.x1, r.y0+half_thickness), b->palette->colors[UI_ColorCode_Border], 0, 0, softness); + dr_rect(r2f32p(r.x0, r.y0-half_thickness, r.x1, r.y0+half_thickness), b->palette->colors[UI_ColorCode_Border], 0, 0, softness); } if(b->flags & UI_BoxFlag_DrawSideBottom) { - d_rect(r2f32p(r.x0, r.y1-half_thickness, r.x1, r.y1+half_thickness), b->palette->colors[UI_ColorCode_Border], 0, 0, softness); + dr_rect(r2f32p(r.x0, r.y1-half_thickness, r.x1, r.y1+half_thickness), b->palette->colors[UI_ColorCode_Border], 0, 0, softness); } if(b->flags & UI_BoxFlag_DrawSideLeft) { - d_rect(r2f32p(r.x0-half_thickness, r.y0, r.x0+half_thickness, r.y1), b->palette->colors[UI_ColorCode_Border], 0, 0, softness); + dr_rect(r2f32p(r.x0-half_thickness, r.y0, r.x0+half_thickness, r.y1), b->palette->colors[UI_ColorCode_Border], 0, 0, softness); } if(b->flags & UI_BoxFlag_DrawSideRight) { - d_rect(r2f32p(r.x1-half_thickness, r.y0, r.x1+half_thickness, r.y1), b->palette->colors[UI_ColorCode_Border], 0, 0, softness); + dr_rect(r2f32p(r.x1-half_thickness, r.y0, r.x1+half_thickness, r.y1), b->palette->colors[UI_ColorCode_Border], 0, 0, softness); } } @@ -8275,7 +8275,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Focus); color.w *= 0.2f*b->focus_hot_t; - R_Rect2DInst *inst = d_rect(b->rect, color, 0, 0, 1.f); + R_Rect2DInst *inst = dr_rect(b->rect, color, 0, 0, 1.f); MemoryCopyArray(inst->corner_radii, b->corner_radii); } @@ -8284,7 +8284,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Focus); color.w *= b->focus_active_t; - R_Rect2DInst *inst = d_rect(pad_2f32(b->rect, 0.f), color, 0, 1.f, 1.f); + R_Rect2DInst *inst = dr_rect(pad_2f32(b->rect, 0.f), color, 0, 1.f, 1.f); MemoryCopyArray(inst->corner_radii, b->corner_radii); } @@ -8293,21 +8293,21 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_DisabledOverlay); color.w *= b->disabled_t; - R_Rect2DInst *inst = d_rect(b->rect, color, 0, 0, 1); + R_Rect2DInst *inst = dr_rect(b->rect, color, 0, 0, 1); MemoryCopyArray(inst->corner_radii, b->corner_radii); } // rjf: pop squish if(b->squish != 0) { - d_pop_xform2d(); - d_pop_tex2d_sample_kind(); + dr_pop_xform2d(); + dr_pop_tex2d_sample_kind(); } // rjf: pop transparency if(b->transparency != 0) { - d_pop_transparency(); + dr_pop_transparency(); } } } @@ -8331,7 +8331,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) Vec3F32 hsv = v3f32((1-pct) * 0.9411f, 1, 0.5f); Vec3F32 rgb = rgb_from_hsv(hsv); Rng2F32 rect = r2f32p(x*heatmap_bucket_size, y*heatmap_bucket_size, (x+1)*heatmap_bucket_size, (y+1)*heatmap_bucket_size); - d_rect(rect, v4f32(rgb.x, rgb.y, rgb.z, 0.3f), 0, 0, 0); + dr_rect(rect, v4f32(rgb.x, rgb.y, rgb.z, 0.3f), 0, 0, 0); } } @@ -8341,8 +8341,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_NegativePopButtonBackground); color.w *= ws->error_t; Rng2F32 rect = os_client_rect_from_window(ws->os); - d_rect(pad_2f32(rect, 24.f), color, 0, 16.f, 12.f); - d_rect(rect, v4f32(color.x, color.y, color.z, color.w*0.05f), 0, 0, 0); + dr_rect(pad_2f32(rect, 24.f), color, 0, 16.f, 12.f); + dr_rect(rect, v4f32(color.x, color.y, color.z, color.w*0.05f), 0, 0, 0); } //- rjf: scratch debug mouse drawing @@ -8350,30 +8350,30 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { #if 1 Vec2F32 p = add_2f32(os_mouse_from_window(ws->os), v2f32(30, 0)); - d_rect(os_client_rect_from_window(ws->os), v4f32(0, 0, 0, 0.9f), 0, 0, 0); + dr_rect(os_client_rect_from_window(ws->os), v4f32(0, 0, 0, 0.9f), 0, 0, 0); FNT_Run trailer_run = fnt_push_run_from_string(scratch.arena, df_font_from_slot(DF_FontSlot_Main), 16.f, 0, 0, 0, str8_lit("...")); - D_FancyStringList strs = {0}; - D_FancyString str = {df_font_from_slot(DF_FontSlot_Main), str8_lit("Shift + F5"), v4f32(1, 1, 1, 1), 72.f, 0.f}; - d_fancy_string_list_push(scratch.arena, &strs, &str); - D_FancyRunList runs = d_fancy_run_list_from_fancy_string_list(scratch.arena, 0, FNT_RasterFlag_Smooth, &strs); - d_truncated_fancy_run_list(p, &runs, 1000000.f, trailer_run); - d_rect(r2f32(p, add_2f32(p, runs.dim)), v4f32(1, 0, 0, 0.5f), 0, 1, 0); - d_rect(r2f32(sub_2f32(p, v2f32(4, 4)), add_2f32(p, v2f32(4, 4))), v4f32(1, 0, 1, 1), 0, 0, 0); + DR_FancyStringList strs = {0}; + DR_FancyString str = {df_font_from_slot(DF_FontSlot_Main), str8_lit("Shift + F5"), v4f32(1, 1, 1, 1), 72.f, 0.f}; + dr_fancy_string_list_push(scratch.arena, &strs, &str); + DR_FancyRunList runs = dr_fancy_run_list_from_fancy_string_list(scratch.arena, 0, FNT_RasterFlag_Smooth, &strs); + dr_truncated_fancy_run_list(p, &runs, 1000000.f, trailer_run); + dr_rect(r2f32(p, add_2f32(p, runs.dim)), v4f32(1, 0, 0, 0.5f), 0, 1, 0); + dr_rect(r2f32(sub_2f32(p, v2f32(4, 4)), add_2f32(p, v2f32(4, 4))), v4f32(1, 0, 1, 1), 0, 0, 0); #else Vec2F32 p = add_2f32(os_mouse_from_window(ws->os), v2f32(30, 0)); - d_rect(os_client_rect_from_window(ws->os), v4f32(0, 0, 0, 0.4f), 0, 0, 0); - D_FancyStringList strs = {0}; - D_FancyString str1 = {df_font_from_slot(DF_FontSlot_Main), str8_lit("T"), v4f32(1, 1, 1, 1), 16.f, 4.f}; - d_fancy_string_list_push(scratch.arena, &strs, &str1); - D_FancyString str2 = {df_font_from_slot(DF_FontSlot_Main), str8_lit("his is a test of some "), v4f32(1, 0.5f, 0.5f, 1), 14.f, 0.f}; - d_fancy_string_list_push(scratch.arena, &strs, &str2); - D_FancyString str3 = {df_font_from_slot(DF_FontSlot_Code), str8_lit("very fancy text!"), v4f32(1, 0.8f, 0.4f, 1), 18.f, 4.f, 4.f}; - d_fancy_string_list_push(scratch.arena, &strs, &str3); - D_FancyRunList runs = d_fancy_run_list_from_fancy_string_list(scratch.arena, 0, 0, &strs); + dr_rect(os_client_rect_from_window(ws->os), v4f32(0, 0, 0, 0.4f), 0, 0, 0); + DR_FancyStringList strs = {0}; + DR_FancyString str1 = {df_font_from_slot(DF_FontSlot_Main), str8_lit("T"), v4f32(1, 1, 1, 1), 16.f, 4.f}; + dr_fancy_string_list_push(scratch.arena, &strs, &str1); + DR_FancyString str2 = {df_font_from_slot(DF_FontSlot_Main), str8_lit("his is a test of some "), v4f32(1, 0.5f, 0.5f, 1), 14.f, 0.f}; + dr_fancy_string_list_push(scratch.arena, &strs, &str2); + DR_FancyString str3 = {df_font_from_slot(DF_FontSlot_Code), str8_lit("very fancy text!"), v4f32(1, 0.8f, 0.4f, 1), 18.f, 4.f, 4.f}; + dr_fancy_string_list_push(scratch.arena, &strs, &str3); + DR_FancyRunList runs = dr_fancy_run_list_from_fancy_string_list(scratch.arena, 0, 0, &strs); FNT_Run trailer_run = fnt_push_run_from_string(scratch.arena, df_font_from_slot(DF_FontSlot_Main), 16.f, 0, 0, 0, str8_lit("...")); - F32 limit = 500.f + sin_f32(df_time_in_seconds()/10.f)*200.f; - d_truncated_fancy_run_list(p, &runs, limit, trailer_run); - d_rect(r2f32p(p.x+limit, 0, p.x+limit+2.f, 1000), v4f32(1, 0, 0, 1), 0, 0, 0); + F32 limit = 500.f + sin_f32(d_time_in_seconds()/10.f)*200.f; + dr_truncated_fancy_run_list(p, &runs, limit, trailer_run); + dr_rect(r2f32p(p.x+limit, 0, p.x+limit+2.f, 1000), v4f32(1, 0, 0, 1), 0, 0, 0); df_gfx_request_frame(); #endif } @@ -8397,7 +8397,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //~ rjf: Eval Viz internal F32 -df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, S32 depth, E_Eval eval, E_Member *member, DF_CfgTable *cfg_table, String8List *out) +df_append_value_strings_from_eval(Arena *arena, D_EvalVizStringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, S32 depth, E_Eval eval, E_Member *member, D_CfgTable *cfg_table, String8List *out) { ProfBeginFunction(); Temp scratch = scratch_begin(&arena, 1); @@ -8405,17 +8405,17 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 //- rjf: unpack view rules U32 radix = default_radix; - DF_CfgVal *dec_cfg = df_cfg_val_from_string(cfg_table, str8_lit("dec")); - DF_CfgVal *hex_cfg = df_cfg_val_from_string(cfg_table, str8_lit("hex")); - DF_CfgVal *bin_cfg = df_cfg_val_from_string(cfg_table, str8_lit("bin")); - DF_CfgVal *oct_cfg = df_cfg_val_from_string(cfg_table, str8_lit("oct")); + D_CfgVal *dec_cfg = d_cfg_val_from_string(cfg_table, str8_lit("dec")); + D_CfgVal *hex_cfg = d_cfg_val_from_string(cfg_table, str8_lit("hex")); + D_CfgVal *bin_cfg = d_cfg_val_from_string(cfg_table, str8_lit("bin")); + D_CfgVal *oct_cfg = d_cfg_val_from_string(cfg_table, str8_lit("oct")); U64 best_insertion_stamp = Max(dec_cfg->insertion_stamp, Max(hex_cfg->insertion_stamp, Max(bin_cfg->insertion_stamp, oct_cfg->insertion_stamp))); - if(dec_cfg != &df_g_nil_cfg_val && dec_cfg->insertion_stamp == best_insertion_stamp) { radix = 10; } - if(hex_cfg != &df_g_nil_cfg_val && hex_cfg->insertion_stamp == best_insertion_stamp) { radix = 16; } - if(bin_cfg != &df_g_nil_cfg_val && bin_cfg->insertion_stamp == best_insertion_stamp) { radix = 2; } - if(oct_cfg != &df_g_nil_cfg_val && oct_cfg->insertion_stamp == best_insertion_stamp) { radix = 8; } - B32 no_addr = (df_cfg_val_from_string(cfg_table, str8_lit("no_addr")) != &df_g_nil_cfg_val) && (flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules); - B32 has_array = (df_cfg_val_from_string(cfg_table, str8_lit("array")) != &df_g_nil_cfg_val); + if(dec_cfg != &d_nil_cfg_val && dec_cfg->insertion_stamp == best_insertion_stamp) { radix = 10; } + if(hex_cfg != &d_nil_cfg_val && hex_cfg->insertion_stamp == best_insertion_stamp) { radix = 16; } + if(bin_cfg != &d_nil_cfg_val && bin_cfg->insertion_stamp == best_insertion_stamp) { radix = 2; } + if(oct_cfg != &d_nil_cfg_val && oct_cfg->insertion_stamp == best_insertion_stamp) { radix = 8; } + B32 no_addr = (d_cfg_val_from_string(cfg_table, str8_lit("no_addr")) != &d_nil_cfg_val) && (flags & D_EvalVizStringFlag_ReadOnlyDisplayRules); + B32 has_array = (d_cfg_val_from_string(cfg_table, str8_lit("array")) != &d_nil_cfg_val); //- rjf: member evaluations -> display member info if(eval.mode == E_Mode_Null && !e_type_key_match(e_type_key_zero(), eval.type_key) && member != 0) @@ -8442,7 +8442,7 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 default: { E_Eval value_eval = e_value_eval_from_eval(eval); - String8 string = df_string_from_simple_typed_eval(arena, flags, radix, value_eval); + String8 string = d_string_from_simple_typed_eval(arena, flags, radix, value_eval); space_taken += fnt_dim_from_tag_size_string(font, font_size, 0, 0, string).x; str8_list_push(arena, out, string); }break; @@ -8462,9 +8462,9 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 E_Eval value_eval = e_value_eval_from_eval(eval); B32 ptee_has_content = (direct_type_kind != E_TypeKind_Null && direct_type_kind != E_TypeKind_Void); B32 ptee_has_string = (E_TypeKind_Char8 <= direct_type_kind && direct_type_kind <= E_TypeKind_UChar32); - DF_Entity *thread = df_entity_from_handle(df_interact_regs()->thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - String8 symbol_name = df_symbol_name_from_process_vaddr(arena, process, value_eval.value.u64, 1); + D_Entity *thread = d_entity_from_handle(d_interact_regs()->thread); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + String8 symbol_name = d_symbol_name_from_process_vaddr(arena, process, value_eval.value.u64, 1); // rjf: special case: push strings for textual string content B32 did_content = 0; @@ -8493,7 +8493,7 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 case 2: {string = str8_from_16(arena, str16_cstring((U16 *)string_buffer));}break; case 4: {string = str8_from_32(arena, str32_cstring((U32 *)string_buffer));}break; } - String8 string_escaped = df_escaped_from_raw_string(arena, string); + String8 string_escaped = d_escaped_from_raw_string(arena, string); space_taken += fnt_dim_from_tag_size_string(font, font_size, 0, 0, string_escaped).x; space_taken += 2*fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_lit("\"")).x; str8_list_push(arena, out, str8_lit("\"")); @@ -8516,7 +8516,7 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 if(!did_content && symbol_name.size == 0 && ((type_kind == E_TypeKind_Ptr && direct_type_kind == E_TypeKind_Function) || (type_kind == E_TypeKind_Function)) && - (flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules)) + (flags & D_EvalVizStringFlag_ReadOnlyDisplayRules)) { did_content = 1; String8 string = str8_lit("???"); @@ -8525,7 +8525,7 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 } // rjf: descend for all other cases - if(!did_content && ptee_has_content && (flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules)) + if(!did_content && ptee_has_content && (flags & D_EvalVizStringFlag_ReadOnlyDisplayRules)) { did_content = 1; if(depth < 4) @@ -8544,7 +8544,7 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 // rjf: push pointer value B32 did_ptr_value = 0; - if((!no_addr || !did_content) && ((flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules) || !did_string)) + if((!no_addr || !did_content) && ((flags & D_EvalVizStringFlag_ReadOnlyDisplayRules) || !did_string)) { did_ptr_value = 1; if(did_content) @@ -8553,7 +8553,7 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 space_taken += fnt_dim_from_tag_size_string(font, font_size, 0, 0, ptr_prefix).x; str8_list_push(arena, out, ptr_prefix); } - String8 string = df_string_from_simple_typed_eval(arena, flags, radix, value_eval); + String8 string = d_string_from_simple_typed_eval(arena, flags, radix, value_eval); space_taken += fnt_dim_from_tag_size_string(font, font_size, 0, 0, string).x; str8_list_push(arena, out, string); if(did_content) @@ -8614,7 +8614,7 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 case 2: {string = str8_from_16(arena, str16_cstring((U16 *)string_buffer));}break; case 4: {string = str8_from_32(arena, str32_cstring((U32 *)string_buffer));}break; } - String8 string_escaped = df_escaped_from_raw_string(arena, string); + String8 string_escaped = d_escaped_from_raw_string(arena, string); space_taken += fnt_dim_from_tag_size_string(font, font_size, 0, 0, string_escaped).x; space_taken += 2*fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_lit("\"")).x; str8_list_push(arena, out, str8_lit("\"")); @@ -8623,7 +8623,7 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 } // rjf: descend in all other cases - if(!did_content && (flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules)) + if(!did_content && (flags & D_EvalVizStringFlag_ReadOnlyDisplayRules)) { did_content = 1; @@ -8691,7 +8691,7 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 if(depth < 4) { E_MemberArray data_members = e_type_data_members_from_key(scratch.arena, e_type_unwrap(eval.type_key)); - E_MemberArray filtered_data_members = df_filtered_data_members_from_members_cfg_table(scratch.arena, data_members, cfg_table); + E_MemberArray filtered_data_members = d_filtered_data_members_from_members_cfg_table(scratch.arena, data_members, cfg_table); for(U64 member_idx = 0; member_idx < filtered_data_members.count && max_size > space_taken; member_idx += 1) { E_Member *mem = &filtered_data_members.v[member_idx]; @@ -8734,7 +8734,7 @@ df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 } internal String8 -df_value_string_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval, E_Member *member, DF_CfgTable *cfg_table) +df_value_string_from_eval(Arena *arena, D_EvalVizStringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval, E_Member *member, D_CfgTable *cfg_table) { Temp scratch = scratch_begin(&arena, 1); String8List strs = {0}; @@ -8750,7 +8750,7 @@ df_value_string_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 default internal void df_set_hover_eval(DF_Window *ws, Vec2F32 pos, String8 file_path, TxtPt pt, U64 vaddr, String8 string) { - if(ws->hover_eval_last_frame_idx+1 < df_frame_index() && + if(ws->hover_eval_last_frame_idx+1 < d_frame_index() && ui_key_match(ui_active_key(UI_MouseButtonKind_Left), ui_key_zero()) && ui_key_match(ui_active_key(UI_MouseButtonKind_Middle), ui_key_zero()) && ui_key_match(ui_active_key(UI_MouseButtonKind_Right), ui_key_zero())) @@ -8758,7 +8758,7 @@ df_set_hover_eval(DF_Window *ws, Vec2F32 pos, String8 file_path, TxtPt pt, U64 v B32 is_new_string = !str8_match(ws->hover_eval_string, string, 0); if(is_new_string) { - ws->hover_eval_first_frame_idx = ws->hover_eval_last_frame_idx = df_frame_index(); + ws->hover_eval_first_frame_idx = ws->hover_eval_last_frame_idx = d_frame_index(); arena_clear(ws->hover_eval_arena); ws->hover_eval_string = push_str8_copy(ws->hover_eval_arena, string); ws->hover_eval_file_path = push_str8_copy(ws->hover_eval_arena, file_path); @@ -8767,7 +8767,7 @@ df_set_hover_eval(DF_Window *ws, Vec2F32 pos, String8 file_path, TxtPt pt, U64 v ws->hover_eval_focused = 0; } ws->hover_eval_spawn_pos = pos; - ws->hover_eval_last_frame_idx = df_frame_index(); + ws->hover_eval_last_frame_idx = d_frame_index(); } } @@ -8939,7 +8939,7 @@ df_view_rule_autocomp_lister_params_from_input_cursor(Arena *arena, String8 stri } //- rjf: map view rule root to spec - DF_CoreViewRuleSpec *spec = df_core_view_rule_spec_from_string(first_step ? first_step->string : str8_zero()); + D_ViewRuleSpec *spec = d_view_rule_spec_from_string(first_step ? first_step->string : str8_zero()); //- rjf: do parse of schema MD_TokenizeResult schema_tokenize = md_tokenize_from_text(scratch.arena, spec->info.schema); @@ -9008,7 +9008,7 @@ df_set_autocomp_lister_query(DF_Window *ws, UI_Key root_key, DF_AutoCompListerPa ws->autocomp_num_visible_rows_t = 0; ws->autocomp_open_t = 0; } - if(ws->autocomp_last_frame_idx+1 < df_frame_index()) + if(ws->autocomp_last_frame_idx+1 < d_frame_index()) { ws->autocomp_force_closed = 0; ws->autocomp_num_visible_rows_t = 0; @@ -9020,7 +9020,7 @@ df_set_autocomp_lister_query(DF_Window *ws, UI_Key root_key, DF_AutoCompListerPa ws->autocomp_lister_params.strings = str8_list_copy(ws->autocomp_lister_params_arena, &ws->autocomp_lister_params.strings); ws->autocomp_lister_query_size = Min(query.size, sizeof(ws->autocomp_lister_query_buffer)); MemoryCopy(ws->autocomp_lister_query_buffer, query.str, ws->autocomp_lister_query_size); - ws->autocomp_last_frame_idx = df_frame_index(); + ws->autocomp_last_frame_idx = d_frame_index(); } //////////////////////////////// @@ -9072,10 +9072,10 @@ df_clear_bindings(void) } internal DF_BindingList -df_bindings_from_spec(Arena *arena, DF_CmdSpec *spec) +df_bindings_from_spec(Arena *arena, D_CmdSpec *spec) { DF_BindingList result = {0}; - U64 hash = df_hash_from_string(spec->info.string); + U64 hash = d_hash_from_string(spec->info.string); U64 slot = hash%df_gfx_state->key_map_table_size; for(DF_KeyMapNode *n = df_gfx_state->key_map_table[slot].first; n != 0; n = n->hash_next) { @@ -9091,11 +9091,11 @@ df_bindings_from_spec(Arena *arena, DF_CmdSpec *spec) } internal void -df_bind_spec(DF_CmdSpec *spec, DF_Binding binding) +df_bind_spec(D_CmdSpec *spec, DF_Binding binding) { if(binding.key != OS_Key_Null) { - U64 hash = df_hash_from_string(spec->info.string); + U64 hash = d_hash_from_string(spec->info.string); U64 slot = hash%df_gfx_state->key_map_table_size; DF_KeyMapNode *existing_node = 0; for(DF_KeyMapNode *n = df_gfx_state->key_map_table[slot].first; n != 0; n = n->hash_next) @@ -9126,9 +9126,9 @@ df_bind_spec(DF_CmdSpec *spec, DF_Binding binding) } internal void -df_unbind_spec(DF_CmdSpec *spec, DF_Binding binding) +df_unbind_spec(D_CmdSpec *spec, DF_Binding binding) { - U64 hash = df_hash_from_string(spec->info.string); + U64 hash = d_hash_from_string(spec->info.string); U64 slot = hash%df_gfx_state->key_map_table_size; for(DF_KeyMapNode *n = df_gfx_state->key_map_table[slot].first, *next = 0; n != 0; n = next) { @@ -9143,34 +9143,34 @@ df_unbind_spec(DF_CmdSpec *spec, DF_Binding binding) } } -internal DF_CmdSpecList +internal D_CmdSpecList df_cmd_spec_list_from_binding(Arena *arena, DF_Binding binding) { - DF_CmdSpecList result = {0}; + D_CmdSpecList result = {0}; for(U64 idx = 0; idx < df_gfx_state->key_map_table_size; idx += 1) { for(DF_KeyMapNode *n = df_gfx_state->key_map_table[idx].first; n != 0; n = n->hash_next) { if(n->binding.key == binding.key && n->binding.flags == binding.flags) { - df_cmd_spec_list_push(arena, &result, n->spec); + d_cmd_spec_list_push(arena, &result, n->spec); } } } return result; } -internal DF_CmdSpecList +internal D_CmdSpecList df_cmd_spec_list_from_event_flags(Arena *arena, OS_EventFlags flags) { - DF_CmdSpecList result = {0}; + D_CmdSpecList result = {0}; for(U64 idx = 0; idx < df_gfx_state->key_map_table_size; idx += 1) { for(DF_KeyMapNode *n = df_gfx_state->key_map_table[idx].first; n != 0; n = n->hash_next) { if(n->binding.flags == flags) { - df_cmd_spec_list_push(arena, &result, n->spec); + d_cmd_spec_list_push(arena, &result, n->spec); } } } @@ -9284,7 +9284,7 @@ df_setting_val_from_code(DF_Window *optional_window, DF_SettingCode code) } if(result.set == 0) { - for(EachEnumVal(DF_CfgSrc, src)) + for(EachEnumVal(D_CfgSrc, src)) { if(df_gfx_state->cfg_setting_vals[src][code].set) { @@ -9305,7 +9305,7 @@ df_qsort_compare__cfg_string_bindings(DF_StringBindingPair *a, DF_StringBindingP } internal String8List -df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) +df_cfg_strings_from_gfx(Arena *arena, String8 root_path, D_CfgSrc source) { ProfBeginFunction(); String8List strs = {0}; @@ -9427,14 +9427,14 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) Temp scratch = scratch_begin(&arena, 1); String8 query_raw = str8(view->query_buffer, view->query_string_size); { - String8 query_file_path = df_file_path_from_eval_string(scratch.arena, query_raw); + String8 query_file_path = d_file_path_from_eval_string(scratch.arena, query_raw); if(query_file_path.size != 0) { query_file_path = path_relative_dst_from_absolute_dst_src(scratch.arena, query_file_path, root_path); query_raw = push_str8f(scratch.arena, "file:\"%S\"", query_file_path); } } - String8 query_sanitized = df_cfg_escaped_from_raw_string(scratch.arena, query_raw); + String8 query_sanitized = d_cfg_escaped_from_raw_string(scratch.arena, query_raw); str8_list_pushf(arena, &strs, "query:{\"%S\"} ", query_sanitized); scratch_end(scratch); } @@ -9517,7 +9517,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) } //- rjf: serialize keybindings - if(source == DF_CfgSrc_User) + if(source == D_CfgSrc_User) { Temp scratch = scratch_begin(&arena, 1); String8 indent_str = str8_lit(" "); @@ -9571,7 +9571,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) } //- rjf: serialize theme colors - if(source == DF_CfgSrc_User) + if(source == D_CfgSrc_User) { // rjf: determine if this theme matches an existing preset B32 is_preset = 0; @@ -9630,10 +9630,10 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) } //- rjf: serialize fonts - if(source == DF_CfgSrc_User) + if(source == D_CfgSrc_User) { - String8 code_font_path_escaped = df_cfg_escaped_from_raw_string(arena, df_gfx_state->cfg_code_font_path); - String8 main_font_path_escaped = df_cfg_escaped_from_raw_string(arena, df_gfx_state->cfg_main_font_path); + String8 code_font_path_escaped = d_cfg_escaped_from_raw_string(arena, df_gfx_state->cfg_code_font_path); + String8 main_font_path_escaped = d_cfg_escaped_from_raw_string(arena, df_gfx_state->cfg_main_font_path); str8_list_push(arena, &strs, str8_lit("/// fonts /////////////////////////////////////////////////////////////////////\n")); str8_list_push(arena, &strs, str8_lit("\n")); str8_list_pushf(arena, &strs, "code_font: \"%S\"\n", code_font_path_escaped); @@ -9696,13 +9696,13 @@ df_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, DF_IconKind icon = DF_IconKind_Null; String8 explanation = {0}; Temp scratch = scratch_begin(&arena, 1); - DF_Entity *thread = df_entity_from_ctrl_handle(event->machine_id, event->entity); - String8 thread_display_string = df_display_string_from_entity(scratch.arena, thread); + D_Entity *thread = d_entity_from_ctrl_handle(event->machine_id, event->entity); + String8 thread_display_string = d_display_string_from_entity(scratch.arena, thread); String8 process_thread_string = thread_display_string; - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - if(process->kind == DF_EntityKind_Process) + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + if(process->kind == D_EntityKind_Process) { - String8 process_display_string = df_display_string_from_entity(scratch.arena, process); + String8 process_display_string = d_display_string_from_entity(scratch.arena, process); process_thread_string = push_str8f(scratch.arena, "%S: %S", process_display_string, thread_display_string); } switch(event->kind) @@ -9714,7 +9714,7 @@ df_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, default:{}break; case CTRL_EventCause_Finished: { - if(!df_entity_is_nil(thread)) + if(!d_entity_is_nil(thread)) { explanation = push_str8f(arena, "%S completed step", process_thread_string); } @@ -9725,7 +9725,7 @@ df_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, }break; case CTRL_EventCause_UserBreakpoint: { - if(!df_entity_is_nil(thread)) + if(!d_entity_is_nil(thread)) { icon = DF_IconKind_CircleFilled; explanation = push_str8f(arena, "%S hit a breakpoint", process_thread_string); @@ -9733,7 +9733,7 @@ df_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, }break; case CTRL_EventCause_InterruptedByException: { - if(!df_entity_is_nil(thread)) + if(!d_entity_is_nil(thread)) { icon = DF_IconKind_WarningBig; switch(event->exception_kind) @@ -9811,7 +9811,7 @@ df_loading_overlay(Rng2F32 rect, F32 loading_t, U64 progress_v, U64 progress_v_t F32 height = ui_top_font_size() * 1.f; F32 min_thickness = ui_top_font_size()/2; F32 trail = ui_top_font_size() * 4; - F32 t = pow_f32(sin_f32((F32)df_time_in_seconds() / 1.8f), 2.f); + F32 t = pow_f32(sin_f32((F32)d_time_in_seconds() / 1.8f), 2.f); F64 v = 1.f - abs_f32(0.5f - t); // rjf: colors @@ -9888,7 +9888,7 @@ df_loading_overlay(Rng2F32 rect, F32 loading_t, U64 progress_v, U64 progress_v_t //~ rjf: UI Widgets: Fancy Buttons internal void -df_cmd_binding_buttons(DF_Window *ws, DF_CmdSpec *spec) +df_cmd_binding_buttons(DF_Window *ws, D_CmdSpec *spec) { Temp scratch = scratch_begin(0, 0); DF_BindingList bindings = df_bindings_from_spec(scratch.arena, spec); @@ -9903,9 +9903,9 @@ df_cmd_binding_buttons(DF_Window *ws, DF_CmdSpec *spec) df_gfx_state->bind_change_binding.flags == binding.flags); //- rjf: grab all conflicts - DF_CmdSpecList specs_with_binding = df_cmd_spec_list_from_binding(scratch.arena, binding); + D_CmdSpecList specs_with_binding = df_cmd_spec_list_from_binding(scratch.arena, binding); B32 has_conflicts = 0; - for(DF_CmdSpecNode *n = specs_with_binding.first; n != 0; n = n->next) + for(D_CmdSpecNode *n = specs_with_binding.first; n != 0; n = n->next) { if(n->spec != spec) { @@ -9973,9 +9973,9 @@ df_cmd_binding_buttons(DF_Window *ws, DF_CmdSpec *spec) { if((binding.key == OS_Key_Esc || binding.key == OS_Key_Delete) && binding.flags == 0) { - DF_CmdParams p = df_cmd_params_zero(); + D_CmdParams p = d_cmd_params_zero(); p.string = str8_lit("Cannot rebind; this command uses a reserved keybinding."); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Error)); } else { @@ -9993,7 +9993,7 @@ df_cmd_binding_buttons(DF_Window *ws, DF_CmdSpec *spec) if(ui_hovering(sig) && has_conflicts) UI_Tooltip { UI_PrefWidth(ui_children_sum(1)) df_error_label(str8_lit("This binding conflicts with those for:")); - for(DF_CmdSpecNode *n = specs_with_binding.first; n != 0; n = n->next) + for(D_CmdSpecNode *n = specs_with_binding.first; n != 0; n = n->next) { if(n->spec != spec) { @@ -10080,7 +10080,7 @@ df_menu_bar_button(String8 string) } internal UI_Signal -df_cmd_spec_button(DF_Window *ws, DF_CmdSpec *spec) +df_cmd_spec_button(DF_Window *ws, D_CmdSpec *spec) { ui_set_next_hover_cursor(OS_Cursor_HandPoint); ui_set_next_child_layout_axis(Axis2_X); @@ -10125,20 +10125,20 @@ df_cmd_spec_button(DF_Window *ws, DF_CmdSpec *spec) } internal void -df_cmd_list_menu_buttons(DF_Window *ws, U64 count, DF_CoreCmdKind *cmds, U32 *fastpath_codepoints) +df_cmd_list_menu_buttons(DF_Window *ws, U64 count, D_CmdKind *cmds, U32 *fastpath_codepoints) { Temp scratch = scratch_begin(0, 0); for(U64 idx = 0; idx < count; idx += 1) { - DF_CmdSpec *spec = df_cmd_spec_from_core_cmd_kind(cmds[idx]); + D_CmdSpec *spec = d_cmd_spec_from_kind(cmds[idx]); ui_set_next_fastpath_codepoint(fastpath_codepoints[idx]); UI_Signal sig = df_cmd_spec_button(ws, spec); if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.cmd_spec = spec; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); ui_ctx_menu_close(); ws->menu_bar_focused = 0; } @@ -10212,37 +10212,37 @@ df_icon_buttonf(DF_Window *ws, DF_IconKind kind, FuzzyMatchRangeList *matches, c } internal void -df_entity_tooltips(DF_Window *ws, DF_Entity *entity) +df_entity_tooltips(DF_Window *ws, D_Entity *entity) { Temp scratch = scratch_begin(0, 0); DF_Palette(ws, DF_PaletteCode_Floating) switch(entity->kind) { default:{}break; - case DF_EntityKind_File: + case D_EntityKind_File: UI_Tooltip UI_PrefWidth(ui_text_dim(10, 1)) { - String8 full_path = df_full_path_from_entity(scratch.arena, entity); + String8 full_path = d_full_path_from_entity(scratch.arena, entity); ui_label(full_path); }break; - case DF_EntityKind_Thread: UI_Flags(0) + case D_EntityKind_Thread: UI_Flags(0) UI_Tooltip UI_PrefWidth(ui_text_dim(10, 1)) { - String8 display_string = df_display_string_from_entity(scratch.arena, entity); - U64 rip_vaddr = df_query_cached_rip_from_thread(entity); - Architecture arch = df_architecture_from_entity(entity); + String8 display_string = d_display_string_from_entity(scratch.arena, entity); + U64 rip_vaddr = d_query_cached_rip_from_thread(entity); + Architecture arch = d_architecture_from_entity(entity); String8 arch_str = string_from_architecture(arch); U32 pid_or_tid = entity->ctrl_id; if(display_string.size != 0) UI_PrefWidth(ui_children_sum(1)) UI_Row { - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & D_EntityFlag_HasColor) { - ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_entity(entity))); + ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = d_rgba_from_entity(entity))); } UI_PrefWidth(ui_text_dim(10, 1)) ui_label(display_string); } { - CTRL_Event stop_event = df_ctrl_last_stop_event(); - DF_Entity *stopper_thread = df_entity_from_ctrl_handle(stop_event.machine_id, stop_event.entity); + CTRL_Event stop_event = d_ctrl_last_stop_event(); + D_Entity *stopper_thread = d_entity_from_ctrl_handle(stop_event.machine_id, stop_event.entity); if(stopper_thread == entity) { ui_spacer(ui_em(1.5f, 1.f)); @@ -10281,20 +10281,20 @@ df_entity_tooltips(DF_Window *ws, DF_Entity *entity) } ui_spacer(ui_em(1.5f, 1.f)); DI_Scope *di_scope = di_scope_open(); - DF_Entity *process = df_entity_ancestor_from_kind(entity, DF_EntityKind_Process); - CTRL_Unwind base_unwind = df_query_cached_unwind_from_thread(entity); - DF_Unwind rich_unwind = df_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); + D_Entity *process = d_entity_ancestor_from_kind(entity, D_EntityKind_Process); + CTRL_Unwind base_unwind = d_query_cached_unwind_from_thread(entity); + D_Unwind rich_unwind = d_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); for(U64 idx = 0; idx < rich_unwind.frames.concrete_frame_count; idx += 1) { - DF_UnwindFrame *f = &rich_unwind.frames.v[idx]; + D_UnwindFrame *f = &rich_unwind.frames.v[idx]; RDI_Parsed *rdi = f->rdi; RDI_Procedure *procedure = f->procedure; U64 rip_vaddr = regs_rip_from_arch_block(entity->arch, f->regs); - DF_Entity *module = df_module_from_process_vaddr(process, rip_vaddr); - String8 module_name = df_entity_is_nil(module) ? str8_lit("???") : str8_skip_last_slash(module->name); + D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr); + String8 module_name = d_entity_is_nil(module) ? str8_lit("???") : str8_skip_last_slash(module->name); // rjf: inline frames - for(DF_UnwindInlineFrame *fin = f->last_inline_frame; fin != 0; fin = fin->prev) + for(D_UnwindInlineFrame *fin = f->last_inline_frame; fin != 0; fin = fin->prev) UI_PrefWidth(ui_children_sum(1)) UI_Row { String8 name = {0}; @@ -10335,18 +10335,18 @@ df_entity_tooltips(DF_Window *ws, DF_Entity *entity) } di_scope_close(di_scope); }break; - case DF_EntityKind_Breakpoint: UI_Flags(0) + case D_EntityKind_Breakpoint: UI_Flags(0) UI_Tooltip UI_PrefWidth(ui_text_dim(10, 1)) { - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & D_EntityFlag_HasColor) { - ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_entity(entity))); + ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = d_rgba_from_entity(entity))); } - String8 display_string = df_display_string_from_entity(scratch.arena, entity); + String8 display_string = d_display_string_from_entity(scratch.arena, entity); UI_PrefWidth(ui_text_dim(10, 1)) ui_label(display_string); UI_PrefWidth(ui_children_sum(1)) UI_Row { - String8 stop_condition = df_entity_child_from_kind(entity, DF_EntityKind_Condition)->name; + String8 stop_condition = d_entity_child_from_kind(entity, D_EntityKind_Condition)->name; if(stop_condition.size == 0) { stop_condition = str8_lit("true"); @@ -10362,15 +10362,15 @@ df_entity_tooltips(DF_Window *ws, DF_Entity *entity) UI_PrefWidth(ui_text_dim(10, 1)) DF_Font(ws, DF_FontSlot_Code) df_code_label(1.f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), hit_count_text); } }break; - case DF_EntityKind_WatchPin: + case D_EntityKind_WatchPin: DF_Font(ws, DF_FontSlot_Code) UI_Tooltip UI_PrefWidth(ui_text_dim(10, 1)) { - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & D_EntityFlag_HasColor) { - ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_entity(entity))); + ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = d_rgba_from_entity(entity))); } - String8 display_string = df_display_string_from_entity(scratch.arena, entity); + String8 display_string = d_display_string_from_entity(scratch.arena, entity); UI_PrefWidth(ui_text_dim(10, 1)) df_code_label(1.f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), display_string); }break; } @@ -10378,16 +10378,16 @@ df_entity_tooltips(DF_Window *ws, DF_Entity *entity) } internal UI_Signal -df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *name_matches, String8 fuzzy_query, B32 is_implicit) +df_entity_desc_button(DF_Window *ws, D_Entity *entity, FuzzyMatchRangeList *name_matches, String8 fuzzy_query, B32 is_implicit) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); UI_Palette *palette = ui_top_palette(); - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == D_EntityKind_Thread) { - CTRL_Event stop_event = df_ctrl_last_stop_event(); - DF_Entity *stopped_thread = df_entity_from_ctrl_handle(stop_event.machine_id, stop_event.entity); - DF_Entity *selected_thread = df_entity_from_handle(df_base_interact_regs()->thread); + CTRL_Event stop_event = d_ctrl_last_stop_event(); + D_Entity *stopped_thread = d_entity_from_ctrl_handle(stop_event.machine_id, stop_event.entity); + D_Entity *selected_thread = d_entity_from_handle(d_base_interact_regs()->thread); if(selected_thread == entity) { palette = df_palette_from_code(ws, DF_PaletteCode_NeutralPopButton); @@ -10401,11 +10401,11 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam palette = df_palette_from_code(ws, DF_PaletteCode_NegativePopButton); } } - if(entity->cfg_src == DF_CfgSrc_CommandLine) + if(entity->cfg_src == D_CfgSrc_CommandLine) { palette = df_palette_from_code(ws, DF_PaletteCode_NeutralPopButton); } - else if(entity->kind == DF_EntityKind_Target && !entity->disabled) + else if(entity->kind == D_EntityKind_Target && !entity->disabled) { palette = df_palette_from_code(ws, DF_PaletteCode_NeutralPopButton); } @@ -10421,13 +10421,13 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam //- rjf: build contents UI_Parent(box) UI_PrefWidth(ui_text_dim(10, 0)) UI_Padding(ui_em(1.f, 1.f)) { - DF_EntityKindFlags kind_flags = df_g_entity_kind_flags_table[entity->kind]; - DF_IconKind icon = df_g_entity_kind_icon_kind_table[entity->kind]; + D_EntityKindFlags kind_flags = d_entity_kind_flags_table[entity->kind]; + DF_IconKind icon = d_entity_kind_icon_kind_table[entity->kind]; Vec4F32 entity_color = palette->colors[UI_ColorCode_Text]; Vec4F32 entity_color_weak = palette->colors[UI_ColorCode_TextWeak]; - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & D_EntityFlag_HasColor) { - entity_color = df_rgba_from_entity(entity); + entity_color = d_rgba_from_entity(entity); entity_color_weak = entity_color; entity_color_weak.w *= 0.5f; } @@ -10437,7 +10437,7 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam UI_PrefWidth(ui_em(1.875f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(df_g_icon_kind_text_table[icon]); - if(entity->cfg_src == DF_CfgSrc_CommandLine) + if(entity->cfg_src == D_CfgSrc_CommandLine) { UI_TextAlignment(UI_TextAlign_Center) UI_PrefWidth(ui_em(1.875f, 1.f)) @@ -10455,12 +10455,12 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam } } } - String8 label = df_display_string_from_entity(scratch.arena, entity); + String8 label = d_display_string_from_entity(scratch.arena, entity); UI_Palette(ui_build_palette(ui_top_palette(), .text = entity_color)) - DF_Font(ws, kind_flags&DF_EntityKindFlag_NameIsCode ? DF_FontSlot_Code : DF_FontSlot_Main) - UI_Flags((entity->kind == DF_EntityKind_Thread || - entity->kind == DF_EntityKind_Breakpoint || - entity->kind == DF_EntityKind_WatchPin) + DF_Font(ws, kind_flags&D_EntityKindFlag_NameIsCode ? DF_FontSlot_Code : DF_FontSlot_Main) + UI_Flags((entity->kind == D_EntityKind_Thread || + entity->kind == D_EntityKind_Breakpoint || + entity->kind == D_EntityKind_WatchPin) ? UI_BoxFlag_DisableTruncatedHover : 0) { @@ -10470,23 +10470,23 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam ui_box_equip_fuzzy_match_ranges(label_sig.box, name_matches); } } - if(entity->kind == DF_EntityKind_Target) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_FontSize(ui_top_font_size()*0.95f) + if(entity->kind == D_EntityKind_Target) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_FontSize(ui_top_font_size()*0.95f) { - DF_Entity *args = df_entity_child_from_kind(entity, DF_EntityKind_Arguments); + D_Entity *args = d_entity_child_from_kind(entity, D_EntityKind_Arguments); ui_label(args->name); } - if(kind_flags & DF_EntityKindFlag_CanEnable && entity->disabled) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_FontSize(ui_top_font_size()*0.95f) UI_HeightFill + if(kind_flags & D_EntityKindFlag_CanEnable && entity->disabled) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_FontSize(ui_top_font_size()*0.95f) UI_HeightFill { ui_label(str8_lit("(Disabled)")); } - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == D_EntityKind_Thread) UI_FontSize(ui_top_font_size()*0.75f) DF_Font(ws, DF_FontSlot_Code) UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol))) UI_Flags(UI_BoxFlag_DisableTruncatedHover) { - CTRL_Unwind unwind = df_query_cached_unwind_from_thread(entity); - DF_Entity *process = df_entity_ancestor_from_kind(entity, DF_EntityKind_Process); + CTRL_Unwind unwind = d_query_cached_unwind_from_thread(entity); + D_Entity *process = d_entity_ancestor_from_kind(entity, D_EntityKind_Process); U64 idx = 0; U64 limit = 3; ui_spacer(ui_em(1.f, 1.f)); @@ -10494,10 +10494,10 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam { CTRL_UnwindFrame *f = &unwind.frames.v[num-1]; U64 rip_vaddr = regs_rip_from_arch_block(entity->arch, f->regs); - DF_Entity *module = df_module_from_process_vaddr(process, rip_vaddr); - U64 rip_voff = df_voff_from_vaddr(module, rip_vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - String8 procedure_name = df_symbol_name_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff, 0); + D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr); + U64 rip_voff = d_voff_from_vaddr(module, rip_vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + String8 procedure_name = d_symbol_name_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff, 0); if(procedure_name.size != 0) { FuzzyMatchRangeList fuzzy_matches = {0}; @@ -10535,16 +10535,16 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam // rjf: click => fastpath for this entity if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_EntityRefFastPath)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_EntityRefFastPath)); } // rjf: right-click => context menu for this entity else if(ui_right_clicked(sig)) { - DF_Handle handle = df_handle_from_entity(entity); + D_Handle handle = d_handle_from_entity(entity); ui_ctx_menu_open(ws->entity_ctx_menu_key, sig.box->key, v2f32(0, sig.box->rect.y1 - sig.box->rect.y0)); ws->entity_ctx_menu_entity = handle; } @@ -10554,7 +10554,7 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam { DF_DragDropPayload payload = {0}; payload.key = box->key; - payload.entity = df_handle_from_entity(entity); + payload.entity = d_handle_from_entity(entity); df_drag_begin(&payload); } } @@ -10594,12 +10594,12 @@ df_src_loc_button(DF_Window *ws, String8 file_path, TxtPt point) // rjf: click => find code location if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); + D_CmdParams params = df_cmd_params_from_window(ws); params.file_path = file_path; params.text_point = point; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_TextPoint); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_TextPoint); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); } // rjf: hover => show full path @@ -10632,12 +10632,12 @@ internal UI_BOX_CUSTOM_DRAW(df_thread_box_draw_extensions) // rjf: draw line before next-to-execute line if(u->do_lines) { - R_Rect2DInst *inst = d_rect(r2f32p(box->parent->parent->parent->rect.x0, - box->parent->rect.y0 - box->font_size*0.125f, - box->parent->parent->parent->rect.x0 + box->font_size*260*u->alive_t, - box->parent->rect.y0 + box->font_size*0.125f), - v4f32(u->thread_color.x, u->thread_color.y, u->thread_color.z, 0), - 0, 0, 1); + R_Rect2DInst *inst = dr_rect(r2f32p(box->parent->parent->parent->rect.x0, + box->parent->rect.y0 - box->font_size*0.125f, + box->parent->parent->parent->rect.x0 + box->font_size*260*u->alive_t, + box->parent->rect.y0 + box->font_size*0.125f), + v4f32(u->thread_color.x, u->thread_color.y, u->thread_color.z, 0), + 0, 0, 1); inst->colors[Corner_00] = inst->colors[Corner_01] = u->thread_color; } @@ -10646,12 +10646,12 @@ internal UI_BOX_CUSTOM_DRAW(df_thread_box_draw_extensions) { Vec4F32 weak_thread_color = u->thread_color; weak_thread_color.w *= 0.4f; - d_rect(r2f32p(box->rect.x0, - box->rect.y0, - box->rect.x1, - box->rect.y0 + (box->rect.y1-box->rect.y0)*u->progress_t), - weak_thread_color, - 0, 0, 1); + dr_rect(r2f32p(box->rect.x0, + box->rect.y0, + box->rect.x1, + box->rect.y0 + (box->rect.y1-box->rect.y0)*u->progress_t), + weak_thread_color, + 0, 0, 1); } // rjf: draw slight fill on selected thread @@ -10659,12 +10659,12 @@ internal UI_BOX_CUSTOM_DRAW(df_thread_box_draw_extensions) { Vec4F32 weak_thread_color = u->thread_color; weak_thread_color.w *= 0.3f; - R_Rect2DInst *inst = d_rect(r2f32p(box->parent->parent->parent->rect.x0, - box->parent->rect.y0, - box->parent->parent->parent->rect.x0 + ui_top_font_size()*22.f*u->alive_t, - box->parent->rect.y1), - v4f32(0, 0, 0, 0), - 0, 0, 1); + R_Rect2DInst *inst = dr_rect(r2f32p(box->parent->parent->parent->rect.x0, + box->parent->rect.y0, + box->parent->parent->parent->rect.x0 + ui_top_font_size()*22.f*u->alive_t, + box->parent->rect.y1), + v4f32(0, 0, 0, 0), + 0, 0, 1); inst->colors[Corner_00] = inst->colors[Corner_01] = weak_thread_color; } @@ -10673,12 +10673,12 @@ internal UI_BOX_CUSTOM_DRAW(df_thread_box_draw_extensions) { F32 lock_icon_off = ui_top_font_size()*0.2f; Vec4F32 lock_icon_color = df_rgba_from_theme_color(DF_ThemeColor_TextNegative); - d_text(df_font_from_slot(DF_FontSlot_Icons), - box->font_size, 0, 0, FNT_RasterFlag_Smooth, - v2f32((box->rect.x0 + box->rect.x1)/2 + lock_icon_off/2, - box->rect.y0 + lock_icon_off/2), - lock_icon_color, - df_g_icon_kind_text_table[DF_IconKind_Locked]); + dr_text(df_font_from_slot(DF_FontSlot_Icons), + box->font_size, 0, 0, FNT_RasterFlag_Smooth, + v2f32((box->rect.x0 + box->rect.x1)/2 + lock_icon_off/2, + box->rect.y0 + lock_icon_off/2), + lock_icon_color, + df_g_icon_kind_text_table[DF_IconKind_Locked]); } } @@ -10699,12 +10699,12 @@ internal UI_BOX_CUSTOM_DRAW(df_bp_box_draw_extensions) // rjf: draw line before next-to-execute line if(u->do_lines) { - R_Rect2DInst *inst = d_rect(r2f32p(box->parent->parent->parent->rect.x0, - box->parent->rect.y0 - box->font_size*0.125f, - box->parent->parent->parent->rect.x0 + ui_top_font_size()*250.f*u->alive_t, - box->parent->rect.y0 + box->font_size*0.125f), - v4f32(u->color.x, u->color.y, u->color.z, 0), - 0, 0, 1.f); + R_Rect2DInst *inst = dr_rect(r2f32p(box->parent->parent->parent->rect.x0, + box->parent->rect.y0 - box->font_size*0.125f, + box->parent->parent->parent->rect.x0 + ui_top_font_size()*250.f*u->alive_t, + box->parent->rect.y0 + box->font_size*0.125f), + v4f32(u->color.x, u->color.y, u->color.z, 0), + 0, 0, 1.f); inst->colors[Corner_00] = inst->colors[Corner_01] = u->color; } @@ -10713,12 +10713,12 @@ internal UI_BOX_CUSTOM_DRAW(df_bp_box_draw_extensions) { Vec4F32 weak_thread_color = u->color; weak_thread_color.w *= 0.3f; - R_Rect2DInst *inst = d_rect(r2f32p(box->parent->parent->parent->rect.x0, - box->parent->rect.y0, - box->parent->parent->parent->rect.x0 + ui_top_font_size()*22.f*u->alive_t, - box->parent->rect.y1), - v4f32(0, 0, 0, 0), - 0, 0, 1); + R_Rect2DInst *inst = dr_rect(r2f32p(box->parent->parent->parent->rect.x0, + box->parent->rect.y0, + box->parent->parent->parent->rect.x0 + ui_top_font_size()*22.f*u->alive_t, + box->parent->rect.y1), + v4f32(0, 0, 0, 0), + 0, 0, 1); inst->colors[Corner_00] = inst->colors[Corner_01] = weak_thread_color; } @@ -10734,16 +10734,16 @@ internal UI_BOX_CUSTOM_DRAW(df_bp_box_draw_extensions) F32 remap_bar_thickness = 0.3f*ui_top_font_size(); Vec4F32 remap_color = u->color; remap_color.w *= 0.3f; - R_Rect2DInst *inst = d_rect(r2f32p(bp_center.x - remap_bar_thickness, - bp_center.y + ClampTop(remap_px_delta, 0) + remap_bar_thickness, - bp_center.x + remap_bar_thickness, - bp_center.y + ClampBot(remap_px_delta, 0) - remap_bar_thickness), - remap_color, 2.f, 0, 1.f); - d_text(box->font, box->font_size, 0, 0, FNT_RasterFlag_Smooth, - v2f32(bp_text_pos.x, - bp_center.y + remap_px_delta), - remap_color, - df_g_icon_kind_text_table[DF_IconKind_CircleFilled]); + R_Rect2DInst *inst = dr_rect(r2f32p(bp_center.x - remap_bar_thickness, + bp_center.y + ClampTop(remap_px_delta, 0) + remap_bar_thickness, + bp_center.x + remap_bar_thickness, + bp_center.y + ClampBot(remap_px_delta, 0) - remap_bar_thickness), + remap_color, 2.f, 0, 1.f); + dr_text(box->font, box->font_size, 0, 0, FNT_RasterFlag_Smooth, + v2f32(bp_text_pos.x, + bp_center.y + remap_px_delta), + remap_color, + df_g_icon_kind_text_table[DF_IconKind_CircleFilled]); } } @@ -10753,12 +10753,12 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m DF_CodeSliceSignal result = {0}; ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - DF_Entity *selected_thread = df_entity_from_handle(df_interact_regs()->thread); - DF_Entity *selected_thread_process = df_entity_ancestor_from_kind(selected_thread, DF_EntityKind_Process); - U64 selected_thread_rip_unwind_vaddr = df_query_cached_rip_from_thread_unwind(selected_thread, df_interact_regs()->unwind_count); - DF_Entity *selected_thread_module = df_module_from_process_vaddr(selected_thread_process, selected_thread_rip_unwind_vaddr); - CTRL_Event stop_event = df_ctrl_last_stop_event(); - DF_Entity *stopper_thread = df_entity_from_ctrl_handle(stop_event.machine_id, stop_event.entity); + D_Entity *selected_thread = d_entity_from_handle(d_interact_regs()->thread); + D_Entity *selected_thread_process = d_entity_ancestor_from_kind(selected_thread, D_EntityKind_Process); + U64 selected_thread_rip_unwind_vaddr = d_query_cached_rip_from_thread_unwind(selected_thread, d_interact_regs()->unwind_count); + D_Entity *selected_thread_module = d_module_from_process_vaddr(selected_thread_process, selected_thread_rip_unwind_vaddr); + CTRL_Event stop_event = d_ctrl_last_stop_event(); + D_Entity *stopper_thread = d_entity_from_ctrl_handle(stop_event.machine_id, stop_event.entity); B32 is_focused = ui_is_focus_active(); B32 ctrlified = (os_get_event_flags() & OS_EventFlag_Ctrl); Vec4F32 code_line_bgs[] = @@ -10804,8 +10804,8 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m line_num < params->line_num_range.max; line_num += 1, line_idx += 1) { - DF_EntityList threads = params->line_ips[line_idx]; - for(DF_EntityNode *n = threads.first; n != 0; n = n->next) + D_EntityList threads = params->line_ips[line_idx]; + for(D_EntityNode *n = threads.first; n != 0; n = n->next) { if(n->entity == stopper_thread && (stop_event.cause == CTRL_EventCause_InterruptedByTrap || stop_event.cause == CTRL_EventCause_InterruptedByException)) { @@ -10839,26 +10839,26 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m line_num <= params->line_num_range.max; line_num += 1, line_idx += 1) { - DF_EntityList line_ips = params->line_ips[line_idx]; + D_EntityList line_ips = params->line_ips[line_idx]; ui_set_next_hover_cursor(OS_Cursor_HandPoint); UI_Box *line_margin_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable)|UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawActiveEffects, "line_margin_%I64x", line_num); UI_Parent(line_margin_box) { //- rjf: build margin thread ip ui - for(DF_EntityNode *n = line_ips.first; n != 0; n = n->next) + for(D_EntityNode *n = line_ips.first; n != 0; n = n->next) { // rjf: unpack thread - DF_Entity *thread = n->entity; + D_Entity *thread = n->entity; if(thread != selected_thread) { continue; } - U64 unwind_count = (thread == selected_thread) ? df_interact_regs()->unwind_count : 0; - U64 thread_rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, unwind_count); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - DF_Entity *module = df_module_from_process_vaddr(process, thread_rip_vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - U64 thread_rip_voff = df_voff_from_vaddr(module, thread_rip_vaddr); + U64 unwind_count = (thread == selected_thread) ? d_interact_regs()->unwind_count : 0; + U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + D_Entity *module = d_module_from_process_vaddr(process, thread_rip_vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + U64 thread_rip_voff = d_voff_from_vaddr(module, thread_rip_vaddr); // rjf: thread info => color Vec4F32 color = v4f32(1, 1, 1, 1); @@ -10874,11 +10874,11 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m { color = df_rgba_from_theme_color(DF_ThemeColor_ThreadError); } - else if(thread->flags & DF_EntityFlag_HasColor) + else if(thread->flags & D_EntityFlag_HasColor) { - color = df_rgba_from_entity(thread); + color = d_rgba_from_entity(thread); } - if(df_ctrl_targets_running() && df_ctrl_last_run_frame_idx() < df_frame_index()) + if(d_ctrl_targets_running() && d_ctrl_last_run_frame_idx() < d_frame_index()) { color.w *= 0.5f; } @@ -10911,7 +10911,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m u->thread_color = color; u->alive_t = thread->alive_t; u->is_selected = (thread == selected_thread); - u->is_frozen = df_entity_is_frozen(thread); + u->is_frozen = d_entity_is_frozen(thread); u->do_lines = df_setting_val_from_code(ws, DF_SettingCode_ThreadLines).s32; u->do_glow = df_setting_val_from_code(ws, DF_SettingCode_ThreadGlow).s32; ui_box_equip_custom_draw(thread_box, df_thread_box_draw_extensions, u); @@ -10920,9 +10920,9 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m // voff range) if(params->line_infos[line_idx].first != 0) { - DF_LineList *lines = ¶ms->line_infos[line_idx]; - DF_Line *line = 0; - for(DF_LineNode *n = lines->first; n != 0; n = n->next) + D_LineList *lines = ¶ms->line_infos[line_idx]; + D_Line *line = 0; + for(D_LineNode *n = lines->first; n != 0; n = n->next) { if(di_key_match(&n->v.dbgi_key, &dbgi_key)) { @@ -10951,7 +10951,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m // rjf: ip right-click menu if(ui_right_clicked(thread_sig)) { - DF_Handle handle = df_handle_from_entity(thread); + D_Handle handle = d_handle_from_entity(thread); ui_ctx_menu_open(ws->entity_ctx_menu_key, thread_box->key, v2f32(0, thread_box->rect.y1-thread_box->rect.y0)); ws->entity_ctx_menu_entity = handle; } @@ -10961,7 +10961,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m { DF_DragDropPayload payload = {0}; payload.key = thread_box->key; - payload.entity = df_handle_from_entity(thread); + payload.entity = d_handle_from_entity(thread); df_drag_begin(&payload); } } @@ -10994,28 +10994,28 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m line_num <= params->line_num_range.max; line_num += 1, line_idx += 1) { - DF_EntityList line_ips = params->line_ips[line_idx]; - DF_EntityList line_bps = params->line_bps[line_idx]; - DF_EntityList line_pins = params->line_pins[line_idx]; + D_EntityList line_ips = params->line_ips[line_idx]; + D_EntityList line_bps = params->line_bps[line_idx]; + D_EntityList line_pins = params->line_pins[line_idx]; ui_set_next_hover_cursor(OS_Cursor_HandPoint); UI_Box *line_margin_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable)|UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawActiveEffects, "line_margin_%I64x", line_num); UI_Parent(line_margin_box) { //- rjf: build margin thread ip ui - for(DF_EntityNode *n = line_ips.first; n != 0; n = n->next) + for(D_EntityNode *n = line_ips.first; n != 0; n = n->next) { // rjf: unpack thread - DF_Entity *thread = n->entity; + D_Entity *thread = n->entity; if(thread == selected_thread) { continue; } - U64 unwind_count = (thread == selected_thread) ? df_interact_regs()->unwind_count : 0; - U64 thread_rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, unwind_count); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - DF_Entity *module = df_module_from_process_vaddr(process, thread_rip_vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - U64 thread_rip_voff = df_voff_from_vaddr(module, thread_rip_vaddr); + U64 unwind_count = (thread == selected_thread) ? d_interact_regs()->unwind_count : 0; + U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + D_Entity *module = d_module_from_process_vaddr(process, thread_rip_vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + U64 thread_rip_voff = d_voff_from_vaddr(module, thread_rip_vaddr); // rjf: thread info => color Vec4F32 color = v4f32(1, 1, 1, 1); @@ -11031,11 +11031,11 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m { color = df_rgba_from_theme_color(DF_ThemeColor_ThreadError); } - else if(thread->flags & DF_EntityFlag_HasColor) + else if(thread->flags & D_EntityFlag_HasColor) { - color = df_rgba_from_entity(thread); + color = d_rgba_from_entity(thread); } - if(df_ctrl_targets_running() && df_ctrl_last_run_frame_idx() < df_frame_index()) + if(d_ctrl_targets_running() && d_ctrl_last_run_frame_idx() < d_frame_index()) { color.w *= 0.5f; } @@ -11068,16 +11068,16 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m u->thread_color = color; u->alive_t = thread->alive_t; u->is_selected = (thread == selected_thread); - u->is_frozen = df_entity_is_frozen(thread); + u->is_frozen = d_entity_is_frozen(thread); ui_box_equip_custom_draw(thread_box, df_thread_box_draw_extensions, u); // rjf: fill out progress t (progress into range of current line's // voff range) - if(df_interact_regs()->file_path.size != 0 && params->line_infos[line_idx].first != 0) + if(d_interact_regs()->file_path.size != 0 && params->line_infos[line_idx].first != 0) { - DF_LineList *lines = ¶ms->line_infos[line_idx]; - DF_Line *line = 0; - for(DF_LineNode *n = lines->first; n != 0; n = n->next) + D_LineList *lines = ¶ms->line_infos[line_idx]; + D_Line *line = 0; + for(D_LineNode *n = lines->first; n != 0; n = n->next) { if(di_key_match(&n->v.dbgi_key, &dbgi_key)) { @@ -11106,7 +11106,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m // rjf: ip right-click menu if(ui_right_clicked(thread_sig)) { - DF_Handle handle = df_handle_from_entity(thread); + D_Handle handle = d_handle_from_entity(thread); ui_ctx_menu_open(ws->entity_ctx_menu_key, thread_box->key, v2f32(0, thread_box->rect.y1-thread_box->rect.y0)); ws->entity_ctx_menu_entity = handle; } @@ -11114,10 +11114,10 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m // rjf: double click => select if(ui_double_clicked(thread_sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(thread); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SelectThread)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(thread); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_SelectThread)); ui_kill_action(); } @@ -11126,19 +11126,19 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m { DF_DragDropPayload payload = {0}; payload.key = thread_box->key; - payload.entity = df_handle_from_entity(thread); + payload.entity = d_handle_from_entity(thread); df_drag_begin(&payload); } } //- rjf: build margin breakpoint ui - for(DF_EntityNode *n = line_bps.first; n != 0; n = n->next) + for(D_EntityNode *n = line_bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; + D_Entity *bp = n->entity; Vec4F32 bp_color = df_rgba_from_theme_color(DF_ThemeColor_Breakpoint); - if(bp->flags & DF_EntityFlag_HasColor) + if(bp->flags & D_EntityFlag_HasColor) { - bp_color = df_rgba_from_entity(bp); + bp_color = d_rgba_from_entity(bp); } if(bp->disabled) { @@ -11152,10 +11152,10 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m bp_draw->alive_t = bp->alive_t; bp_draw->do_lines = df_setting_val_from_code(ws, DF_SettingCode_BreakpointLines).s32; bp_draw->do_glow = df_setting_val_from_code(ws, DF_SettingCode_BreakpointGlow).s32; - if(df_interact_regs()->file_path.size != 0) + if(d_interact_regs()->file_path.size != 0) { - DF_LineList *lines = ¶ms->line_infos[line_idx]; - for(DF_LineNode *n = lines->first; n != 0; n = n->next) + D_LineList *lines = ¶ms->line_infos[line_idx]; + for(D_LineNode *n = lines->first; n != 0; n = n->next) { S64 remap_line = n->v.pt.line; if(remap_line != line_num) @@ -11195,37 +11195,37 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m // rjf: click => remove breakpoint if(ui_clicked(bp_sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(bp); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RemoveBreakpoint)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(bp); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RemoveBreakpoint)); } // rjf: drag start if(ui_dragging(bp_sig) && !contains_2f32(bp_box->rect, ui_mouse())) { DF_DragDropPayload payload = {0}; - payload.entity = df_handle_from_entity(bp); + payload.entity = d_handle_from_entity(bp); df_drag_begin(&payload); } // rjf: bp right-click menu if(ui_right_clicked(bp_sig)) { - DF_Handle handle = df_handle_from_entity(bp); + D_Handle handle = d_handle_from_entity(bp); ui_ctx_menu_open(ws->entity_ctx_menu_key, bp_box->key, v2f32(0, bp_box->rect.y1-bp_box->rect.y0)); ws->entity_ctx_menu_entity = handle; } } //- rjf: build margin watch pin ui - for(DF_EntityNode *n = line_pins.first; n != 0; n = n->next) + for(D_EntityNode *n = line_pins.first; n != 0; n = n->next) { - DF_Entity *pin = n->entity; + D_Entity *pin = n->entity; Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Text); - if(pin->flags & DF_EntityFlag_HasColor) + if(pin->flags & D_EntityFlag_HasColor) { - color = df_rgba_from_entity(pin); + color = d_rgba_from_entity(pin); } // rjf: build box for watch @@ -11255,24 +11255,24 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m // rjf: click => remove pin if(ui_clicked(pin_sig)) { - DF_CmdParams params = df_cmd_params_from_window(ws); - params.entity = df_handle_from_entity(pin); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RemoveEntity)); + D_CmdParams params = df_cmd_params_from_window(ws); + params.entity = d_handle_from_entity(pin); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RemoveEntity)); } // rjf: drag start if(ui_dragging(pin_sig) && !contains_2f32(pin_box->rect, ui_mouse())) { DF_DragDropPayload payload = {0}; - payload.entity = df_handle_from_entity(pin); + payload.entity = d_handle_from_entity(pin); df_drag_begin(&payload); } // rjf: watch right-click menu if(ui_right_clicked(pin_sig)) { - DF_Handle handle = df_handle_from_entity(pin); + D_Handle handle = d_handle_from_entity(pin); ui_ctx_menu_open(ws->entity_ctx_menu_key, pin_box->key, v2f32(0, pin_box->rect.y1-pin_box->rect.y0)); ws->entity_ctx_menu_entity = handle; } @@ -11283,11 +11283,11 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m UI_Signal line_margin_sig = ui_signal_from_box(line_margin_box); if(ui_clicked(line_margin_sig)) { - DF_CmdParams p = df_cmd_params_from_window(ws); - p.file_path = df_interact_regs()->file_path; + D_CmdParams p = df_cmd_params_from_window(ws); + p.file_path = d_interact_regs()->file_path; p.text_point = txt_pt(line_num, 1); p.vaddr = params->line_vaddrs[line_idx]; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_AddBreakpoint)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_AddBreakpoint)); } } } @@ -11325,12 +11325,12 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m U64 best_stamp = 0; S64 line_info_line_num = 0; F32 line_info_t = selected_thread_module->alive_t; - DF_LineList *lines = ¶ms->line_infos[line_idx]; - for(DF_LineNode *n = lines->first; n != 0; n = n->next) + D_LineList *lines = ¶ms->line_infos[line_idx]; + for(D_LineNode *n = lines->first; n != 0; n = n->next) { if(n->v.dbgi_key.min_timestamp >= best_stamp) { - has_line_info = (n->v.pt.line == line_num || df_interact_regs()->file_path.size == 0); + has_line_info = (n->v.pt.line == line_num || d_interact_regs()->file_path.size == 0); line_info_line_num = n->v.pt.line; best_stamp = n->v.dbgi_key.min_timestamp; } @@ -11417,10 +11417,10 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m line_num < params->line_num_range.max; line_num += 1, line_idx += 1) { - DF_EntityList threads = params->line_ips[line_idx]; - for(DF_EntityNode *n = threads.first; n != 0; n = n->next) + D_EntityList threads = params->line_ips[line_idx]; + for(D_EntityNode *n = threads.first; n != 0; n = n->next) { - DF_Entity *thread = n->entity; + D_Entity *thread = n->entity; if(thread == stopper_thread && (stop_event.cause == CTRL_EventCause_InterruptedByException || stop_event.cause == CTRL_EventCause_InterruptedByTrap)) @@ -11453,22 +11453,22 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m line_num < params->line_num_range.max; line_num += 1, line_idx += 1) { - DF_EntityList pins = params->line_pins[line_idx]; + D_EntityList pins = params->line_pins[line_idx]; if(pins.count != 0) UI_Parent(line_extras_boxes[line_idx]) DF_Font(ws, DF_FontSlot_Code) UI_FontSize(params->font_size) UI_PrefHeight(ui_px(params->line_height_px, 1.f)) { - for(DF_EntityNode *n = pins.first; n != 0; n = n->next) + for(D_EntityNode *n = pins.first; n != 0; n = n->next) { - DF_Entity *pin = n->entity; + D_Entity *pin = n->entity; String8 pin_expr = pin->name; E_Eval eval = e_eval_from_string(scratch.arena, pin_expr); String8 eval_string = {0}; if(!e_type_key_match(e_type_key_zero(), eval.type_key)) { - DF_CfgTable cfg_table = {0}; - eval_string = df_value_string_from_eval(scratch.arena, DF_EvalVizStringFlag_ReadOnlyDisplayRules, 10, params->font, params->font_size, params->font_size*60.f, eval, 0, &cfg_table); + D_CfgTable cfg_table = {0}; + eval_string = df_value_string_from_eval(scratch.arena, D_EvalVizStringFlag_ReadOnlyDisplayRules, 10, params->font, params->font_size, params->font_size*60.f, eval, 0, &cfg_table); } ui_spacer(ui_em(1.5f, 1.f)); ui_set_next_pref_width(ui_children_sum(1)); @@ -11480,9 +11480,9 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m UI_Parent(pin_box) UI_PrefWidth(ui_text_dim(10, 1)) { Vec4F32 pin_color = df_rgba_from_theme_color(DF_ThemeColor_CodeDefault); - if(pin->flags & DF_EntityFlag_HasColor) + if(pin->flags & D_EntityFlag_HasColor) { - pin_color = df_rgba_from_entity(pin); + pin_color = d_rgba_from_entity(pin); } UI_PrefWidth(ui_em(1.5f, 1.f)) DF_Font(ws, DF_FontSlot_Icons) @@ -11494,13 +11494,13 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m if(ui_dragging(sig) && !contains_2f32(sig.box->rect, ui_mouse())) { DF_DragDropPayload payload = {0}; - payload.entity = df_handle_from_entity(pin); + payload.entity = d_handle_from_entity(pin); df_drag_begin(&payload); } if(ui_right_clicked(sig)) { ui_ctx_menu_open(ws->entity_ctx_menu_key, sig.box->key, v2f32(0, sig.box->rect.y1-sig.box->rect.y0)); - ws->entity_ctx_menu_entity = df_handle_from_entity(pin); + ws->entity_ctx_menu_entity = d_handle_from_entity(pin); } } df_code_label(0.8f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), pin_expr); @@ -11588,7 +11588,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m UI_Signal priority_margin_container_sig = ui_signal_from_box(priority_margin_container_box); 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); - DF_Entity *line_drag_entity = &df_g_nil_entity; + D_Entity *line_drag_entity = &d_nil_entity; { //- rjf: determine mouse drag range TxtRng mouse_drag_rng = txt_rng(mouse_pt, mouse_pt); @@ -11641,9 +11641,9 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m } ui_ctx_menu_open(ws->code_ctx_menu_key, ui_key_zero(), sub_2f32(ui_mouse(), v2f32(2, 2))); arena_clear(ws->code_ctx_menu_arena); - ws->code_ctx_menu_file_path = push_str8_copy(ws->code_ctx_menu_arena, df_interact_regs()->file_path); - ws->code_ctx_menu_text_key = df_interact_regs()->text_key; - ws->code_ctx_menu_lang_kind = df_interact_regs()->lang_kind; + ws->code_ctx_menu_file_path = push_str8_copy(ws->code_ctx_menu_arena, d_interact_regs()->file_path); + ws->code_ctx_menu_text_key = d_interact_regs()->text_key; + ws->code_ctx_menu_lang_kind = d_interact_regs()->lang_kind; ws->code_ctx_menu_range = txt_rng(*cursor, *mark); if(params->line_num_range.min <= cursor->line && cursor->line < params->line_num_range.max) { @@ -11651,7 +11651,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m } if(params->line_num_range.min <= cursor->line && cursor->line < params->line_num_range.max) { - ws->code_ctx_menu_lines = df_line_list_copy(ws->code_ctx_menu_arena, ¶ms->line_infos[cursor->line - params->line_num_range.min]); + ws->code_ctx_menu_lines = d_line_list_copy(ws->code_ctx_menu_arena, ¶ms->line_infos[cursor->line - params->line_num_range.min]); } } @@ -11660,10 +11660,10 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m if(df_drag_is_active() && contains_2f32(clipped_top_container_rect, ui_mouse())) { DF_DragDropPayload *payload = &df_g_drag_drop_payload; - DF_Entity *entity = df_entity_from_handle(payload->entity); - if(entity->kind == DF_EntityKind_Thread || - entity->kind == DF_EntityKind_WatchPin || - entity->kind == DF_EntityKind_Breakpoint) + D_Entity *entity = d_entity_from_handle(payload->entity); + if(entity->kind == D_EntityKind_Thread || + entity->kind == D_EntityKind_WatchPin || + entity->kind == D_EntityKind_Breakpoint) { line_drag_entity = entity; } @@ -11672,46 +11672,46 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m //- rjf: drop target is dropped -> process { DF_DragDropPayload payload = {0}; - if(!df_entity_is_nil(line_drag_entity) && df_drag_drop(&payload) && contains_1s64(params->line_num_range, mouse_pt.line)) + if(!d_entity_is_nil(line_drag_entity) && df_drag_drop(&payload) && contains_1s64(params->line_num_range, mouse_pt.line)) { - DF_Entity *dropped_entity = line_drag_entity; + D_Entity *dropped_entity = line_drag_entity; S64 line_num = mouse_pt.line; U64 line_idx = line_num - params->line_num_range.min; U64 line_vaddr = params->line_vaddrs[line_idx]; switch(dropped_entity->kind) { default:{}break; - case DF_EntityKind_Breakpoint: - case DF_EntityKind_WatchPin: + case D_EntityKind_Breakpoint: + case D_EntityKind_WatchPin: { - DF_CmdParams p = df_cmd_params_zero(); - p.entity = df_handle_from_entity(dropped_entity); - p.file_path = df_interact_regs()->file_path; + D_CmdParams p = d_cmd_params_zero(); + p.entity = d_handle_from_entity(dropped_entity); + p.file_path = d_interact_regs()->file_path; p.text_point = txt_pt(line_num, 1); p.vaddr = line_vaddr; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RelocateEntity)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_RelocateEntity)); }break; - case DF_EntityKind_Thread: + case D_EntityKind_Thread: { U64 new_rip_vaddr = line_vaddr; - if(df_interact_regs()->file_path.size != 0) + if(d_interact_regs()->file_path.size != 0) { - DF_LineList *lines = ¶ms->line_infos[line_idx]; - for(DF_LineNode *n = lines->first; n != 0; n = n->next) + D_LineList *lines = ¶ms->line_infos[line_idx]; + for(D_LineNode *n = lines->first; n != 0; n = n->next) { - DF_EntityList modules = df_modules_from_dbgi_key(scratch.arena, &n->v.dbgi_key); - DF_Entity *module = df_module_from_thread_candidates(dropped_entity, &modules); - if(!df_entity_is_nil(module)) + D_EntityList modules = d_modules_from_dbgi_key(scratch.arena, &n->v.dbgi_key); + D_Entity *module = d_module_from_thread_candidates(dropped_entity, &modules); + if(!d_entity_is_nil(module)) { - new_rip_vaddr = df_vaddr_from_voff(module, n->v.voff_range.min); + new_rip_vaddr = d_vaddr_from_voff(module, n->v.voff_range.min); break; } } } - DF_CmdParams p = df_cmd_params_from_window(ws); - p.entity = df_handle_from_entity(dropped_entity); + D_CmdParams p = df_cmd_params_from_window(ws); + p.entity = d_handle_from_entity(dropped_entity); p.vaddr = new_rip_vaddr; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SetThreadIP)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_SetThreadIP)); }break; } } @@ -11769,13 +11769,13 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m if(ui_hovering(text_container_sig) && contains_1s64(params->line_num_range, mouse_pt.line) && (ui_mouse().x - text_container_box->rect.x0 < params->line_num_width_px + line_num_padding_px)) { U64 line_slice_idx = mouse_pt.line-params->line_num_range.min; - DF_LineList *lines = ¶ms->line_infos[line_slice_idx]; - if(lines->first != 0 && (df_interact_regs()->file_path.size == 0 || lines->first->v.pt.line == mouse_pt.line)) + D_LineList *lines = ¶ms->line_infos[line_slice_idx]; + if(lines->first != 0 && (d_interact_regs()->file_path.size == 0 || lines->first->v.pt.line == mouse_pt.line)) { DF_RichHoverInfo info = {0}; - info.process = df_handle_from_entity(selected_thread_process); - info.vaddr_range = df_vaddr_range_from_voff_range(selected_thread_module, lines->first->v.voff_range); - info.module = df_handle_from_entity(selected_thread_module); + info.process = d_handle_from_entity(selected_thread_process); + info.vaddr_range = d_vaddr_range_from_voff_range(selected_thread_module, lines->first->v.voff_range); + info.module = d_handle_from_entity(selected_thread_module); info.dbgi_key = lines->first->v.dbgi_key; info.voff_range = lines->first->v.voff_range; df_set_rich_hover_info(&info); @@ -11796,29 +11796,29 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m U64 line_idx = mouse_pt.line-params->line_num_range.min; line_vaddr = params->line_vaddrs[line_idx]; } - df_set_hover_eval(ws, mouse_expr_baseline_pos, df_interact_regs()->file_path, mouse_pt, line_vaddr, mouse_expr); + df_set_hover_eval(ws, mouse_expr_baseline_pos, d_interact_regs()->file_path, mouse_pt, line_vaddr, mouse_expr); } } ////////////////////////////// //- rjf: dragging entity which applies to lines over this slice -> visualize // - if(!df_entity_is_nil(line_drag_entity) && contains_2f32(clipped_top_container_rect, ui_mouse())) + if(!d_entity_is_nil(line_drag_entity) && contains_2f32(clipped_top_container_rect, ui_mouse())) { Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_DropSiteOverlay); - if(line_drag_entity->flags & DF_EntityFlag_HasColor) + if(line_drag_entity->flags & D_EntityFlag_HasColor) { - color = df_rgba_from_entity(line_drag_entity); + color = d_rgba_from_entity(line_drag_entity); color.w /= 2; } - D_Bucket *bucket = d_bucket_make(); + DR_Bucket *bucket = dr_bucket_make(); D_BucketScope(bucket) { Rng2F32 drop_line_rect = r2f32p(top_container_box->rect.x0, top_container_box->rect.y0 + (mouse_pt.line - params->line_num_range.min) * params->line_height_px, top_container_box->rect.x1, top_container_box->rect.y0 + (mouse_pt.line - params->line_num_range.min + 1) * params->line_height_px); - R_Rect2DInst *inst = d_rect(pad_2f32(drop_line_rect, 8.f), color, 0, 0, 4.f); + R_Rect2DInst *inst = dr_rect(pad_2f32(drop_line_rect, 8.f), color, 0, 0, 4.f); inst->colors[Corner_10] = inst->colors[Corner_11] = v4f32(color.x, color.y, color.z, 0); } ui_box_equip_draw_bucket(text_container_box, bucket); @@ -11874,8 +11874,8 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m Rng1U64 rich_hover_voff_range = rich_hover.voff_range; if(rich_hover_voff_range.min == 0 && rich_hover_voff_range.max == 0) { - DF_Entity *module = df_entity_from_handle(rich_hover.module); - rich_hover_voff_range = df_voff_range_from_vaddr_range(module, rich_hover.vaddr_range); + D_Entity *module = d_entity_from_handle(rich_hover.module); + rich_hover_voff_range = d_voff_range_from_vaddr_range(module, rich_hover.vaddr_range); } ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f)); UI_WidthFill @@ -11902,15 +11902,15 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m } ui_set_next_tab_size(params->tab_size); UI_Box *line_box = ui_build_box_from_key(UI_BoxFlag_DisableTextTrunc|UI_BoxFlag_DrawText|UI_BoxFlag_DisableIDString, line_key); - D_Bucket *line_bucket = d_bucket_make(); - d_push_bucket(line_bucket); + DR_Bucket *line_bucket = dr_bucket_make(); + dr_push_bucket(line_bucket); // rjf: string * tokens -> fancy string list - D_FancyStringList line_fancy_strings = {0}; + DR_FancyStringList line_fancy_strings = {0}; { if(line_tokens->count == 0) { - D_FancyString fstr = + DR_FancyString fstr = { params->font, line_string, @@ -11919,7 +11919,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m 0, 0, }; - d_fancy_string_list_push(scratch.arena, &line_fancy_strings, &fstr); + dr_fancy_string_list_push(scratch.arena, &line_fancy_strings, &fstr); } else { @@ -11955,7 +11955,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m DI_Key dbgi_key = n->v; if(!mapped_special && token->kind == TXT_TokenKind_Identifier) { - U64 voff = df_voff_from_dbgi_key_symbol_name(&dbgi_key, token_string); + U64 voff = d_voff_from_dbgi_key_symbol_name(&dbgi_key, token_string); if(voff != 0) { mapped_special = 1; @@ -11965,7 +11965,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m } if(!mapped_special && token->kind == TXT_TokenKind_Identifier) { - U64 type_num = df_type_num_from_dbgi_key_name(&dbgi_key, token_string); + U64 type_num = d_type_num_from_dbgi_key_name(&dbgi_key, token_string); if(type_num != 0) { mapped_special = 1; @@ -12027,7 +12027,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m } // rjf: push fancy string - D_FancyString fstr = + DR_FancyString fstr = { params->font, token_string, @@ -12036,7 +12036,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m 0, 0, }; - d_fancy_string_list_push(scratch.arena, &line_fancy_strings, &fstr); + dr_fancy_string_list_push(scratch.arena, &line_fancy_strings, &fstr); } } } @@ -12077,7 +12077,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m { color.w *= 0.5f; } - d_rect(match_rect, color, 4.f, 0, 1.f); + dr_rect(match_rect, color, 4.f, 0, 1.f); needle_pos += 1; } } @@ -12126,7 +12126,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m color.w *= 0.5f; } F32 rounded_radius = params->font_size*0.4f; - R_Rect2DInst *inst = d_rect(select_rect, color, rounded_radius, 0, 1); + R_Rect2DInst *inst = dr_rect(select_rect, color, rounded_radius, 0, 1); inst->corner_radii[Corner_00] = !prev_line_good || select_range_in_prev_line.min.column > select_range_in_line.min.column ? rounded_radius : 0.f; inst->corner_radii[Corner_10] = (!prev_line_good || select_range_in_line.max.column > select_range_in_prev_line.max.column || select_range_in_line.max.column < select_range_in_prev_line.min.column) ? rounded_radius : 0.f; inst->corner_radii[Corner_01] = (!next_line_good || select_range_in_next_line.min.column > select_range_in_line.min.column || select_range_in_next_line.max.column < select_range_in_line.min.column) ? rounded_radius : 0.f; @@ -12149,17 +12149,17 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m ui_box_text_position(line_box).x+cursor_off_pixels+cursor_thickness/2.f, line_box->rect.y1+params->font_size*0.25f, }; - d_rect(cursor_rect, df_rgba_from_theme_color(is_focused ? DF_ThemeColor_Cursor : DF_ThemeColor_CursorInactive), 1.f, 0, 1.f); + dr_rect(cursor_rect, df_rgba_from_theme_color(is_focused ? DF_ThemeColor_Cursor : DF_ThemeColor_CursorInactive), 1.f, 0, 1.f); } // rjf: extra rendering for lines with line-info that match the hovered { B32 matches = 0; S64 line_info_line_num = 0; - DF_LineList *lines = ¶ms->line_infos[line_idx]; - for(DF_LineNode *n = lines->first; n != 0; n = n->next) + D_LineList *lines = ¶ms->line_infos[line_idx]; + for(D_LineNode *n = lines->first; n != 0; n = n->next) { - if((n->v.pt.line == line_num || df_interact_regs()->file_path.size == 0) && + if((n->v.pt.line == line_num || d_interact_regs()->file_path.size == 0) && ((di_key_match(&n->v.dbgi_key, &rich_hover.dbgi_key) && n->v.voff_range.min <= rich_hover_voff_range.min && rich_hover_voff_range.min < n->v.voff_range.max) || (params->line_vaddrs[line_idx] == rich_hover.vaddr_range.min && rich_hover.vaddr_range.min != 0))) @@ -12175,7 +12175,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m { Vec4F32 highlight_color = code_line_bgs[line_info_line_num % ArrayCount(code_line_bgs)]; highlight_color.w *= 0.25f; - d_rect(line_box->rect, highlight_color, 0, 0, 0); + dr_rect(line_box->rect, highlight_color, 0, 0, 0); } } @@ -12185,7 +12185,7 @@ df_code_slice(DF_Window *ws, DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *m ui_box_equip_draw_bucket(line_box, line_bucket); } - d_pop_bucket(); + dr_pop_bucket(); } } } @@ -12431,10 +12431,10 @@ df_label(String8 string) active_part_flags ^= StringPartFlag_Code; } } - D_FancyStringList fstrs = {0}; + DR_FancyStringList fstrs = {0}; for(StringPart *p = first_part; p != 0; p = p->next) { - D_FancyString fstr = {0}; + DR_FancyString fstr = {0}; { fstr.font = ui_top_font(); fstr.string = p->string; @@ -12446,7 +12446,7 @@ df_label(String8 string) fstr.color = df_rgba_from_theme_color(DF_ThemeColor_CodeDefault); } } - d_fancy_string_list_push(scratch.arena, &fstrs, &fstr); + dr_fancy_string_list_push(scratch.arena, &fstrs, &fstr); } UI_Box *box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); ui_box_equip_display_fancy_strings(box, &fstrs); @@ -12498,11 +12498,11 @@ df_help_label(String8 string) return result; } -internal D_FancyStringList +internal DR_FancyStringList df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string) { Temp scratch = scratch_begin(&arena, 1); - D_FancyStringList fancy_strings = {0}; + DR_FancyStringList fancy_strings = {0}; TXT_TokenArray tokens = txt_token_array_from_string__c_cpp(scratch.arena, 0, string); TXT_Token *tokens_opl = tokens.v+tokens.count; S32 indirection_counter = 0; @@ -12520,14 +12520,14 @@ df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_s { default: { - D_FancyString fancy_string = + DR_FancyString fancy_string = { ui_top_font(), token_string, token_color_rgba, ui_top_font_size() * (1.f - !!indirection_size_change*(indirection_counter/10.f)), }; - d_fancy_string_list_push(arena, &fancy_strings, &fancy_string); + dr_fancy_string_list_push(arena, &fancy_strings, &fancy_string); }break; case TXT_TokenKind_Identifier: { @@ -12539,22 +12539,22 @@ df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_s } else { - DF_Entity *module = df_entity_from_handle(df_interact_regs()->module); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - U64 symbol_voff = df_voff_from_dbgi_key_symbol_name(&dbgi_key, token_string); + D_Entity *module = d_entity_from_handle(d_interact_regs()->module); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + U64 symbol_voff = d_voff_from_dbgi_key_symbol_name(&dbgi_key, token_string); if(symbol_voff != 0) { color = df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol); } } - D_FancyString fancy_string = + DR_FancyString fancy_string = { ui_top_font(), token_string, color, ui_top_font_size() * (1.f - !!indirection_size_change*(indirection_counter/10.f)), }; - d_fancy_string_list_push(arena, &fancy_strings, &fancy_string); + dr_fancy_string_list_push(arena, &fancy_strings, &fancy_string); }break; case TXT_TokenKind_Numeric: { @@ -12600,14 +12600,14 @@ df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_s // rjf: push prefix { - D_FancyString fancy_string = + DR_FancyString fancy_string = { ui_top_font(), prefix, token_color_rgba, font_size, }; - d_fancy_string_list_push(arena, &fancy_strings, &fancy_string); + dr_fancy_string_list_push(arena, &fancy_strings, &fancy_string); } // rjf: push digit groups @@ -12623,14 +12623,14 @@ df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_s num_digits_passed = 0; if(start_idx < idx) { - D_FancyString fancy_string = + DR_FancyString fancy_string = { ui_top_font(), str8_substr(whole, r1u64(start_idx, idx)), odd ? token_color_rgba_alt : token_color_rgba, font_size, }; - d_fancy_string_list_push(arena, &fancy_strings, &fancy_string); + dr_fancy_string_list_push(arena, &fancy_strings, &fancy_string); start_idx = idx; odd ^= 1; } @@ -12644,14 +12644,14 @@ df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_s // rjf: push decimal { - D_FancyString fancy_string = + DR_FancyString fancy_string = { ui_top_font(), decimal, token_color_rgba, font_size, }; - d_fancy_string_list_push(arena, &fancy_strings, &fancy_string); + dr_fancy_string_list_push(arena, &fancy_strings, &fancy_string); } }break; @@ -12668,7 +12668,7 @@ internal UI_Box * df_code_label(F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string) { Temp scratch = scratch_begin(0, 0); - D_FancyStringList fancy_strings = df_fancy_string_list_from_code_string(scratch.arena, alpha, indirection_size_change, base_color, string); + DR_FancyStringList fancy_strings = df_fancy_string_list_from_code_string(scratch.arena, alpha, indirection_size_change, base_color, string); UI_Box *box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); ui_box_equip_display_fancy_strings(box, &fancy_strings); scratch_end(scratch); @@ -12950,15 +12950,15 @@ df_line_edit(DF_Window *ws, DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeLi F32 total_editstr_width = total_text_width - !!(flags & (DF_LineEditFlag_Expander|DF_LineEditFlag_ExpanderSpace|DF_LineEditFlag_ExpanderPlaceholder)) * expander_size_px; ui_set_next_pref_width(ui_px(total_editstr_width+ui_top_font_size()*2, 0.f)); UI_Box *editstr_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_DisableTextTrunc, "###editstr"); - D_FancyStringList code_fancy_strings = df_fancy_string_list_from_code_string(scratch.arena, 1.f, 0, ui_top_palette()->text, edit_string); + DR_FancyStringList code_fancy_strings = df_fancy_string_list_from_code_string(scratch.arena, 1.f, 0, ui_top_palette()->text, edit_string); if(autocomplete_hint_string.size != 0) { String8 query_word = df_autocomp_query_word_from_input_string_off(edit_string, cursor->column-1); String8 autocomplete_append_string = str8_skip(autocomplete_hint_string, query_word.size); U64 off = 0; U64 cursor_off = cursor->column-1; - D_FancyStringNode *prev_n = 0; - for(D_FancyStringNode *n = code_fancy_strings.first; n != 0; n = n->next) + DR_FancyStringNode *prev_n = 0; + for(DR_FancyStringNode *n = code_fancy_strings.first; n != 0; n = n->next) { if(off <= cursor_off && cursor_off <= off+n->v.string.size) { @@ -12968,8 +12968,8 @@ df_line_edit(DF_Window *ws, DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeLi off += n->v.string.size; } { - D_FancyStringNode *autocomp_fstr_n = push_array(scratch.arena, D_FancyStringNode, 1); - D_FancyString *fstr = &autocomp_fstr_n->v; + DR_FancyStringNode *autocomp_fstr_n = push_array(scratch.arena, DR_FancyStringNode, 1); + DR_FancyString *fstr = &autocomp_fstr_n->v; fstr->font = ui_top_font(); fstr->string = autocomplete_append_string; fstr->color = ui_top_palette()->text; @@ -12999,8 +12999,8 @@ df_line_edit(DF_Window *ws, DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeLi if(chop_amt != 0) { String8 post_cursor = str8_skip(full_string, cursor_off - off); - D_FancyStringNode *post_fstr_n = push_array(scratch.arena, D_FancyStringNode, 1); - D_FancyString *post_fstr = &post_fstr_n->v; + DR_FancyStringNode *post_fstr_n = push_array(scratch.arena, DR_FancyStringNode, 1); + DR_FancyString *post_fstr = &post_fstr_n->v; MemoryCopyStruct(post_fstr, &prev_n->v); post_fstr->string = post_cursor; if(autocomp_fstr_n->next == 0) @@ -13119,7 +13119,7 @@ df_gfx_request_frame(void) #endif internal void -df_gfx_init(OS_WindowRepaintFunctionType *window_repaint_entry_point, DF_StateDeltaHistory *hist) +df_gfx_init(OS_WindowRepaintFunctionType *window_repaint_entry_point, D_StateDeltaHistory *hist) { ProfBeginFunction(); Arena *arena = arena_alloc(); @@ -13132,7 +13132,7 @@ df_gfx_init(OS_WindowRepaintFunctionType *window_repaint_entry_point, DF_StateDe df_gfx_state->view_spec_table_size = 256; df_gfx_state->view_spec_table = push_array(arena, DF_ViewSpec *, df_gfx_state->view_spec_table_size); df_gfx_state->view_rule_spec_table_size = 1024; - df_gfx_state->view_rule_spec_table = push_array(arena, DF_GfxViewRuleSpec *, df_state->view_rule_spec_table_size); + df_gfx_state->view_rule_spec_table = push_array(arena, DF_GfxViewRuleSpec *, d_state->view_rule_spec_table_size); df_gfx_state->view_rule_block_slots_count = 1024; df_gfx_state->view_rule_block_slots = push_array(arena, DF_ViewRuleBlockSlot, df_gfx_state->view_rule_block_slots_count); df_gfx_state->string_search_arena = arena_alloc(); @@ -13159,12 +13159,12 @@ df_gfx_init(OS_WindowRepaintFunctionType *window_repaint_entry_point, DF_StateDe { for(U64 idx = 0; idx < ArrayCount(df_g_cmd_param_slot_2_view_spec_src_map); idx += 1) { - DF_CmdParamSlot slot = df_g_cmd_param_slot_2_view_spec_src_map[idx]; + D_CmdParamSlot slot = df_g_cmd_param_slot_2_view_spec_src_map[idx]; String8 view_spec_name = df_g_cmd_param_slot_2_view_spec_dst_map[idx]; String8 cmd_spec_name = df_g_cmd_param_slot_2_view_spec_cmd_map[idx]; DF_ViewSpec *view_spec = df_view_spec_from_string(view_spec_name); - DF_CmdSpec *cmd_spec = cmd_spec_name.size != 0 ? df_cmd_spec_from_string(cmd_spec_name) : &df_g_nil_cmd_spec; - DF_CmdParamSlotViewSpecRuleNode *n = push_array(df_gfx_state->arena, DF_CmdParamSlotViewSpecRuleNode, 1); + D_CmdSpec *cmd_spec = cmd_spec_name.size != 0 ? d_cmd_spec_from_string(cmd_spec_name) : &d_nil_cmd_spec; + D_CmdParamSlotViewSpecRuleNode *n = push_array(df_gfx_state->arena, D_CmdParamSlotViewSpecRuleNode, 1); n->view_spec = view_spec; n->cmd_spec = cmd_spec; SLLQueuePush(df_gfx_state->cmd_param_slot_view_spec_table[slot].first, df_gfx_state->cmd_param_slot_view_spec_table[slot].last, n); @@ -13242,7 +13242,7 @@ df_gfx_init(OS_WindowRepaintFunctionType *window_repaint_entry_point, DF_StateDe } internal void -df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) +df_gfx_begin_frame(Arena *arena, D_CmdList *cmds) { ProfBeginFunction(); arena_clear(df_gfx_state->rich_hover_info_current_arena); @@ -13253,7 +13253,7 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) //- rjf: animate confirmation { - F32 rate = df_setting_val_from_code(0, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-10.f * df_dt())) : 1.f; + F32 rate = df_setting_val_from_code(0, DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-10.f * d_dt())) : 1.f; B32 confirm_open = df_gfx_state->confirm_active; df_gfx_state->confirm_t += rate * ((F32)!!confirm_open-df_gfx_state->confirm_t); if(abs_f32(df_gfx_state->confirm_t - (F32)!!confirm_open) > 0.005f) @@ -13270,65 +13270,65 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) //- rjf: process top-level graphical commands { - B32 cfg_write_done[DF_CfgSrc_COUNT] = {0}; + B32 cfg_write_done[D_CfgSrc_COUNT] = {0}; Temp scratch = scratch_begin(&arena, 1); - for(DF_CmdNode *cmd_node = cmds->first; + for(D_CmdNode *cmd_node = cmds->first; cmd_node != 0; cmd_node = cmd_node->next) { temp_end(scratch); // rjf: unpack command - DF_Cmd *cmd = &cmd_node->cmd; - DF_CmdParams params = cmd->params; - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); + D_Cmd *cmd = &cmd_node->cmd; + D_CmdParams params = cmd->params; + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); // rjf: request frame df_gfx_request_frame(); // rjf: process command - DF_CfgSrc cfg_src = (DF_CfgSrc)0; + D_CfgSrc cfg_src = (D_CfgSrc)0; switch(core_cmd_kind) { default:{}break; //- rjf: exiting - case DF_CoreCmdKind_Exit: + case D_CmdKind_Exit: { // rjf: save { - DF_CmdParams params = df_cmd_params_zero(); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_WriteUserData)); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_WriteProjectData)); + D_CmdParams params = d_cmd_params_zero(); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_WriteUserData)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_WriteProjectData)); df_gfx_state->last_window_queued_save = 1; } // rjf: close all windows for(DF_Window *window = df_gfx_state->first_window; window != 0; window = window->next) { - DF_CmdParams params = df_cmd_params_from_window(window); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseWindow)); + D_CmdParams params = df_cmd_params_from_window(window); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CloseWindow)); } }break; //- rjf: errors - case DF_CoreCmdKind_Error: + case D_CmdKind_Error: { DF_Window *window = df_window_from_handle(params.window); if(window == 0) { for(DF_Window *w = df_gfx_state->first_window; w != 0; w = w->next) { - DF_CmdParams p = df_cmd_params_from_window(w); + D_CmdParams p = df_cmd_params_from_window(w); p.string = push_str8_copy(arena, params.string); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Error)); } } }break; //- rjf: windows - case DF_CoreCmdKind_OpenWindow: + case D_CmdKind_OpenWindow: { DF_Window *originating_window = df_window_from_handle(params.window); if(originating_window == 0) @@ -13336,18 +13336,18 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) originating_window = df_gfx_state->first_window; } OS_Handle preferred_monitor = {0}; - DF_Window *new_ws = df_window_open(v2f32(1280, 720), preferred_monitor, DF_CfgSrc_User); + DF_Window *new_ws = df_window_open(v2f32(1280, 720), preferred_monitor, D_CfgSrc_User); if(originating_window) { MemoryCopy(new_ws->setting_vals, originating_window->setting_vals, sizeof(DF_SettingVal)*DF_SettingCode_COUNT); } }break; - case DF_CoreCmdKind_CloseWindow: + case D_CmdKind_CloseWindow: { DF_Window *ws = df_window_from_handle(params.window); if(ws != 0) { - DF_EntityList running_processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); + D_EntityList running_processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); // NOTE(rjf): if this is the last window, and targets are running, but // this command is not force-confirmed, then we should query the user @@ -13363,10 +13363,10 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) df_gfx_state->confirm_msg = push_str8f(df_gfx_state->confirm_arena, "The debugger is still attached to %slive process%s.", running_processes.count == 1 ? "a " : "", running_processes.count == 1 ? "" : "es"); - DF_CmdParams p = df_cmd_params_from_window(ws); + D_CmdParams p = df_cmd_params_from_window(ws); p.force_confirm = 1; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_ForceConfirm); - df_cmd_list_push(df_gfx_state->confirm_arena, &df_gfx_state->confirm_cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseWindow)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_ForceConfirm); + d_cmd_list_push(df_gfx_state->confirm_arena, &df_gfx_state->confirm_cmds, &p, d_cmd_spec_from_kind(D_CmdKind_CloseWindow)); } // NOTE(rjf): if this is the last window, and it is being closed, then @@ -13376,11 +13376,11 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) { df_gfx_state->last_window_queued_save = 1; { - DF_CmdParams params = df_cmd_params_zero(); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_WriteUserData)); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_WriteProjectData)); + D_CmdParams params = d_cmd_params_zero(); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_WriteUserData)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_WriteProjectData)); } - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseWindow)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CloseWindow)); } // NOTE(rjf): if this is the last window and we've queued the final autosave, @@ -13394,7 +13394,7 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) df_panel_release_all_views(panel); } - df_state_delta_history_release(ws->view_state_hist); + d_state_delta_history_release(ws->view_state_hist); ui_state_release(ws->ui); DLLRemove(df_gfx_state->first_window, df_gfx_state->last_window, ws); r_window_unequip(ws->os, ws->r); @@ -13409,7 +13409,7 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) } } }break; - case DF_CoreCmdKind_ToggleFullscreen: + case D_CmdKind_ToggleFullscreen: { DF_Window *window = df_window_from_handle(params.window); if(window != 0) @@ -13419,16 +13419,16 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) }break; //- rjf: confirmations - case DF_CoreCmdKind_ConfirmAccept: + case D_CmdKind_ConfirmAccept: { df_gfx_state->confirm_active = 0; df_gfx_state->confirm_key = ui_key_zero(); - for(DF_CmdNode *n = df_gfx_state->confirm_cmds.first; n != 0; n = n->next) + for(D_CmdNode *n = df_gfx_state->confirm_cmds.first; n != 0; n = n->next) { - df_push_cmd__root(&n->cmd.params, n->cmd.spec); + d_push_cmd__root(&n->cmd.params, n->cmd.spec); } }break; - case DF_CoreCmdKind_ConfirmCancel: + case D_CmdKind_ConfirmCancel: { df_gfx_state->confirm_active = 0; df_gfx_state->confirm_key = ui_key_zero(); @@ -13436,8 +13436,8 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) //- rjf: commands with implications for graphical systems, but generated // without context needed - pick selected window & dispatch - case DF_CoreCmdKind_SelectThread: - case DF_CoreCmdKind_FindThread: + case D_CmdKind_SelectThread: + case D_CmdKind_FindThread: { DF_Window *window = df_window_from_handle(params.window); if(window == 0) @@ -13454,30 +13454,30 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) { os_window_bring_to_front(window->os); os_window_focus(window->os); - DF_CmdParams p = params; + D_CmdParams p = params; p.window = df_handle_from_window(window); p.panel = df_handle_from_panel(window->focused_panel); p.view = df_handle_from_view(df_selected_tab_from_panel(window->focused_panel)); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Window); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Panel); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_View); - df_cmd_list_push(arena, cmds, &p, cmd->spec); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Window); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Panel); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_View); + d_cmd_list_push(arena, cmds, &p, cmd->spec); } } }break; //- rjf: loading/applying stateful config changes - case DF_CoreCmdKind_ApplyUserData: - case DF_CoreCmdKind_ApplyProjectData: + case D_CmdKind_ApplyUserData: + case D_CmdKind_ApplyProjectData: { - DF_CfgTable *table = df_cfg_table(); + D_CfgTable *table = d_cfg_table(); OS_HandleArray monitors = os_push_monitors_array(scratch.arena); //- rjf: get src - DF_CfgSrc src = DF_CfgSrc_User; - for(DF_CfgSrc s = (DF_CfgSrc)0; s < DF_CfgSrc_COUNT; s = (DF_CfgSrc)(s+1)) + D_CfgSrc src = D_CfgSrc_User; + for(D_CfgSrc s = (D_CfgSrc)0; s < D_CfgSrc_COUNT; s = (D_CfgSrc)(s+1)) { - if(core_cmd_kind == df_g_cfg_src_apply_cmd_kind_table[s]) + if(core_cmd_kind == d_cfg_src_apply_cmd_kind_table[s]) { src = s; break; @@ -13485,7 +13485,7 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) } //- rjf: get paths - String8 cfg_path = df_cfg_path_from_src(src); + String8 cfg_path = d_cfg_path_from_src(src); String8 cfg_folder = str8_chop_last_slash(cfg_path); //- rjf: eliminate all windows @@ -13495,8 +13495,8 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) { continue; } - DF_CmdParams params = df_cmd_params_from_window(window); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseWindow)); + D_CmdParams params = df_cmd_params_from_window(window); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CloseWindow)); } //- rjf: apply fonts @@ -13509,8 +13509,8 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) }; MemoryZeroArray(df_gfx_state->cfg_font_tags); { - DF_CfgVal *code_font_val = df_cfg_val_from_string(table, str8_lit("code_font")); - DF_CfgVal *main_font_val = df_cfg_val_from_string(table, str8_lit("main_font")); + D_CfgVal *code_font_val = d_cfg_val_from_string(table, str8_lit("code_font")); + D_CfgVal *main_font_val = d_cfg_val_from_string(table, str8_lit("main_font")); MD_Node *code_font_node = code_font_val->last->root; MD_Node *main_font_node = main_font_val->last->root; String8 code_font_relative_path = code_font_node->first->string; @@ -13546,9 +13546,9 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) } //- rjf: build windows & panel layouts - DF_CfgVal *windows = df_cfg_val_from_string(table, str8_lit("window")); - for(DF_CfgTree *window_tree = windows->first; - window_tree != &df_g_nil_cfg_tree; + D_CfgVal *windows = d_cfg_val_from_string(table, str8_lit("window")); + for(D_CfgTree *window_tree = windows->first; + window_tree != &d_nil_cfg_tree; window_tree = window_tree->next) { // rjf: skip wrong source @@ -13740,12 +13740,12 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) String8 view_query = str8_lit(""); { String8 escaped_query = md_child_from_string(op, str8_lit("query"), 0)->first->string; - view_query = df_cfg_raw_from_escaped_string(scratch.arena, escaped_query); + view_query = d_cfg_raw_from_escaped_string(scratch.arena, escaped_query); } // rjf: convert file queries from relative to absolute { - String8 query_file_path = df_file_path_from_eval_string(scratch.arena, view_query); + String8 query_file_path = d_file_path_from_eval_string(scratch.arena, view_query); if(query_file_path.size != 0) { query_file_path = path_absolute_dst_from_relative_dst_src(scratch.arena, query_file_path, cfg_folder); @@ -13834,18 +13834,18 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) } //- rjf: apply keybindings - if(src == DF_CfgSrc_User) + if(src == D_CfgSrc_User) { df_clear_bindings(); } - DF_CfgVal *keybindings = df_cfg_val_from_string(table, str8_lit("keybindings")); - for(DF_CfgTree *keybinding_set = keybindings->first; - keybinding_set != &df_g_nil_cfg_tree; + D_CfgVal *keybindings = d_cfg_val_from_string(table, str8_lit("keybindings")); + for(D_CfgTree *keybinding_set = keybindings->first; + keybinding_set != &d_nil_cfg_tree; keybinding_set = keybinding_set->next) { for(MD_EachNode(keybind, keybinding_set->root->first)) { - DF_CmdSpec *cmd_spec = &df_g_nil_cmd_spec; + D_CmdSpec *cmd_spec = &d_nil_cmd_spec; OS_Key key = OS_Key_Null; MD_Node *ctrl_node = &md_nil_node; MD_Node *shift_node = &md_nil_node; @@ -13866,16 +13866,16 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) } else { - DF_CmdSpec *spec = df_cmd_spec_from_string(child->string); + D_CmdSpec *spec = d_cmd_spec_from_string(child->string); for(U64 idx = 0; idx < ArrayCount(df_g_binding_version_remap_old_name_table); idx += 1) { if(str8_match(df_g_binding_version_remap_old_name_table[idx], child->string, StringMatchFlag_CaseInsensitive)) { String8 new_name = df_g_binding_version_remap_new_name_table[idx]; - spec = df_cmd_spec_from_string(new_name); + spec = d_cmd_spec_from_string(new_name); } } - if(!df_cmd_spec_is_nil(spec)) + if(!d_cmd_spec_is_nil(spec)) { cmd_spec = spec; } @@ -13886,7 +13886,7 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) } } } - if(!df_cmd_spec_is_nil(cmd_spec) && key != OS_Key_Null) + if(!d_cmd_spec_is_nil(cmd_spec) && key != OS_Key_Null) { OS_EventFlags flags = 0; if(!md_node_is_nil(ctrl_node)) { flags |= OS_EventFlag_Ctrl; } @@ -13903,9 +13903,9 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) MemoryCopy(df_gfx_state->cfg_theme.colors, df_g_theme_preset_colors__default_dark, sizeof(df_g_theme_preset_colors__default_dark)); //- rjf: apply theme presets - DF_CfgVal *color_preset = df_cfg_val_from_string(table, str8_lit("color_preset")); + D_CfgVal *color_preset = d_cfg_val_from_string(table, str8_lit("color_preset")); B32 preset_applied = 0; - if(color_preset != &df_g_nil_cfg_val) + if(color_preset != &d_nil_cfg_val) { String8 color_preset_name = color_preset->last->root->first->string; DF_ThemePreset preset = (DF_ThemePreset)0; @@ -13929,9 +13929,9 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) //- rjf: apply individual theme colors B8 theme_color_hit[DF_ThemeColor_COUNT] = {0}; - DF_CfgVal *colors = df_cfg_val_from_string(table, str8_lit("colors")); - for(DF_CfgTree *colors_set = colors->first; - colors_set != &df_g_nil_cfg_tree; + D_CfgVal *colors = d_cfg_val_from_string(table, str8_lit("colors")); + for(D_CfgTree *colors_set = colors->first; + colors_set != &d_nil_cfg_tree; colors_set = colors_set->next) { for(MD_EachNode(color, colors_set->root->first)) @@ -13967,7 +13967,7 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) try_u64_from_str8_c_rules(hex_string, &hex_val); Vec4F32 color_rgba = rgba_from_u32((U32)hex_val); df_gfx_state->cfg_theme_target.colors[color_code] = color_rgba; - if(df_frame_index() <= 2) + if(d_frame_index() <= 2) { df_gfx_state->cfg_theme.colors[color_code] = color_rgba; } @@ -14030,8 +14030,8 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) for(EachEnumVal(DF_SettingCode, code)) { String8 name = df_g_setting_code_lower_string_table[code]; - DF_CfgVal *code_cfg_val = df_cfg_val_from_string(table, name); - DF_CfgTree *code_tree = code_cfg_val->last; + D_CfgVal *code_cfg_val = d_cfg_val_from_string(table, name); + D_CfgTree *code_tree = code_cfg_val->last; if(code_tree->source == src) { MD_Node *val_node = code_tree->root->first; @@ -14046,7 +14046,7 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) } //- rjf: if config applied 0 settings, we need to do some sensible default - if(src == DF_CfgSrc_User) + if(src == D_CfgSrc_User) { for(EachEnumVal(DF_SettingCode, code)) { @@ -14058,47 +14058,47 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) } //- rjf: if config opened 0 windows, we need to do some sensible default - if(src == DF_CfgSrc_User && windows->first == &df_g_nil_cfg_tree) + if(src == D_CfgSrc_User && windows->first == &d_nil_cfg_tree) { OS_Handle preferred_monitor = os_primary_monitor(); Vec2F32 monitor_dim = os_dim_from_monitor(preferred_monitor); Vec2F32 window_dim = v2f32(monitor_dim.x*4/5, monitor_dim.y*4/5); - DF_Window *ws = df_window_open(window_dim, preferred_monitor, DF_CfgSrc_User); - DF_CmdParams blank_params = df_cmd_params_from_window(ws); + DF_Window *ws = df_window_open(window_dim, preferred_monitor, D_CfgSrc_User); + D_CmdParams blank_params = df_cmd_params_from_window(ws); if(monitor_dim.x < 1920) { - df_cmd_list_push(arena, cmds, &blank_params, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ResetToCompactPanels)); + d_cmd_list_push(arena, cmds, &blank_params, d_cmd_spec_from_kind(D_CmdKind_ResetToCompactPanels)); } else { - df_cmd_list_push(arena, cmds, &blank_params, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ResetToDefaultPanels)); + d_cmd_list_push(arena, cmds, &blank_params, d_cmd_spec_from_kind(D_CmdKind_ResetToDefaultPanels)); } } //- rjf: if config bound 0 keys, we need to do some sensible default - if(src == DF_CfgSrc_User && df_gfx_state->key_map_total_count == 0) + if(src == D_CfgSrc_User && df_gfx_state->key_map_total_count == 0) { for(U64 idx = 0; idx < ArrayCount(df_g_default_binding_table); idx += 1) { DF_StringBindingPair *pair = &df_g_default_binding_table[idx]; - DF_CmdSpec *cmd_spec = df_cmd_spec_from_string(pair->string); + D_CmdSpec *cmd_spec = d_cmd_spec_from_string(pair->string); df_bind_spec(cmd_spec, pair->binding); } } //- rjf: always ensure that the meta controls have bindings - if(src == DF_CfgSrc_User) + if(src == D_CfgSrc_User) { struct { - DF_CmdSpec *spec; + D_CmdSpec *spec; OS_Key fallback_key; } meta_ctrls[] = { - { df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Edit), OS_Key_F2 }, - { df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Accept), OS_Key_Return }, - { df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Cancel), OS_Key_Esc }, + { d_cmd_spec_from_kind(D_CmdKind_Edit), OS_Key_F2 }, + { d_cmd_spec_from_kind(D_CmdKind_Accept), OS_Key_Return }, + { d_cmd_spec_from_kind(D_CmdKind_Cancel), OS_Key_Esc }, }; for(U64 idx = 0; idx < ArrayCount(meta_ctrls); idx += 1) { @@ -14113,13 +14113,13 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) }break; //- rjf: writing config changes - case DF_CoreCmdKind_WriteUserData: - case DF_CoreCmdKind_WriteProjectData: + case D_CmdKind_WriteUserData: + case D_CmdKind_WriteProjectData: { - DF_CfgSrc src = DF_CfgSrc_User; - for(DF_CfgSrc s = (DF_CfgSrc)0; s < DF_CfgSrc_COUNT; s = (DF_CfgSrc)(s+1)) + D_CfgSrc src = D_CfgSrc_User; + for(D_CfgSrc s = (D_CfgSrc)0; s < D_CfgSrc_COUNT; s = (D_CfgSrc)(s+1)) { - if(core_cmd_kind == df_g_cfg_src_write_cmd_kind_table[s]) + if(core_cmd_kind == d_cfg_src_write_cmd_kind_table[s]) { src = s; break; @@ -14128,35 +14128,35 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) if(cfg_write_done[src] == 0) { cfg_write_done[src] = 1; - String8 path = df_cfg_path_from_src(src); + String8 path = d_cfg_path_from_src(src); String8List strs = df_cfg_strings_from_gfx(scratch.arena, path, src); String8 data = str8_list_join(scratch.arena, &strs, 0); String8 data_indented = indented_from_string(scratch.arena, data); - df_cfg_push_write_string(src, data_indented); + d_cfg_push_write_string(src, data_indented); } }break; //- rjf: code navigation - case DF_CoreCmdKind_FindTextForward: - case DF_CoreCmdKind_FindTextBackward: + case D_CmdKind_FindTextForward: + case D_CmdKind_FindTextBackward: { df_set_search_string(params.string); }break; //- rjf: find next and find prev - case DF_CoreCmdKind_FindNext: + case D_CmdKind_FindNext: { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = df_push_search_string(scratch.arena); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindTextForward)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_FindTextForward)); }break; - case DF_CoreCmdKind_FindPrev: + case D_CmdKind_FindPrev: { - DF_CmdParams p = params; + D_CmdParams p = params; p.string = df_push_search_string(scratch.arena); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindTextBackward)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_FindTextBackward)); }break; } } @@ -14167,7 +14167,7 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) { DF_Theme *current = &df_gfx_state->cfg_theme; DF_Theme *target = &df_gfx_state->cfg_theme_target; - F32 rate = 1 - pow_f32(2, (-50.f * df_dt())); + F32 rate = 1 - pow_f32(2, (-50.f * d_dt())); for(DF_ThemeColor color = DF_ThemeColor_Null; color < DF_ThemeColor_COUNT; color = (DF_ThemeColor)(color+1)) @@ -14188,8 +14188,8 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds) //- rjf: animate alive-transitions for entities { - F32 rate = 1.f - pow_f32(2.f, -20.f*df_dt()); - for(DF_Entity *e = df_entity_root(); !df_entity_is_nil(e); e = df_entity_rec_df_pre(e, df_entity_root()).next) + F32 rate = 1.f - pow_f32(2.f, -20.f*d_dt()); + for(D_Entity *e = d_entity_root(); !d_entity_is_nil(e); e = d_entity_rec_df_pre(e, d_entity_root()).next) { F32 diff = (1.f - e->alive_t); e->alive_t += diff * rate; diff --git a/src/df/gfx/df_gfx.h b/src/dbg_gfx/dbg_gfx_core.h similarity index 84% rename from src/df/gfx/df_gfx.h rename to src/dbg_gfx/dbg_gfx_core.h index d7066f65..75837464 100644 --- a/src/df/gfx/df_gfx.h +++ b/src/dbg_gfx/dbg_gfx_core.h @@ -1,8 +1,8 @@ // Copyright (c) 2024 Epic Games Tools // Licensed under the MIT license (https://opensource.org/license/mit/) -#ifndef DF_GFX_H -#define DF_GFX_H +#ifndef DBG_GFX_CORE_H +#define DBG_GFX_CORE_H //////////////////////////////// //~ rjf: Basic Types @@ -55,7 +55,7 @@ struct DF_KeyMapNode { DF_KeyMapNode *hash_next; DF_KeyMapNode *hash_prev; - DF_CmdSpec *spec; + D_CmdSpec *spec; DF_Binding binding; }; @@ -88,7 +88,7 @@ typedef struct DF_Window DF_Window; #define DF_VIEW_SETUP_FUNCTION_DEF(name) internal DF_VIEW_SETUP_FUNCTION_SIG(DF_VIEW_SETUP_FUNCTION_NAME(name)) typedef DF_VIEW_SETUP_FUNCTION_SIG(DF_ViewSetupFunctionType); -#define DF_VIEW_CMD_FUNCTION_SIG(name) void name(struct DF_Window *ws, struct DF_Panel *panel, struct DF_View *view, MD_Node *params, String8 string, struct DF_CmdList *cmds) +#define DF_VIEW_CMD_FUNCTION_SIG(name) void name(struct DF_Window *ws, struct DF_Panel *panel, struct DF_View *view, MD_Node *params, String8 string, struct D_CmdList *cmds) #define DF_VIEW_CMD_FUNCTION_NAME(name) df_view_cmds_##name #define DF_VIEW_CMD_FUNCTION_DEF(name) internal DF_VIEW_CMD_FUNCTION_SIG(DF_VIEW_CMD_FUNCTION_NAME(name)) typedef DF_VIEW_CMD_FUNCTION_SIG(DF_ViewCmdFunctionType); @@ -138,19 +138,19 @@ struct DF_ViewSpecInfoArray U64 count; }; -typedef struct DF_CmdParamSlotViewSpecRuleNode DF_CmdParamSlotViewSpecRuleNode; -struct DF_CmdParamSlotViewSpecRuleNode +typedef struct D_CmdParamSlotViewSpecRuleNode D_CmdParamSlotViewSpecRuleNode; +struct D_CmdParamSlotViewSpecRuleNode { - DF_CmdParamSlotViewSpecRuleNode *next; + D_CmdParamSlotViewSpecRuleNode *next; DF_ViewSpec *view_spec; - DF_CmdSpec *cmd_spec; + D_CmdSpec *cmd_spec; }; -typedef struct DF_CmdParamSlotViewSpecRuleList DF_CmdParamSlotViewSpecRuleList; -struct DF_CmdParamSlotViewSpecRuleList +typedef struct D_CmdParamSlotViewSpecRuleList D_CmdParamSlotViewSpecRuleList; +struct D_CmdParamSlotViewSpecRuleList { - DF_CmdParamSlotViewSpecRuleNode *first; - DF_CmdParamSlotViewSpecRuleNode *last; + D_CmdParamSlotViewSpecRuleNode *first; + D_CmdParamSlotViewSpecRuleNode *last; U64 count; }; @@ -169,7 +169,7 @@ struct DF_TransientViewNode { DF_TransientViewNode *next; DF_TransientViewNode *prev; - DF_ExpandKey key; + D_ExpandKey key; DF_View *view; Arena *initial_params_arena; MD_Node *initial_params; @@ -283,7 +283,7 @@ struct DF_Panel DF_View *first_tab_view; DF_View *last_tab_view; U64 tab_view_count; - DF_Handle selected_tab_view; + D_Handle selected_tab_view; }; typedef struct DF_PanelRec DF_PanelRec; @@ -310,9 +310,9 @@ typedef struct DF_DragDropPayload DF_DragDropPayload; struct DF_DragDropPayload { UI_Key key; - DF_Handle panel; - DF_Handle view; - DF_Handle entity; + D_Handle panel; + D_Handle view; + D_Handle entity; TxtPt text_point; }; @@ -322,9 +322,9 @@ struct DF_DragDropPayload typedef struct DF_RichHoverInfo DF_RichHoverInfo; struct DF_RichHoverInfo { - DF_Handle process; + D_Handle process; Rng1U64 vaddr_range; - DF_Handle module; + D_Handle module; Rng1U64 voff_range; DI_Key dbgi_key; }; @@ -349,7 +349,7 @@ enum #define DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(name) df_gfx_view_rule_line_stringize__##name #define DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(name) internal DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_SIG(DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(name)) -#define DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_SIG(name) void name(struct DF_Window *ws, DF_ExpandKey key, MD_Node *params, String8 string) +#define DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_SIG(name) void name(struct DF_Window *ws, D_ExpandKey key, MD_Node *params, String8 string) #define DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(name) df_gfx_view_rule_row_ui__##name #define DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(name) DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_SIG(DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(name)) @@ -384,7 +384,7 @@ struct DF_GfxViewRuleSpec //////////////////////////////// //~ rjf: Generated Code -#include "generated/df_gfx.meta.h" +#include "generated/dbg_gfx.meta.h" //////////////////////////////// //~ rjf: Theme Types @@ -461,11 +461,11 @@ struct DF_CodeSliceParams String8 *line_text; Rng1U64 *line_ranges; TXT_TokenArray *line_tokens; - DF_EntityList *line_bps; - DF_EntityList *line_ips; - DF_EntityList *line_pins; + D_EntityList *line_bps; + D_EntityList *line_ips; + D_EntityList *line_pins; U64 *line_vaddrs; - DF_LineList *line_infos; + D_LineList *line_infos; DI_KeyList relevant_dbgi_keys; // rjf: visual parameters @@ -489,7 +489,7 @@ struct DF_CodeSliceSignal TxtRng mouse_expr_rng; Vec2F32 mouse_expr_baseline_pos; S64 clicked_margin_line_num; - DF_Entity *dropped_entity; + D_Entity *dropped_entity; S64 dropped_entity_line_num; TxtRng copy_range; B32 toggle_cursor_watch; @@ -566,7 +566,7 @@ struct DF_Window DF_Window *prev; U64 gen; U64 frames_alive; - DF_CfgSrc cfg_src; + D_CfgSrc cfg_src; // rjf: top-level info & handles Arena *arena; @@ -581,7 +581,7 @@ struct DF_Window UI_Palette cfg_palettes[DF_PaletteCode_COUNT]; // derivative from theme // rjf: view state delta history - DF_StateDeltaHistory *view_state_hist; + D_StateDeltaHistory *view_state_hist; // rjf: dev interface state B32 dev_menu_is_open; @@ -600,11 +600,11 @@ struct DF_Window TXT_LangKind code_ctx_menu_lang_kind; TxtRng code_ctx_menu_range; U64 code_ctx_menu_vaddr; - DF_LineList code_ctx_menu_lines; + D_LineList code_ctx_menu_lines; // rjf: entity context menu state UI_Key entity_ctx_menu_key; - DF_Handle entity_ctx_menu_entity; + D_Handle entity_ctx_menu_entity; U8 entity_ctx_menu_input_buffer[1024]; U64 entity_ctx_menu_input_size; TxtPt entity_ctx_menu_input_cursor; @@ -612,8 +612,8 @@ struct DF_Window // rjf: tab context menu state UI_Key tab_ctx_menu_key; - DF_Handle tab_ctx_menu_panel; - DF_Handle tab_ctx_menu_view; + D_Handle tab_ctx_menu_panel; + D_Handle tab_ctx_menu_view; // rjf: autocomplete lister state U64 autocomp_last_frame_idx; @@ -631,8 +631,8 @@ struct DF_Window // rjf: query view stack Arena *query_cmd_arena; - DF_CmdSpec *query_cmd_spec; - DF_CmdParams query_cmd_params; + D_CmdSpec *query_cmd_spec; + D_CmdParams query_cmd_params; DF_View *query_view_stack_top; B32 query_view_selected; F32 query_view_selected_t; @@ -670,7 +670,7 @@ struct DF_Window DF_Panel *focused_panel; // rjf: per-frame drawing state - D_Bucket *draw_bucket; + DR_Bucket *draw_bucket; }; //////////////////////////////// @@ -687,7 +687,7 @@ typedef struct DF_ViewRuleBlockNode DF_ViewRuleBlockNode; struct DF_ViewRuleBlockNode { DF_ViewRuleBlockNode *next; - DF_ExpandKey key; + D_ExpandKey key; DF_ViewRuleBlockArenaExt *first_arena_ext; DF_ViewRuleBlockArenaExt *last_arena_ext; Arena *user_state_arena; @@ -730,7 +730,7 @@ struct DF_GfxState U64 num_frames_requested; // rjf: history cache - DF_StateDeltaHistory *hist; + D_StateDeltaHistory *hist; // rjf: key map table Arena *key_map_arena; @@ -741,7 +741,7 @@ struct DF_GfxState // rjf: bind change B32 bind_change_active; - DF_CmdSpec *bind_change_cmd_spec; + D_CmdSpec *bind_change_cmd_spec; DF_Binding bind_change_binding; // rjf: confirmation popup state @@ -749,7 +749,7 @@ struct DF_GfxState B32 confirm_active; F32 confirm_t; Arena *confirm_arena; - DF_CmdList confirm_cmds; + D_CmdList confirm_cmds; String8 confirm_title; String8 confirm_msg; @@ -771,7 +771,7 @@ struct DF_GfxState DF_ViewRuleBlockNode *free_view_rule_block_node; // rjf: cmd param slot -> view spec rule table - DF_CmdParamSlotViewSpecRuleList cmd_param_slot_view_spec_table[DF_CmdParamSlot_COUNT]; + D_CmdParamSlotViewSpecRuleList cmd_param_slot_view_spec_table[D_CmdParamSlot_COUNT]; // rjf: windows OS_WindowRepaintFunctionType *repaint_hook; @@ -807,7 +807,7 @@ struct DF_GfxState FNT_Tag cfg_font_tags[DF_FontSlot_COUNT]; // derivative from font paths // rjf: global settings - DF_SettingVal cfg_setting_vals[DF_CfgSrc_COUNT][DF_SettingCode_COUNT]; + DF_SettingVal cfg_setting_vals[D_CfgSrc_COUNT][DF_SettingCode_COUNT]; // rjf: icon texture R_Handle icon_texture; @@ -857,8 +857,8 @@ read_only global DF_Panel df_g_nil_panel = global DF_GfxState *df_gfx_state = 0; global DF_DragDropPayload df_g_drag_drop_payload = {0}; -global DF_Handle df_g_last_drag_drop_panel = {0}; -global DF_Handle df_g_last_drag_drop_prev_tab = {0}; +global D_Handle df_g_last_drag_drop_panel = {0}; +global D_Handle df_g_last_drag_drop_prev_tab = {0}; //////////////////////////////// //~ rjf: Basic Helpers @@ -870,8 +870,8 @@ internal DF_PathQuery df_path_query_from_string(String8 string); internal B32 df_view_is_nil(DF_View *view); internal B32 df_view_is_project_filtered(DF_View *view); -internal DF_Handle df_handle_from_view(DF_View *view); -internal DF_View *df_view_from_handle(DF_Handle handle); +internal D_Handle df_handle_from_view(DF_View *view); +internal DF_View *df_view_from_handle(D_Handle handle); //////////////////////////////// //~ rjf: View Spec Type Functions @@ -883,8 +883,8 @@ internal DF_GfxViewKind df_gfx_view_kind_from_string(String8 string); //- rjf: basic type functions internal B32 df_panel_is_nil(DF_Panel *panel); -internal DF_Handle df_handle_from_panel(DF_Panel *panel); -internal DF_Panel *df_panel_from_handle(DF_Handle handle); +internal D_Handle df_handle_from_panel(DF_Panel *panel); +internal DF_Panel *df_panel_from_handle(D_Handle handle); internal UI_Key df_ui_key_from_panel(DF_Panel *panel); //- rjf: panel tree mutation notification @@ -910,23 +910,23 @@ internal DF_View *df_selected_tab_from_panel(DF_Panel *panel); //- rjf: icons & display strings internal DF_IconKind df_icon_kind_from_view(DF_View *view); -internal D_FancyStringList df_title_fstrs_from_view(Arena *arena, DF_View *view, Vec4F32 primary_color, Vec4F32 secondary_color, F32 size); +internal DR_FancyStringList df_title_fstrs_from_view(Arena *arena, DF_View *view, Vec4F32 primary_color, Vec4F32 secondary_color, F32 size); //////////////////////////////// //~ rjf: Window Type Functions -internal DF_Handle df_handle_from_window(DF_Window *window); -internal DF_Window *df_window_from_handle(DF_Handle handle); +internal D_Handle df_handle_from_window(DF_Window *window); +internal DF_Window *df_window_from_handle(D_Handle handle); //////////////////////////////// //~ rjf: Command Parameters From Context -internal DF_CmdParams df_cmd_params_from_gfx(void); +internal D_CmdParams df_cmd_params_from_gfx(void); internal B32 df_prefer_dasm_from_window(DF_Window *window); -internal DF_CmdParams df_cmd_params_from_window(DF_Window *window); -internal DF_CmdParams df_cmd_params_from_panel(DF_Window *window, DF_Panel *panel); -internal DF_CmdParams df_cmd_params_from_view(DF_Window *window, DF_Panel *panel, DF_View *view); -internal DF_CmdParams df_cmd_params_copy(Arena *arena, DF_CmdParams *src); +internal D_CmdParams df_cmd_params_from_window(DF_Window *window); +internal D_CmdParams df_cmd_params_from_panel(DF_Window *window, DF_Panel *panel); +internal D_CmdParams df_cmd_params_from_view(DF_Window *window, DF_Panel *panel, DF_View *view); +internal D_CmdParams df_cmd_params_copy(Arena *arena, D_CmdParams *src); //////////////////////////////// //~ rjf: Global Cross-Window UI Interaction State Functions @@ -946,7 +946,7 @@ internal DF_RichHoverInfo df_get_rich_hover_info(void); internal void df_register_view_specs(DF_ViewSpecInfoArray specs); internal DF_ViewSpec *df_view_spec_from_string(String8 string); internal DF_ViewSpec *df_view_spec_from_gfx_view_kind(DF_GfxViewKind gfx_view_kind); -internal DF_ViewSpec *df_view_spec_from_cmd_param_slot_spec(DF_CmdParamSlot slot, DF_CmdSpec *cmd_spec); +internal DF_ViewSpec *df_view_spec_from_cmd_param_slot_spec(D_CmdParamSlot slot, D_CmdSpec *cmd_spec); //////////////////////////////// //~ rjf: View Rule Spec State Functions @@ -981,14 +981,14 @@ internal void df_view_store_paramf(DF_View *view, String8 key, char *fmt, ...); //////////////////////////////// //~ rjf: Expand-Keyed Transient View Functions -internal DF_TransientViewNode *df_transient_view_node_from_expand_key(DF_View *owner_view, DF_ExpandKey key); +internal DF_TransientViewNode *df_transient_view_node_from_expand_key(DF_View *owner_view, D_ExpandKey key); //////////////////////////////// //~ rjf: View Rule Instance State Functions -internal void *df_view_rule_block_get_or_push_user_state(DF_ExpandKey key, U64 size); +internal void *df_view_rule_block_get_or_push_user_state(D_ExpandKey key, U64 size); #define df_view_rule_block_user_state(key, type) (type *)df_view_rule_block_get_or_push_user_state(key, sizeof(type)) -internal Arena *df_view_rule_block_push_arena_ext(DF_ExpandKey key); +internal Arena *df_view_rule_block_push_arena_ext(D_ExpandKey key); //////////////////////////////// //~ rjf: Panel State Functions @@ -1000,17 +1000,17 @@ internal void df_panel_release_all_views(DF_Panel *panel); //////////////////////////////// //~ rjf: Window State Functions -internal DF_Window *df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src); +internal DF_Window *df_window_open(Vec2F32 size, OS_Handle preferred_monitor, D_CfgSrc cfg_src); internal DF_Window *df_window_from_os_handle(OS_Handle os); -internal void df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds); +internal void df_window_update_and_render(Arena *arena, DF_Window *ws, D_CmdList *cmds); //////////////////////////////// //~ rjf: Eval Viz -internal F32 df_append_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, S32 depth, E_Eval eval, E_Member *member, DF_CfgTable *cfg_table, String8List *out); -internal String8 df_value_string_from_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval, E_Member *member, DF_CfgTable *cfg_table); +internal F32 df_append_value_strings_from_eval(Arena *arena, D_EvalVizStringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, S32 depth, E_Eval eval, E_Member *member, D_CfgTable *cfg_table, String8List *out); +internal String8 df_value_string_from_eval(Arena *arena, D_EvalVizStringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval, E_Member *member, D_CfgTable *cfg_table); //////////////////////////////// //~ rjf: Hover Eval @@ -1041,11 +1041,11 @@ internal String8 df_push_search_string(Arena *arena); //- rjf: keybindings internal OS_Key df_os_key_from_cfg_string(String8 string); internal void df_clear_bindings(void); -internal DF_BindingList df_bindings_from_spec(Arena *arena, DF_CmdSpec *spec); -internal void df_bind_spec(DF_CmdSpec *spec, DF_Binding binding); -internal void df_unbind_spec(DF_CmdSpec *spec, DF_Binding binding); -internal DF_CmdSpecList df_cmd_spec_list_from_binding(Arena *arena, DF_Binding binding); -internal DF_CmdSpecList df_cmd_spec_list_from_event_flags(Arena *arena, OS_EventFlags flags); +internal DF_BindingList df_bindings_from_spec(Arena *arena, D_CmdSpec *spec); +internal void df_bind_spec(D_CmdSpec *spec, DF_Binding binding); +internal void df_unbind_spec(D_CmdSpec *spec, DF_Binding binding); +internal D_CmdSpecList df_cmd_spec_list_from_binding(Arena *arena, DF_Binding binding); +internal D_CmdSpecList df_cmd_spec_list_from_event_flags(Arena *arena, OS_EventFlags flags); //- rjf: colors internal Vec4F32 df_rgba_from_theme_color(DF_ThemeColor color); @@ -1064,7 +1064,7 @@ internal DF_SettingVal df_setting_val_from_code(DF_Window *optional_window, DF_S //- rjf: config serialization internal int df_qsort_compare__cfg_string_bindings(DF_StringBindingPair *a, DF_StringBindingPair *b); -internal String8List df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source); +internal String8List df_cfg_strings_from_gfx(Arena *arena, String8 root_path, D_CfgSrc source); //////////////////////////////// //~ rjf: Process Control Info Stringification @@ -1086,14 +1086,14 @@ internal void df_loading_overlay(Rng2F32 rect, F32 loading_t, U64 progress_v, U6 //////////////////////////////// //~ rjf: UI Widgets: Fancy Buttons -internal void df_cmd_binding_buttons(DF_Window *ws, DF_CmdSpec *spec); +internal void df_cmd_binding_buttons(DF_Window *ws, D_CmdSpec *spec); internal UI_Signal df_menu_bar_button(String8 string); -internal UI_Signal df_cmd_spec_button(DF_Window *ws, DF_CmdSpec *spec); -internal void df_cmd_list_menu_buttons(DF_Window *ws, U64 count, DF_CoreCmdKind *cmds, U32 *fastpath_codepoints); +internal UI_Signal df_cmd_spec_button(DF_Window *ws, D_CmdSpec *spec); +internal void df_cmd_list_menu_buttons(DF_Window *ws, U64 count, D_CmdKind *cmds, U32 *fastpath_codepoints); internal UI_Signal df_icon_button(DF_Window *ws, DF_IconKind kind, FuzzyMatchRangeList *matches, String8 string); internal UI_Signal df_icon_buttonf(DF_Window *ws, DF_IconKind kind, FuzzyMatchRangeList *matches, char *fmt, ...); -internal void df_entity_tooltips(DF_Window *ws, DF_Entity *entity); -internal UI_Signal df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *name_matches, String8 fuzzy_query, B32 is_implicit); +internal void df_entity_tooltips(DF_Window *ws, D_Entity *entity); +internal UI_Signal df_entity_desc_button(DF_Window *ws, D_Entity *entity, FuzzyMatchRangeList *name_matches, String8 fuzzy_query, B32 is_implicit); internal void df_src_loc_button(DF_Window *ws, String8 file_path, TxtPt point); //////////////////////////////// @@ -1112,7 +1112,7 @@ internal B32 df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count internal UI_Signal df_label(String8 string); internal UI_Signal df_error_label(String8 string); internal B32 df_help_label(String8 string); -internal D_FancyStringList df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string); +internal DR_FancyStringList df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string); internal UI_Box *df_code_label(F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string); //////////////////////////////// @@ -1129,8 +1129,8 @@ internal void df_gfx_request_frame(void); //////////////////////////////// //~ rjf: Main Layer Top-Level Calls -internal void df_gfx_init(OS_WindowRepaintFunctionType *window_repaint_entry_point, DF_StateDeltaHistory *hist); -internal void df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds); +internal void df_gfx_init(OS_WindowRepaintFunctionType *window_repaint_entry_point, D_StateDeltaHistory *hist); +internal void df_gfx_begin_frame(Arena *arena, D_CmdList *cmds); internal void df_gfx_end_frame(void); -#endif // DF_GFX_H +#endif // DBG_GFX_CORE_H diff --git a/src/dbg_gfx/dbg_gfx_inc.c b/src/dbg_gfx/dbg_gfx_inc.c new file mode 100644 index 00000000..7d6cf27d --- /dev/null +++ b/src/dbg_gfx/dbg_gfx_inc.c @@ -0,0 +1,6 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#include "dbg_gfx_core.c" +#include "dbg_gfx_views.c" +#include "dbg_gfx_view_rules.c" diff --git a/src/dbg_gfx/dbg_gfx_inc.h b/src/dbg_gfx/dbg_gfx_inc.h new file mode 100644 index 00000000..0a9b265e --- /dev/null +++ b/src/dbg_gfx/dbg_gfx_inc.h @@ -0,0 +1,11 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#ifndef DBG_GFX_INC_H +#define DBG_GFX_INC_H + +#include "dbg_gfx_core.h" +#include "dbg_gfx_views.h" +#include "dbg_gfx_view_rules.h" + +#endif // DBG_GFX_INC_H diff --git a/src/df/gfx/df_view_rules.c b/src/dbg_gfx/dbg_gfx_view_rules.c similarity index 64% rename from src/df/gfx/df_view_rules.c rename to src/dbg_gfx/dbg_gfx_view_rules.c index 42c36818..76bc03f0 100644 --- a/src/df/gfx/df_view_rules.c +++ b/src/dbg_gfx/dbg_gfx_view_rules.c @@ -4,7 +4,7 @@ //////////////////////////////// //~ rjf: default -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) { Temp scratch = scratch_begin(&arena, 1); @@ -29,46 +29,46 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) { // rjf: type -> filtered data members E_MemberArray data_members = e_type_data_members_from_key(arena, e_type_kind_is_pointer_or_ref(type_kind) ? direct_type_key : type_key); - E_MemberArray filtered_data_members = df_filtered_data_members_from_members_cfg_table(arena, data_members, cfg_table); + E_MemberArray filtered_data_members = d_filtered_data_members_from_members_cfg_table(arena, data_members, cfg_table); // rjf: build blocks for all members, split by sub-expansions - DF_EvalVizBlock *last_vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Members, key, df_expand_key_make(df_hash_from_expand_key(key), 0), depth); + D_EvalVizBlock *last_vb = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_Members, key, d_expand_key_make(df_hash_from_expand_key(key), 0), depth); { last_vb->expr = expr; last_vb->cfg_table = cfg_table; last_vb->visual_idx_range = last_vb->semantic_idx_range = r1u64(0, filtered_data_members.count); last_vb->members = filtered_data_members; } - for(DF_ExpandNode *child = expand_node->first; child != 0; child = child->next) + for(D_ExpandNode *child = expand_node->first; child != 0; child = child->next) { // rjf: unpack expansion info; skip out-of-bounds splits U64 child_num = child->key.child_num; U64 child_idx = child_num-1; - E_Expr *child_expr = df_expr_from_eval_viz_block_index(arena, last_vb, child_idx); + E_Expr *child_expr = d_expr_from_eval_viz_block_index(arena, last_vb, child_idx); if(child_idx >= last_vb->semantic_idx_range.max) { continue; } // rjf: form split: truncate & complete last block; begin next block - last_vb = df_eval_viz_block_split_and_continue(arena, out, last_vb, child_idx); + last_vb = d_eval_viz_block_split_and_continue(arena, out, last_vb, child_idx); // rjf: build child config table - DF_CfgTable *child_cfg_table = cfg_table; + D_CfgTable *child_cfg_table = cfg_table; { - String8 view_rule_string = df_eval_view_rule_from_key(eval_view, child->key); + String8 view_rule_string = d_eval_view_rule_from_key(eval_view, child->key); if(view_rule_string.size != 0) { - child_cfg_table = push_array(arena, DF_CfgTable, 1); - *child_cfg_table = df_cfg_table_from_inheritance(arena, cfg_table); - df_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, DF_CfgSrc_User); + child_cfg_table = push_array(arena, D_CfgTable, 1); + *child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table); + d_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, D_CfgSrc_User); } } // rjf: recurse for child - df_append_expr_eval_viz_blocks__rec(arena, eval_view, key, child->key, str8_zero(), child_expr, child_cfg_table, depth, out); + d_append_expr_eval_viz_blocks__rec(arena, eval_view, key, child->key, str8_zero(), child_expr, child_cfg_table, depth, out); } - df_eval_viz_block_end(out, last_vb); + d_eval_viz_block_end(out, last_vb); } //////////////////////////// @@ -80,7 +80,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) (e_type_kind_is_pointer_or_ref(type_kind) && direct_type_kind == E_TypeKind_Enum)) { E_Type *type = e_type_from_key(arena, e_type_kind_is_pointer_or_ref(type_kind) ? direct_type_key : type_key); - DF_EvalVizBlock *last_vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_EnumMembers, key, df_expand_key_make(df_hash_from_expand_key(key), 0), depth); + D_EvalVizBlock *last_vb = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_EnumMembers, key, d_expand_key_make(df_hash_from_expand_key(key), 0), depth); { last_vb->expr = expr; last_vb->cfg_table = cfg_table; @@ -88,7 +88,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) last_vb->enum_vals.v = type->enum_vals; last_vb->enum_vals.count = type->count; } - df_eval_viz_block_end(out, last_vb); + d_eval_viz_block_end(out, last_vb); } //////////////////////////// @@ -103,42 +103,42 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) B32 need_extra_deref = e_type_kind_is_pointer_or_ref(type_kind); // rjf: build blocks for all elements, split by sub-expansions - DF_EvalVizBlock *last_vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Elements, key, df_expand_key_make(df_hash_from_expand_key(key), 0), depth); + D_EvalVizBlock *last_vb = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_Elements, key, d_expand_key_make(df_hash_from_expand_key(key), 0), depth); { last_vb->expr = need_extra_deref ? e_expr_ref_deref(arena, expr) : expr; last_vb->cfg_table = cfg_table; last_vb->visual_idx_range = last_vb->semantic_idx_range = r1u64(0, array_count); } - for(DF_ExpandNode *child = expand_node->first; child != 0; child = child->next) + for(D_ExpandNode *child = expand_node->first; child != 0; child = child->next) { // rjf: unpack expansion info; skip out-of-bounds splits U64 child_num = child->key.child_num; U64 child_idx = child_num-1; - E_Expr *child_expr = df_expr_from_eval_viz_block_index(arena, last_vb, child_idx); + E_Expr *child_expr = d_expr_from_eval_viz_block_index(arena, last_vb, child_idx); if(child_idx >= last_vb->semantic_idx_range.max) { continue; } // rjf: form split: truncate & complete last block; begin next block - last_vb = df_eval_viz_block_split_and_continue(arena, out, last_vb, child_idx); + last_vb = d_eval_viz_block_split_and_continue(arena, out, last_vb, child_idx); // rjf: build child config table - DF_CfgTable *child_cfg_table = cfg_table; + D_CfgTable *child_cfg_table = cfg_table; { - String8 view_rule_string = df_eval_view_rule_from_key(eval_view, child->key); + String8 view_rule_string = d_eval_view_rule_from_key(eval_view, child->key); if(view_rule_string.size != 0) { - child_cfg_table = push_array(arena, DF_CfgTable, 1); - *child_cfg_table = df_cfg_table_from_inheritance(arena, cfg_table); - df_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, DF_CfgSrc_User); + child_cfg_table = push_array(arena, D_CfgTable, 1); + *child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table); + d_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, D_CfgSrc_User); } } // rjf: recurse for child - df_append_expr_eval_viz_blocks__rec(arena, eval_view, key, child->key, str8_zero(), child_expr, child_cfg_table, depth, out); + d_append_expr_eval_viz_blocks__rec(arena, eval_view, key, child->key, str8_zero(), child_expr, child_cfg_table, depth, out); } - df_eval_viz_block_end(out, last_vb); + d_eval_viz_block_end(out, last_vb); } //////////////////////////// @@ -147,23 +147,23 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) else if(e_type_kind_is_pointer_or_ref(type_kind) && e_type_kind_is_pointer_or_ref(direct_type_kind)) { // rjf: compute key - DF_ExpandKey child_key = df_expand_key_make(df_hash_from_expand_key(key), 1); + D_ExpandKey child_key = d_expand_key_make(df_hash_from_expand_key(key), 1); // rjf: build child config table - DF_CfgTable *child_cfg_table = cfg_table; + D_CfgTable *child_cfg_table = cfg_table; { - String8 view_rule_string = df_eval_view_rule_from_key(eval_view, child_key); + String8 view_rule_string = d_eval_view_rule_from_key(eval_view, child_key); if(view_rule_string.size != 0) { - child_cfg_table = push_array(arena, DF_CfgTable, 1); - *child_cfg_table = df_cfg_table_from_inheritance(arena, cfg_table); - df_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, DF_CfgSrc_User); + child_cfg_table = push_array(arena, D_CfgTable, 1); + *child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table); + d_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, D_CfgSrc_User); } } // rjf: recurse for child E_Expr *child_expr = e_expr_ref_deref(arena, expr); - df_append_expr_eval_viz_blocks__rec(arena, eval_view, key, child_key, str8_zero(), child_expr, child_cfg_table, depth, out); + d_append_expr_eval_viz_blocks__rec(arena, eval_view, key, child_key, str8_zero(), child_expr, child_cfg_table, depth, out); } scratch_end(scratch); @@ -172,7 +172,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) //////////////////////////////// //~ rjf: "array" -DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(array) +D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(array) { Temp scratch = scratch_begin(&arena, 1); E_IRTreeAndType irtree = e_irtree_and_type_from_expr(scratch.arena, expr); @@ -180,7 +180,7 @@ DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(array) E_TypeKind type_kind = e_type_kind_from_key(type_key); if(e_type_kind_is_pointer_or_ref(type_kind)) { - E_Value count = df_value_from_params(params); + E_Value count = d_value_from_params(params); E_TypeKey element_type_key = e_type_ptee_from_key(type_key); E_TypeKey array_type_key = e_type_key_cons_array(element_type_key, count.u64); E_TypeKey ptr_type_key = e_type_key_cons_ptr(e_type_state->ctx->primary_module->arch, array_type_key); @@ -193,7 +193,7 @@ DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(array) //////////////////////////////// //~ rjf: "slice" -DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(slice) +D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(slice) { Temp scratch = scratch_begin(&arena, 1); E_IRTreeAndType irtree = e_irtree_and_type_from_expr(scratch.arena, expr); @@ -269,13 +269,13 @@ DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(slice) //////////////////////////////// //~ rjf: "list" -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(list){} +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(list){} DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(list){} //////////////////////////////// //~ rjf: "bswap" -DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(bswap) +D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(bswap) { expr = e_expr_ref_bswap(arena, expr); return expr; @@ -284,9 +284,9 @@ DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(bswap) //////////////////////////////// //~ rjf: "cast" -DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(cast) +D_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(cast) { - E_TypeKey type_key = df_type_key_from_params(params); + E_TypeKey type_key = d_type_key_from_params(params); expr = e_expr_ref_cast(arena, type_key, expr); return expr; } @@ -314,14 +314,14 @@ DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(hex){} //////////////////////////////// //~ rjf: "only" -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(only){} +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(only){} DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(only){} DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(only){} //////////////////////////////// //~ rjf: "omit" -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(omit){} +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(omit){} DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(omit){} DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(omit){} @@ -340,7 +340,7 @@ DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(checkbox) E_Eval value_eval = e_value_eval_from_eval(eval); if(ui_clicked(df_icon_buttonf(ws, value_eval.value.u64 == 0 ? DF_IconKind_CheckHollow : DF_IconKind_CheckFilled, 0, "###check"))) { - df_commit_eval_value_string(eval, value_eval.value.u64 == 0 ? str8_lit("1") : str8_lit("0")); + d_commit_eval_value_string(eval, value_eval.value.u64 == 0 ? str8_lit("1") : str8_lit("0")); } scratch_end(scratch); } @@ -348,15 +348,15 @@ DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(checkbox) //////////////////////////////// //~ rjf: "rgba" -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(color_rgba) +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(color_rgba) { - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + D_EvalVizBlock *vb = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_Canvas, key, d_expand_key_make(df_hash_from_expand_key(key), 1), depth); vb->string = string; vb->expr = expr; vb->visual_idx_range = r1u64(0, 8); vb->semantic_idx_range = r1u64(0, 1); vb->cfg_table = cfg_table; - df_eval_viz_block_end(out, vb); + d_eval_viz_block_end(out, vb); } DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(color_rgba) @@ -371,24 +371,24 @@ DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(color_rgba) UI_WidthFill DF_Font(ws, DF_FontSlot_Code) { text_box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); - D_FancyStringList fancy_strings = {0}; + DR_FancyStringList fancy_strings = {0}; { - D_FancyString open_paren = {ui_top_font(), str8_lit("("), ui_top_palette()->text, ui_top_font_size(), 0, 0}; - D_FancyString comma = {ui_top_font(), str8_lit(", "), ui_top_palette()->text, ui_top_font_size(), 0, 0}; - D_FancyString r_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.x), v4f32(1.f, 0.25f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; - D_FancyString g_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.y), v4f32(0.25f, 1.f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; - D_FancyString b_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.z), v4f32(0.25f, 0.25f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; - D_FancyString a_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.w), v4f32(1.f, 1.f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; - D_FancyString clse_paren = {ui_top_font(), str8_lit(")"), ui_top_palette()->text, ui_top_font_size(), 0, 0}; - d_fancy_string_list_push(scratch.arena, &fancy_strings, &open_paren); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &r_fstr); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &g_fstr); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &b_fstr); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &a_fstr); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &clse_paren); + DR_FancyString open_paren = {ui_top_font(), str8_lit("("), ui_top_palette()->text, ui_top_font_size(), 0, 0}; + DR_FancyString comma = {ui_top_font(), str8_lit(", "), ui_top_palette()->text, ui_top_font_size(), 0, 0}; + DR_FancyString r_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.x), v4f32(1.f, 0.25f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; + DR_FancyString g_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.y), v4f32(0.25f, 1.f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; + DR_FancyString b_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.z), v4f32(0.25f, 0.25f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; + DR_FancyString a_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.w), v4f32(1.f, 1.f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; + DR_FancyString clse_paren = {ui_top_font(), str8_lit(")"), ui_top_palette()->text, ui_top_font_size(), 0, 0}; + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &open_paren); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &r_fstr); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &g_fstr); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &b_fstr); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &a_fstr); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &clse_paren); } ui_box_equip_display_fancy_strings(text_box, &fancy_strings); } @@ -421,83 +421,83 @@ DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(color_rgba) //////////////////////////////// //~ rjf: "text" -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(text) +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(text) { - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + D_EvalVizBlock *vb = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_Canvas, key, d_expand_key_make(df_hash_from_expand_key(key), 1), depth); vb->string = string; vb->expr = expr; vb->visual_idx_range = r1u64(0, 8); vb->semantic_idx_range = r1u64(0, 1); vb->cfg_table = cfg_table; - df_eval_viz_block_end(out, vb); + d_eval_viz_block_end(out, vb); } //////////////////////////////// //~ rjf: "disasm" -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(disasm) +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(disasm) { - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + D_EvalVizBlock *vb = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_Canvas, key, d_expand_key_make(df_hash_from_expand_key(key), 1), depth); vb->string = string; vb->expr = expr; vb->visual_idx_range = r1u64(0, 8); vb->semantic_idx_range = r1u64(0, 1); vb->cfg_table = cfg_table; - df_eval_viz_block_end(out, vb); + d_eval_viz_block_end(out, vb); } //////////////////////////////// //~ rjf: "memory" -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(memory) +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(memory) { - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + D_EvalVizBlock *vb = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_Canvas, key, d_expand_key_make(df_hash_from_expand_key(key), 1), depth); vb->string = string; vb->expr = expr; vb->visual_idx_range = r1u64(0, 16); vb->semantic_idx_range = r1u64(0, 1); vb->cfg_table = cfg_table; - df_eval_viz_block_end(out, vb); + d_eval_viz_block_end(out, vb); } //////////////////////////////// //~ rjf: "graph" -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(graph) +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(graph) { - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + D_EvalVizBlock *vb = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_Canvas, key, d_expand_key_make(df_hash_from_expand_key(key), 1), depth); vb->string = string; vb->expr = expr; vb->visual_idx_range = r1u64(0, 8); vb->semantic_idx_range = r1u64(0, 1); vb->cfg_table = cfg_table; - df_eval_viz_block_end(out, vb); + d_eval_viz_block_end(out, vb); } //////////////////////////////// //~ rjf: "bitmap" -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(bitmap) +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(bitmap) { - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + D_EvalVizBlock *vb = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_Canvas, key, d_expand_key_make(df_hash_from_expand_key(key), 1), depth); vb->string = string; vb->expr = expr; vb->visual_idx_range = r1u64(0, 8); vb->semantic_idx_range = r1u64(0, 1); vb->cfg_table = cfg_table; - df_eval_viz_block_end(out, vb); + d_eval_viz_block_end(out, vb); } //////////////////////////////// //~ rjf: "geo3d" -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(geo3d) +D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(geo3d) { - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + D_EvalVizBlock *vb = d_eval_viz_block_begin(arena, D_EvalVizBlockKind_Canvas, key, d_expand_key_make(df_hash_from_expand_key(key), 1), depth); vb->string = string; vb->expr = expr; vb->visual_idx_range = r1u64(0, 16); vb->semantic_idx_range = r1u64(0, 1); vb->cfg_table = cfg_table; - df_eval_viz_block_end(out, vb); + d_eval_viz_block_end(out, vb); } diff --git a/src/df/gfx/df_view_rules.h b/src/dbg_gfx/dbg_gfx_view_rules.h similarity index 68% rename from src/df/gfx/df_view_rules.h rename to src/dbg_gfx/dbg_gfx_view_rules.h index 07e91344..9c7d6980 100644 --- a/src/df/gfx/df_view_rules.h +++ b/src/dbg_gfx/dbg_gfx_view_rules.h @@ -1,7 +1,7 @@ // Copyright (c) 2024 Epic Games Tools // Licensed under the MIT license (https://opensource.org/license/mit/) -#ifndef DF_VIEW_RULES_H -#define DF_VIEW_RULES_H +#ifndef DBG_GFX_VIEW_RULES_H +#define DBG_GFX_VIEW_RULES_H #endif // DF_VIEW_RULES_H diff --git a/src/df/gfx/df_views.c b/src/dbg_gfx/dbg_gfx_views.c similarity index 80% rename from src/df/gfx/df_views.c rename to src/dbg_gfx/dbg_gfx_views.c index 3a4289dd..418f8fea 100644 --- a/src/df/gfx/df_views.c +++ b/src/dbg_gfx/dbg_gfx_views.c @@ -19,11 +19,11 @@ df_code_view_init(DF_CodeViewState *cv, DF_View *view) } internal void -df_code_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CmdList *cmds, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key) +df_code_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, D_CmdList *cmds, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key) { - for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) + for(D_CmdNode *n = cmds->first; n != 0; n = n->next) { - DF_Cmd *cmd = &n->cmd; + D_Cmd *cmd = &n->cmd; // rjf: mismatched window/panel => skip if(df_window_from_handle(cmd->params.window) != ws || @@ -33,33 +33,33 @@ df_code_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewStat } // rjf: process - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); switch(core_cmd_kind) { default: break; - case DF_CoreCmdKind_GoToLine: + case D_CmdKind_GoToLine: { cv->goto_line_num = cmd->params.text_point.line; }break; - case DF_CoreCmdKind_CenterCursor: + case D_CmdKind_CenterCursor: { cv->center_cursor = 1; }break; - case DF_CoreCmdKind_ContainCursor: + case D_CmdKind_ContainCursor: { cv->contain_cursor = 1; }break; - case DF_CoreCmdKind_FindTextForward: + case D_CmdKind_FindTextForward: { arena_clear(cv->find_text_arena); cv->find_text_fwd = push_str8_copy(cv->find_text_arena, cmd->params.string); }break; - case DF_CoreCmdKind_FindTextBackward: + case D_CmdKind_FindTextBackward: { arena_clear(cv->find_text_arena); cv->find_text_bwd = push_str8_copy(cv->find_text_arena, cmd->params.string); }break; - case DF_CoreCmdKind_ToggleWatchExpressionAtMouse: + case D_CmdKind_ToggleWatchExpressionAtMouse: { cv->watch_expr_at_mouse = 1; }break; @@ -88,8 +88,8 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, F32 scroll_bar_dim = floor_f32(ui_top_font_size()*1.5f); Vec2F32 code_area_dim = v2f32(panel_box_dim.x - scroll_bar_dim, panel_box_dim.y - scroll_bar_dim); S64 num_possible_visible_lines = (S64)(code_area_dim.y/code_line_height)+1; - DF_Entity *thread = df_entity_from_handle(df_interact_regs()->thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); + D_Entity *thread = d_entity_from_handle(d_interact_regs()->thread); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); ////////////////////////////// //- rjf: determine visible line range / count @@ -144,13 +144,13 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, Side search_query_side = Side_Invalid; B32 search_query_is_active = 0; { - DF_CoreCmdKind query_cmd_kind = df_core_cmd_kind_from_string(ws->query_cmd_spec->info.string); - if(query_cmd_kind == DF_CoreCmdKind_FindTextForward || - query_cmd_kind == DF_CoreCmdKind_FindTextBackward) + D_CmdKind query_cmd_kind = d_cmd_kind_from_string(ws->query_cmd_spec->info.string); + if(query_cmd_kind == D_CmdKind_FindTextForward || + query_cmd_kind == D_CmdKind_FindTextBackward) { search_query = str8(ws->query_view_stack_top->query_buffer, ws->query_view_stack_top->query_string_size); search_query_is_active = 1; - search_query_side = (query_cmd_kind == DF_CoreCmdKind_FindTextForward) ? Side_Max : Side_Min; + search_query_side = (query_cmd_kind == D_CmdKind_FindTextForward) ? Side_Max : Side_Min; } } @@ -169,11 +169,11 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, code_slice_params.line_text = push_array(scratch.arena, String8, visible_line_count); code_slice_params.line_ranges = push_array(scratch.arena, Rng1U64, visible_line_count); code_slice_params.line_tokens = push_array(scratch.arena, TXT_TokenArray, visible_line_count); - code_slice_params.line_bps = push_array(scratch.arena, DF_EntityList, visible_line_count); - code_slice_params.line_ips = push_array(scratch.arena, DF_EntityList, visible_line_count); - code_slice_params.line_pins = push_array(scratch.arena, DF_EntityList, visible_line_count); + code_slice_params.line_bps = push_array(scratch.arena, D_EntityList, visible_line_count); + code_slice_params.line_ips = push_array(scratch.arena, D_EntityList, visible_line_count); + code_slice_params.line_pins = push_array(scratch.arena, D_EntityList, visible_line_count); code_slice_params.line_vaddrs = push_array(scratch.arena, U64, visible_line_count); - code_slice_params.line_infos = push_array(scratch.arena, DF_LineList, visible_line_count); + code_slice_params.line_infos = push_array(scratch.arena, D_LineList, visible_line_count); code_slice_params.font = code_font; code_slice_params.font_size = code_font_size; code_slice_params.tab_size = code_tab_size; @@ -200,16 +200,16 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: find visible breakpoints for source code ProfScope("find visible breakpoints") { - DF_EntityList bps = df_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - for(DF_EntityNode *n = bps.first; n != 0; n = n->next) + D_EntityList bps = d_query_cached_entity_list_with_kind(D_EntityKind_Breakpoint); + for(D_EntityNode *n = bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(bp, DF_EntityKind_Location); - if(path_match_normalized(loc->name, df_interact_regs()->file_path) && + D_Entity *bp = n->entity; + D_Entity *loc = d_entity_child_from_kind(bp, D_EntityKind_Location); + if(path_match_normalized(loc->name, d_interact_regs()->file_path) && visible_line_num_range.min <= loc->text_point.line && loc->text_point.line <= visible_line_num_range.max) { U64 slice_line_idx = (loc->text_point.line-visible_line_num_range.min); - df_entity_list_push(scratch.arena, &code_slice_params.line_bps[slice_line_idx], bp); + d_entity_list_push(scratch.arena, &code_slice_params.line_bps[slice_line_idx], bp); } } } @@ -217,27 +217,27 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: find live threads mapping to source code ProfScope("find live threads mapping to this file") { - String8 file_path = df_interact_regs()->file_path; - DF_Entity *selected_thread = df_entity_from_handle(df_interact_regs()->thread); - DF_EntityList threads = df_query_cached_entity_list_with_kind(DF_EntityKind_Thread); - for(DF_EntityNode *thread_n = threads.first; thread_n != 0; thread_n = thread_n->next) + String8 file_path = d_interact_regs()->file_path; + D_Entity *selected_thread = d_entity_from_handle(d_interact_regs()->thread); + D_EntityList threads = d_query_cached_entity_list_with_kind(D_EntityKind_Thread); + for(D_EntityNode *thread_n = threads.first; thread_n != 0; thread_n = thread_n->next) { - DF_Entity *thread = thread_n->entity; - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - U64 unwind_count = (thread == selected_thread) ? df_interact_regs()->unwind_count : 0; - U64 inline_depth = (thread == selected_thread) ? df_interact_regs()->inline_depth : 0; - U64 rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, unwind_count); + D_Entity *thread = thread_n->entity; + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + U64 unwind_count = (thread == selected_thread) ? d_interact_regs()->unwind_count : 0; + U64 inline_depth = (thread == selected_thread) ? d_interact_regs()->inline_depth : 0; + U64 rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count); U64 last_inst_on_unwound_rip_vaddr = rip_vaddr - !!unwind_count; - DF_Entity *module = df_module_from_process_vaddr(process, last_inst_on_unwound_rip_vaddr); - U64 rip_voff = df_voff_from_vaddr(module, last_inst_on_unwound_rip_vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff); - for(DF_LineNode *n = lines.first; n != 0; n = n->next) + D_Entity *module = d_module_from_process_vaddr(process, last_inst_on_unwound_rip_vaddr); + U64 rip_voff = d_voff_from_vaddr(module, last_inst_on_unwound_rip_vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff); + for(D_LineNode *n = lines.first; n != 0; n = n->next) { if(path_match_normalized(n->v.file_path, file_path) && visible_line_num_range.min <= n->v.pt.line && n->v.pt.line <= visible_line_num_range.max) { U64 slice_line_idx = n->v.pt.line-visible_line_num_range.min; - df_entity_list_push(scratch.arena, &code_slice_params.line_ips[slice_line_idx], thread); + d_entity_list_push(scratch.arena, &code_slice_params.line_ips[slice_line_idx], thread); } } } @@ -246,16 +246,16 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: find visible watch pins for source code ProfScope("find visible watch pins") { - DF_EntityList wps = df_query_cached_entity_list_with_kind(DF_EntityKind_WatchPin); - for(DF_EntityNode *n = wps.first; n != 0; n = n->next) + D_EntityList wps = d_query_cached_entity_list_with_kind(D_EntityKind_WatchPin); + for(D_EntityNode *n = wps.first; n != 0; n = n->next) { - DF_Entity *wp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(wp, DF_EntityKind_Location); - if(path_match_normalized(loc->name, df_interact_regs()->file_path) && + D_Entity *wp = n->entity; + D_Entity *loc = d_entity_child_from_kind(wp, D_EntityKind_Location); + if(path_match_normalized(loc->name, d_interact_regs()->file_path) && visible_line_num_range.min <= loc->text_point.line && loc->text_point.line <= visible_line_num_range.max) { U64 slice_line_idx = (loc->text_point.line-visible_line_num_range.min); - df_entity_list_push(scratch.arena, &code_slice_params.line_pins[slice_line_idx], wp); + d_entity_list_push(scratch.arena, &code_slice_params.line_pins[slice_line_idx], wp); } } } @@ -263,11 +263,11 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: find all src -> dasm info ProfScope("find all src -> dasm info") { - String8 file_path = df_interact_regs()->file_path; - DF_LineListArray lines_array = df_lines_array_from_file_path_line_range(scratch.arena, file_path, visible_line_num_range); + String8 file_path = d_interact_regs()->file_path; + D_LineListArray lines_array = d_lines_array_from_file_path_line_range(scratch.arena, file_path, visible_line_num_range); if(lines_array.count != 0) { - MemoryCopy(code_slice_params.line_infos, lines_array.v, sizeof(DF_LineList)*lines_array.count); + MemoryCopy(code_slice_params.line_infos, lines_array.v, sizeof(D_LineList)*lines_array.count); } code_slice_params.relevant_dbgi_keys = lines_array.dbgi_keys; } @@ -275,21 +275,21 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: find live threads mapping to disasm if(dasm_lines) ProfScope("find live threads mapping to this disassembly") { - DF_Entity *selected_thread = df_entity_from_handle(df_interact_regs()->thread); - DF_EntityList threads = df_query_cached_entity_list_with_kind(DF_EntityKind_Thread); - for(DF_EntityNode *thread_n = threads.first; thread_n != 0; thread_n = thread_n->next) + D_Entity *selected_thread = d_entity_from_handle(d_interact_regs()->thread); + D_EntityList threads = d_query_cached_entity_list_with_kind(D_EntityKind_Thread); + for(D_EntityNode *thread_n = threads.first; thread_n != 0; thread_n = thread_n->next) { - DF_Entity *thread = thread_n->entity; - U64 unwind_count = (thread == selected_thread) ? df_interact_regs()->unwind_count : 0; - U64 rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, unwind_count); - if(df_entity_ancestor_from_kind(thread, DF_EntityKind_Process) == process && contains_1u64(dasm_vaddr_range, rip_vaddr)) + D_Entity *thread = thread_n->entity; + U64 unwind_count = (thread == selected_thread) ? d_interact_regs()->unwind_count : 0; + U64 rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count); + if(d_entity_ancestor_from_kind(thread, D_EntityKind_Process) == process && contains_1u64(dasm_vaddr_range, rip_vaddr)) { U64 rip_off = rip_vaddr - dasm_vaddr_range.min; S64 line_num = dasm_line_array_idx_from_code_off__linear_scan(dasm_lines, rip_off)+1; if(contains_1s64(visible_line_num_range, line_num)) { U64 slice_line_idx = (line_num-visible_line_num_range.min); - df_entity_list_push(scratch.arena, &code_slice_params.line_ips[slice_line_idx], thread); + d_entity_list_push(scratch.arena, &code_slice_params.line_ips[slice_line_idx], thread); } } } @@ -298,12 +298,12 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: find breakpoints mapping to this disasm if(dasm_lines) ProfScope("find breakpoints mapping to this disassembly") { - DF_EntityList bps = df_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - for(DF_EntityNode *n = bps.first; n != 0; n = n->next) + D_EntityList bps = d_query_cached_entity_list_with_kind(D_EntityKind_Breakpoint); + for(D_EntityNode *n = bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(bp, DF_EntityKind_Location); - if(loc->flags & DF_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, loc->vaddr)) + D_Entity *bp = n->entity; + D_Entity *loc = d_entity_child_from_kind(bp, D_EntityKind_Location); + if(loc->flags & D_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, loc->vaddr)) { U64 off = loc->vaddr-dasm_vaddr_range.min; U64 idx = dasm_line_array_idx_from_code_off__linear_scan(dasm_lines, off); @@ -311,7 +311,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, if(contains_1s64(visible_line_num_range, line_num)) { U64 slice_line_idx = (line_num-visible_line_num_range.min); - df_entity_list_push(scratch.arena, &code_slice_params.line_bps[slice_line_idx], bp); + d_entity_list_push(scratch.arena, &code_slice_params.line_bps[slice_line_idx], bp); } } } @@ -320,12 +320,12 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: find watch pins mapping to this disasm if(dasm_lines) ProfScope("find watch pins mapping to this disassembly") { - DF_EntityList pins = df_query_cached_entity_list_with_kind(DF_EntityKind_WatchPin); - for(DF_EntityNode *n = pins.first; n != 0; n = n->next) + D_EntityList pins = d_query_cached_entity_list_with_kind(D_EntityKind_WatchPin); + for(D_EntityNode *n = pins.first; n != 0; n = n->next) { - DF_Entity *pin = n->entity; - DF_Entity *loc = df_entity_child_from_kind(pin, DF_EntityKind_Location); - if(loc->flags & DF_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, loc->vaddr)) + D_Entity *pin = n->entity; + D_Entity *loc = d_entity_child_from_kind(pin, D_EntityKind_Location); + if(loc->flags & D_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, loc->vaddr)) { U64 off = loc->vaddr-dasm_vaddr_range.min; U64 idx = dasm_line_array_idx_from_code_off__linear_scan(dasm_lines, off); @@ -333,7 +333,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, if(contains_1s64(visible_line_num_range, line_num)) { U64 slice_line_idx = (line_num-visible_line_num_range.min); - df_entity_list_push(scratch.arena, &code_slice_params.line_pins[slice_line_idx], pin); + d_entity_list_push(scratch.arena, &code_slice_params.line_pins[slice_line_idx], pin); } } } @@ -342,15 +342,15 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: fill dasm -> src info if(dasm_lines) { - DF_Entity *module = df_module_from_process_vaddr(process, dasm_vaddr_range.min); - DI_Key dbgi_key = df_dbgi_key_from_module(module); + D_Entity *module = d_module_from_process_vaddr(process, dasm_vaddr_range.min); + DI_Key dbgi_key = d_dbgi_key_from_module(module); for(S64 line_num = visible_line_num_range.min; line_num < visible_line_num_range.max; line_num += 1) { U64 vaddr = dasm_vaddr_range.min + dasm_line_array_code_off_from_idx(dasm_lines, line_num-1); - U64 voff = df_voff_from_vaddr(module, vaddr); + U64 voff = d_voff_from_vaddr(module, vaddr); U64 slice_idx = line_num-visible_line_num_range.min; code_slice_params.line_vaddrs[slice_idx] = vaddr; - code_slice_params.line_infos[slice_idx] = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, voff); + code_slice_params.line_infos[slice_idx] = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, voff); } } @@ -395,7 +395,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, Temp scratch = scratch_begin(0, 0); B32 found = 0; B32 first = 1; - S64 line_num_start = df_interact_regs()->cursor.line; + S64 line_num_start = d_interact_regs()->cursor.line; S64 line_num_last = (S64)text_info->lines_count; for(S64 line_num = line_num_start;; first = 0) { @@ -405,18 +405,18 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: gather line info String8 line_string = str8_substr(text_data, text_info->lines_ranges[line_num-1]); U64 search_start = 0; - if(df_interact_regs()->cursor.line == line_num && first) + if(d_interact_regs()->cursor.line == line_num && first) { - search_start = df_interact_regs()->cursor.column; + search_start = d_interact_regs()->cursor.column; } // rjf: search string U64 needle_pos = str8_find_needle(line_string, search_start, cv->find_text_fwd, StringMatchFlag_CaseInsensitive); if(needle_pos < line_string.size) { - df_interact_regs()->cursor.line = line_num; - df_interact_regs()->cursor.column = needle_pos+1; - df_interact_regs()->mark = df_interact_regs()->cursor; + d_interact_regs()->cursor.line = line_num; + d_interact_regs()->cursor.column = needle_pos+1; + d_interact_regs()->mark = d_interact_regs()->cursor; found = 1; break; } @@ -437,10 +437,10 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, cv->center_cursor = found; if(found == 0) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.string = push_str8f(scratch.arena, "Could not find \"%S\"", cv->find_text_fwd); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Error)); } scratch_end(scratch); } @@ -451,7 +451,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, Temp scratch = scratch_begin(0, 0); B32 found = 0; B32 first = 1; - S64 line_num_start = df_interact_regs()->cursor.line; + S64 line_num_start = d_interact_regs()->cursor.line; S64 line_num_last = (S64)text_info->lines_count; for(S64 line_num = line_num_start;; first = 0) { @@ -460,9 +460,9 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: gather line info String8 line_string = str8_substr(text_data, text_info->lines_ranges[line_num-1]); - if(df_interact_regs()->cursor.line == line_num && first) + if(d_interact_regs()->cursor.line == line_num && first) { - line_string = str8_prefix(line_string, df_interact_regs()->cursor.column-1); + line_string = str8_prefix(line_string, d_interact_regs()->cursor.column-1); } // rjf: search string @@ -478,9 +478,9 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, } if(next_needle_pos < line_string.size) { - df_interact_regs()->cursor.line = line_num; - df_interact_regs()->cursor.column = next_needle_pos+1; - df_interact_regs()->mark = df_interact_regs()->cursor; + d_interact_regs()->cursor.line = line_num; + d_interact_regs()->cursor.column = next_needle_pos+1; + d_interact_regs()->mark = d_interact_regs()->cursor; found = 1; break; } @@ -501,10 +501,10 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, cv->center_cursor = found; if(found == 0) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.string = push_str8f(scratch.arena, "Could not find \"%S\"", cv->find_text_bwd); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Error)); } scratch_end(scratch); } @@ -522,7 +522,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, S64 line_num = cv->goto_line_num; cv->goto_line_num = 0; line_num = Clamp(1, line_num, text_info->lines_count); - df_interact_regs()->cursor = df_interact_regs()->mark = txt_pt(line_num, 1); + d_interact_regs()->cursor = d_interact_regs()->mark = txt_pt(line_num, 1); cv->center_cursor = !cv->contain_cursor || (line_num < target_visible_line_num_range.min+4 || target_visible_line_num_range.max-4 < line_num); } @@ -534,7 +534,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, { if(ui_is_focus_active() && visible_line_num_range.max >= visible_line_num_range.min) { - snap[Axis2_X] = snap[Axis2_Y] = df_do_txt_controls(text_info, text_data, ClampBot(num_possible_visible_lines, 10) - 10, &df_interact_regs()->cursor, &df_interact_regs()->mark, &cv->preferred_column); + snap[Axis2_X] = snap[Axis2_Y] = df_do_txt_controls(text_info, text_data, ClampBot(num_possible_visible_lines, 10) - 10, &d_interact_regs()->cursor, &d_interact_regs()->mark, &cv->preferred_column); } } @@ -551,14 +551,14 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeSliceSignal sig = {0}; UI_Focus(UI_FocusKind_On) { - sig = df_code_slicef(ws, &code_slice_params, &df_interact_regs()->cursor, &df_interact_regs()->mark, &cv->preferred_column, "txt_view_%p", view); + sig = df_code_slicef(ws, &code_slice_params, &d_interact_regs()->cursor, &d_interact_regs()->mark, &cv->preferred_column, "txt_view_%p", view); } //- rjf: press code slice? -> focus panel if(ui_pressed(sig.base)) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } //- rjf: dragging & outside region? -> contain cursor @@ -578,26 +578,26 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, if(ui_pressed(sig.base) && sig.base.event_flags & OS_EventFlag_Ctrl) { ui_kill_action(); - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.string = txt_string_from_info_data_txt_rng(text_info, text_data, sig.mouse_expr_rng); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_GoToName)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_GoToName)); } //- rjf: watch expr at mouse if(cv->watch_expr_at_mouse) { cv->watch_expr_at_mouse = 0; - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.string = txt_string_from_info_data_txt_rng(text_info, text_data, sig.mouse_expr_rng); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ToggleWatchExpression)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_ToggleWatchExpression)); } //- rjf: selected text on single line, no query? -> set search text - if(!txt_pt_match(df_interact_regs()->cursor, df_interact_regs()->mark) && df_interact_regs()->cursor.line == df_interact_regs()->mark.line && search_query.size == 0) + if(!txt_pt_match(d_interact_regs()->cursor, d_interact_regs()->mark) && d_interact_regs()->cursor.line == d_interact_regs()->mark.line && search_query.size == 0) { - String8 text = txt_string_from_info_data_txt_rng(text_info, text_data, txt_rng(df_interact_regs()->cursor, df_interact_regs()->mark)); + String8 text = txt_string_from_info_data_txt_rng(text_info, text_data, txt_rng(d_interact_regs()->cursor, d_interact_regs()->mark)); df_set_search_string(text); } } @@ -618,8 +618,8 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, if(cv->center_cursor) { cv->center_cursor = 0; - String8 cursor_line = str8_substr(text_data, text_info->lines_ranges[df_interact_regs()->cursor.line-1]); - F32 cursor_advance = fnt_dim_from_tag_size_string(code_font, code_font_size, 0, code_tab_size, str8_prefix(cursor_line, df_interact_regs()->cursor.column-1)).x; + String8 cursor_line = str8_substr(text_data, text_info->lines_ranges[d_interact_regs()->cursor.line-1]); + F32 cursor_advance = fnt_dim_from_tag_size_string(code_font, code_font_size, 0, code_tab_size, str8_prefix(cursor_line, d_interact_regs()->cursor.column-1)).x; // rjf: scroll x { @@ -631,7 +631,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: scroll y { - S64 new_idx = (df_interact_regs()->cursor.line-1) - num_possible_visible_lines/2 + 2; + S64 new_idx = (d_interact_regs()->cursor.line-1) - num_possible_visible_lines/2 + 2; new_idx = Clamp(scroll_idx_rng[Axis2_Y].min, new_idx, scroll_idx_rng[Axis2_Y].max); ui_scroll_pt_target_idx(&view->scroll_pos.y, new_idx); snap[Axis2_Y] = 0; @@ -641,8 +641,8 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: snap in X if(snap[Axis2_X]) { - String8 cursor_line = str8_substr(text_data, text_info->lines_ranges[df_interact_regs()->cursor.line-1]); - S64 cursor_off = (S64)(fnt_dim_from_tag_size_string(code_font, code_font_size, 0, code_tab_size, str8_prefix(cursor_line, df_interact_regs()->cursor.column-1)).x + priority_margin_width_px + catchall_margin_width_px + line_num_width_px); + String8 cursor_line = str8_substr(text_data, text_info->lines_ranges[d_interact_regs()->cursor.line-1]); + S64 cursor_off = (S64)(fnt_dim_from_tag_size_string(code_font, code_font_size, 0, code_tab_size, str8_prefix(cursor_line, d_interact_regs()->cursor.column-1)).x + priority_margin_width_px + catchall_margin_width_px + line_num_width_px); Rng1S64 visible_pixel_range = { view->scroll_pos.x.idx, @@ -663,7 +663,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, // rjf: snap in Y if(snap[Axis2_Y]) { - Rng1S64 cursor_visibility_range = r1s64(df_interact_regs()->cursor.line-4, df_interact_regs()->cursor.line+4); + Rng1S64 cursor_visibility_range = r1s64(d_interact_regs()->cursor.line-4, d_interact_regs()->cursor.line+4); cursor_visibility_range.min = ClampBot(0, cursor_visibility_range.min); cursor_visibility_range.max = ClampBot(0, cursor_visibility_range.max); S64 min_delta = Min(0, cursor_visibility_range.min-(target_visible_line_num_range.min)); @@ -736,13 +736,13 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, ui_eat_event(evt); if(evt->delta_2f32.y < 0) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_IncCodeFontScale)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_IncCodeFontScale)); } else if(evt->delta_2f32.y > 0) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_DecCodeFontScale)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_DecCodeFontScale)); } } } @@ -773,10 +773,10 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, //- rjf: eval watch view instance -> eval view key -internal DF_EvalViewKey +internal D_EvalViewKey df_eval_view_key_from_eval_watch_view(DF_WatchViewState *ewv) { - DF_EvalViewKey key = df_eval_view_key_make((U64)ewv, df_hash_from_string(str8_struct(&ewv))); + D_EvalViewKey key = d_eval_view_key_make((U64)ewv, d_hash_from_string(str8_struct(&ewv))); return key; } @@ -804,33 +804,33 @@ internal B32 df_watch_view_point_match(DF_WatchViewPoint a, DF_WatchViewPoint b) { return (a.x == b.x && - df_expand_key_match(a.parent_key, b.parent_key) && - df_expand_key_match(a.key, b.key)); + d_expand_key_match(a.parent_key, b.parent_key) && + d_expand_key_match(a.key, b.key)); } internal DF_WatchViewPoint -df_watch_view_point_from_tbl(DF_EvalVizBlockList *blocks, Vec2S64 tbl) +df_watch_view_point_from_tbl(D_EvalVizBlockList *blocks, Vec2S64 tbl) { DF_WatchViewPoint pt = zero_struct; pt.x = tbl.x; - pt.key = df_key_from_viz_block_list_row_num(blocks, tbl.y); - pt.parent_key = df_parent_key_from_viz_block_list_row_num(blocks, tbl.y); + pt.key = d_key_from_viz_block_list_row_num(blocks, tbl.y); + pt.parent_key = d_parent_key_from_viz_block_list_row_num(blocks, tbl.y); return pt; } internal Vec2S64 -df_tbl_from_watch_view_point(DF_EvalVizBlockList *blocks, DF_WatchViewPoint pt) +df_tbl_from_watch_view_point(D_EvalVizBlockList *blocks, DF_WatchViewPoint pt) { Vec2S64 tbl = {0}; tbl.x = pt.x; - tbl.y = df_row_num_from_viz_block_list_key(blocks, pt.key); + tbl.y = d_row_num_from_viz_block_list_key(blocks, pt.key); return tbl; } //- rjf: table coordinates -> strings internal String8 -df_string_from_eval_viz_row_column(Arena *arena, DF_EvalView *ev, DF_EvalVizRow *row, DF_WatchViewColumn *col, B32 editable, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px) +df_string_from_eval_viz_row_column(Arena *arena, D_EvalView *ev, D_EvalVizRow *row, DF_WatchViewColumn *col, B32 editable, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px) { String8 result = {0}; switch(col->kind) @@ -838,12 +838,12 @@ df_string_from_eval_viz_row_column(Arena *arena, DF_EvalView *ev, DF_EvalVizRow default:{}break; case DF_WatchViewColumnKind_Expr: { - result = df_expr_string_from_viz_row(arena, row); + result = d_expr_string_from_viz_row(arena, row); }break; case DF_WatchViewColumnKind_Value: { E_Eval eval = e_eval_from_expr(arena, row->expr); - result = df_value_string_from_eval(arena, !editable * DF_EvalVizStringFlag_ReadOnlyDisplayRules, default_radix, font, font_size, max_size_px, eval, row->member, row->cfg_table); + result = df_value_string_from_eval(arena, !editable * D_EvalVizStringFlag_ReadOnlyDisplayRules, default_radix, font, font_size, max_size_px, eval, row->member, row->cfg_table); }break; case DF_WatchViewColumnKind_Type: { @@ -854,20 +854,20 @@ df_string_from_eval_viz_row_column(Arena *arena, DF_EvalView *ev, DF_EvalVizRow }break; case DF_WatchViewColumnKind_ViewRule: { - result = df_eval_view_rule_from_key(ev, row->key); + result = d_eval_view_rule_from_key(ev, row->key); }break; case DF_WatchViewColumnKind_Module: { E_Eval eval = e_eval_from_expr(arena, row->expr); - DF_Entity *process = df_entity_from_handle(df_interact_regs()->process); - DF_Entity *module = df_module_from_process_vaddr(process, eval.value.u64); - result = df_display_string_from_entity(arena, module); + D_Entity *process = d_entity_from_handle(d_interact_regs()->process); + D_Entity *module = d_module_from_process_vaddr(process, eval.value.u64); + result = d_display_string_from_entity(arena, module); }break; case DF_WatchViewColumnKind_Member: { E_Expr *expr = e_expr_ref_member_access(arena, row->expr, str8(col->string_buffer, col->string_size)); E_Eval eval = e_eval_from_expr(arena, expr); - result = df_value_string_from_eval(arena, !editable * DF_EvalVizStringFlag_ReadOnlyDisplayRules, default_radix, font, font_size, max_size_px, eval, row->member, row->cfg_table); + result = df_value_string_from_eval(arena, !editable * D_EvalVizStringFlag_ReadOnlyDisplayRules, default_radix, font, font_size, max_size_px, eval, row->member, row->cfg_table); }break; } if(col->dequote_string && @@ -950,12 +950,12 @@ df_watch_view_init(DF_WatchViewState *ewv, DF_View *view, DF_WatchViewFillKind f } internal void -df_watch_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, DF_CmdList *cmds) +df_watch_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, D_CmdList *cmds) { - for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) + for(D_CmdNode *n = cmds->first; n != 0; n = n->next) { - DF_Cmd *cmd = &n->cmd; - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); + D_Cmd *cmd = &n->cmd; + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); // rjf: process switch(core_cmd_kind) @@ -963,23 +963,23 @@ df_watch_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewSt default:break; //- rjf: watch expression toggling - case DF_CoreCmdKind_ToggleWatchExpression: + case D_CmdKind_ToggleWatchExpression: if(cmd->params.string.size != 0) { - DF_Entity *existing_watch = df_entity_from_name_and_kind(cmd->params.string, DF_EntityKind_Watch); - if(df_entity_is_nil(existing_watch)) + D_Entity *existing_watch = d_entity_from_name_and_kind(cmd->params.string, D_EntityKind_Watch); + if(d_entity_is_nil(existing_watch)) { - DF_Entity *watch = &df_g_nil_entity; - DF_StateDeltaHistoryBatch(df_state_delta_history()) + D_Entity *watch = &d_nil_entity; + D_StateDeltaHistoryBatch(d_state_delta_history()) { - watch = df_entity_alloc(df_entity_root(), DF_EntityKind_Watch); + watch = d_entity_alloc(d_entity_root(), D_EntityKind_Watch); } - df_entity_equip_cfg_src(watch, DF_CfgSrc_Project); - df_entity_equip_name(watch, cmd->params.string); + d_entity_equip_cfg_src(watch, D_CfgSrc_Project); + d_entity_equip_name(watch, cmd->params.string); } else { - df_entity_mark_for_deletion(existing_watch); + d_entity_mark_for_deletion(existing_watch); } }break; } @@ -998,18 +998,18 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS //- rjf: unpack arguments // FNT_Tag code_font = df_font_from_slot(DF_FontSlot_Code); - DF_Entity *thread = df_entity_from_handle(df_interact_regs()->thread); - Architecture arch = df_architecture_from_entity(thread); - CTRL_Unwind base_unwind = df_query_cached_unwind_from_thread(thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - DF_Unwind rich_unwind = df_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); - U64 thread_ip_vaddr = df_query_cached_rip_from_thread_unwind(thread, df_interact_regs()->unwind_count); - DF_EvalViewKey eval_view_key = df_eval_view_key_from_eval_watch_view(ewv); - DF_EvalView *eval_view = df_eval_view_from_key(eval_view_key); + D_Entity *thread = d_entity_from_handle(d_interact_regs()->thread); + Architecture arch = d_architecture_from_entity(thread); + CTRL_Unwind base_unwind = d_query_cached_unwind_from_thread(thread); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + D_Unwind rich_unwind = d_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); + U64 thread_ip_vaddr = d_query_cached_rip_from_thread_unwind(thread, d_interact_regs()->unwind_count); + D_EvalViewKey eval_view_key = df_eval_view_key_from_eval_watch_view(ewv); + D_EvalView *eval_view = d_eval_view_from_key(eval_view_key); String8 filter = str8(view->query_buffer, view->query_string_size); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); S64 num_possible_visible_rows = (S64)(dim_2f32(rect).y/row_height_px); - DF_EntityKind mutable_entity_kind = DF_EntityKind_Nil; + D_EntityKind mutable_entity_kind = D_EntityKind_Nil; F32 row_string_max_size_px = dim_2f32(rect).x; ////////////////////////////// @@ -1042,8 +1042,8 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS }; U64 frame_rows_count = 0; FrameRow *frame_rows = 0; - DF_CfgTable top_level_cfg_table = {0}; - DF_EvalVizBlockList blocks = {0}; + D_CfgTable top_level_cfg_table = {0}; + D_EvalVizBlockList blocks = {0}; UI_ScrollListRowBlockArray row_blocks = {0}; Vec2S64 cursor_tbl = {0}; Vec2S64 mark_tbl = {0}; @@ -1062,8 +1062,8 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS if(state_dirty) { MemoryZeroStruct(&blocks); - DF_EvalViewKey eval_view_key = df_eval_view_key_from_eval_watch_view(ewv); - DF_EvalView *eval_view = df_eval_view_from_key(eval_view_key); + D_EvalViewKey eval_view_key = df_eval_view_key_from_eval_watch_view(ewv); + D_EvalView *eval_view = d_eval_view_from_key(eval_view_key); String8 filter = str8(view->query_buffer, view->query_string_size); RDI_SectionKind fzy_target = RDI_SectionKind_UDTs; switch(ewv->fill_kind) @@ -1074,25 +1074,25 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS default: case DF_WatchViewFillKind_Watch: { - mutable_entity_kind = DF_EntityKind_Watch; - DF_EntityList watches = df_query_cached_entity_list_with_kind(mutable_entity_kind); - for(DF_EntityNode *n = watches.first; n != 0; n = n->next) + mutable_entity_kind = D_EntityKind_Watch; + D_EntityList watches = d_query_cached_entity_list_with_kind(mutable_entity_kind); + for(D_EntityNode *n = watches.first; n != 0; n = n->next) { - DF_Entity *watch = n->entity; - if(watch->flags & DF_EntityFlag_MarkedForDeletion) + D_Entity *watch = n->entity; + if(watch->flags & D_EntityFlag_MarkedForDeletion) { continue; } - DF_ExpandKey parent_key = df_parent_expand_key_from_entity(watch); - DF_ExpandKey key = df_expand_key_from_entity(watch); - DF_Entity *view_rule = df_entity_child_from_kind(watch, DF_EntityKind_ViewRule); - df_eval_view_set_key_rule(eval_view, key, view_rule->name); + D_ExpandKey parent_key = d_parent_expand_key_from_entity(watch); + D_ExpandKey key = d_expand_key_from_entity(watch); + D_Entity *view_rule = d_entity_child_from_kind(watch, D_EntityKind_ViewRule); + d_eval_view_set_key_rule(eval_view, key, view_rule->name); String8 expr_string = watch->name; FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, expr_string); if(matches.count == matches.needle_part_count) { - DF_EvalVizBlockList watch_blocks = df_eval_viz_block_list_from_eval_view_expr_keys(scratch.arena, eval_view, &top_level_cfg_table, expr_string, parent_key, key); - df_eval_viz_block_list_concat__in_place(&blocks, &watch_blocks);} + D_EvalVizBlockList watch_blocks = d_eval_viz_block_list_from_eval_view_expr_keys(scratch.arena, eval_view, &top_level_cfg_table, expr_string, parent_key, key); + d_eval_viz_block_list_concat__in_place(&blocks, &watch_blocks);} } }break; @@ -1101,19 +1101,19 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS // case DF_WatchViewFillKind_Breakpoints: { - mutable_entity_kind = DF_EntityKind_Breakpoint; - df_cfg_table_push_unparsed_string(scratch.arena, &top_level_cfg_table, str8_lit("no_addr"), DF_CfgSrc_User); - DF_EntityList bps = df_query_cached_entity_list_with_kind(mutable_entity_kind); - for(DF_EntityNode *n = bps.first; n != 0; n = n->next) + mutable_entity_kind = D_EntityKind_Breakpoint; + d_cfg_table_push_unparsed_string(scratch.arena, &top_level_cfg_table, str8_lit("no_addr"), D_CfgSrc_User); + D_EntityList bps = d_query_cached_entity_list_with_kind(mutable_entity_kind); + for(D_EntityNode *n = bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - if(bp->flags & DF_EntityFlag_MarkedForDeletion) + D_Entity *bp = n->entity; + if(bp->flags & D_EntityFlag_MarkedForDeletion) { continue; } - DF_ExpandKey parent_key = df_parent_expand_key_from_entity(bp); - DF_ExpandKey key = df_expand_key_from_entity(bp); - String8 title = df_display_string_from_entity(scratch.arena, bp); + D_ExpandKey parent_key = d_parent_expand_key_from_entity(bp); + D_ExpandKey key = d_expand_key_from_entity(bp); + String8 title = d_display_string_from_entity(scratch.arena, bp); FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, title); if(matches.count == matches.needle_part_count) { @@ -1130,8 +1130,8 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS E_Expr *bp_expr = e_push_expr(scratch.arena, E_ExprKind_LeafOffset, 0); bp_expr->type_key = bp_type; bp_expr->mode = E_Mode_Offset; - bp_expr->space = df_eval_space_from_entity(bp); - df_append_expr_eval_viz_blocks__rec(scratch.arena, eval_view, parent_key, key, title, bp_expr, &top_level_cfg_table, 0, &blocks); + bp_expr->space = d_eval_space_from_entity(bp); + d_append_expr_eval_viz_blocks__rec(scratch.arena, eval_view, parent_key, key, title, bp_expr, &top_level_cfg_table, 0, &blocks); } } }break; @@ -1141,17 +1141,17 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS // case DF_WatchViewFillKind_WatchPins: { - mutable_entity_kind = DF_EntityKind_WatchPin; - DF_EntityList wps = df_query_cached_entity_list_with_kind(mutable_entity_kind); - for(DF_EntityNode *n = wps.first; n != 0; n = n->next) + mutable_entity_kind = D_EntityKind_WatchPin; + D_EntityList wps = d_query_cached_entity_list_with_kind(mutable_entity_kind); + for(D_EntityNode *n = wps.first; n != 0; n = n->next) { - DF_Entity *wp = n->entity; - if(wp->flags & DF_EntityFlag_MarkedForDeletion) + D_Entity *wp = n->entity; + if(wp->flags & D_EntityFlag_MarkedForDeletion) { continue; } - DF_ExpandKey parent_key = df_parent_expand_key_from_entity(wp); - DF_ExpandKey key = df_expand_key_from_entity(wp); + D_ExpandKey parent_key = d_parent_expand_key_from_entity(wp); + D_ExpandKey key = d_expand_key_from_entity(wp); String8 title = wp->name; FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, title); if(matches.count == matches.needle_part_count) @@ -1165,8 +1165,8 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS E_Expr *wp_expr = e_push_expr(scratch.arena, E_ExprKind_LeafOffset, 0); wp_expr->type_key = wp_type; wp_expr->mode = E_Mode_Offset; - wp_expr->space = df_eval_space_from_entity(wp); - df_append_expr_eval_viz_blocks__rec(scratch.arena, eval_view, parent_key, key, title, wp_expr, &top_level_cfg_table, 0, &blocks); + wp_expr->space = d_eval_space_from_entity(wp); + d_append_expr_eval_viz_blocks__rec(scratch.arena, eval_view, parent_key, key, title, wp_expr, &top_level_cfg_table, 0, &blocks); } } }break; @@ -1184,12 +1184,12 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS U64 row_idx = 0; for(;concrete_frame_idx < rich_unwind.frames.concrete_frame_count; concrete_frame_idx += 1, row_idx += 1) { - DF_UnwindFrame *f = &rich_unwind.frames.v[concrete_frame_idx]; + D_UnwindFrame *f = &rich_unwind.frames.v[concrete_frame_idx]; // rjf: fill frame_rows for inline frames { U64 inline_unwind_idx = 0; - for(DF_UnwindInlineFrame *fin = f->last_inline_frame; fin != 0; fin = fin->prev, row_idx += 1, inline_unwind_idx += 1) + for(D_UnwindInlineFrame *fin = f->last_inline_frame; fin != 0; fin = fin->prev, row_idx += 1, inline_unwind_idx += 1) { frame_rows[row_idx].regs = f->regs; frame_rows[row_idx].rdi = f->rdi; @@ -1213,9 +1213,9 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS for(U64 row_idx = 0; row_idx < frame_rows_count; row_idx += 1) { FrameRow *row = &frame_rows[row_idx]; - DF_ExpandKey parent_key = df_expand_key_make(5381, 0); - DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(parent_key), row_idx+1); - DF_EvalVizBlock *block = df_eval_viz_block_begin(scratch.arena, DF_EvalVizBlockKind_Root, parent_key, key, 0); + D_ExpandKey parent_key = d_expand_key_make(5381, 0); + D_ExpandKey key = d_expand_key_make(df_hash_from_expand_key(parent_key), row_idx+1); + D_EvalVizBlock *block = d_eval_viz_block_begin(scratch.arena, D_EvalVizBlockKind_Root, parent_key, key, 0); { E_TypeKey type_key = zero_struct; if(row->procedure != 0) @@ -1233,13 +1233,13 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS E_Expr *expr = e_push_expr(scratch.arena, E_ExprKind_LeafBytecode, 0); expr->bytecode = bytecode; expr->mode = E_Mode_Value; - expr->space = df_eval_space_from_entity(process); + expr->space = d_eval_space_from_entity(process); expr->type_key = type_key; block->expr = expr; block->visual_idx_range = r1u64(row_idx, row_idx+1); block->semantic_idx_range = r1u64(row_idx, row_idx+1); } - df_eval_viz_block_end(&blocks, block); + d_eval_viz_block_end(&blocks, block); } }break; @@ -1248,8 +1248,8 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS // case DF_WatchViewFillKind_Registers: { - DF_Entity *thread = df_entity_from_handle(df_interact_regs()->thread); - Architecture arch = df_architecture_from_entity(thread); + D_Entity *thread = d_entity_from_handle(d_interact_regs()->thread); + Architecture arch = d_architecture_from_entity(thread); U64 reg_count = regs_reg_code_count_from_architecture(arch); String8 *reg_strings = regs_reg_code_string_table_from_architecture(arch); U64 alias_count = regs_alias_code_count_from_architecture(arch); @@ -1261,10 +1261,10 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, root_expr_string); if(matches.count == matches.needle_part_count) { - DF_ExpandKey parent_key = df_expand_key_make(5381, 0); - DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(parent_key), num); - DF_EvalVizBlockList root_blocks = df_eval_viz_block_list_from_eval_view_expr_keys(scratch.arena, eval_view, &top_level_cfg_table, root_expr_string, parent_key, key); - df_eval_viz_block_list_concat__in_place(&blocks, &root_blocks); + D_ExpandKey parent_key = d_expand_key_make(5381, 0); + D_ExpandKey key = d_expand_key_make(df_hash_from_expand_key(parent_key), num); + D_EvalVizBlockList root_blocks = d_eval_viz_block_list_from_eval_view_expr_keys(scratch.arena, eval_view, &top_level_cfg_table, root_expr_string, parent_key, key); + d_eval_viz_block_list_concat__in_place(&blocks, &root_blocks); } } for(U64 alias_idx = 1; alias_idx < alias_count; alias_idx += 1, num += 1) @@ -1273,10 +1273,10 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, root_expr_string); if(matches.count == matches.needle_part_count) { - DF_ExpandKey parent_key = df_expand_key_make(5381, 0); - DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(parent_key), num); - DF_EvalVizBlockList root_blocks = df_eval_viz_block_list_from_eval_view_expr_keys(scratch.arena, eval_view, &top_level_cfg_table, root_expr_string, parent_key, key); - df_eval_viz_block_list_concat__in_place(&blocks, &root_blocks); + D_ExpandKey parent_key = d_expand_key_make(5381, 0); + D_ExpandKey key = d_expand_key_make(df_hash_from_expand_key(parent_key), num); + D_EvalVizBlockList root_blocks = d_eval_viz_block_list_from_eval_view_expr_keys(scratch.arena, eval_view, &top_level_cfg_table, root_expr_string, parent_key, key); + d_eval_viz_block_list_concat__in_place(&blocks, &root_blocks); } } }break; @@ -1295,10 +1295,10 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, root_expr_string); if(matches.count == matches.needle_part_count) { - DF_ExpandKey parent_key = df_expand_key_make(5381, 0); - DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(parent_key), idx+1); - DF_EvalVizBlockList root_blocks = df_eval_viz_block_list_from_eval_view_expr_keys(scratch.arena, eval_view, &top_level_cfg_table, root_expr_string, parent_key, key); - df_eval_viz_block_list_concat__in_place(&blocks, &root_blocks); + D_ExpandKey parent_key = d_expand_key_make(5381, 0); + D_ExpandKey key = d_expand_key_make(df_hash_from_expand_key(parent_key), idx+1); + D_EvalVizBlockList root_blocks = d_eval_viz_block_list_from_eval_view_expr_keys(scratch.arena, eval_view, &top_level_cfg_table, root_expr_string, parent_key, key); + d_eval_viz_block_list_concat__in_place(&blocks, &root_blocks); } } }break; @@ -1315,7 +1315,7 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS U64 endt_us = os_now_microseconds()+200; //- rjf: unpack context - DI_KeyList dbgi_keys_list = df_push_active_dbgi_key_list(scratch.arena); + DI_KeyList dbgi_keys_list = d_push_active_dbgi_key_list(scratch.arena); DI_KeyArray dbgi_keys = di_key_array_from_list(scratch.arena, &dbgi_keys_list); U64 rdis_count = dbgi_keys.count; RDI_Parsed **rdis = push_array(scratch.arena, RDI_Parsed *, rdis_count); @@ -1325,13 +1325,13 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS } //- rjf: calculate top-level keys, expand root-level, grab root expansion node - DF_ExpandKey parent_key = df_expand_key_make(5381, 0); - DF_ExpandKey root_key = df_expand_key_make(df_hash_from_expand_key(parent_key), 0); - df_expand_set_expansion(eval_view->arena, &eval_view->expand_tree_table, df_expand_key_zero(), parent_key, 1); - DF_ExpandNode *root_node = df_expand_node_from_key(&eval_view->expand_tree_table, parent_key); + D_ExpandKey parent_key = d_expand_key_make(5381, 0); + D_ExpandKey root_key = d_expand_key_make(df_hash_from_expand_key(parent_key), 0); + d_expand_set_expansion(eval_view->arena, &eval_view->expand_tree_table, d_expand_key_zero(), parent_key, 1); + D_ExpandNode *root_node = d_expand_node_from_key(&eval_view->expand_tree_table, parent_key); //- rjf: query all filtered items from dbgi searching system - U128 fuzzy_search_key = {(U64)view, df_hash_from_string(str8_struct(&view))}; + U128 fuzzy_search_key = {(U64)view, d_hash_from_string(str8_struct(&view))}; B32 items_stale = 0; FZY_Params params = {fzy_target, dbgi_keys}; FZY_ItemArray items = fzy_items_from_key_params_query(fzy_scope, fuzzy_search_key, ¶ms, filter, endt_us, &items_stale); @@ -1352,18 +1352,18 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS // blocks BY THE ORDER OF SUB-EXPANSIONS IN THE FILTERED ITEM ARRAY // SPACE, so that all of the expansions come out in the right order. // - DF_ExpandKey *sub_expand_keys = 0; + D_ExpandKey *sub_expand_keys = 0; U64 *sub_expand_item_idxs = 0; U64 sub_expand_keys_count = 0; { - for(DF_ExpandNode *child = root_node->first; child != 0; child = child->next) + for(D_ExpandNode *child = root_node->first; child != 0; child = child->next) { sub_expand_keys_count += 1; } - sub_expand_keys = push_array(scratch.arena, DF_ExpandKey, sub_expand_keys_count); + sub_expand_keys = push_array(scratch.arena, D_ExpandKey, sub_expand_keys_count); sub_expand_item_idxs = push_array(scratch.arena, U64, sub_expand_keys_count); U64 idx = 0; - for(DF_ExpandNode *child = root_node->first; child != 0; child = child->next) + for(D_ExpandNode *child = root_node->first; child != 0; child = child->next) { U64 item_num = fzy_item_num_from_array_element_idx__linear_search(&items, child->key.child_num); if(item_num != 0) @@ -1395,15 +1395,15 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS } if(min_idx2 != 0) { - Swap(DF_ExpandKey, sub_expand_keys[idx1], sub_expand_keys[min_idx2]); + Swap(D_ExpandKey, sub_expand_keys[idx1], sub_expand_keys[min_idx2]); Swap(U64, sub_expand_item_idxs[idx1], sub_expand_item_idxs[min_idx2]); } } } //- rjf: build blocks for all table items, split by sorted sub-expansions - DF_CfgTable *cfg_table = &top_level_cfg_table; - DF_EvalVizBlock *last_vb = df_eval_viz_block_begin(scratch.arena, DF_EvalVizBlockKind_DebugInfoTable, parent_key, root_key, 0); + D_CfgTable *cfg_table = &top_level_cfg_table; + D_EvalVizBlock *last_vb = d_eval_viz_block_begin(scratch.arena, D_EvalVizBlockKind_DebugInfoTable, parent_key, root_key, 0); { last_vb->visual_idx_range = last_vb->semantic_idx_range = r1u64(0, items.count); last_vb->fzy_target = fzy_target; @@ -1412,27 +1412,27 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS for(U64 sub_expand_idx = 0; sub_expand_idx < sub_expand_keys_count; sub_expand_idx += 1) { FZY_Item *item = &items.v[sub_expand_item_idxs[sub_expand_idx]]; - E_Expr *child_expr = df_expr_from_eval_viz_block_index(scratch.arena, last_vb, sub_expand_item_idxs[sub_expand_idx]); + E_Expr *child_expr = d_expr_from_eval_viz_block_index(scratch.arena, last_vb, sub_expand_item_idxs[sub_expand_idx]); // rjf: form split: truncate & complete last block; begin next block - last_vb = df_eval_viz_block_split_and_continue(scratch.arena, &blocks, last_vb, sub_expand_item_idxs[sub_expand_idx]); + last_vb = d_eval_viz_block_split_and_continue(scratch.arena, &blocks, last_vb, sub_expand_item_idxs[sub_expand_idx]); // rjf: build child config table - DF_CfgTable *child_cfg_table = cfg_table; + D_CfgTable *child_cfg_table = cfg_table; { - String8 view_rule_string = df_eval_view_rule_from_key(eval_view, sub_expand_keys[sub_expand_idx]); + String8 view_rule_string = d_eval_view_rule_from_key(eval_view, sub_expand_keys[sub_expand_idx]); if(view_rule_string.size != 0) { - child_cfg_table = push_array(scratch.arena, DF_CfgTable, 1); - *child_cfg_table = df_cfg_table_from_inheritance(scratch.arena, cfg_table); - df_cfg_table_push_unparsed_string(scratch.arena, child_cfg_table, view_rule_string, DF_CfgSrc_User); + child_cfg_table = push_array(scratch.arena, D_CfgTable, 1); + *child_cfg_table = d_cfg_table_from_inheritance(scratch.arena, cfg_table); + d_cfg_table_push_unparsed_string(scratch.arena, child_cfg_table, view_rule_string, D_CfgSrc_User); } } // rjf: recurse for child - df_append_expr_eval_viz_blocks__rec(scratch.arena, eval_view, parent_key, sub_expand_keys[sub_expand_idx], str8_zero(), child_expr, child_cfg_table, 0, &blocks); + d_append_expr_eval_viz_blocks__rec(scratch.arena, eval_view, parent_key, sub_expand_keys[sub_expand_idx], str8_zero(), child_expr, child_cfg_table, 0, &blocks); } - df_eval_viz_block_end(&blocks, last_vb); + d_eval_viz_block_end(&blocks, last_vb); }break; } } @@ -1440,13 +1440,13 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS ////////////////////////// //- rjf: does this eval watch view allow mutation? -> add extra block for editable empty row // - DF_ExpandKey empty_row_parent_key = df_expand_key_make(max_U64, max_U64); - DF_ExpandKey empty_row_key = df_expand_key_make(df_hash_from_expand_key(empty_row_parent_key), 1); + D_ExpandKey empty_row_parent_key = d_expand_key_make(max_U64, max_U64); + D_ExpandKey empty_row_key = d_expand_key_make(df_hash_from_expand_key(empty_row_parent_key), 1); if(state_dirty && modifiable) { - DF_EvalVizBlock *b = df_eval_viz_block_begin(scratch.arena, DF_EvalVizBlockKind_Null, empty_row_parent_key, empty_row_key, 0); + D_EvalVizBlock *b = d_eval_viz_block_begin(scratch.arena, D_EvalVizBlockKind_Null, empty_row_parent_key, empty_row_key, 0); b->visual_idx_range = b->semantic_idx_range = r1u64(0, 1); - df_eval_viz_block_end(&blocks, b); + d_eval_viz_block_end(&blocks, b); } ////////////////////////// @@ -1454,9 +1454,9 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS // { UI_ScrollListRowBlockChunkList row_block_chunks = {0}; - for(DF_EvalVizBlockNode *n = blocks.first; n != 0; n = n->next) + for(D_EvalVizBlockNode *n = blocks.first; n != 0; n = n->next) { - DF_EvalVizBlock *vb = &n->v; + D_EvalVizBlock *vb = &n->v; UI_ScrollListRowBlock block = {0}; block.row_count = dim_1u64(vb->visual_idx_range); block.item_count = dim_1u64(vb->semantic_idx_range); @@ -1491,14 +1491,14 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS }; for(U64 point_idx = 0; point_idx < ArrayCount(points); point_idx += 1) { - DF_ExpandKey last_key = points[point_idx].pt_state->key; - DF_ExpandKey last_parent_key = points[point_idx].pt_state->parent_key; + D_ExpandKey last_key = points[point_idx].pt_state->key; + D_ExpandKey last_parent_key = points[point_idx].pt_state->parent_key; points[point_idx].pt_state[0] = df_watch_view_point_from_tbl(&blocks, points[point_idx].pt_tbl); - if(df_expand_key_match(df_expand_key_zero(), points[point_idx].pt_state->key)) + if(d_expand_key_match(d_expand_key_zero(), points[point_idx].pt_state->key)) { points[point_idx].pt_state->key = last_parent_key; - DF_ExpandNode *node = df_expand_node_from_key(&eval_view->expand_tree_table, last_parent_key); - for(DF_ExpandNode *n = node; n != 0; n = n->parent) + D_ExpandNode *node = d_expand_node_from_key(&eval_view->expand_tree_table, last_parent_key); + for(D_ExpandNode *n = node; n != 0; n = n->parent) { points[point_idx].pt_state->key = n->key; if(n->expanded == 0) @@ -1508,8 +1508,8 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS } } if(point_idx == 0 && - (!df_expand_key_match(ewv->cursor.key, last_key) || - !df_expand_key_match(ewv->cursor.parent_key, last_parent_key))) + (!d_expand_key_match(ewv->cursor.key, last_key) || + !d_expand_key_match(ewv->cursor.parent_key, last_parent_key))) { ewv->text_editing = 0; } @@ -1609,9 +1609,9 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS ewv->text_edit_state_slots_count = u64_up_to_pow2(selection_dim.y+1); ewv->text_edit_state_slots_count = Max(ewv->text_edit_state_slots_count, 64); ewv->text_edit_state_slots = push_array(ewv->text_edit_arena, DF_WatchViewTextEditState*, ewv->text_edit_state_slots_count); - DF_EvalVizWindowedRowList rows = df_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y-1), - ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y-1)+1), &blocks); - DF_EvalVizRow *row = rows.first; + D_EvalVizWindowedRowList rows = d_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y-1), + ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y-1)+1), &blocks); + D_EvalVizRow *row = rows.first; for(S64 y = selection_tbl.min.y; y <= selection_tbl.max.y; y += 1, row = row->next) { for(S64 x = selection_tbl.min.x; x <= selection_tbl.max.x; x += 1) @@ -1641,26 +1641,26 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS if(!ewv->text_editing && evt->slot == UI_EventActionSlot_Accept) { taken = 1; - DF_EvalVizWindowedRowList rows = df_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y-1), - ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y-1)+1), &blocks); - DF_EvalVizRow *row = rows.first; + D_EvalVizWindowedRowList rows = d_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y-1), + ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y-1)+1), &blocks); + D_EvalVizRow *row = rows.first; for(S64 y = selection_tbl.min.y; y <= selection_tbl.max.y && row != 0; y += 1, row = row->next) { - if(selection_tbl.min.x <= 0 && df_viz_row_is_expandable(row)) + if(selection_tbl.min.x <= 0 && d_viz_row_is_expandable(row)) { - B32 is_expanded = df_expand_key_is_set(&eval_view->expand_tree_table, row->key); - df_expand_set_expansion(eval_view->arena, &eval_view->expand_tree_table, row->parent_key, row->key, !is_expanded); + B32 is_expanded = d_expand_key_is_set(&eval_view->expand_tree_table, row->key); + d_expand_set_expansion(eval_view->arena, &eval_view->expand_tree_table, row->parent_key, row->key, !is_expanded); } if(row->expand_ui_rule_spec != &df_g_nil_gfx_view_rule_spec && row->expand_ui_rule_spec != 0) { - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); p.string = e_string_from_expr(scratch.arena, row->expr); p.view_spec = df_view_spec_from_string(row->expand_ui_rule_spec->info.string); p.params_tree = row->expand_ui_rule_params; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_ViewSpec); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_ParamsTree); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_OpenTab)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_ViewSpec); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_ParamsTree); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_OpenTab)); } } } @@ -1674,36 +1674,36 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS selection_tbl.min.x == 1) { taken = 1; - DF_EvalVizWindowedRowList rows = df_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y-1), - ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y-1)+1), &blocks); - DF_EvalVizRow *row = rows.first; - B32 row_is_editable = df_viz_row_is_editable(row); + D_EvalVizWindowedRowList rows = d_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y-1), + ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y-1)+1), &blocks); + D_EvalVizRow *row = rows.first; + B32 row_is_editable = d_viz_row_is_editable(row); if(!row_is_editable) { E_Eval eval = e_eval_from_expr(scratch.arena, row->expr); U64 vaddr = eval.value.u64; - DF_Entity *module = df_module_from_process_vaddr(process, vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - U64 voff = df_voff_from_vaddr(module, vaddr); - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, voff); - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - p.entity = df_handle_from_entity(process); + D_Entity *module = d_module_from_process_vaddr(process, vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + U64 voff = d_voff_from_vaddr(module, vaddr); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, voff); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + p.entity = d_handle_from_entity(process); p.vaddr = vaddr; if(lines.first != 0) { p.file_path = lines.first->v.file_path; p.text_point = lines.first->v.pt; } - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); } if(1 <= selection_tbl.min.y && selection_tbl.min.y <= frame_rows_count) { FrameRow *frame_row = &frame_rows[selection_tbl.min.y-1]; - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - p.entity = df_interact_regs()->thread; + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + p.entity = d_interact_regs()->thread; p.unwind_index = frame_row->unwind_idx; p.inline_depth = frame_row->inline_depth; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SelectUnwind)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_SelectUnwind)); } } @@ -1782,20 +1782,20 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS if(modifiable) { DF_WatchViewPoint pt = df_watch_view_point_from_tbl(&blocks, tbl); - DF_Entity *watch = df_entity_from_expand_key_and_kind(pt.key, mutable_entity_kind); - if(!df_entity_is_nil(watch)) + D_Entity *watch = d_entity_from_expand_key_and_kind(pt.key, mutable_entity_kind); + if(!d_entity_is_nil(watch)) { - df_entity_equip_name(watch, new_string); + d_entity_equip_name(watch, new_string); state_dirty = 1; snap_to_cursor = 1; } - else if(editing_complete && new_string.size != 0 && df_expand_key_match(pt.key, empty_row_key)) + else if(editing_complete && new_string.size != 0 && d_expand_key_match(pt.key, empty_row_key)) { - watch = df_entity_alloc(df_entity_root(), mutable_entity_kind); - df_entity_equip_cfg_src(watch, DF_CfgSrc_Project); - df_entity_equip_name(watch, new_string); - DF_ExpandKey key = df_expand_key_from_entity(watch); - df_eval_view_set_key_rule(eval_view, key, str8_zero()); + watch = d_entity_alloc(d_entity_root(), mutable_entity_kind); + d_entity_equip_cfg_src(watch, D_CfgSrc_Project); + d_entity_equip_name(watch, new_string); + D_ExpandKey key = d_expand_key_from_entity(watch); + d_eval_view_set_key_rule(eval_view, key, str8_zero()); state_dirty = 1; snap_to_cursor = 1; } @@ -1804,8 +1804,8 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS case DF_WatchViewColumnKind_Value: if(editing_complete && evt->slot != UI_EventActionSlot_Cancel) { - DF_EvalVizWindowedRowList rows = df_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, y-1), - ui_scroll_list_row_from_item(&row_blocks, y-1)+1), &blocks); + D_EvalVizWindowedRowList rows = d_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, y-1), + ui_scroll_list_row_from_item(&row_blocks, y-1)+1), &blocks); B32 success = 0; if(rows.first != 0) { @@ -1815,14 +1815,14 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS expr = e_expr_ref_member_access(scratch.arena, expr, str8(col->string_buffer, col->string_size)); } E_Eval dst_eval = e_eval_from_expr(scratch.arena, expr); - success = df_commit_eval_value_string(dst_eval, new_string); + success = d_commit_eval_value_string(dst_eval, new_string); } if(!success) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.string = str8_lit("Could not commit value successfully."); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Error)); } }break; case DF_WatchViewColumnKind_Type:{}break; @@ -1830,20 +1830,20 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS if(editing_complete) { DF_WatchViewPoint pt = df_watch_view_point_from_tbl(&blocks, tbl); - df_eval_view_set_key_rule(eval_view, pt.key, new_string); - DF_Entity *watch = df_entity_from_expand_key_and_kind(pt.key, mutable_entity_kind); - DF_Entity *view_rule = df_entity_child_from_kind(watch, DF_EntityKind_ViewRule); - if(new_string.size != 0 && df_entity_is_nil(view_rule)) + d_eval_view_set_key_rule(eval_view, pt.key, new_string); + D_Entity *watch = d_entity_from_expand_key_and_kind(pt.key, mutable_entity_kind); + D_Entity *view_rule = d_entity_child_from_kind(watch, D_EntityKind_ViewRule); + if(new_string.size != 0 && d_entity_is_nil(view_rule)) { - view_rule = df_entity_alloc(watch, DF_EntityKind_ViewRule); + view_rule = d_entity_alloc(watch, D_EntityKind_ViewRule); } - else if(new_string.size == 0 && !df_entity_is_nil(view_rule)) + else if(new_string.size == 0 && !d_entity_is_nil(view_rule)) { - df_entity_mark_for_deletion(view_rule); + d_entity_mark_for_deletion(view_rule); } if(new_string.size != 0) { - df_entity_equip_name(view_rule, new_string); + d_entity_equip_name(view_rule, new_string); } state_dirty = 1; snap_to_cursor = 1; @@ -1865,9 +1865,9 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS { taken = 1; String8List strs = {0}; - DF_EvalVizWindowedRowList rows = df_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y-1), - ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y-1)+1), &blocks); - DF_EvalVizRow *row = rows.first; + D_EvalVizWindowedRowList rows = d_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y-1), + ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y-1)+1), &blocks); + D_EvalVizRow *row = rows.first; for(S64 y = selection_tbl.min.y; y <= selection_tbl.max.y && row != 0; y += 1, row = row->next) { for(S64 x = selection_tbl.min.x; x <= selection_tbl.max.x; x += 1) @@ -1915,31 +1915,31 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS { DF_WatchViewPoint fallback_pt_prev = df_watch_view_point_from_tbl(&blocks, v2s64(0, y - 1)); DF_WatchViewPoint fallback_pt_next = df_watch_view_point_from_tbl(&blocks, v2s64(0, y + 1)); - DF_Entity *watch = df_entity_from_expand_key_and_kind(pt.key, mutable_entity_kind); - if(!df_entity_is_nil(watch)) + D_Entity *watch = d_entity_from_expand_key_and_kind(pt.key, mutable_entity_kind); + if(!d_entity_is_nil(watch)) { - DF_ExpandKey new_cursor_key = empty_row_key; - DF_ExpandKey new_cursor_parent_key = empty_row_parent_key; - if((evt->delta_2s32.x < 0 || evt->delta_2s32.y < 0) && !df_expand_key_match(df_expand_key_zero(), fallback_pt_prev.key)) + D_ExpandKey new_cursor_key = empty_row_key; + D_ExpandKey new_cursor_parent_key = empty_row_parent_key; + if((evt->delta_2s32.x < 0 || evt->delta_2s32.y < 0) && !d_expand_key_match(d_expand_key_zero(), fallback_pt_prev.key)) { - DF_Entity *fallback_watch = df_entity_from_expand_key_and_kind(fallback_pt_prev.key, mutable_entity_kind); - if(!df_entity_is_nil(fallback_watch)) + D_Entity *fallback_watch = d_entity_from_expand_key_and_kind(fallback_pt_prev.key, mutable_entity_kind); + if(!d_entity_is_nil(fallback_watch)) { new_cursor_key = fallback_pt_prev.key; - new_cursor_parent_key = df_parent_expand_key_from_entity(fallback_watch); + new_cursor_parent_key = d_parent_expand_key_from_entity(fallback_watch); } } - else if(!df_expand_key_match(df_expand_key_zero(), fallback_pt_next.key)) + else if(!d_expand_key_match(d_expand_key_zero(), fallback_pt_next.key)) { - DF_Entity *fallback_watch = df_entity_from_expand_key_and_kind(fallback_pt_next.key, mutable_entity_kind); - if(!df_entity_is_nil(fallback_watch)) + D_Entity *fallback_watch = d_entity_from_expand_key_and_kind(fallback_pt_next.key, mutable_entity_kind); + if(!d_entity_is_nil(fallback_watch)) { new_cursor_key = fallback_pt_next.key; - new_cursor_parent_key = df_parent_expand_key_from_entity(fallback_watch); + new_cursor_parent_key = d_parent_expand_key_from_entity(fallback_watch); } } DF_WatchViewPoint new_cursor_pt = {0, new_cursor_parent_key, new_cursor_key}; - df_entity_mark_for_deletion(watch); + d_entity_mark_for_deletion(watch); ewv->cursor = ewv->mark = ewv->next_cursor = ewv->next_mark = new_cursor_pt; } } @@ -1947,10 +1947,10 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS // rjf: view rule deletions else if(selection_tbl.min.x <= DF_WatchViewColumnKind_ViewRule && DF_WatchViewColumnKind_ViewRule <= selection_tbl.max.x) { - DF_Entity *watch = df_entity_from_expand_key_and_kind(pt.key, mutable_entity_kind); - DF_Entity *view_rule = df_entity_child_from_kind(watch, DF_EntityKind_ViewRule); - df_entity_mark_for_deletion(view_rule); - df_eval_view_set_key_rule(eval_view, pt.key, str8_zero()); + D_Entity *watch = d_entity_from_expand_key_and_kind(pt.key, mutable_entity_kind); + D_Entity *view_rule = d_entity_child_from_kind(watch, D_EntityKind_ViewRule); + d_entity_mark_for_deletion(view_rule); + d_eval_view_set_key_rule(eval_view, pt.key, str8_zero()); } } } @@ -2047,36 +2047,36 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS if(!ewv->text_editing && evt->flags & UI_EventFlag_Reorder) { taken = 1; - DF_ExpandKey first_watch_key = df_key_from_viz_block_list_row_num(&blocks, selection_tbl.min.y); - DF_ExpandKey reorder_group_prev_watch_key = df_key_from_viz_block_list_row_num(&blocks, selection_tbl.min.y - 1); - DF_ExpandKey reorder_group_next_watch_key = df_key_from_viz_block_list_row_num(&blocks, selection_tbl.max.y + 1); - DF_Entity *reorder_group_prev = df_entity_from_expand_key_and_kind(reorder_group_prev_watch_key, mutable_entity_kind); - DF_Entity *reorder_group_next = df_entity_from_expand_key_and_kind(reorder_group_next_watch_key, mutable_entity_kind); - DF_Entity *first_watch = df_entity_from_expand_key_and_kind(first_watch_key, mutable_entity_kind); - DF_Entity *last_watch = first_watch; - if(!df_entity_is_nil(first_watch)) + D_ExpandKey first_watch_key = d_key_from_viz_block_list_row_num(&blocks, selection_tbl.min.y); + D_ExpandKey reorder_group_prev_watch_key = d_key_from_viz_block_list_row_num(&blocks, selection_tbl.min.y - 1); + D_ExpandKey reorder_group_next_watch_key = d_key_from_viz_block_list_row_num(&blocks, selection_tbl.max.y + 1); + D_Entity *reorder_group_prev = d_entity_from_expand_key_and_kind(reorder_group_prev_watch_key, mutable_entity_kind); + D_Entity *reorder_group_next = d_entity_from_expand_key_and_kind(reorder_group_next_watch_key, mutable_entity_kind); + D_Entity *first_watch = d_entity_from_expand_key_and_kind(first_watch_key, mutable_entity_kind); + D_Entity *last_watch = first_watch; + if(!d_entity_is_nil(first_watch)) { for(S64 y = selection_tbl.min.y+1; y <= selection_tbl.max.y; y += 1) { - DF_ExpandKey key = df_key_from_viz_block_list_row_num(&blocks, y); - DF_Entity *new_last = df_entity_from_expand_key_and_kind(key, mutable_entity_kind); - if(!df_entity_is_nil(new_last)) + D_ExpandKey key = d_key_from_viz_block_list_row_num(&blocks, y); + D_Entity *new_last = d_entity_from_expand_key_and_kind(key, mutable_entity_kind); + if(!d_entity_is_nil(new_last)) { last_watch = new_last; } } } - if(evt->delta_2s32.y < 0 && !df_entity_is_nil(first_watch) && !df_entity_is_nil(reorder_group_prev)) + if(evt->delta_2s32.y < 0 && !d_entity_is_nil(first_watch) && !d_entity_is_nil(reorder_group_prev)) { state_dirty = 1; snap_to_cursor = 1; - df_entity_change_parent(reorder_group_prev, reorder_group_prev->parent, reorder_group_prev->parent, last_watch); + d_entity_change_parent(reorder_group_prev, reorder_group_prev->parent, reorder_group_prev->parent, last_watch); } - if(evt->delta_2s32.y > 0 && !df_entity_is_nil(last_watch) && !df_entity_is_nil(reorder_group_next)) + if(evt->delta_2s32.y > 0 && !d_entity_is_nil(last_watch) && !d_entity_is_nil(reorder_group_next)) { state_dirty = 1; snap_to_cursor = 1; - df_entity_change_parent(reorder_group_next, reorder_group_next->parent, reorder_group_next->parent, reorder_group_prev); + d_entity_change_parent(reorder_group_next, reorder_group_next->parent, reorder_group_next->parent, reorder_group_prev); } } @@ -2123,9 +2123,9 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS scroll_list_params.item_range = r1s64(0, 1 + blocks.total_visual_row_count); scroll_list_params.cursor_min_is_empty_selection[Axis2_Y] = 1; UI_ScrollListRowBlockChunkList row_block_chunks = {0}; - for(DF_EvalVizBlockNode *n = blocks.first; n != 0; n = n->next) + for(D_EvalVizBlockNode *n = blocks.first; n != 0; n = n->next) { - DF_EvalVizBlock *vb = &n->v; + D_EvalVizBlock *vb = &n->v; UI_ScrollListRowBlock block = {0}; block.row_count = dim_1u64(vb->visual_idx_range); block.item_count = dim_1u64(vb->semantic_idx_range); @@ -2134,7 +2134,7 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS scroll_list_params.row_blocks = ui_scroll_list_row_block_array_from_chunk_list(scratch.arena, &row_block_chunks); } UI_BoxFlags disabled_flags = ui_top_flags(); - if(df_ctrl_targets_running()) + if(d_ctrl_targets_running()) { disabled_flags |= UI_BoxFlag_Disabled; } @@ -2220,9 +2220,9 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS //////////////////////////// //- rjf: viz blocks -> rows // - DF_EvalVizWindowedRowList rows = {0}; + D_EvalVizWindowedRowList rows = {0}; { - rows = df_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(visible_row_rng.min-1, visible_row_rng.max), &blocks); + rows = d_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, eval_view, r1s64(visible_row_rng.min-1, visible_row_rng.max), &blocks); } //////////////////////////// @@ -2231,17 +2231,17 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS ProfScope("build table") { U64 semantic_idx = rows.count_before_semantic; - for(DF_EvalVizRow *row = rows.first; row != 0; row = row->next, semantic_idx += 1) + for(D_EvalVizRow *row = rows.first; row != 0; row = row->next, semantic_idx += 1) { //////////////////////// //- rjf: unpack row info // U64 row_hash = df_hash_from_expand_key(row->key); B32 row_selected = (selection_tbl.min.y <= (semantic_idx+1) && (semantic_idx+1) <= selection_tbl.max.y); - B32 row_expanded = df_expand_key_is_set(&eval_view->expand_tree_table, row->key); + B32 row_expanded = d_expand_key_is_set(&eval_view->expand_tree_table, row->key); E_Eval row_eval = e_eval_from_expr(scratch.arena, row->expr); - B32 row_is_expandable = df_viz_row_is_expandable(row); - B32 row_is_editable = df_viz_row_is_editable(row); + B32 row_is_expandable = d_viz_row_is_expandable(row); + B32 row_is_editable = d_viz_row_is_editable(row); B32 next_row_expanded = row_expanded; //////////////////////// @@ -2254,8 +2254,8 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS default:{}break; case E_Mode_Offset: { - DF_Entity *space_entity = df_entity_from_eval_space(row_eval.space); - if(space_entity->kind == DF_EntityKind_Process) + D_Entity *space_entity = d_entity_from_eval_space(row_eval.space); + if(space_entity->kind == D_EntityKind_Process) { U64 size = e_type_byte_size_from_key(row_eval.type_key); size = Min(size, 64); @@ -2365,11 +2365,11 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS if(ui_clicked(sig)) { DF_ViewSpec *canvas_view_spec = df_view_spec_from_string(row->expand_ui_rule_spec->info.string); - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); p.string = e_string_from_expr(scratch.arena, row->expr); p.view_spec = canvas_view_spec; p.params_tree = row->expand_ui_rule_params; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_OpenTab)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_OpenTab)); } } @@ -2384,9 +2384,9 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS df_loading_overlay(canvas_rect, canvas_view->loading_t, canvas_view->loading_progress_v, canvas_view->loading_progress_v_target); //- rjf: push interaction registers, fill with per-view states - df_push_interact_regs(); + d_push_interact_regs(); { - df_interact_regs()->file_path = df_file_path_from_eval_string(df_frame_arena(), str8(canvas_view->query_buffer, canvas_view->query_string_size)); + d_interact_regs()->file_path = d_file_path_from_eval_string(d_frame_arena(), str8(canvas_view->query_buffer, canvas_view->query_string_size)); } //- rjf: build @@ -2396,7 +2396,7 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS } //- rjf: pop interaction registers - df_pop_interact_regs(); + d_pop_interact_regs(); } } } @@ -2473,7 +2473,7 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS cell_can_edit = (row->depth == 0 && modifiable); if(filter.size != 0) { - cell_matches = fuzzy_match_find(scratch.arena, filter, df_expr_string_from_viz_row(scratch.arena, row)); + cell_matches = fuzzy_match_find(scratch.arena, filter, d_expr_string_from_viz_row(scratch.arena, row)); } cell_autocomp_flags = DF_AutoCompListerFlag_Locals; if(row->member != 0 && row->member->inheritance_key_chain.first != 0) @@ -2531,7 +2531,7 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS cell_ui_hook = row->value_ui_rule_spec->info.row_ui; cell_ui_params = row->value_ui_rule_params; } - cell_can_edit = df_type_key_is_editable(cell_eval.type_key); + cell_can_edit = d_type_key_is_editable(cell_eval.type_key); }break; case DF_WatchViewColumnKind_Type: { @@ -2544,10 +2544,10 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS }break; case DF_WatchViewColumnKind_FrameSelection: { - if(semantic_idx == df_interact_regs()->unwind_count - df_interact_regs()->inline_depth) + if(semantic_idx == d_interact_regs()->unwind_count - d_interact_regs()->inline_depth) { cell_icon = DF_IconKind_RightArrow; - cell_base_color = df_rgba_from_entity(df_entity_from_handle(df_interact_regs()->thread)); + cell_base_color = d_rgba_from_entity(d_entity_from_handle(d_interact_regs()->thread)); } }break; } @@ -2556,9 +2556,9 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS if(col->view_rule_size != 0) { String8 col_view_rule = str8(col->view_rule_buffer, col->view_rule_size); - DF_CfgTable col_cfg_table = {0}; - df_cfg_table_push_unparsed_string(scratch.arena, &col_cfg_table, col_view_rule, DF_CfgSrc_User); - for(DF_CfgVal *val = col_cfg_table.first_val; val != 0 && val != &df_g_nil_cfg_val; val = val->linear_next) + D_CfgTable col_cfg_table = {0}; + d_cfg_table_push_unparsed_string(scratch.arena, &col_cfg_table, col_view_rule, D_CfgSrc_User); + for(D_CfgVal *val = col_cfg_table.first_val; val != 0 && val != &d_nil_cfg_val; val = val->linear_next) { DF_GfxViewRuleSpec *spec = df_gfx_view_rule_spec_from_string(val->string); if(spec != &df_g_nil_gfx_view_rule_spec && spec->info.flags & DF_GfxViewRuleSpecInfoFlag_RowUI) @@ -2674,38 +2674,38 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS if(ui_double_clicked(sig) && cell_can_edit) { ui_kill_action(); - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Edit)); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Edit)); } // rjf: double-click, not editable -> go-to-location if(ui_double_clicked(sig) && !cell_can_edit) { U64 vaddr = cell_eval.value.u64; - DF_Entity *module = df_module_from_process_vaddr(process, vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - U64 voff = df_voff_from_vaddr(module, vaddr); - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, voff); - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - p.entity = df_handle_from_entity(process); + D_Entity *module = d_module_from_process_vaddr(process, vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + U64 voff = d_voff_from_vaddr(module, vaddr); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, voff); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + p.entity = d_handle_from_entity(process); p.vaddr = vaddr; if(lines.first != 0) { p.file_path = lines.first->v.file_path; p.text_point = lines.first->v.pt; } - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FindCodeLocation)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FindCodeLocation)); } // rjf: double-click, not editable, callstack frame -> select frame if(ui_double_clicked(sig) && !cell_can_edit && semantic_idx < frame_rows_count) { FrameRow *frame_row = &frame_rows[semantic_idx]; - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - p.entity = df_interact_regs()->thread; + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + p.entity = d_interact_regs()->thread; p.unwind_index = frame_row->unwind_idx; p.inline_depth = frame_row->inline_depth; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SelectUnwind)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_SelectUnwind)); } // rjf: hovering with inheritance string -> show tooltip @@ -2729,7 +2729,7 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS if(DEV_eval_compiler_tooltips && x == 0 && ui_hovering(sig)) UI_Tooltip DF_Font(ws, DF_FontSlot_Code) { local_persist char *spaces = " "; - String8 string = df_expr_string_from_viz_row(scratch.arena, row); + String8 string = d_expr_string_from_viz_row(scratch.arena, row); E_TokenArray tokens = e_token_array_from_text(scratch.arena, string); E_Parse parse = e_parse_expr_from_text_tokens(scratch.arena, string, &tokens); E_IRTreeAndType irtree = e_irtree_and_type_from_expr(scratch.arena, parse.expr); @@ -2877,7 +2877,7 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS // if(next_row_expanded != row_expanded) { - df_expand_set_expansion(eval_view->arena, &eval_view->expand_tree_table, row->parent_key, row->key, next_row_expanded); + d_expand_set_expansion(eval_view->arena, &eval_view->expand_tree_table, row->parent_key, row->key, next_row_expanded); } } } @@ -2889,8 +2889,8 @@ df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewS // if(pressed) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } scratch_end(scratch); @@ -2927,8 +2927,8 @@ DF_VIEW_UI_FUNCTION_DEF(empty) { if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_X, 0, "Close Panel"))) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_ClosePanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_ClosePanel)); } } } @@ -2948,8 +2948,8 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_Padding(ui_pct(1, 0)) UI_Focus(UI_FocusKind_Null) { - DF_EntityList targets = df_push_active_target_list(scratch.arena); - DF_EntityList processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); + D_EntityList targets = d_push_active_target_list(scratch.arena); + D_EntityList processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); //- rjf: icon & info UI_Padding(ui_em(2.f, 1.f)) @@ -2999,17 +2999,17 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) DF_Palette(ws, DF_PaletteCode_NeutralPopButton) if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_Add, 0, "Add Target"))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_AddTarget); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.cmd_spec = d_cmd_spec_from_kind(D_CmdKind_AddTarget); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); } }break; //- rjf: user has 1 target. build helper for launching it case 1: { - DF_Entity *target = df_first_entity_from_list(&targets); + D_Entity *target = d_first_entity_from_list(&targets); String8 target_full_path = target->name; String8 target_name = str8_skip_last_slash(target_full_path); UI_PrefHeight(ui_em(3.75f, 1.f)) @@ -3022,18 +3022,18 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) { if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_Play, 0, "Launch %S", target_name))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.entity = df_handle_from_entity(target); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_LaunchAndRun)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.entity = d_handle_from_entity(target); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_LaunchAndRun)); } ui_spacer(ui_em(1.5f, 1)); if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_Play, 0, "Step Into %S", target_name))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.entity = df_handle_from_entity(target); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_LaunchAndInit)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.entity = d_handle_from_entity(target); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_LaunchAndInit)); } } }break; @@ -3064,7 +3064,7 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) UI_Padding(ui_pct(1, 0)) { ui_labelf("use"); - DF_CmdSpec *spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand); + D_CmdSpec *spec = d_cmd_spec_from_kind(D_CmdKind_RunCommand); UI_Flags(UI_BoxFlag_DrawBorder) UI_TextAlignment(UI_TextAlign_Center) df_cmd_binding_buttons(ws, spec); ui_labelf("to open command menu"); } @@ -3079,7 +3079,7 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) typedef struct DF_CmdListerItem DF_CmdListerItem; struct DF_CmdListerItem { - DF_CmdSpec *cmd_spec; + D_CmdSpec *cmd_spec; U64 registrar_idx; U64 ordering_idx; FuzzyMatchRangeList name_match_ranges; @@ -3113,12 +3113,12 @@ internal DF_CmdListerItemList df_cmd_lister_item_list_from_needle(Arena *arena, String8 needle) { Temp scratch = scratch_begin(&arena, 1); - DF_CmdSpecList specs = df_push_cmd_spec_list(scratch.arena); + D_CmdSpecList specs = d_push_cmd_spec_list(scratch.arena); DF_CmdListerItemList result = {0}; - for(DF_CmdSpecNode *n = specs.first; n != 0; n = n->next) + for(D_CmdSpecNode *n = specs.first; n != 0; n = n->next) { - DF_CmdSpec *spec = n->spec; - if(spec->info.flags & DF_CmdSpecFlag_ListInUI) + D_CmdSpec *spec = n->spec; + if(spec->info.flags & D_CmdSpecFlag_ListInUI) { String8 cmd_display_name = spec->info.display_name; String8 cmd_desc = spec->info.description; @@ -3225,7 +3225,7 @@ DF_VIEW_UI_FUNCTION_DEF(commands) typedef struct DF_CmdsViewState DF_CmdsViewState; struct DF_CmdsViewState { - DF_CmdSpec *selected_cmd_spec; + D_CmdSpec *selected_cmd_spec; }; DF_CmdsViewState *cv = df_view_user_state(view, DF_CmdsViewState); @@ -3235,16 +3235,16 @@ DF_VIEW_UI_FUNCTION_DEF(commands) df_cmd_lister_item_array_sort_by_strength__in_place(cmd_array); //- rjf: submit best match when hitting enter w/ no selection - if(cv->selected_cmd_spec == &df_g_nil_cmd_spec && ui_slot_press(UI_EventActionSlot_Accept)) + if(cv->selected_cmd_spec == &d_nil_cmd_spec && ui_slot_press(UI_EventActionSlot_Accept)) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); if(cmd_array.count > 0) { DF_CmdListerItem *item = &cmd_array.v[0]; params.cmd_spec = item->cmd_spec; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); } - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } //- rjf: selected kind -> cursor @@ -3356,10 +3356,10 @@ DF_VIEW_UI_FUNCTION_DEF(commands) UI_Signal sig = ui_signal_from_box(box); if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.cmd_spec = item->cmd_spec; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } } } @@ -3371,7 +3371,7 @@ DF_VIEW_UI_FUNCTION_DEF(commands) } else { - cv->selected_cmd_spec = &df_g_nil_cmd_spec; + cv->selected_cmd_spec = &d_nil_cmd_spec; } scratch_end(scratch); @@ -3500,8 +3500,8 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) DF_PathQuery path_query = df_path_query_from_string(query_normalized_with_opt_slash); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); F32 scroll_bar_dim = floor_f32(ui_top_font_size()*1.5f); - B32 file_selection = !!(ws->query_cmd_spec->info.query.flags & DF_CmdQueryFlag_AllowFiles); - B32 dir_selection = !!(ws->query_cmd_spec->info.query.flags & DF_CmdQueryFlag_AllowFolders); + B32 file_selection = !!(ws->query_cmd_spec->info.query.flags & D_CmdQueryFlag_AllowFiles); + B32 dir_selection = !!(ws->query_cmd_spec->info.query.flags & D_CmdQueryFlag_AllowFolders); //- rjf: get extra state for this view DF_FileSystemViewState *fs = df_view_user_state(view, DF_FileSystemViewState); @@ -3520,7 +3520,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) DF_FileSystemViewPathState *ps = 0; { String8 key = query_normalized; - U64 hash = df_hash_from_string(key); + U64 hash = d_hash_from_string(key); U64 slot = hash % fs->path_state_table_size; for(DF_FileSystemViewPathState *p = fs->path_state_table[slot]; p != 0; p = p->hash_next) { @@ -3558,10 +3558,10 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) // choose the most recent change to a file browser path, and live with the // consequences). { - DF_CmdParams p = df_cmd_params_zero(); + D_CmdParams p = d_cmd_params_zero(); p.file_path = path_query.path; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_FilePath); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SetCurrentPath)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_FilePath); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_SetCurrentPath)); } //- rjf: get files, filtered @@ -3649,10 +3649,10 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) // rjf: command search part is empty, but directory matches some file: if(path_query_path_props.created != 0 && path_query.search.size == 0) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.file_path = query_normalized_with_opt_slash; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } // rjf: command argument exactly matches some file: @@ -3668,20 +3668,20 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) // rjf: is a file -> complete view else { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.file_path = query_normalized_with_opt_slash; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } } // rjf: command argument is empty, picking folders -> use current folder else if(path_query.search.size == 0 && dir_selection) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.file_path = path_query.path; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } // rjf: command argument does not exactly match any file, but lister results are in: @@ -3696,20 +3696,20 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) } else { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.file_path = push_str8f(scratch.arena, "%S%S", path_query.path, filename); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } } // rjf: command argument does not match any file, and lister is empty (new file) else { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.file_path = query; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } } @@ -3908,10 +3908,10 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) } else { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.file_path = new_path; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_FilePath); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_FilePath); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } } } @@ -3965,13 +3965,13 @@ df_process_info_list_from_query(Arena *arena, String8 query) U64 attached_process_count = 0; U32 *attached_process_pids = 0; { - DF_EntityList processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); + D_EntityList processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); attached_process_count = processes.count; attached_process_pids = push_array(scratch.arena, U32, attached_process_count); U64 idx = 0; - for(DF_EntityNode *n = processes.first; n != 0; n = n->next, idx += 1) + for(D_EntityNode *n = processes.first; n != 0; n = n->next, idx += 1) { - DF_Entity *process = n->entity; + D_Entity *process = n->entity; attached_process_pids[idx] = process->ctrl_id; } } @@ -4132,10 +4132,10 @@ DF_VIEW_UI_FUNCTION_DEF(system_processes) if(sp->selected_pid == 0 && process_info_array.count > 0 && ui_slot_press(UI_EventActionSlot_Accept)) { DF_ProcessInfo *info = &process_info_array.v[0]; - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.id = info->info.pid; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_ID); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_ID); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } //- rjf: selected PID -> cursor @@ -4223,10 +4223,10 @@ DF_VIEW_UI_FUNCTION_DEF(system_processes) // rjf: click => activate this specific process if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); params.id = info->info.pid; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_ID); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_ID); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } } } @@ -4254,7 +4254,7 @@ DF_VIEW_UI_FUNCTION_DEF(system_processes) typedef struct DF_EntityListerItem DF_EntityListerItem; struct DF_EntityListerItem { - DF_Entity *entity; + D_Entity *entity; FuzzyMatchRangeList name_match_ranges; }; @@ -4281,17 +4281,17 @@ struct DF_EntityListerItemArray }; internal DF_EntityListerItemList -df_entity_lister_item_list_from_needle(Arena *arena, DF_EntityKind kind, DF_EntityFlags omit_flags, String8 needle) +df_entity_lister_item_list_from_needle(Arena *arena, D_EntityKind kind, D_EntityFlags omit_flags, String8 needle) { Temp scratch = scratch_begin(&arena, 1); DF_EntityListerItemList result = {0}; - DF_EntityList ent_list = df_query_cached_entity_list_with_kind(kind); - for(DF_EntityNode *n = ent_list.first; n != 0; n = n->next) + D_EntityList ent_list = d_query_cached_entity_list_with_kind(kind); + for(D_EntityNode *n = ent_list.first; n != 0; n = n->next) { - DF_Entity *entity = n->entity; + D_Entity *entity = n->entity; if(!(entity->flags & omit_flags)) { - String8 display_string = df_display_string_from_entity(scratch.arena, entity); + String8 display_string = d_display_string_from_entity(scratch.arena, entity); FuzzyMatchRangeList match_rngs = fuzzy_match_find(arena, needle, display_string); if(match_rngs.count != 0 || needle.size == 0) { @@ -4350,9 +4350,9 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - DF_CmdSpec *spec = ws->query_cmd_spec; - DF_EntityKind entity_kind = spec->info.query.entity_kind; - DF_EntityFlags entity_flags_omit = DF_EntityFlag_IsFolder; + D_CmdSpec *spec = ws->query_cmd_spec; + D_EntityKind entity_kind = spec->info.query.entity_kind; + D_EntityFlags entity_flags_omit = D_EntityFlag_IsFolder; F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); F32 scroll_bar_dim = floor_f32(ui_top_font_size()*1.5f); @@ -4360,11 +4360,11 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) typedef struct DF_EntityListerViewState DF_EntityListerViewState; struct DF_EntityListerViewState { - DF_Handle selected_entity_handle; + D_Handle selected_entity_handle; }; DF_EntityListerViewState *fev = df_view_user_state(view, DF_EntityListerViewState); - DF_Handle selected_entity_handle = fev->selected_entity_handle; - DF_Entity *selected_entity = df_entity_from_handle(selected_entity_handle); + D_Handle selected_entity_handle = fev->selected_entity_handle; + D_Entity *selected_entity = d_entity_from_handle(selected_entity_handle); //- rjf: build filtered array of entities DF_EntityListerItemList ent_list = df_entity_lister_item_list_from_needle(scratch.arena, entity_kind, entity_flags_omit, string); @@ -4372,15 +4372,15 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) df_entity_lister_item_array_sort_by_strength__in_place(ent_arr); //- rjf: submit best match when hitting enter w/ no selection - if(df_entity_is_nil(df_entity_from_handle(fev->selected_entity_handle)) && ent_arr.count != 0 && ui_slot_press(UI_EventActionSlot_Accept)) + if(d_entity_is_nil(d_entity_from_handle(fev->selected_entity_handle)) && ent_arr.count != 0 && ui_slot_press(UI_EventActionSlot_Accept)) { - DF_Entity *ent = ent_arr.v[0].entity; - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.entity = df_handle_from_entity(ent); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_EntityList); - df_handle_list_push(scratch.arena, ¶ms.entity_list, params.entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + D_Entity *ent = ent_arr.v[0].entity; + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.entity = d_handle_from_entity(ent); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_EntityList); + d_handle_list_push(scratch.arena, ¶ms.entity_list, params.entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } //- rjf: selected entity -> cursor @@ -4423,7 +4423,7 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) idx += 1) { DF_EntityListerItem item = ent_arr.v[idx]; - DF_Entity *ent = item.entity; + D_Entity *ent = item.entity; ui_set_next_hover_cursor(OS_Cursor_HandPoint); ui_set_next_child_layout_axis(Axis2_X); UI_Box *box = &ui_g_nil_box; @@ -4438,7 +4438,7 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) } UI_Parent(box) { - DF_IconKind icon_kind = df_g_entity_kind_icon_kind_table[ent->kind]; + DF_IconKind icon_kind = d_entity_kind_icon_kind_table[ent->kind]; if(icon_kind != DF_IconKind_Null) { UI_TextAlignment(UI_TextAlign_Center) @@ -4448,8 +4448,8 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) UI_PrefWidth(ui_text_dim(10, 1)) ui_label(df_g_icon_kind_text_table[icon_kind]); } - String8 display_string = df_display_string_from_entity(scratch.arena, ent); - Vec4F32 color = df_rgba_from_entity(ent); + String8 display_string = d_display_string_from_entity(scratch.arena, ent); + Vec4F32 color = d_rgba_from_entity(ent); if(color.w != 0) { ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = color)); @@ -4459,19 +4459,19 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) } if(ui_clicked(ui_signal_from_box(box))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.entity = df_handle_from_entity(ent); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_EntityList); - df_handle_list_push(scratch.arena, ¶ms.entity_list, params.entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.entity = d_handle_from_entity(ent); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_EntityList); + d_handle_list_push(scratch.arena, ¶ms.entity_list, params.entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } } } //- rjf: selected entity num -> handle { - fev->selected_entity_handle = (1 <= cursor.y && cursor.y <= ent_arr.count) ? df_handle_from_entity(ent_arr.v[cursor.y-1].entity) : df_handle_zero(); + fev->selected_entity_handle = (1 <= cursor.y && cursor.y <= ent_arr.count) ? d_handle_from_entity(ent_arr.v[cursor.y-1].entity) : d_handle_zero(); } scratch_end(scratch); @@ -4490,7 +4490,7 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) DI_Scope *di_scope = di_scope_open(); FZY_Scope *fzy_scope = fzy_scope_open(); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); - DI_KeyList dbgi_keys_list = df_push_active_dbgi_key_list(scratch.arena); + DI_KeyList dbgi_keys_list = d_push_active_dbgi_key_list(scratch.arena); DI_KeyArray dbgi_keys = di_key_array_from_list(scratch.arena, &dbgi_keys_list); FZY_Params fuzzy_search_params = {RDI_SectionKind_Procedures, dbgi_keys}; U64 endt_us = os_now_microseconds()+200; @@ -4516,7 +4516,7 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) DF_SymbolListerViewState *slv = df_view_user_state(view, DF_SymbolListerViewState); //- rjf: query -> raddbg, filtered items - U128 fuzzy_search_key = {(U64)view, df_hash_from_string(str8_struct(&view))}; + U128 fuzzy_search_key = {(U64)view, d_hash_from_string(str8_struct(&view))}; B32 items_stale = 0; FZY_ItemArray items = fzy_items_from_key_params_query(fzy_scope, fuzzy_search_key, &fuzzy_search_params, string, endt_us, &items_stale); if(items_stale) @@ -4542,10 +4542,10 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) String8 name = str8(name_base, name_size); if(name.size != 0) { - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); p.string = name; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } break; } @@ -4635,18 +4635,18 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) UI_Signal sig = ui_signal_from_box(box); if(ui_clicked(sig)) { - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); p.string = name; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_String); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_CompleteQuery)); } if(ui_hovering(sig)) UI_Tooltip { DF_Font(ws, DF_FontSlot_Code) df_code_label(1.f, 0, df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol), name); DF_Font(ws, DF_FontSlot_Main) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_labelf("Procedure #%I64u", item->idx); - U64 binary_voff = df_voff_from_dbgi_key_symbol_name(&dbgi_key, name); - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, binary_voff); + U64 binary_voff = d_voff_from_dbgi_key_symbol_name(&dbgi_key, name); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, binary_voff); if(lines.first != 0) { String8 file_path = lines.first->v.file_path; @@ -4678,7 +4678,7 @@ struct DF_TargetViewState B32 initialized; // rjf: pick file kind - DF_EntityKind pick_dst_kind; + D_EntityKind pick_dst_kind; // rjf: selection cursor Vec2S64 cursor; @@ -4703,12 +4703,12 @@ DF_VIEW_SETUP_FUNCTION_DEF(target) DF_VIEW_CMD_FUNCTION_DEF(target) { DF_TargetViewState *tv = df_view_user_state(view, DF_TargetViewState); - DF_Entity *entity = df_entity_from_eval_string(string); + D_Entity *entity = d_entity_from_eval_string(string); // rjf: process commands - for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) + for(D_CmdNode *n = cmds->first; n != 0; n = n->next) { - DF_Cmd *cmd = &n->cmd; + D_Cmd *cmd = &n->cmd; // rjf: mismatched window/panel => skip if(df_window_from_handle(cmd->params.window) != ws || @@ -4718,25 +4718,25 @@ DF_VIEW_CMD_FUNCTION_DEF(target) } // rjf: process command - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); switch(core_cmd_kind) { default:break; - case DF_CoreCmdKind_PickFile: - case DF_CoreCmdKind_PickFolder: + case D_CmdKind_PickFile: + case D_CmdKind_PickFolder: { String8 pick_string = cmd->params.file_path; - DF_Entity *storage_entity = entity; - if(tv->pick_dst_kind != DF_EntityKind_Nil) + D_Entity *storage_entity = entity; + if(tv->pick_dst_kind != D_EntityKind_Nil) { - DF_Entity *child = df_entity_child_from_kind(entity, tv->pick_dst_kind); - if(df_entity_is_nil(child)) + D_Entity *child = d_entity_child_from_kind(entity, tv->pick_dst_kind); + if(d_entity_is_nil(child)) { - child = df_entity_alloc(entity, tv->pick_dst_kind); + child = d_entity_alloc(entity, tv->pick_dst_kind); } storage_entity = child; } - df_entity_equip_name(storage_entity, pick_string); + d_entity_equip_name(storage_entity, pick_string); }break; } } @@ -4746,8 +4746,8 @@ DF_VIEW_UI_FUNCTION_DEF(target) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - DF_Entity *entity = df_entity_from_eval_string(string); - DF_EntityList custom_entry_points = df_push_entity_child_list_with_kind(scratch.arena, entity, DF_EntityKind_EntryPoint); + D_Entity *entity = d_entity_from_eval_string(string); + D_EntityList custom_entry_points = d_push_entity_child_list_with_kind(scratch.arena, entity, D_EntityKind_EntryPoint); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); //- rjf: grab state @@ -4766,16 +4766,16 @@ DF_VIEW_UI_FUNCTION_DEF(target) B32 fill_with_folder; B32 use_code_font; String8 key; - DF_EntityKind storage_child_kind; + D_EntityKind storage_child_kind; String8 current_text; } kv_info[] = { - { 0, 0, 0, str8_lit("Label"), DF_EntityKind_Nil, entity->name }, - { 1, 0, 0, str8_lit("Executable"), DF_EntityKind_Executable, df_entity_child_from_kind(entity, DF_EntityKind_Executable)->name }, - { 0, 0, 0, str8_lit("Arguments"), DF_EntityKind_Arguments, df_entity_child_from_kind(entity, DF_EntityKind_Arguments)->name }, - { 0, 1, 0, str8_lit("Working Directory"), DF_EntityKind_WorkingDirectory, df_entity_child_from_kind(entity, DF_EntityKind_WorkingDirectory)->name }, - { 0, 0, 1, str8_lit("Entry Point Override"), DF_EntityKind_EntryPoint, df_entity_child_from_kind(entity, DF_EntityKind_EntryPoint)->name }, + { 0, 0, 0, str8_lit("Label"), D_EntityKind_Nil, entity->name }, + { 1, 0, 0, str8_lit("Executable"), D_EntityKind_Executable, d_entity_child_from_kind(entity, D_EntityKind_Executable)->name }, + { 0, 0, 0, str8_lit("Arguments"), D_EntityKind_Arguments, d_entity_child_from_kind(entity, D_EntityKind_Arguments)->name }, + { 0, 1, 0, str8_lit("Working Directory"), D_EntityKind_WorkingDirectory, d_entity_child_from_kind(entity, D_EntityKind_WorkingDirectory)->name }, + { 0, 0, 1, str8_lit("Entry Point Override"), D_EntityKind_EntryPoint, d_entity_child_from_kind(entity, D_EntityKind_EntryPoint)->name }, }; //- rjf: take controls to start/end editing @@ -4831,7 +4831,7 @@ DF_VIEW_UI_FUNCTION_DEF(target) scroll_list_params.item_range = r1s64(0, (S64)ArrayCount(kv_info)); scroll_list_params.cursor_min_is_empty_selection[Axis2_Y] = 1; } - DF_EntityKind commit_storage_child_kind = DF_EntityKind_Nil; + D_EntityKind commit_storage_child_kind = D_EntityKind_Nil; Vec2S64 next_cursor = tv->cursor; UI_ScrollListSignal scroll_list_sig = {0}; UI_Focus(UI_FocusKind_On) @@ -4860,7 +4860,7 @@ DF_VIEW_UI_FUNCTION_DEF(target) //- rjf: key (label) UI_TableCell UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) { - if(kv_info[idx].storage_child_kind == DF_EntityKind_EntryPoint) + if(kv_info[idx].storage_child_kind == D_EntityKind_EntryPoint) { if(df_help_label(str8_lit("Custom Entry Point"))) UI_Tooltip { @@ -4916,8 +4916,8 @@ DF_VIEW_UI_FUNCTION_DEF(target) // rjf: focus panel on press if(ui_pressed(sig)) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } // rjf: begin editing on double-click @@ -4959,10 +4959,10 @@ DF_VIEW_UI_FUNCTION_DEF(target) UI_TextAlignment(UI_TextAlign_Center) if(ui_clicked(ui_buttonf("Browse..."))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.cmd_spec = df_cmd_spec_from_core_cmd_kind(kv_info[idx].fill_with_file ? DF_CoreCmdKind_PickFile : DF_CoreCmdKind_PickFolder); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.cmd_spec = d_cmd_spec_from_kind(kv_info[idx].fill_with_file ? D_CmdKind_PickFile : D_CmdKind_PickFolder); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); tv->pick_dst_kind = kv_info[idx].storage_child_kind; } } @@ -4979,16 +4979,16 @@ DF_VIEW_UI_FUNCTION_DEF(target) { default: { - DF_Entity *child = df_entity_child_from_kind(entity, commit_storage_child_kind); - if(df_entity_is_nil(child)) + D_Entity *child = d_entity_child_from_kind(entity, commit_storage_child_kind); + if(d_entity_is_nil(child)) { - child = df_entity_alloc(entity, commit_storage_child_kind); + child = d_entity_alloc(entity, commit_storage_child_kind); } - df_entity_equip_name(child, new_string); + d_entity_equip_name(child, new_string); }break; - case DF_EntityKind_Nil: + case D_EntityKind_Nil: { - df_entity_equip_name(entity, new_string); + d_entity_equip_name(entity, new_string); }break; } } @@ -5019,8 +5019,8 @@ DF_VIEW_UI_FUNCTION_DEF(targets) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - DF_EntityList targets_list = df_query_cached_entity_list_with_kind(DF_EntityKind_Target); - DF_EntityFuzzyItemArray targets = df_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &targets_list, string); + D_EntityList targets_list = d_query_cached_entity_list_with_kind(D_EntityKind_Target); + D_EntityFuzzyItemArray targets = d_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &targets_list, string); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); //- rjf: grab state @@ -5028,7 +5028,7 @@ DF_VIEW_UI_FUNCTION_DEF(targets) struct DF_TargetsViewState { B32 selected_add; - DF_Handle selected_target_handle; + D_Handle selected_target_handle; S64 selected_column; }; DF_TargetsViewState *tv = df_view_user_state(view, DF_TargetsViewState); @@ -5040,7 +5040,7 @@ DF_VIEW_UI_FUNCTION_DEF(targets) // NOTE(rjf): 0 => nothing, 1 => add new, 2 => first target Vec2S64 cursor = {0}; { - DF_Entity *selected_target = df_entity_from_handle(tv->selected_target_handle); + D_Entity *selected_target = d_entity_from_handle(tv->selected_target_handle); for(U64 idx = 0; idx < targets.count; idx += 1) { if(selected_target == targets.v[idx].entity) @@ -5085,10 +5085,10 @@ DF_VIEW_UI_FUNCTION_DEF(targets) add_sig = df_icon_buttonf(ws, DF_IconKind_Add, 0, "Add New Target"); if(ui_clicked(add_sig)) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_AddTarget); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.cmd_spec = d_cmd_spec_from_kind(D_CmdKind_AddTarget); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); } } @@ -5098,7 +5098,7 @@ DF_VIEW_UI_FUNCTION_DEF(targets) row_idx += 1) UI_Row { - DF_Entity *target = targets.v[row_idx-1].entity; + D_Entity *target = targets.v[row_idx-1].entity; B32 row_selected = ((U64)cursor.y == row_idx+1); // rjf: enabled @@ -5108,9 +5108,9 @@ DF_VIEW_UI_FUNCTION_DEF(targets) UI_Signal sig = df_icon_buttonf(ws, !target->disabled ? DF_IconKind_CheckFilled : DF_IconKind_CheckHollow, 0, "###ebl_%p", target); if(ui_clicked(sig)) { - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - p.entity = df_handle_from_entity(target); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(!target->disabled ? DF_CoreCmdKind_DisableTarget : DF_CoreCmdKind_EnableTarget)); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + p.entity = d_handle_from_entity(target); + d_push_cmd__root(&p, d_cmd_spec_from_kind(!target->disabled ? D_CmdKind_DisableTarget : D_CmdKind_EnableTarget)); } } @@ -5127,14 +5127,14 @@ DF_VIEW_UI_FUNCTION_DEF(targets) { DF_IconKind icon; String8 text; - DF_CoreCmdKind cmd; + D_CmdKind cmd; } ctrls[] = { - { DF_IconKind_PlayStepForward, str8_lit("Launch and Initialize"), DF_CoreCmdKind_LaunchAndInit }, - { DF_IconKind_Play, str8_lit("Launch and Run"), DF_CoreCmdKind_LaunchAndRun }, - { DF_IconKind_Pencil, str8_lit("Edit"), DF_CoreCmdKind_Target }, - { DF_IconKind_Trash, str8_lit("Delete"), DF_CoreCmdKind_RemoveTarget }, + { DF_IconKind_PlayStepForward, str8_lit("Launch and Initialize"), D_CmdKind_LaunchAndInit }, + { DF_IconKind_Play, str8_lit("Launch and Run"), D_CmdKind_LaunchAndRun }, + { DF_IconKind_Pencil, str8_lit("Edit"), D_CmdKind_Target }, + { DF_IconKind_Trash, str8_lit("Delete"), D_CmdKind_RemoveTarget }, }; for(U64 ctrl_idx = 0; ctrl_idx < ArrayCount(ctrls); ctrl_idx += 1) { @@ -5149,11 +5149,11 @@ DF_VIEW_UI_FUNCTION_DEF(targets) } if(ui_clicked(sig)) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.entity = df_handle_from_entity(target); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_handle_list_push(scratch.arena, ¶ms.entity_list, params.entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(ctrls[ctrl_idx].cmd)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.entity = d_handle_from_entity(target); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_handle_list_push(scratch.arena, ¶ms.entity_list, params.entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(ctrls[ctrl_idx].cmd)); } } } @@ -5163,7 +5163,7 @@ DF_VIEW_UI_FUNCTION_DEF(targets) //- rjf: commit cursor to selection state { tv->selected_column = cursor.x; - tv->selected_target_handle = (1 < cursor.y && cursor.y < targets.count+2) ? df_handle_from_entity(targets.v[cursor.y-2].entity) : df_handle_zero(); + tv->selected_target_handle = (1 < cursor.y && cursor.y < targets.count+2) ? d_handle_from_entity(targets.v[cursor.y-2].entity) : d_handle_zero(); tv->selected_add = (cursor.y == 1); } @@ -5184,7 +5184,7 @@ struct DF_FilePathMapViewState U8 input_buffer[1024]; U64 input_size; B32 input_editing; - DF_Handle pick_file_dst_map; + D_Handle pick_file_dst_map; Side pick_file_dst_side; F32 src_column_pct; F32 dst_column_pct; @@ -5206,9 +5206,9 @@ DF_VIEW_CMD_FUNCTION_DEF(file_path_map) DF_FilePathMapViewState *fpms = df_view_user_state(view, DF_FilePathMapViewState); // rjf: process commands - for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) + for(D_CmdNode *n = cmds->first; n != 0; n = n->next) { - DF_Cmd *cmd = &n->cmd; + D_Cmd *cmd = &n->cmd; // rjf: mismatched window/panel => skip if(df_window_from_handle(cmd->params.window) != ws || @@ -5218,25 +5218,25 @@ DF_VIEW_CMD_FUNCTION_DEF(file_path_map) } //rjf: process - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); switch(core_cmd_kind) { default:break; - case DF_CoreCmdKind_PickFile: - case DF_CoreCmdKind_PickFolder: - case DF_CoreCmdKind_PickFileOrFolder: + case D_CmdKind_PickFile: + case D_CmdKind_PickFolder: + case D_CmdKind_PickFileOrFolder: { String8 pick_string = cmd->params.file_path; Side pick_side = fpms->pick_file_dst_side; - DF_Entity *storage_entity = df_entity_from_handle(fpms->pick_file_dst_map); - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - p.entity = df_handle_from_entity(storage_entity); + D_Entity *storage_entity = d_entity_from_handle(fpms->pick_file_dst_map); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + p.entity = d_handle_from_entity(storage_entity); p.file_path = pick_string; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_FilePath); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(pick_side == Side_Min ? - DF_CoreCmdKind_SetFileOverrideLinkSrc : - DF_CoreCmdKind_SetFileOverrideLinkDst)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_FilePath); + d_push_cmd__root(&p, d_cmd_spec_from_kind(pick_side == Side_Min ? + D_CmdKind_SetFileOverrideLinkSrc : + D_CmdKind_SetFileOverrideLinkDst)); }break; } } @@ -5246,8 +5246,8 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - DF_EntityList maps_list = df_query_cached_entity_list_with_kind(DF_EntityKind_FilePathMap); - DF_EntityArray maps = df_entity_array_from_list(scratch.arena, &maps_list); + D_EntityList maps_list = d_query_cached_entity_list_with_kind(D_EntityKind_FilePathMap); + D_EntityArray maps = d_entity_array_from_list(scratch.arena, &maps_list); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); //- rjf: grab state @@ -5292,7 +5292,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) } //- rjf: build - DF_Handle commit_map = df_handle_zero(); + D_Handle commit_map = d_handle_zero(); Side commit_side = Side_Invalid; F32 *col_pcts[] = { &fpms->src_column_pct, &fpms->dst_column_pct }; Vec2S64 next_cursor = fpms->cursor; @@ -5335,9 +5335,9 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) row_idx += 1) UI_TableVector { U64 map_idx = row_idx-1; - DF_Entity *map = (map_idx < maps.count ? maps.v[map_idx] : &df_g_nil_entity); - DF_Entity *map_src = df_entity_child_from_kind(map, DF_EntityKind_Source); - DF_Entity *map_dst = df_entity_child_from_kind(map, DF_EntityKind_Dest); + D_Entity *map = (map_idx < maps.count ? maps.v[map_idx] : &d_nil_entity); + D_Entity *map_src = d_entity_child_from_kind(map, D_EntityKind_Source); + D_Entity *map_dst = d_entity_child_from_kind(map, D_EntityKind_Dest); String8 map_src_path = map_src->name; String8 map_dst_path = map_dst->name; B32 row_selected = (fpms->cursor.y == row_idx); @@ -5371,8 +5371,8 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) // rjf: focus panel on press if(ui_pressed(sig)) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } // rjf: begin editing on double-click @@ -5398,7 +5398,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) if(value_selected) { commit_side = Side_Min; - commit_map = df_handle_from_entity(map); + commit_map = d_handle_from_entity(map); } } @@ -5407,11 +5407,11 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) UI_PrefWidth(ui_text_dim(10, 1)) if(ui_clicked(ui_buttonf("Browse..."))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PickFileOrFolder); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); - fpms->pick_file_dst_map = df_handle_from_entity(map); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.cmd_spec = d_cmd_spec_from_kind(D_CmdKind_PickFileOrFolder); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); + fpms->pick_file_dst_map = d_handle_from_entity(map); fpms->pick_file_dst_side = Side_Min; } } @@ -5445,8 +5445,8 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) // rjf: focus panel on press if(ui_pressed(sig)) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } // rjf: begin editing on double-click @@ -5472,7 +5472,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) if(value_selected) { commit_side = Side_Max; - commit_map = df_handle_from_entity(map); + commit_map = d_handle_from_entity(map); } } @@ -5482,11 +5482,11 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) UI_PrefWidth(ui_text_dim(10, 1)) if(ui_clicked(ui_buttonf("Browse..."))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PickFileOrFolder); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); - fpms->pick_file_dst_map = df_handle_from_entity(map); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.cmd_spec = d_cmd_spec_from_kind(D_CmdKind_PickFileOrFolder); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); + fpms->pick_file_dst_map = d_handle_from_entity(map); fpms->pick_file_dst_side = Side_Max; } } @@ -5498,14 +5498,14 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) if(edit_commit && commit_side != Side_Invalid) { String8 new_string = str8(fpms->input_buffer, fpms->input_size); - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); p.entity = commit_map; p.file_path = new_string; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_FilePath); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(commit_side == Side_Min ? - DF_CoreCmdKind_SetFileOverrideLinkSrc : - DF_CoreCmdKind_SetFileOverrideLinkDst)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_FilePath); + d_push_cmd__root(&p, d_cmd_spec_from_kind(commit_side == Side_Min ? + D_CmdKind_SetFileOverrideLinkSrc : + D_CmdKind_SetFileOverrideLinkDst)); } //- rjf: apply editing finish @@ -5560,9 +5560,9 @@ DF_VIEW_CMD_FUNCTION_DEF(auto_view_rules) DF_AutoViewRulesViewState *avrs = df_view_user_state(view, DF_AutoViewRulesViewState); // rjf: process commands - for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) + for(D_CmdNode *n = cmds->first; n != 0; n = n->next) { - DF_Cmd *cmd = &n->cmd; + D_Cmd *cmd = &n->cmd; // rjf: mismatched window/panel => skip if(df_window_from_handle(cmd->params.window) != ws || @@ -5577,8 +5577,8 @@ DF_VIEW_UI_FUNCTION_DEF(auto_view_rules) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - DF_EntityList maps_list = df_query_cached_entity_list_with_kind(DF_EntityKind_AutoViewRule); - DF_EntityArray maps = df_entity_array_from_list(scratch.arena, &maps_list); + D_EntityList maps_list = d_query_cached_entity_list_with_kind(D_EntityKind_AutoViewRule); + D_EntityArray maps = d_entity_array_from_list(scratch.arena, &maps_list); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); //- rjf: grab state @@ -5623,7 +5623,7 @@ DF_VIEW_UI_FUNCTION_DEF(auto_view_rules) } //- rjf: build - DF_Handle commit_map = df_handle_zero(); + D_Handle commit_map = d_handle_zero(); Side commit_side = Side_Invalid; F32 *col_pcts[] = { &avrs->src_column_pct, &avrs->dst_column_pct }; Vec2S64 next_cursor = avrs->cursor; @@ -5663,9 +5663,9 @@ DF_VIEW_UI_FUNCTION_DEF(auto_view_rules) row_idx += 1) UI_TableVector { U64 map_idx = row_idx-1; - DF_Entity *map = (map_idx < maps.count ? maps.v[map_idx] : &df_g_nil_entity); - DF_Entity *source = df_entity_child_from_kind(map, DF_EntityKind_Source); - DF_Entity *dest = df_entity_child_from_kind(map, DF_EntityKind_Dest); + D_Entity *map = (map_idx < maps.count ? maps.v[map_idx] : &d_nil_entity); + D_Entity *source = d_entity_child_from_kind(map, D_EntityKind_Source); + D_Entity *dest = d_entity_child_from_kind(map, D_EntityKind_Dest); String8 type = source->name; String8 view_rule = dest->name; B32 row_selected = (avrs->cursor.y == row_idx); @@ -5700,8 +5700,8 @@ DF_VIEW_UI_FUNCTION_DEF(auto_view_rules) // rjf: focus panel on press if(ui_pressed(sig)) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } // rjf: begin editing on double-click @@ -5727,7 +5727,7 @@ DF_VIEW_UI_FUNCTION_DEF(auto_view_rules) if(value_selected) { commit_side = Side_Min; - commit_map = df_handle_from_entity(map); + commit_map = d_handle_from_entity(map); } } } @@ -5762,8 +5762,8 @@ DF_VIEW_UI_FUNCTION_DEF(auto_view_rules) // rjf: focus panel on press if(ui_pressed(sig)) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } // rjf: begin editing on double-click @@ -5789,7 +5789,7 @@ DF_VIEW_UI_FUNCTION_DEF(auto_view_rules) if(value_selected) { commit_side = Side_Max; - commit_map = df_handle_from_entity(map); + commit_map = d_handle_from_entity(map); } } } @@ -5800,14 +5800,14 @@ DF_VIEW_UI_FUNCTION_DEF(auto_view_rules) if(edit_commit && commit_side != Side_Invalid) { String8 new_string = str8(avrs->input_buffer, avrs->input_size); - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); p.entity = commit_map; p.string = new_string; - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(&p, DF_CmdParamSlot_FilePath); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(commit_side == Side_Min ? - DF_CoreCmdKind_SetAutoViewRuleType : - DF_CoreCmdKind_SetAutoViewRuleViewRule)); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(&p, D_CmdParamSlot_FilePath); + d_push_cmd__root(&p, d_cmd_spec_from_kind(commit_side == Side_Min ? + D_CmdKind_SetAutoViewRuleType : + D_CmdKind_SetAutoViewRuleViewRule)); } //- rjf: apply editing finish @@ -5893,46 +5893,46 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) typedef struct DF_SchedulerViewState DF_SchedulerViewState; struct DF_SchedulerViewState { - DF_Handle selected_entity; + D_Handle selected_entity; S64 selected_column; }; DF_SchedulerViewState *sv = df_view_user_state(view, DF_SchedulerViewState); //- rjf: get entities - DF_EntityList machines = df_query_cached_entity_list_with_kind(DF_EntityKind_Machine); - DF_EntityList processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); - DF_EntityList threads = df_query_cached_entity_list_with_kind(DF_EntityKind_Thread); + D_EntityList machines = d_query_cached_entity_list_with_kind(D_EntityKind_Machine); + D_EntityList processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); + D_EntityList threads = d_query_cached_entity_list_with_kind(D_EntityKind_Thread); //- rjf: produce list of items; no query -> all entities, in tree; query -> only show threads - DF_EntityFuzzyItemArray items = {0}; + D_EntityFuzzyItemArray items = {0}; ProfScope("query -> entities") { if(query.size == 0) { //- rjf: build flat array of entities, arranged into row order - DF_EntityArray entities = {0}; + D_EntityArray entities = {0}; { entities.count = machines.count+processes.count+threads.count; - entities.v = push_array_no_zero(scratch.arena, DF_Entity *, entities.count); + entities.v = push_array_no_zero(scratch.arena, D_Entity *, entities.count); U64 idx = 0; - for(DF_EntityNode *machine_n = machines.first; machine_n != 0; machine_n = machine_n->next) + for(D_EntityNode *machine_n = machines.first; machine_n != 0; machine_n = machine_n->next) { - DF_Entity *machine = machine_n->entity; + D_Entity *machine = machine_n->entity; entities.v[idx] = machine; idx += 1; - for(DF_EntityNode *process_n = processes.first; process_n != 0; process_n = process_n->next) + for(D_EntityNode *process_n = processes.first; process_n != 0; process_n = process_n->next) { - DF_Entity *process = process_n->entity; - if(df_entity_ancestor_from_kind(process, DF_EntityKind_Machine) != machine) + D_Entity *process = process_n->entity; + if(d_entity_ancestor_from_kind(process, D_EntityKind_Machine) != machine) { continue; } entities.v[idx] = process; idx += 1; - for(DF_EntityNode *thread_n = threads.first; thread_n != 0; thread_n = thread_n->next) + for(D_EntityNode *thread_n = threads.first; thread_n != 0; thread_n = thread_n->next) { - DF_Entity *thread = thread_n->entity; - if(df_entity_ancestor_from_kind(thread, DF_EntityKind_Process) != process) + D_Entity *thread = thread_n->entity; + if(d_entity_ancestor_from_kind(thread, D_EntityKind_Process) != process) { continue; } @@ -5944,11 +5944,11 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) } //- rjf: entities -> fuzzy-filtered entities - items = df_entity_fuzzy_item_array_from_entity_array_needle(scratch.arena, &entities, query); + items = d_entity_fuzzy_item_array_from_entity_array_needle(scratch.arena, &entities, query); } else { - items = df_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &threads, query); + items = d_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &threads, query); } } @@ -5956,7 +5956,7 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) Vec2S64 cursor = {sv->selected_column}; for(U64 idx = 0; idx < items.count; idx += 1) { - if(items.v[idx].entity == df_entity_from_handle(sv->selected_entity)) + if(items.v[idx].entity == d_entity_from_handle(sv->selected_entity)) { cursor.y = (S64)(idx+1); break; @@ -5990,30 +5990,30 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) idx <= visible_row_range.max && idx < items.count; idx += 1) { - DF_Entity *entity = items.v[idx].entity; + D_Entity *entity = items.v[idx].entity; B32 row_is_selected = (cursor.y == (S64)(idx+1)); F32 depth = 0.f; if(query.size == 0) switch(entity->kind) { default:{}break; - case DF_EntityKind_Machine:{depth = 0.f;}break; - case DF_EntityKind_Process:{depth = 1.f;}break; - case DF_EntityKind_Thread: {depth = 2.f;}break; + case D_EntityKind_Machine:{depth = 0.f;}break; + case D_EntityKind_Process:{depth = 1.f;}break; + case D_EntityKind_Thread: {depth = 2.f;}break; } Rng1S64 desc_col_rng = r1s64(1, 1); switch(entity->kind) { default:{}break; - case DF_EntityKind_Machine:{desc_col_rng = r1s64(1, 4);}break; - case DF_EntityKind_Process:{desc_col_rng = r1s64(1, 1);}break; - case DF_EntityKind_Thread: {desc_col_rng = r1s64(1, 1);}break; + case D_EntityKind_Machine:{desc_col_rng = r1s64(1, 4);}break; + case D_EntityKind_Process:{desc_col_rng = r1s64(1, 1);}break; + case D_EntityKind_Thread: {desc_col_rng = r1s64(1, 1);}break; } UI_NamedTableVectorF("entity_row_%p", entity) { UI_TableCellSized(ui_em(1.5f*depth, 1.f)) {} UI_TableCellSized(ui_em(2.25f, 1.f)) UI_FocusHot((row_is_selected && cursor.x == 0) ? UI_FocusKind_On : UI_FocusKind_Off) { - B32 frozen = df_entity_is_frozen(entity); + B32 frozen = d_entity_is_frozen(entity); UI_Palette *palette = ui_top_palette(); if(frozen) { @@ -6027,11 +6027,11 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) UI_Palette(palette) sig = df_icon_buttonf(ws, frozen ? DF_IconKind_Locked : DF_IconKind_Unlocked, 0, "###lock_%p", entity); if(ui_clicked(sig)) { - DF_CoreCmdKind cmd_kind = frozen ? DF_CoreCmdKind_ThawEntity : DF_CoreCmdKind_FreezeEntity; - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.entity = df_handle_from_entity(entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(cmd_kind)); + D_CmdKind cmd_kind = frozen ? D_CmdKind_ThawEntity : D_CmdKind_FreezeEntity; + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.entity = d_handle_from_entity(entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(cmd_kind)); } } UI_TableCellSized(ui_pct(1, 0)) @@ -6042,11 +6042,11 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) switch(entity->kind) { default:{}break; - case DF_EntityKind_Machine: + case D_EntityKind_Machine: { }break; - case DF_EntityKind_Process: + case D_EntityKind_Process: { UI_TableCellSized(ui_children_sum(1.f)) UI_FocusHot((row_is_selected && cursor.x == 2) ? UI_FocusKind_On : UI_FocusKind_Off) { @@ -6054,22 +6054,22 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) UI_TextAlignment(UI_TextAlign_Center) if(ui_clicked(ui_buttonf("Detach"))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.entity = df_handle_from_entity(entity); - df_handle_list_push(scratch.arena, ¶ms.entity_list, df_handle_from_entity(entity)); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_EntityList); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Detach)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.entity = d_handle_from_entity(entity); + d_handle_list_push(scratch.arena, ¶ms.entity_list, d_handle_from_entity(entity)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_Entity); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_EntityList); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Detach)); } } UI_TableCellSized(ui_em(2.25f, 1.f)) UI_FocusHot((row_is_selected && cursor.x == 3) ? UI_FocusKind_On : UI_FocusKind_Off) { if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_Redo, 0, "###retry"))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - df_handle_list_push(scratch.arena, ¶ms.entity_list, df_handle_from_entity(entity)); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_EntityList); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Restart)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + d_handle_list_push(scratch.arena, ¶ms.entity_list, d_handle_from_entity(entity)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_EntityList); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Restart)); } } UI_TableCellSized(ui_em(2.25f, 1.f)) UI_FocusHot((row_is_selected && cursor.x == 4) ? UI_FocusKind_On : UI_FocusKind_Off) @@ -6077,23 +6077,23 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) DF_Palette(ws, DF_PaletteCode_NegativePopButton) if(ui_clicked(df_icon_buttonf(ws, DF_IconKind_X, 0, "###kill"))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - df_handle_list_push(scratch.arena, ¶ms.entity_list, df_handle_from_entity(entity)); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_EntityList); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Kill)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + d_handle_list_push(scratch.arena, ¶ms.entity_list, d_handle_from_entity(entity)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_EntityList); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Kill)); } } }break; - case DF_EntityKind_Thread: + case D_EntityKind_Thread: { UI_TableCellSized(ui_children_sum(1.f)) UI_FocusHot((row_is_selected && cursor.x >= 2) ? UI_FocusKind_On : UI_FocusKind_Off) { - DF_Entity *process = df_entity_ancestor_from_kind(entity, DF_EntityKind_Process); - U64 rip_vaddr = df_query_cached_rip_from_thread(entity); - DF_Entity *module = df_module_from_process_vaddr(process, rip_vaddr); - U64 rip_voff = df_voff_from_vaddr(module, rip_vaddr); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - DF_LineList lines = df_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff); + D_Entity *process = d_entity_ancestor_from_kind(entity, D_EntityKind_Process); + U64 rip_vaddr = d_query_cached_rip_from_thread(entity); + D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr); + U64 rip_voff = d_voff_from_vaddr(module, rip_vaddr); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff); if(lines.first != 0) { UI_PrefWidth(ui_children_sum(0)) df_src_loc_button(ws, lines.first->v.file_path, lines.first->v.pt); @@ -6108,7 +6108,7 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) //- rjf: selected num -> selected entity sv->selected_column = cursor.x; - sv->selected_entity = (1 <= cursor.y && cursor.y <= items.count) ? df_handle_from_entity(items.v[cursor.y-1].entity) : df_handle_zero(); + sv->selected_entity = (1 <= cursor.y && cursor.y <= items.count) ? d_handle_from_entity(items.v[cursor.y-1].entity) : d_handle_zero(); scratch_end(scratch); ProfEnd(); @@ -6141,14 +6141,14 @@ typedef struct DF_ModulesViewState DF_ModulesViewState; struct DF_ModulesViewState { B32 initialized; - DF_Handle selected_entity; + D_Handle selected_entity; S64 selected_column; B32 txt_editing; TxtPt txt_cursor; TxtPt txt_mark; U8 txt_buffer[1024]; U64 txt_size; - DF_Handle pick_file_dst_entity; + D_Handle pick_file_dst_entity; F32 idx_col_pct; F32 desc_col_pct; F32 range_col_pct; @@ -6171,9 +6171,9 @@ DF_VIEW_SETUP_FUNCTION_DEF(modules) DF_VIEW_CMD_FUNCTION_DEF(modules) { DF_ModulesViewState *mv = df_view_user_state(view, DF_ModulesViewState); - for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) + for(D_CmdNode *n = cmds->first; n != 0; n = n->next) { - DF_Cmd *cmd = &n->cmd; + D_Cmd *cmd = &n->cmd; // rjf: mismatched window/panel => skip if(df_window_from_handle(cmd->params.window) != ws || @@ -6183,16 +6183,16 @@ DF_VIEW_CMD_FUNCTION_DEF(modules) } //rjf: process - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); switch(core_cmd_kind) { default:break; - case DF_CoreCmdKind_PickFile: + case D_CmdKind_PickFile: { Temp scratch = scratch_begin(0, 0); String8 pick_string = cmd->params.file_path; - DF_Entity *module = df_entity_from_handle(mv->pick_file_dst_entity); - if(module->kind == DF_EntityKind_Module) + D_Entity *module = d_entity_from_handle(mv->pick_file_dst_entity); + if(module->kind == D_EntityKind_Module) { String8 exe_path = module->name; String8 dbg_path = pick_string; @@ -6216,27 +6216,27 @@ DF_VIEW_UI_FUNCTION_DEF(modules) F32 *col_pcts[] = {&mv->idx_col_pct, &mv->desc_col_pct, &mv->range_col_pct, &mv->dbg_col_pct}; //- rjf: get entities - DF_EntityList processes = df_query_cached_entity_list_with_kind(DF_EntityKind_Process); - DF_EntityList modules = df_query_cached_entity_list_with_kind(DF_EntityKind_Module); + D_EntityList processes = d_query_cached_entity_list_with_kind(D_EntityKind_Process); + D_EntityList modules = d_query_cached_entity_list_with_kind(D_EntityKind_Module); //- rjf: make filtered item array - DF_EntityFuzzyItemArray items = {0}; + D_EntityFuzzyItemArray items = {0}; if(query.size == 0) { - DF_EntityArray entities = {0}; + D_EntityArray entities = {0}; { entities.count = processes.count+modules.count; - entities.v = push_array_no_zero(scratch.arena, DF_Entity *, entities.count); + entities.v = push_array_no_zero(scratch.arena, D_Entity *, entities.count); U64 idx = 0; - for(DF_EntityNode *process_n = processes.first; process_n != 0; process_n = process_n->next) + for(D_EntityNode *process_n = processes.first; process_n != 0; process_n = process_n->next) { - DF_Entity *process = process_n->entity; + D_Entity *process = process_n->entity; entities.v[idx] = process; idx += 1; - for(DF_EntityNode *module_n = modules.first; module_n != 0; module_n = module_n->next) + for(D_EntityNode *module_n = modules.first; module_n != 0; module_n = module_n->next) { - DF_Entity *module = module_n->entity; - if(df_entity_ancestor_from_kind(module, DF_EntityKind_Process) != process) + D_Entity *module = module_n->entity; + if(d_entity_ancestor_from_kind(module, D_EntityKind_Process) != process) { continue; } @@ -6245,18 +6245,18 @@ DF_VIEW_UI_FUNCTION_DEF(modules) } } } - items = df_entity_fuzzy_item_array_from_entity_array_needle(scratch.arena, &entities, query); + items = d_entity_fuzzy_item_array_from_entity_array_needle(scratch.arena, &entities, query); } else { - items = df_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &modules, query); + items = d_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &modules, query); } //- rjf: selected column/entity -> selected cursor Vec2S64 cursor = {mv->selected_column}; for(U64 idx = 0; idx < items.count; idx += 1) { - if(items.v[idx].entity == df_entity_from_handle(mv->selected_entity)) + if(items.v[idx].entity == d_entity_from_handle(mv->selected_entity)) { cursor.y = (S64)(idx+1); break; @@ -6301,7 +6301,7 @@ DF_VIEW_UI_FUNCTION_DEF(modules) } //- rjf: build table - DF_Entity *commit_module = &df_g_nil_entity; + D_Entity *commit_module = &d_nil_entity; Rng1S64 visible_row_range = {0}; UI_ScrollListParams scroll_list_params = {0}; { @@ -6327,15 +6327,15 @@ DF_VIEW_UI_FUNCTION_DEF(modules) U64 idx_in_process = 0; for(U64 idx = 0; idx < items.count; idx += 1) { - DF_Entity *entity = items.v[idx].entity; + D_Entity *entity = items.v[idx].entity; B32 row_is_selected = (cursor.y == (S64)(idx+1)); - idx_in_process += (entity->kind == DF_EntityKind_Module); + idx_in_process += (entity->kind == D_EntityKind_Module); if(visible_row_range.min <= idx && idx <= visible_row_range.max) { switch(entity->kind) { default:{}break; - case DF_EntityKind_Process: + case D_EntityKind_Process: { UI_NamedTableVectorF("process_%p", entity) { @@ -6346,7 +6346,7 @@ DF_VIEW_UI_FUNCTION_DEF(modules) } idx_in_process = 0; }break; - case DF_EntityKind_Module: + case D_EntityKind_Module: UI_NamedTableVectorF("module_%p", entity) { UI_TableCell UI_TextAlignment(UI_TextAlign_Center) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) @@ -6364,8 +6364,8 @@ DF_VIEW_UI_FUNCTION_DEF(modules) if(ui_pressed(sig)) { next_cursor = v2s64(1, (S64)idx+1); - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } } UI_TableCell @@ -6374,7 +6374,7 @@ DF_VIEW_UI_FUNCTION_DEF(modules) B32 brw_is_selected = (row_is_selected && cursor.x == 3); // rjf: unpack module info - DI_Key dbgi_key = df_dbgi_key_from_module(entity); + DI_Key dbgi_key = d_dbgi_key_from_module(entity); String8 dbgi_path = dbgi_key.path; RDI_Parsed *rdi = di_rdi_from_key(scope, &dbgi_key, 0); B32 dbgi_is_valid = (rdi != &di_rdi_parsed_nil); @@ -6405,8 +6405,8 @@ DF_VIEW_UI_FUNCTION_DEF(modules) { edit_commit = (mv->txt_editing && !txt_is_selected); next_cursor = v2s64(2, (S64)idx+1); - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } // rjf: double-click -> begin editing @@ -6431,11 +6431,11 @@ DF_VIEW_UI_FUNCTION_DEF(modules) { if(ui_clicked(ui_buttonf("Browse...")) || (brw_is_selected && edit_begin)) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PickFile); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); - mv->pick_file_dst_entity = df_handle_from_entity(entity); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.cmd_spec = d_cmd_spec_from_kind(D_CmdKind_PickFile); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); + mv->pick_file_dst_entity = d_handle_from_entity(entity); } } } @@ -6450,7 +6450,7 @@ DF_VIEW_UI_FUNCTION_DEF(modules) if(edit_commit) { mv->txt_editing = 0; - if(!df_entity_is_nil(commit_module)) + if(!d_entity_is_nil(commit_module)) { String8 exe_path = commit_module->name; String8 dbg_path = str8(mv->txt_buffer, mv->txt_size); @@ -6470,7 +6470,7 @@ DF_VIEW_UI_FUNCTION_DEF(modules) //- rjf: selected num -> selected entity mv->selected_column = cursor.x; - mv->selected_entity = (1 <= cursor.y && cursor.y <= items.count) ? df_handle_from_entity(items.v[cursor.y-1].entity) : df_handle_zero(); + mv->selected_entity = (1 <= cursor.y && cursor.y <= items.count) ? d_handle_from_entity(items.v[cursor.y-1].entity) : d_handle_zero(); di_scope_close(scope); scratch_end(scratch); @@ -6634,7 +6634,7 @@ typedef struct DF_PendingFileViewState DF_PendingFileViewState; struct DF_PendingFileViewState { Arena *deferred_cmd_arena; - DF_CmdList deferred_cmds; + D_CmdList deferred_cmds; }; DF_VIEW_SETUP_FUNCTION_DEF(pending_file) @@ -6649,9 +6649,9 @@ DF_VIEW_CMD_FUNCTION_DEF(pending_file) DF_PendingFileViewState *pves = df_view_user_state(view, DF_PendingFileViewState); //- rjf: process commands - for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) + for(D_CmdNode *n = cmds->first; n != 0; n = n->next) { - DF_Cmd *cmd = &n->cmd; + D_Cmd *cmd = &n->cmd; // rjf: mismatched window/panel => skip if(df_window_from_handle(cmd->params.window) != ws || @@ -6661,24 +6661,24 @@ DF_VIEW_CMD_FUNCTION_DEF(pending_file) } // rjf: process - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); switch(core_cmd_kind) { default:break; // rjf: gather deferred commands to redispatch when entity is ready - case DF_CoreCmdKind_GoToLine: - case DF_CoreCmdKind_GoToAddress: - case DF_CoreCmdKind_CenterCursor: - case DF_CoreCmdKind_ContainCursor: + case D_CmdKind_GoToLine: + case D_CmdKind_GoToAddress: + case D_CmdKind_CenterCursor: + case D_CmdKind_ContainCursor: { - df_cmd_list_push(pves->deferred_cmd_arena, &pves->deferred_cmds, &cmd->params, cmd->spec); + d_cmd_list_push(pves->deferred_cmd_arena, &pves->deferred_cmds, &cmd->params, cmd->spec); }break; } } //- rjf: determine if file is ready, and which viewer to use - String8 file_path = df_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); + String8 file_path = d_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); Rng1U64 file_range = r1u64(0, 1024); U128 file_hash = fs_hash_from_path_range(file_path, file_range, 0); B32 file_is_ready = 0; @@ -6722,10 +6722,10 @@ DF_VIEW_CMD_FUNCTION_DEF(pending_file) //- rjf: if entity is ready, dispatch all deferred commands if(file_is_ready) { - for(DF_CmdNode *cmd_node = pves->deferred_cmds.first; cmd_node != 0; cmd_node = cmd_node->next) + for(D_CmdNode *cmd_node = pves->deferred_cmds.first; cmd_node != 0; cmd_node = cmd_node->next) { - DF_Cmd *cmd = &cmd_node->cmd; - df_push_cmd__root(&cmd->params, cmd->spec); + D_Cmd *cmd = &cmd_node->cmd; + d_push_cmd__root(&cmd->params, cmd->spec); } arena_clear(pves->deferred_cmd_arena); MemoryZeroStruct(&pves->deferred_cmds); @@ -6746,7 +6746,7 @@ DF_VIEW_CMD_FUNCTION_DEF(pending_file) { view_spec = df_view_spec_from_gfx_view_kind(viewer_kind); } - String8 query = df_eval_string_from_file_path(scratch.arena, file_path); + String8 query = d_eval_string_from_file_path(scratch.arena, file_path); df_view_equip_spec(ws, view, view_spec, query, params_copy); df_panel_notify_mutation(ws, panel); } @@ -6754,8 +6754,8 @@ DF_VIEW_CMD_FUNCTION_DEF(pending_file) //- rjf: if entity is ready, but we have no viewer for it, then just close this tab if(file_is_ready && viewer_kind == DF_GfxViewKind_Null) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseTab)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CloseTab)); } scratch_end(scratch); @@ -6785,20 +6785,20 @@ DF_VIEW_CMD_FUNCTION_DEF(text) HS_Scope *hs_scope = hs_scope_open(); TXT_Scope *txt_scope = txt_scope_open(); E_Eval eval = e_eval_from_string(scratch.arena, string); - Rng1U64 range = df_range_from_eval_params(eval, params); - df_interact_regs()->text_key = df_key_from_eval_space_range(eval.space, range, 1); - df_interact_regs()->lang_kind = df_lang_kind_from_eval_params(eval, params); + Rng1U64 range = d_range_from_eval_params(eval, params); + d_interact_regs()->text_key = d_key_from_eval_space_range(eval.space, range, 1); + d_interact_regs()->lang_kind = d_lang_kind_from_eval_params(eval, params); U128 hash = {0}; - TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, df_interact_regs()->text_key, df_interact_regs()->lang_kind, &hash); + TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, d_interact_regs()->text_key, d_interact_regs()->lang_kind, &hash); String8 data = hs_data_from_hash(hs_scope, hash); //- rjf: process general code-view commands df_code_view_cmds(ws, panel, view, cv, cmds, data, &info, 0, r1u64(0, 0), di_key_zero()); //- rjf: process code-file commands - for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) + for(D_CmdNode *n = cmds->first; n != 0; n = n->next) { - DF_Cmd *cmd = &n->cmd; + D_Cmd *cmd = &n->cmd; // rjf: mismatched window/panel => skip if(df_window_from_handle(cmd->params.window) != ws || @@ -6808,23 +6808,23 @@ DF_VIEW_CMD_FUNCTION_DEF(text) } // rjf: process - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); switch(core_cmd_kind) { default:{}break; // rjf: override file picking - case DF_CoreCmdKind_PickFile: + case D_CmdKind_PickFile: { - String8 src = df_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); + String8 src = d_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); String8 dst = cmd->params.file_path; if(src.size != 0 && dst.size != 0) { // rjf: record src -> dst mapping - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); p.string = src; p.file_path = dst; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SetFileReplacementPath)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_SetFileReplacementPath)); // rjf: switch this view to viewing replacement file view->query_string_size = Min(sizeof(view->query_buffer), dst.size); @@ -6856,17 +6856,17 @@ DF_VIEW_UI_FUNCTION_DEF(text) ////////////////////////////// //- rjf: unpack parameterization info // - df_interact_regs()->cursor.line = df_value_from_params_key(params, str8_lit("cursor_line")).s64; - df_interact_regs()->cursor.column = df_value_from_params_key(params, str8_lit("cursor_column")).s64; - df_interact_regs()->mark.line = df_value_from_params_key(params, str8_lit("mark_line")).s64; - df_interact_regs()->mark.column = df_value_from_params_key(params, str8_lit("mark_column")).s64; - String8 path = df_file_path_from_eval_string(scratch.arena, string); + d_interact_regs()->cursor.line = d_value_from_params_key(params, str8_lit("cursor_line")).s64; + d_interact_regs()->cursor.column = d_value_from_params_key(params, str8_lit("cursor_column")).s64; + d_interact_regs()->mark.line = d_value_from_params_key(params, str8_lit("mark_line")).s64; + d_interact_regs()->mark.column = d_value_from_params_key(params, str8_lit("mark_column")).s64; + String8 path = d_file_path_from_eval_string(scratch.arena, string); E_Eval eval = e_eval_from_string(scratch.arena, string); - Rng1U64 range = df_range_from_eval_params(eval, params); - df_interact_regs()->text_key = df_key_from_eval_space_range(eval.space, range, 1); - df_interact_regs()->lang_kind = df_lang_kind_from_eval_params(eval, params); + Rng1U64 range = d_range_from_eval_params(eval, params); + d_interact_regs()->text_key = d_key_from_eval_space_range(eval.space, range, 1); + d_interact_regs()->lang_kind = d_lang_kind_from_eval_params(eval, params); U128 hash = {0}; - TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, df_interact_regs()->text_key, df_interact_regs()->lang_kind, &hash); + TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, d_interact_regs()->text_key, d_interact_regs()->lang_kind, &hash); String8 data = hs_data_from_hash(hs_scope, hash); B32 file_is_missing = (path.size != 0 && os_properties_from_file_path(path).modified == 0); B32 key_has_data = !u128_match(hash, u128_zero()) && info.lines_count; @@ -6897,10 +6897,10 @@ DF_VIEW_UI_FUNCTION_DEF(text) UI_TextAlignment(UI_TextAlign_Center) if(ui_clicked(ui_buttonf("Find alternative..."))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - params.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PickFile); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand)); + D_CmdParams params = df_cmd_params_from_view(ws, panel, view); + params.cmd_spec = d_cmd_spec_from_kind(D_CmdKind_PickFile); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_RunCommand)); } scratch_end(scratch); } @@ -6929,7 +6929,7 @@ DF_VIEW_UI_FUNCTION_DEF(text) // if(path.size != 0) { - df_interact_regs()->lines = df_lines_from_file_path_line_num(df_frame_arena(), path, df_interact_regs()->cursor.line); + d_interact_regs()->lines = d_lines_from_file_path_line_num(d_frame_arena(), path, d_interact_regs()->cursor.line); } ////////////////////////////// @@ -6998,7 +6998,7 @@ DF_VIEW_UI_FUNCTION_DEF(text) ui_label(path); ui_spacer(ui_em(1.5f, 1)); } - ui_labelf("Line: %I64d, Column: %I64d", df_interact_regs()->cursor.line, df_interact_regs()->cursor.column); + ui_labelf("Line: %I64d, Column: %I64d", d_interact_regs()->cursor.line, d_interact_regs()->cursor.column); ui_spacer(ui_pct(1, 0)); ui_labelf("(read only)"); ui_labelf("%s", @@ -7012,10 +7012,10 @@ DF_VIEW_UI_FUNCTION_DEF(text) ////////////////////////////// //- rjf: store params // - df_view_store_param_s64(view, str8_lit("cursor_line"), df_interact_regs()->cursor.line); - df_view_store_param_s64(view, str8_lit("cursor_column"), df_interact_regs()->cursor.column); - df_view_store_param_s64(view, str8_lit("mark_line"), df_interact_regs()->mark.line); - df_view_store_param_s64(view, str8_lit("mark_column"), df_interact_regs()->mark.column); + df_view_store_param_s64(view, str8_lit("cursor_line"), d_interact_regs()->cursor.line); + df_view_store_param_s64(view, str8_lit("cursor_column"), d_interact_regs()->cursor.column); + df_view_store_param_s64(view, str8_lit("mark_line"), d_interact_regs()->mark.line); + df_view_store_param_s64(view, str8_lit("mark_column"), d_interact_regs()->mark.column); txt_scope_close(txt_scope); hs_scope_close(hs_scope); @@ -7076,26 +7076,26 @@ DF_VIEW_CMD_FUNCTION_DEF(disasm) E_Space space = eval.space; if(auto_selected_thread) { - space = df_eval_space_from_entity(df_entity_from_handle(df_interact_regs()->process)); + space = d_eval_space_from_entity(d_entity_from_handle(d_interact_regs()->process)); } - Rng1U64 range = df_range_from_eval_params(eval, params); - Architecture arch = df_architecture_from_eval_params(eval, params); - DF_Entity *space_entity = df_entity_from_eval_space(space); - DF_Entity *dasm_module = &df_g_nil_entity; + Rng1U64 range = d_range_from_eval_params(eval, params); + Architecture arch = d_architecture_from_eval_params(eval, params); + D_Entity *space_entity = d_entity_from_eval_space(space); + D_Entity *dasm_module = &d_nil_entity; DI_Key dbgi_key = {0}; U64 base_vaddr = 0; switch(space_entity->kind) { default:{}break; - case DF_EntityKind_Process: + case D_EntityKind_Process: { - arch = df_architecture_from_entity(space_entity); - dasm_module = df_module_from_process_vaddr(space_entity, range.min); - dbgi_key = df_dbgi_key_from_module(dasm_module); + arch = d_architecture_from_entity(space_entity); + dasm_module = d_module_from_process_vaddr(space_entity, range.min); + dbgi_key = d_dbgi_key_from_module(dasm_module); base_vaddr = dasm_module->vaddr_rng.min; }break; } - U128 dasm_key = df_key_from_eval_space_range(space, range, 0); + U128 dasm_key = d_key_from_eval_space_range(space, range, 0); U128 dasm_data_hash = {0}; DASM_Params dasm_params = {0}; { @@ -7107,10 +7107,10 @@ DF_VIEW_CMD_FUNCTION_DEF(disasm) dasm_params.dbgi_key = dbgi_key; } DASM_Info dasm_info = dasm_info_from_key_params(dasm_scope, dasm_key, &dasm_params, &dasm_data_hash); - df_interact_regs()->text_key = dasm_info.text_key; - df_interact_regs()->lang_kind = txt_lang_kind_from_architecture(arch); + d_interact_regs()->text_key = dasm_info.text_key; + d_interact_regs()->lang_kind = txt_lang_kind_from_architecture(arch); U128 dasm_text_hash = {0}; - TXT_TextInfo dasm_text_info = txt_text_info_from_key_lang(txt_scope, df_interact_regs()->text_key, df_interact_regs()->lang_kind, &dasm_text_hash); + TXT_TextInfo dasm_text_info = txt_text_info_from_key_lang(txt_scope, d_interact_regs()->text_key, d_interact_regs()->lang_kind, &dasm_text_hash); String8 dasm_text_data = hs_data_from_hash(hs_scope, dasm_text_hash); B32 has_disasm = (dasm_info.lines.count != 0 && dasm_text_info.lines_count != 0); B32 is_loading = (!has_disasm && dim_1u64(range) != 0 && eval.msgs.max_kind == E_MsgKind_Null); @@ -7123,10 +7123,10 @@ DF_VIEW_CMD_FUNCTION_DEF(disasm) ////////////////////////////// //- rjf: process disassembly-specific commands // - for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) + for(D_CmdNode *n = cmds->first; n != 0; n = n->next) { - DF_Cmd *cmd = &n->cmd; - DF_CmdParams params = cmd->params; + D_Cmd *cmd = &n->cmd; + D_CmdParams params = cmd->params; // rjf: mismatched window/panel => skip if(df_window_from_handle(cmd->params.window) != ws || @@ -7136,32 +7136,32 @@ DF_VIEW_CMD_FUNCTION_DEF(disasm) } // rjf: process - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); switch(core_cmd_kind) { default: break; - case DF_CoreCmdKind_GoToAddress: + case D_CmdKind_GoToAddress: { - DF_Entity *process = &df_g_nil_entity; + D_Entity *process = &d_nil_entity; { - DF_Entity *entity = df_entity_from_handle(params.entity); - if(!df_entity_is_nil(entity) && - (entity->kind == DF_EntityKind_Process || - entity->kind == DF_EntityKind_Thread || - entity->kind == DF_EntityKind_Module)) + D_Entity *entity = d_entity_from_handle(params.entity); + if(!d_entity_is_nil(entity) && + (entity->kind == D_EntityKind_Process || + entity->kind == D_EntityKind_Thread || + entity->kind == D_EntityKind_Module)) { process = entity; - if(entity->kind == DF_EntityKind_Thread || - entity->kind == DF_EntityKind_Module) + if(entity->kind == D_EntityKind_Thread || + entity->kind == D_EntityKind_Module) { - process = df_entity_ancestor_from_kind(process, DF_EntityKind_Process); + process = d_entity_ancestor_from_kind(process, D_EntityKind_Process); } } } dv->goto_vaddr = params.vaddr; }break; - case DF_CoreCmdKind_ToggleCodeBytesVisibility: {dv->style_flags ^= DASM_StyleFlag_CodeBytes;}break; - case DF_CoreCmdKind_ToggleAddressVisibility: {dv->style_flags ^= DASM_StyleFlag_Addresses;}break; + case D_CmdKind_ToggleCodeBytesVisibility: {dv->style_flags ^= DASM_StyleFlag_CodeBytes;}break; + case D_CmdKind_ToggleAddressVisibility: {dv->style_flags ^= DASM_StyleFlag_Addresses;}break; } } @@ -7198,8 +7198,8 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) F32 bottom_bar_height = ui_top_font_size()*2.f; Rng2F32 code_area_rect = r2f32p(rect.x0, rect.y0, rect.x1, rect.y1 - bottom_bar_height); Rng2F32 bottom_bar_rect = r2f32p(rect.x0, rect.y1 - bottom_bar_height, rect.x1, rect.y1); - df_interact_regs()->cursor = dv->cursor; - df_interact_regs()->mark = dv->mark; + d_interact_regs()->cursor = dv->cursor; + d_interact_regs()->mark = dv->mark; ////////////////////////////// //- rjf: unpack parameterization info @@ -7208,26 +7208,26 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) E_Space space = eval.space; if(auto_selected_thread) { - space = df_eval_space_from_entity(df_entity_from_handle(df_interact_regs()->process)); + space = d_eval_space_from_entity(d_entity_from_handle(d_interact_regs()->process)); } - Rng1U64 range = df_range_from_eval_params(eval, params); - Architecture arch = df_architecture_from_eval_params(eval, params); - DF_Entity *space_entity = df_entity_from_eval_space(space); - DF_Entity *dasm_module = &df_g_nil_entity; + Rng1U64 range = d_range_from_eval_params(eval, params); + Architecture arch = d_architecture_from_eval_params(eval, params); + D_Entity *space_entity = d_entity_from_eval_space(space); + D_Entity *dasm_module = &d_nil_entity; DI_Key dbgi_key = {0}; U64 base_vaddr = 0; switch(space_entity->kind) { default:{}break; - case DF_EntityKind_Process: + case D_EntityKind_Process: { - arch = df_architecture_from_entity(space_entity); - dasm_module = df_module_from_process_vaddr(space_entity, range.min); - dbgi_key = df_dbgi_key_from_module(dasm_module); + arch = d_architecture_from_entity(space_entity); + dasm_module = d_module_from_process_vaddr(space_entity, range.min); + dbgi_key = d_dbgi_key_from_module(dasm_module); base_vaddr = dasm_module->vaddr_rng.min; }break; } - U128 dasm_key = df_key_from_eval_space_range(space, range, 0); + U128 dasm_key = d_key_from_eval_space_range(space, range, 0); U128 dasm_data_hash = {0}; DASM_Params dasm_params = {0}; { @@ -7239,10 +7239,10 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) dasm_params.dbgi_key = dbgi_key; } DASM_Info dasm_info = dasm_info_from_key_params(dasm_scope, dasm_key, &dasm_params, &dasm_data_hash); - df_interact_regs()->text_key = dasm_info.text_key; - df_interact_regs()->lang_kind = txt_lang_kind_from_architecture(arch); + d_interact_regs()->text_key = dasm_info.text_key; + d_interact_regs()->lang_kind = txt_lang_kind_from_architecture(arch); U128 dasm_text_hash = {0}; - TXT_TextInfo dasm_text_info = txt_text_info_from_key_lang(txt_scope, df_interact_regs()->text_key, df_interact_regs()->lang_kind, &dasm_text_hash); + TXT_TextInfo dasm_text_info = txt_text_info_from_key_lang(txt_scope, d_interact_regs()->text_key, d_interact_regs()->lang_kind, &dasm_text_hash); String8 dasm_text_data = hs_data_from_hash(hs_scope, dasm_text_hash); B32 has_disasm = (dasm_info.lines.count != 0 && dasm_text_info.lines_count != 0); B32 is_loading = (!has_disasm && dim_1u64(range) != 0 && eval.msgs.max_kind == E_MsgKind_Null); @@ -7250,7 +7250,7 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) ////////////////////////////// //- rjf: is loading -> equip view with loading information // - if(is_loading && !df_ctrl_targets_running()) + if(is_loading && !d_ctrl_targets_running()) { df_view_equip_loading_info(view, is_loading, 0, 0); } @@ -7280,10 +7280,10 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) // if(!is_loading && has_disasm) { - U64 off = dasm_line_array_code_off_from_idx(&dasm_info.lines, df_interact_regs()->cursor.line-1); - df_interact_regs()->vaddr_range = r1u64(base_vaddr+off, base_vaddr+off); - df_interact_regs()->voff_range = df_voff_range_from_vaddr_range(dasm_module, df_interact_regs()->vaddr_range); - df_interact_regs()->lines = df_lines_from_dbgi_key_voff(df_frame_arena(), &dbgi_key, df_interact_regs()->voff_range.min); + U64 off = dasm_line_array_code_off_from_idx(&dasm_info.lines, d_interact_regs()->cursor.line-1); + d_interact_regs()->vaddr_range = r1u64(base_vaddr+off, base_vaddr+off); + d_interact_regs()->voff_range = d_voff_range_from_vaddr_range(dasm_module, d_interact_regs()->vaddr_range); + d_interact_regs()->lines = d_lines_from_dbgi_key_voff(d_frame_arena(), &dbgi_key, d_interact_regs()->voff_range.min); } ////////////////////////////// @@ -7299,13 +7299,13 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) DF_Font(ws, DF_FontSlot_Code) { - U64 cursor_vaddr = (1 <= df_interact_regs()->cursor.line && df_interact_regs()->cursor.line <= dasm_info.lines.count) ? (range.min+dasm_info.lines.v[df_interact_regs()->cursor.line-1].code_off) : 0; - if(!df_entity_is_nil(dasm_module)) + U64 cursor_vaddr = (1 <= d_interact_regs()->cursor.line && d_interact_regs()->cursor.line <= dasm_info.lines.count) ? (range.min+dasm_info.lines.v[d_interact_regs()->cursor.line-1].code_off) : 0; + if(!d_entity_is_nil(dasm_module)) { ui_labelf("%S", path_normalized_from_string(scratch.arena, dasm_module->name)); ui_spacer(ui_em(1.5f, 1)); } - ui_labelf("Address: 0x%I64x, Line: %I64d, Column: %I64d", cursor_vaddr, df_interact_regs()->cursor.line, df_interact_regs()->cursor.column); + ui_labelf("Address: 0x%I64x, Line: %I64d, Column: %I64d", cursor_vaddr, d_interact_regs()->cursor.line, d_interact_regs()->cursor.column); ui_spacer(ui_pct(1, 0)); ui_labelf("(read only)"); ui_labelf("bin"); @@ -7315,8 +7315,8 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) ////////////////////////////// //- rjf: commit storage // - dv->cursor = df_interact_regs()->cursor; - dv->mark = df_interact_regs()->mark; + dv->cursor = d_interact_regs()->cursor; + dv->mark = d_interact_regs()->mark; txt_scope_close(txt_scope); dasm_scope_close(dasm_scope); @@ -7339,10 +7339,10 @@ DF_VIEW_CMD_FUNCTION_DEF(output) Temp scratch = scratch_begin(0, 0); HS_Scope *hs_scope = hs_scope_open(); TXT_Scope *txt_scope = txt_scope_open(); - df_interact_regs()->text_key = df_state->output_log_key; - df_interact_regs()->lang_kind = TXT_LangKind_Null; + d_interact_regs()->text_key = d_state->output_log_key; + d_interact_regs()->lang_kind = TXT_LangKind_Null; U128 hash = {0}; - TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, df_interact_regs()->text_key, df_interact_regs()->lang_kind, &hash); + TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, d_interact_regs()->text_key, d_interact_regs()->lang_kind, &hash); String8 data = hs_data_from_hash(hs_scope, hash); df_code_view_cmds(ws, panel, view, cv, cmds, data, &info, 0, r1u64(0, 0), di_key_zero()); txt_scope_close(txt_scope); @@ -7367,7 +7367,7 @@ DF_VIEW_UI_FUNCTION_DEF(output) ////////////////////////////// //- rjf: unpack text info // - U128 key = df_state->output_log_key; + U128 key = d_state->output_log_key; TXT_LangKind lang_kind = TXT_LangKind_Null; U128 hash = {0}; TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, key, lang_kind, &hash); @@ -7400,7 +7400,7 @@ DF_VIEW_UI_FUNCTION_DEF(output) { ui_labelf("(Debug String Output)"); ui_spacer(ui_em(1.5f, 1)); - ui_labelf("Line: %I64d, Column: %I64d", df_interact_regs()->cursor.line, df_interact_regs()->cursor.column); + ui_labelf("Line: %I64d, Column: %I64d", d_interact_regs()->cursor.line, d_interact_regs()->cursor.column); ui_spacer(ui_pct(1, 0)); ui_labelf("(read only)"); } @@ -7429,25 +7429,25 @@ DF_VIEW_SETUP_FUNCTION_DEF(memory) DF_VIEW_CMD_FUNCTION_DEF(memory) { DF_MemoryViewState *mv = df_view_user_state(view, DF_MemoryViewState); - for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) + for(D_CmdNode *n = cmds->first; n != 0; n = n->next) { - DF_Cmd *cmd = &n->cmd; - DF_CoreCmdKind core_cmd_kind = df_core_cmd_kind_from_string(cmd->spec->info.string); - DF_CmdParams *params = &cmd->params; + D_Cmd *cmd = &n->cmd; + D_CmdKind core_cmd_kind = d_cmd_kind_from_string(cmd->spec->info.string); + D_CmdParams *params = &cmd->params; switch(core_cmd_kind) { default: break; - case DF_CoreCmdKind_CenterCursor: + case D_CmdKind_CenterCursor: if(df_view_from_handle(params->view) == view) { mv->center_cursor = 1; }break; - case DF_CoreCmdKind_ContainCursor: + case D_CmdKind_ContainCursor: if(df_view_from_handle(params->view) == view) { mv->contain_cursor = 1; }break; - case DF_CoreCmdKind_GoToAddress: + case D_CmdKind_GoToAddress: { // NOTE(rjf): go-to-address occurs with disassembly snaps, and we don't // generally want to respond to those in thise view, so just skip any @@ -7458,7 +7458,7 @@ DF_VIEW_CMD_FUNCTION_DEF(memory) // TODO(rjf) } }break; - case DF_CoreCmdKind_SetColumns: + case D_CmdKind_SetColumns: if(df_view_from_handle(params->view) == view) { // TODO(rjf) @@ -7480,13 +7480,13 @@ DF_VIEW_UI_FUNCTION_DEF(memory) E_Eval eval = e_eval_from_string(scratch.arena, string); if(u128_match(eval.space, u128_zero())) { - eval.space = df_eval_space_from_entity(df_entity_from_handle(df_interact_regs()->process)); + eval.space = d_eval_space_from_entity(d_entity_from_handle(d_interact_regs()->process)); } - Rng1U64 space_range = df_whole_range_from_eval_space(eval.space); - U64 cursor = df_value_from_params_key(params, str8_lit("cursor_vaddr")).u64; - U64 mark = df_value_from_params_key(params, str8_lit("mark_vaddr")).u64; - U64 bytes_per_cell = df_value_from_params_key(params, str8_lit("bytes_per_cell")).u64; - U64 num_columns = df_value_from_params_key(params, str8_lit("num_columns")).u64; + Rng1U64 space_range = d_whole_range_from_eval_space(eval.space); + U64 cursor = d_value_from_params_key(params, str8_lit("cursor_vaddr")).u64; + U64 mark = d_value_from_params_key(params, str8_lit("mark_vaddr")).u64; + U64 bytes_per_cell = d_value_from_params_key(params, str8_lit("bytes_per_cell")).u64; + U64 num_columns = d_value_from_params_key(params, str8_lit("num_columns")).u64; if(num_columns == 0) { num_columns = 16; @@ -7654,7 +7654,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) ////////////////////////////// //- rjf: produce fancy string runs for all possible byte values in all cells // - D_FancyStringList byte_fancy_strings[256] = {0}; + DR_FancyStringList byte_fancy_strings[256] = {0}; { Vec4F32 full_color = df_rgba_from_theme_color(DF_ThemeColor_TextPositive); Vec4F32 zero_color = df_rgba_from_theme_color(DF_ThemeColor_TextWeak); @@ -7667,8 +7667,8 @@ DF_VIEW_UI_FUNCTION_DEF(memory) { text_color.w *= 0.5f; } - D_FancyString fstr = {font, push_str8f(scratch.arena, "%02x", byte), text_color, font_size, 0, 0}; - d_fancy_string_list_push(scratch.arena, &byte_fancy_strings[idx], &fstr); + DR_FancyString fstr = {font, push_str8f(scratch.arena, "%02x", byte), text_color, font_size, 0, 0}; + dr_fancy_string_list_push(scratch.arena, &byte_fancy_strings[idx], &fstr); } } @@ -7702,9 +7702,9 @@ DF_VIEW_UI_FUNCTION_DEF(memory) }; AnnotationList *visible_memory_annotations = push_array(scratch.arena, AnnotationList, visible_memory_size); { - DF_Entity *thread = df_entity_from_handle(df_interact_regs()->thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - CTRL_Unwind unwind = df_query_cached_unwind_from_thread(thread); + D_Entity *thread = d_entity_from_handle(d_interact_regs()->thread); + D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process); + CTRL_Unwind unwind = d_query_cached_unwind_from_thread(thread); //- rjf: fill unwind frame annotations if(unwind.frames.count != 0) @@ -7720,10 +7720,10 @@ DF_VIEW_UI_FUNCTION_DEF(memory) if(dim_1u64(frame_vaddr_range_in_viz) != 0) { U64 f_rip = regs_rip_from_arch_block(thread->arch, f->regs); - DF_Entity *module = df_module_from_process_vaddr(process, f_rip); - DI_Key dbgi_key = df_dbgi_key_from_module(module); - U64 rip_voff = df_voff_from_vaddr(module, f_rip); - String8 symbol_name = df_symbol_name_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff, 1); + D_Entity *module = d_module_from_process_vaddr(process, f_rip); + DI_Key dbgi_key = d_dbgi_key_from_module(module); + U64 rip_voff = d_voff_from_vaddr(module, f_rip); + String8 symbol_name = d_symbol_name_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff, 1); Annotation *annotation = push_array(scratch.arena, Annotation, 1); annotation->name_string = symbol_name.size != 0 ? symbol_name : str8_lit("[external code]"); annotation->kind_string = str8_lit("Call Stack Frame"); @@ -7748,9 +7748,9 @@ DF_VIEW_UI_FUNCTION_DEF(memory) if(dim_1u64(stack_vaddr_range_in_viz) != 0) { Annotation *annotation = push_array(scratch.arena, Annotation, 1); - annotation->name_string = df_display_string_from_entity(scratch.arena, thread); + annotation->name_string = d_display_string_from_entity(scratch.arena, thread); annotation->kind_string = str8_lit("Stack"); - annotation->color = thread->flags & DF_EntityFlag_HasColor ? df_rgba_from_entity(thread) : df_rgba_from_theme_color(DF_ThemeColor_Text); + annotation->color = thread->flags & D_EntityFlag_HasColor ? d_rgba_from_entity(thread) : df_rgba_from_theme_color(DF_ThemeColor_Text); annotation->vaddr_range = stack_vaddr_range; for(U64 vaddr = stack_vaddr_range_in_viz.min; vaddr < stack_vaddr_range_in_viz.max; vaddr += 1) { @@ -7774,7 +7774,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) df_rgba_from_theme_color(DF_ThemeColor_Thread6), df_rgba_from_theme_color(DF_ThemeColor_Thread7), }; - U64 thread_rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, df_interact_regs()->unwind_count); + U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, d_interact_regs()->unwind_count); for(E_String2NumMapNode *n = e_parse_ctx->locals_map->first; n != 0; n = n->order_next) { String8 local_name = n->string; @@ -7941,8 +7941,8 @@ DF_VIEW_UI_FUNCTION_DEF(memory) // rjf: press -> focus panel if(ui_pressed(sig)) { - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } // rjf: click & drag -> select @@ -7969,13 +7969,13 @@ DF_VIEW_UI_FUNCTION_DEF(memory) ui_eat_event(evt); if(evt->delta_2f32.y < 0) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_IncCodeFontScale)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_IncCodeFontScale)); } else if(evt->delta_2f32.y > 0) { - DF_CmdParams params = df_cmd_params_from_window(ws); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_DecCodeFontScale)); + D_CmdParams params = df_cmd_params_from_window(ws); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_DecCodeFontScale)); } } } @@ -8111,32 +8111,32 @@ DF_VIEW_UI_FUNCTION_DEF(memory) if(selection.max >= row_range_bytes.min && selection.min < row_range_bytes.max) { Rng1U64 selection_in_row = intersect_1u64(row_range_bytes, selection); - D_Bucket *bucket = d_bucket_make(); + DR_Bucket *bucket = dr_bucket_make(); D_BucketScope(bucket) { Vec2F32 text_pos = ui_box_text_position(ascii_box); - d_rect(r2f32p(text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, selection_in_row.min+0-row_range_bytes.min)).x - font_size/8.f, - ascii_box->rect.y0, - text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, selection_in_row.max+1-row_range_bytes.min)).x + font_size/4.f, - ascii_box->rect.y1), - df_rgba_from_theme_color(DF_ThemeColor_SelectionOverlay), - 0, 0, 1.f); + dr_rect(r2f32p(text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, selection_in_row.min+0-row_range_bytes.min)).x - font_size/8.f, + ascii_box->rect.y0, + text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, selection_in_row.max+1-row_range_bytes.min)).x + font_size/4.f, + ascii_box->rect.y1), + df_rgba_from_theme_color(DF_ThemeColor_SelectionOverlay), + 0, 0, 1.f); } ui_box_equip_draw_bucket(ascii_box, bucket); } if(mouse_hover_byte_num != 0 && contains_1u64(row_range_bytes, mouse_hover_byte_num-1)) { - D_Bucket *bucket = d_bucket_make(); + DR_Bucket *bucket = dr_bucket_make(); D_BucketScope(bucket) { Vec2F32 text_pos = ui_box_text_position(ascii_box); Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay); - d_rect(r2f32p(text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, mouse_hover_byte_num-1-row_range_bytes.min)).x - font_size/8.f, - ascii_box->rect.y0, - text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, mouse_hover_byte_num+0-row_range_bytes.min)).x + font_size/4.f, - ascii_box->rect.y1), - color, - 1.f, 3.f, 1.f); + dr_rect(r2f32p(text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, mouse_hover_byte_num-1-row_range_bytes.min)).x - font_size/8.f, + ascii_box->rect.y0, + text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, mouse_hover_byte_num+0-row_range_bytes.min)).x + font_size/4.f, + ascii_box->rect.y1), + color, + 1.f, 3.f, 1.f); } ui_box_equip_draw_bucket(ascii_box, bucket); } @@ -8279,7 +8279,7 @@ internal UI_BOX_CUSTOM_DRAW(df_bitmap_box_draw) { DF_BitmapBoxDrawData *draw_data = (DF_BitmapBoxDrawData *)user_data; Vec4F32 bg_color = box->palette->background; - d_img(box->rect, draw_data->src, draw_data->texture, v4f32(1, 1, 1, 1), 0, 0, 0); + dr_img(box->rect, draw_data->src, draw_data->texture, v4f32(1, 1, 1, 1), 0, 0, 0); if(draw_data->loaded_t < 0.98f) { Rng2F32 clip = box->rect; @@ -8290,22 +8290,22 @@ internal UI_BOX_CUSTOM_DRAW(df_bitmap_box_draw) clip = intersect_2f32(b->rect, clip); } } - d_blur(intersect_2f32(clip, box->rect), 10.f-9.f*draw_data->loaded_t, 0); + dr_blur(intersect_2f32(clip, box->rect), 10.f-9.f*draw_data->loaded_t, 0); } if(r_handle_match(draw_data->texture, r_handle_zero())) { - d_rect(box->rect, v4f32(0, 0, 0, 1), 0, 0, 0); + dr_rect(box->rect, v4f32(0, 0, 0, 1), 0, 0, 0); } - d_rect(box->rect, v4f32(bg_color.x*bg_color.w, bg_color.y*bg_color.w, bg_color.z*bg_color.w, 1.f-draw_data->loaded_t), 0, 0, 0); + dr_rect(box->rect, v4f32(bg_color.x*bg_color.w, bg_color.y*bg_color.w, bg_color.z*bg_color.w, 1.f-draw_data->loaded_t), 0, 0, 0); if(draw_data->hovered) { Vec4F32 indicator_color = v4f32(1, 1, 1, 1); - d_rect(pad_2f32(r2f32p(box->rect.x0 + draw_data->mouse_px.x*draw_data->ui_per_bmp_px, - box->rect.y0 + draw_data->mouse_px.y*draw_data->ui_per_bmp_px, - box->rect.x0 + draw_data->mouse_px.x*draw_data->ui_per_bmp_px + draw_data->ui_per_bmp_px, - box->rect.y0 + draw_data->mouse_px.y*draw_data->ui_per_bmp_px + draw_data->ui_per_bmp_px), - 3.f), - indicator_color, 3.f, 4.f, 1.f); + dr_rect(pad_2f32(r2f32p(box->rect.x0 + draw_data->mouse_px.x*draw_data->ui_per_bmp_px, + box->rect.y0 + draw_data->mouse_px.y*draw_data->ui_per_bmp_px, + box->rect.x0 + draw_data->mouse_px.x*draw_data->ui_per_bmp_px + draw_data->ui_per_bmp_px, + box->rect.y0 + draw_data->mouse_px.y*draw_data->ui_per_bmp_px + draw_data->ui_per_bmp_px), + 3.f), + indicator_color, 3.f, 4.f, 1.f); } } @@ -8331,7 +8331,7 @@ internal UI_BOX_CUSTOM_DRAW(df_bitmap_view_canvas_box_draw) rect.p1.v[axis] = p_scr.v[axis] + grid_line_thickness_px/2; rect.p0.v[axis2_flip(axis)] = box->rect.p0.v[axis2_flip(axis)]; rect.p1.v[axis2_flip(axis)] = box->rect.p1.v[axis2_flip(axis)]; - d_rect(rect, grid_line_color, 0, 0, 1.f); + dr_rect(rect, grid_line_color, 0, 0, 1.f); } } } @@ -8352,20 +8352,20 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) //- rjf: evaluate expression // E_Eval eval = e_eval_from_string(scratch.arena, string); - Vec2S32 dim = df_dim2s32_from_eval_params(eval, params); - R_Tex2DFormat fmt = df_tex2dformat_from_eval_params(eval, params); - U64 base_offset = df_base_offset_from_eval(eval); + Vec2S32 dim = d_dim2s32_from_eval_params(eval, params); + R_Tex2DFormat fmt = d_tex2dformat_from_eval_params(eval, params); + U64 base_offset = d_base_offset_from_eval(eval); U64 expected_size = dim.x*dim.y*r_tex2d_format_bytes_per_pixel_table[fmt]; Rng1U64 offset_range = r1u64(base_offset, base_offset + expected_size); ////////////////////////////// //- rjf: unpack params // - F32 zoom = df_value_from_params_key(params, str8_lit("zoom")).f32; + F32 zoom = d_value_from_params_key(params, str8_lit("zoom")).f32; Vec2F32 view_center_pos = { - df_value_from_params_key(params, str8_lit("x")).f32, - df_value_from_params_key(params, str8_lit("y")).f32, + d_value_from_params_key(params, str8_lit("x")).f32, + d_value_from_params_key(params, str8_lit("y")).f32, }; if(zoom == 0) { @@ -8384,7 +8384,7 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) ////////////////////////////// //- rjf: map expression artifacts -> texture // - U128 texture_key = df_key_from_eval_space_range(eval.space, offset_range, 0); + U128 texture_key = d_key_from_eval_space_range(eval.space, offset_range, 0); TEX_Topology topology = tex_topology_make(dim, fmt); U128 data_hash = {0}; R_Handle texture = tex_texture_from_key_topology(tex_scope, texture_key, topology, &data_hash); @@ -8422,8 +8422,8 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) { if(ui_pressed(canvas_sig)) { - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); ui_store_drag_struct(&view_center_pos); } Vec2F32 start_view_center_pos = *ui_get_drag_struct(Vec2F32); @@ -8658,11 +8658,11 @@ internal UI_BOX_CUSTOM_DRAW(df_geo3d_box_draw) // rjf: mesh Vec2F32 box_dim = dim_2f32(box->rect); - R_PassParams_Geo3D *pass = d_geo3d_begin(box->rect, - make_look_at_4x4f32(eye, target, v3f32(0, 0, 1)), - make_perspective_4x4f32(0.25f, box_dim.x/box_dim.y, 0.1f, 500.f)); + R_PassParams_Geo3D *pass = dr_geo3d_begin(box->rect, + make_look_at_4x4f32(eye, target, v3f32(0, 0, 1)), + make_perspective_4x4f32(0.25f, box_dim.x/box_dim.y, 0.1f, 500.f)); pass->clip = clip; - d_mesh(draw_data->vertex_buffer, draw_data->index_buffer, R_GeoTopologyKind_Triangles, R_GeoVertexFlag_TexCoord|R_GeoVertexFlag_Normals|R_GeoVertexFlag_RGB, r_handle_zero(), mat_4x4f32(1.f)); + dr_mesh(draw_data->vertex_buffer, draw_data->index_buffer, R_GeoTopologyKind_Triangles, R_GeoVertexFlag_TexCoord|R_GeoVertexFlag_Normals|R_GeoVertexFlag_RGB, r_handle_zero(), mat_4x4f32(1.f)); } DF_VIEW_SETUP_FUNCTION_DEF(geo3d) @@ -8680,22 +8680,22 @@ DF_VIEW_UI_FUNCTION_DEF(geo3d) ////////////////////////////// //- rjf: unpack parameters // - U64 count = df_value_from_params_key(params, str8_lit("count")).u64; - U64 vtx_base_off = df_value_from_params_key(params, str8_lit("vtx")).u64; - U64 vtx_size = df_value_from_params_key(params, str8_lit("vtx_size")).u64; - F32 yaw_target = df_value_from_params_key(params, str8_lit("yaw")).f32; - F32 pitch_target = df_value_from_params_key(params, str8_lit("pitch")).f32; - F32 zoom_target = df_value_from_params_key(params, str8_lit("zoom")).f32; + U64 count = d_value_from_params_key(params, str8_lit("count")).u64; + U64 vtx_base_off = d_value_from_params_key(params, str8_lit("vtx")).u64; + U64 vtx_size = d_value_from_params_key(params, str8_lit("vtx_size")).u64; + F32 yaw_target = d_value_from_params_key(params, str8_lit("yaw")).f32; + F32 pitch_target = d_value_from_params_key(params, str8_lit("pitch")).f32; + F32 zoom_target = d_value_from_params_key(params, str8_lit("zoom")).f32; ////////////////////////////// //- rjf: evaluate & unpack expression // E_Eval eval = e_eval_from_string(scratch.arena, string); - U64 base_offset = df_base_offset_from_eval(eval); + U64 base_offset = d_base_offset_from_eval(eval); Rng1U64 idxs_range = r1u64(base_offset, base_offset+count*sizeof(U32)); Rng1U64 vtxs_range = r1u64(vtx_base_off, vtx_base_off+vtx_size); - U128 idxs_key = df_key_from_eval_space_range(eval.space, idxs_range, 0); - U128 vtxs_key = df_key_from_eval_space_range(eval.space, vtxs_range, 0); + U128 idxs_key = d_key_from_eval_space_range(eval.space, idxs_range, 0); + U128 vtxs_key = d_key_from_eval_space_range(eval.space, vtxs_range, 0); R_Handle idxs_buffer = geo_buffer_from_key(geo_scope, idxs_key); R_Handle vtxs_buffer = geo_buffer_from_key(geo_scope, vtxs_key); @@ -8723,8 +8723,8 @@ DF_VIEW_UI_FUNCTION_DEF(geo3d) //- rjf: animate camera // { - F32 fast_rate = 1 - pow_f32(2, (-60.f * df_dt())); - F32 slow_rate = 1 - pow_f32(2, (-30.f * df_dt())); + F32 fast_rate = 1 - pow_f32(2, (-60.f * d_dt())); + F32 slow_rate = 1 - pow_f32(2, (-30.f * d_dt())); state->zoom += (zoom_target - state->zoom) * slow_rate; state->yaw += (yaw_target - state->yaw) * fast_rate; state->pitch += (pitch_target - state->pitch) * fast_rate; @@ -8752,8 +8752,8 @@ DF_VIEW_UI_FUNCTION_DEF(geo3d) { if(ui_pressed(sig)) { - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_view(ws, panel, view); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); Vec2F32 data = v2f32(yaw_target, pitch_target); ui_store_drag_struct(&data); } @@ -8856,7 +8856,7 @@ DF_VIEW_UI_FUNCTION_DEF(exception_filters) } node->v[node->count].name = name; node->v[node->count].matches = matches; - node->v[node->count].is_enabled = !!(df_state->ctrl_exception_code_filters[k/64] & (1ull<<(k%64))); + node->v[node->count].is_enabled = !!(d_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; @@ -8908,11 +8908,11 @@ DF_VIEW_UI_FUNCTION_DEF(exception_filters) CTRL_ExceptionCodeKind k = opt->exception_code_kind; if(opt->is_enabled) { - df_state->ctrl_exception_code_filters[k/64] &= ~(1ull<<(k%64)); + d_state->ctrl_exception_code_filters[k/64] &= ~(1ull<<(k%64)); } else { - df_state->ctrl_exception_code_filters[k/64] |= (1ull<<(k%64)); + d_state->ctrl_exception_code_filters[k/64] |= (1ull<<(k%64)); } } } @@ -9441,7 +9441,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) S32 slider_s32_val = 0; F32 slider_pct = 0.f; UI_BoxFlags flags = UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawHotEffects|UI_BoxFlag_DrawActiveEffects; - DF_SettingVal *val_table = &df_gfx_state->cfg_setting_vals[DF_CfgSrc_User][0]; + DF_SettingVal *val_table = &df_gfx_state->cfg_setting_vals[D_CfgSrc_User][0]; switch(item->kind) { case DF_SettingsItemKind_COUNT:{}break; @@ -9560,8 +9560,8 @@ DF_VIEW_UI_FUNCTION_DEF(settings) ui_ctx_menu_open(color_ctx_menu_keys[item->color], item_box->key, v2f32(0, dim_2f32(item_box->rect).y)); sv->color_ctx_menu_color = item->color; sv->color_ctx_menu_color_hsva = v4f32(hsv.x, hsv.y, hsv.z, rgba.w); - DF_CmdParams p = df_cmd_params_from_panel(ws, panel); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + D_CmdParams p = df_cmd_params_from_panel(ws, panel); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_FocusPanel)); } if((item->kind == DF_SettingsItemKind_GlobalSetting || item->kind == DF_SettingsItemKind_WindowSetting) && is_toggler && ui_clicked(sig)) diff --git a/src/df/gfx/df_views.h b/src/dbg_gfx/dbg_gfx_views.h similarity index 84% rename from src/df/gfx/df_views.h rename to src/dbg_gfx/dbg_gfx_views.h index bf4cbbb6..2352c610 100644 --- a/src/df/gfx/df_views.h +++ b/src/dbg_gfx/dbg_gfx_views.h @@ -1,8 +1,8 @@ // Copyright (c) 2024 Epic Games Tools // Licensed under the MIT license (https://opensource.org/license/mit/) -#ifndef DEBUG_FRONTEND_VIEWS_H -#define DEBUG_FRONTEND_VIEWS_H +#ifndef DBG_GFX_VIEWS_H +#define DBG_GFX_VIEWS_H //////////////////////////////// //~ rjf: Code View Types @@ -105,8 +105,8 @@ typedef struct DF_WatchViewPoint DF_WatchViewPoint; struct DF_WatchViewPoint { S64 x; - DF_ExpandKey parent_key; - DF_ExpandKey key; + D_ExpandKey parent_key; + D_ExpandKey key; }; typedef struct DF_WatchViewTextEditState DF_WatchViewTextEditState; @@ -155,25 +155,25 @@ struct DF_WatchViewState //~ rjf: Code View Functions internal void df_code_view_init(DF_CodeViewState *cv, DF_View *view); -internal void df_code_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CmdList *cmds, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); +internal void df_code_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, D_CmdList *cmds, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); internal DF_CodeViewBuildResult df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); //////////////////////////////// //~ rjf: Watch View Functions //- rjf: eval watch view instance -> eval view key -internal DF_EvalViewKey df_eval_view_key_from_eval_watch_view(DF_WatchViewState *ewv); +internal D_EvalViewKey df_eval_view_key_from_eval_watch_view(DF_WatchViewState *ewv); //- rjf: index -> column internal DF_WatchViewColumn *df_watch_view_column_from_x(DF_WatchViewState *wv, S64 index); //- rjf: watch view points <-> table coordinates internal B32 df_watch_view_point_match(DF_WatchViewPoint a, DF_WatchViewPoint b); -internal DF_WatchViewPoint df_watch_view_point_from_tbl(DF_EvalVizBlockList *blocks, Vec2S64 tbl); -internal Vec2S64 df_tbl_from_watch_view_point(DF_EvalVizBlockList *blocks, DF_WatchViewPoint pt); +internal DF_WatchViewPoint df_watch_view_point_from_tbl(D_EvalVizBlockList *blocks, Vec2S64 tbl); +internal Vec2S64 df_tbl_from_watch_view_point(D_EvalVizBlockList *blocks, DF_WatchViewPoint pt); //- rjf: table coordinates -> strings -internal String8 df_string_from_eval_viz_row_column(Arena *arena, DF_EvalView *ev, DF_EvalVizRow *row, DF_WatchViewColumn *col, B32 editable, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px); +internal String8 df_string_from_eval_viz_row_column(Arena *arena, D_EvalView *ev, D_EvalVizRow *row, DF_WatchViewColumn *col, B32 editable, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px); //- rjf: table coordinates -> text edit state internal DF_WatchViewTextEditState *df_watch_view_text_edit_state_from_pt(DF_WatchViewState *wv, DF_WatchViewPoint pt); @@ -185,7 +185,7 @@ internal void df_watch_view_column_release(DF_WatchViewState *wv, DF_WatchViewCo //- rjf: watch view main hooks internal void df_watch_view_init(DF_WatchViewState *ewv, DF_View *view, DF_WatchViewFillKind fill_kind); -internal void df_watch_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, DF_CmdList *cmds); +internal void df_watch_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, D_CmdList *cmds); internal void df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect); -#endif // DEBUG_FRONTEND_VIEWS_H +#endif // DBG_GFX_VIEWS_H diff --git a/src/df/gfx/generated/df_gfx.meta.c b/src/dbg_gfx/generated/dbg_gfx.meta.c similarity index 97% rename from src/df/gfx/generated/df_gfx.meta.c rename to src/dbg_gfx/generated/dbg_gfx.meta.c index 2b33ff9a..0697dfaa 100644 --- a/src/df/gfx/generated/df_gfx.meta.c +++ b/src/dbg_gfx/generated/dbg_gfx.meta.c @@ -178,15 +178,15 @@ DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[34] = {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("settings"), str8_lit_comp("Settings"), DF_IconKind_Gear, DF_VIEW_SETUP_FUNCTION_NAME(settings), DF_VIEW_CMD_FUNCTION_NAME(settings), DF_VIEW_UI_FUNCTION_NAME(settings)}, }; -DF_CmdParamSlot df_g_cmd_param_slot_2_view_spec_src_map[7] = +D_CmdParamSlot df_g_cmd_param_slot_2_view_spec_src_map[7] = { -DF_CmdParamSlot_Entity, -DF_CmdParamSlot_EntityList, -DF_CmdParamSlot_FilePath, -DF_CmdParamSlot_CmdSpec, -DF_CmdParamSlot_ID, -DF_CmdParamSlot_String, -DF_CmdParamSlot_String, +D_CmdParamSlot_Entity, +D_CmdParamSlot_EntityList, +D_CmdParamSlot_FilePath, +D_CmdParamSlot_CmdSpec, +D_CmdParamSlot_ID, +D_CmdParamSlot_String, +D_CmdParamSlot_String, }; String8 df_g_cmd_param_slot_2_view_spec_dst_map[7] = diff --git a/src/df/gfx/generated/df_gfx.meta.h b/src/dbg_gfx/generated/dbg_gfx.meta.h similarity index 99% rename from src/df/gfx/generated/df_gfx.meta.h rename to src/dbg_gfx/generated/dbg_gfx.meta.h index 0fcc2ae7..105980bc 100644 --- a/src/df/gfx/generated/df_gfx.meta.h +++ b/src/dbg_gfx/generated/dbg_gfx.meta.h @@ -3,8 +3,8 @@ //- GENERATED CODE -#ifndef DF_GFX_META_H -#define DF_GFX_META_H +#ifndef DBG_GFX_META_H +#define DBG_GFX_META_H typedef enum DF_GfxViewKind { @@ -283,7 +283,7 @@ extern DF_StringBindingPair df_g_default_binding_table[110]; extern String8 df_g_binding_version_remap_old_name_table[7]; extern String8 df_g_binding_version_remap_new_name_table[7]; extern DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[34]; -extern DF_CmdParamSlot df_g_cmd_param_slot_2_view_spec_src_map[7]; +extern D_CmdParamSlot df_g_cmd_param_slot_2_view_spec_src_map[7]; extern String8 df_g_cmd_param_slot_2_view_spec_dst_map[7]; extern String8 df_g_cmd_param_slot_2_view_spec_cmd_map[7]; extern String8 df_g_theme_preset_display_string_table[9]; @@ -5016,4 +5016,4 @@ read_only global String8 df_g_icon_file_bytes = {df_g_icon_file_bytes__data, siz C_LINKAGE_END -#endif // DF_GFX_META_H +#endif // DBG_GFX_META_H diff --git a/src/df/core/df_core.h b/src/df/core/df_core.h deleted file mode 100644 index 57781f80..00000000 --- a/src/df/core/df_core.h +++ /dev/null @@ -1,1721 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -#ifndef DF_CORE_H -#define DF_CORE_H - -//////////////////////////////// -//~ rjf: Handles - -typedef struct DF_Handle DF_Handle; -struct DF_Handle -{ - U64 u64[2]; -}; - -typedef struct DF_HandleNode DF_HandleNode; -struct DF_HandleNode -{ - DF_HandleNode *next; - DF_HandleNode *prev; - DF_Handle handle; -}; - -typedef struct DF_HandleList DF_HandleList; -struct DF_HandleList -{ - DF_HandleNode *first; - DF_HandleNode *last; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Sparse Tree Expansion State Data Structure - -typedef struct DF_ExpandKey DF_ExpandKey; -struct DF_ExpandKey -{ - U64 parent_hash; - U64 child_num; -}; - -typedef struct DF_ExpandNode DF_ExpandNode; -struct DF_ExpandNode -{ - DF_ExpandNode *hash_next; - DF_ExpandNode *hash_prev; - DF_ExpandNode *first; - DF_ExpandNode *last; - DF_ExpandNode *next; - DF_ExpandNode *prev; - DF_ExpandNode *parent; - DF_ExpandKey key; - B32 expanded; -}; - -typedef struct DF_ExpandSlot DF_ExpandSlot; -struct DF_ExpandSlot -{ - DF_ExpandNode *first; - DF_ExpandNode *last; -}; - -typedef struct DF_ExpandTreeTable DF_ExpandTreeTable; -struct DF_ExpandTreeTable -{ - DF_ExpandSlot *slots; - U64 slots_count; - DF_ExpandNode *free_node; -}; - -//////////////////////////////// -//~ rjf: Entity Kind Flags - -typedef U32 DF_EntityKindFlags; -enum -{ - //- rjf: allowed operations - DF_EntityKindFlag_CanDelete = (1<<8), - DF_EntityKindFlag_CanFreeze = (1<<9), - DF_EntityKindFlag_CanEdit = (1<<10), - DF_EntityKindFlag_CanRename = (1<<11), - DF_EntityKindFlag_CanEnable = (1<<12), - DF_EntityKindFlag_CanCondition = (1<<13), - DF_EntityKindFlag_CanDuplicate = (1<<14), - - //- rjf: mutation -> cascading effects - DF_EntityKindFlag_LeafMutUserConfig = (1<<0), - DF_EntityKindFlag_TreeMutUserConfig = (1<<1), - DF_EntityKindFlag_LeafMutProjectConfig = (1<<2), - DF_EntityKindFlag_TreeMutProjectConfig = (1<<3), - DF_EntityKindFlag_LeafMutSoftHalt = (1<<4), - DF_EntityKindFlag_TreeMutSoftHalt = (1<<5), - DF_EntityKindFlag_LeafMutDebugInfoMap = (1<<6), - DF_EntityKindFlag_TreeMutDebugInfoMap = (1<<7), - - //- rjf: name categorization - DF_EntityKindFlag_NameIsCode = (1<<15), - DF_EntityKindFlag_NameIsPath = (1<<16), - - //- rjf: lifetime categorization - DF_EntityKindFlag_UserDefinedLifetime = (1<<17), - - //- rjf: serialization - DF_EntityKindFlag_IsSerializedToConfig = (1<<18), -}; - -//////////////////////////////// -//~ rjf: Entity Filesystem Lookup Flags - -typedef U32 DF_EntityFromPathFlags; -enum -{ - DF_EntityFromPathFlag_AllowOverrides = (1<<0), - DF_EntityFromPathFlag_OpenAsNeeded = (1<<1), - DF_EntityFromPathFlag_OpenMissing = (1<<2), - DF_EntityFromPathFlag_All = 0xffffffff, -}; - -//////////////////////////////// -//~ rjf: Debug Engine Control Communication Types - -typedef enum DF_RunKind -{ - DF_RunKind_Run, - DF_RunKind_SingleStep, - DF_RunKind_Step, - DF_RunKind_COUNT -} -DF_RunKind; - -//////////////////////////////// -//~ rjf: Control Flow Analysis Types - -typedef U32 DF_CtrlFlowFlags; -enum -{ - DF_CtrlFlowFlag_StackPointerChangesVariably = (1<<0), -}; - -typedef struct DF_CtrlFlowPoint DF_CtrlFlowPoint; -struct DF_CtrlFlowPoint -{ - U64 vaddr; - U64 jump_dest_vaddr; - DASM_InstFlags inst_flags; -}; - -typedef struct DF_CtrlFlowPointNode DF_CtrlFlowPointNode; -struct DF_CtrlFlowPointNode -{ - DF_CtrlFlowPointNode *next; - DF_CtrlFlowPoint v; -}; - -typedef struct DF_CtrlFlowPointList DF_CtrlFlowPointList; -struct DF_CtrlFlowPointList -{ - DF_CtrlFlowPointNode *first; - DF_CtrlFlowPointNode *last; - U64 count; -}; - -typedef struct DF_CtrlFlowInfo DF_CtrlFlowInfo; -struct DF_CtrlFlowInfo -{ - DF_CtrlFlowFlags flags; - DF_CtrlFlowPointList exit_points; - U64 total_size; -}; - -//////////////////////////////// -//~ rjf: View Rule Hook Types - -typedef struct DF_CfgTree DF_CfgTree; -typedef struct DF_CfgVal DF_CfgVal; -typedef struct DF_CfgTable DF_CfgTable; -typedef struct DF_EvalView DF_EvalView; -typedef struct DF_EvalVizBlockList DF_EvalVizBlockList; -#define DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_SIG(name) E_Expr *name(Arena *arena, E_Expr *expr, MD_Node *params) -#define DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(name) df_core_view_rule_expr_resolution__##name -#define DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(name) internal DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_SIG(DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(name)) -#define DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_SIG(name) void name(Arena *arena, \ -DF_EvalView *eval_view, \ -DF_ExpandKey parent_key, \ -DF_ExpandKey key, \ -DF_ExpandNode *expand_node, \ -String8 string, \ -E_Expr *expr, \ -DF_CfgTable *cfg_table, \ -S32 depth, \ -MD_Node *params, \ -struct DF_EvalVizBlockList *out) -#define DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(name) df_core_view_rule_viz_block_prod__##name -#define DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(name) internal DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_SIG(DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(name)) -typedef DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_SIG(DF_CoreViewRuleExprResolutionHookFunctionType); -typedef DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_SIG(DF_CoreViewRuleVizBlockProdHookFunctionType); - -//////////////////////////////// -//~ rjf: Generated Code - -#include "df/core/generated/df_core.meta.h" - -//////////////////////////////// -//~ rjf: Config Types - -typedef struct DF_CfgTree DF_CfgTree; -struct DF_CfgTree -{ - DF_CfgTree *next; - DF_CfgSrc source; - MD_Node *root; -}; - -typedef struct DF_CfgVal DF_CfgVal; -struct DF_CfgVal -{ - DF_CfgVal *hash_next; - DF_CfgVal *linear_next; - DF_CfgTree *first; - DF_CfgTree *last; - U64 insertion_stamp; - String8 string; -}; - -typedef struct DF_CfgSlot DF_CfgSlot; -struct DF_CfgSlot -{ - DF_CfgVal *first; -}; - -typedef struct DF_CfgTable DF_CfgTable; -struct DF_CfgTable -{ - U64 slot_count; - DF_CfgSlot *slots; - U64 insertion_stamp_counter; - DF_CfgVal *first_val; - DF_CfgVal *last_val; -}; - -//////////////////////////////// -//~ rjf: View Rules - -typedef U32 DF_CoreViewRuleSpecInfoFlags; // NOTE(rjf): see @view_rule_info -enum -{ - DF_CoreViewRuleSpecInfoFlag_Inherited = (1<<0), - DF_CoreViewRuleSpecInfoFlag_Expandable = (1<<1), - DF_CoreViewRuleSpecInfoFlag_ExprResolution = (1<<2), - DF_CoreViewRuleSpecInfoFlag_VizBlockProd = (1<<3), -}; - -typedef struct DF_CoreViewRuleSpecInfo DF_CoreViewRuleSpecInfo; -struct DF_CoreViewRuleSpecInfo -{ - String8 string; - String8 display_string; - String8 schema; - String8 description; - DF_CoreViewRuleSpecInfoFlags flags; - DF_CoreViewRuleExprResolutionHookFunctionType *expr_resolution; - DF_CoreViewRuleVizBlockProdHookFunctionType *viz_block_prod; -}; - -typedef struct DF_CoreViewRuleSpecInfoArray DF_CoreViewRuleSpecInfoArray; -struct DF_CoreViewRuleSpecInfoArray -{ - DF_CoreViewRuleSpecInfo *v; - U64 count; -}; - -typedef struct DF_CoreViewRuleSpec DF_CoreViewRuleSpec; -struct DF_CoreViewRuleSpec -{ - DF_CoreViewRuleSpec *hash_next; - DF_CoreViewRuleSpecInfo info; -}; - -//////////////////////////////// -//~ rjf: Entity Types - -typedef U32 DF_EntityFlags; -enum -{ - //- rjf: allocationless, simple equipment - DF_EntityFlag_HasTextPoint = (1<<0), - DF_EntityFlag_HasEntityHandle = (1<<2), - DF_EntityFlag_HasU64 = (1<<4), - DF_EntityFlag_HasColor = (1<<6), - DF_EntityFlag_DiesOnRunStop = (1<<8), - - //- rjf: ctrl entity equipment - DF_EntityFlag_HasCtrlMachineID = (1<<9), - DF_EntityFlag_HasCtrlHandle = (1<<10), - DF_EntityFlag_HasArch = (1<<11), - DF_EntityFlag_HasCtrlID = (1<<12), - DF_EntityFlag_HasStackBase = (1<<13), - DF_EntityFlag_HasTLSRoot = (1<<14), - DF_EntityFlag_HasVAddrRng = (1<<15), - DF_EntityFlag_HasVAddr = (1<<16), - - //- rjf: file properties - DF_EntityFlag_IsFolder = (1<<17), - DF_EntityFlag_IsMissing = (1<<18), - - //- rjf: deletion - DF_EntityFlag_MarkedForDeletion = (1<<31), -}; - -typedef U64 DF_EntityID; - -typedef struct DF_Entity DF_Entity; -struct DF_Entity -{ - // rjf: tree links - DF_Entity *first; - DF_Entity *last; - DF_Entity *next; - DF_Entity *prev; - DF_Entity *parent; - - // rjf: metadata - DF_EntityKind kind; - DF_EntityFlags flags; - DF_EntityID id; - U64 gen; - U64 alloc_time_us; - F32 alive_t; - - // rjf: basic equipment - TxtPt text_point; - DF_Handle entity_handle; - B32 disabled; - U64 u64; - Vec4F32 color_hsva; - F32 life_left; - DF_CfgSrc cfg_src; - U64 timestamp; - - // rjf: ctrl equipment - CTRL_MachineID ctrl_machine_id; - DMN_Handle ctrl_handle; - Architecture arch; - U32 ctrl_id; - U64 stack_base; - Rng1U64 vaddr_rng; - U64 vaddr; - - // rjf: name equipment - String8 name; -}; - -typedef struct DF_EntityNode DF_EntityNode; -struct DF_EntityNode -{ - DF_EntityNode *next; - DF_Entity *entity; -}; - -typedef struct DF_EntityList DF_EntityList; -struct DF_EntityList -{ - DF_EntityNode *first; - DF_EntityNode *last; - U64 count; -}; - -typedef struct DF_EntityArray DF_EntityArray; -struct DF_EntityArray -{ - DF_Entity **v; - U64 count; -}; - -typedef struct DF_EntityRec DF_EntityRec; -struct DF_EntityRec -{ - DF_Entity *next; - S32 push_count; - S32 pop_count; -}; - -//////////////////////////////// -//~ rjf: Entity Evaluation Types - -typedef struct DF_EntityEval DF_EntityEval; -struct DF_EntityEval -{ - B64 enabled; - U64 hit_count; - U64 label_off; - U64 location_off; - U64 condition_off; -}; - -//////////////////////////////// -//~ rjf: Entity Fuzzy Listing Types - -typedef struct DF_EntityFuzzyItem DF_EntityFuzzyItem; -struct DF_EntityFuzzyItem -{ - DF_Entity *entity; - FuzzyMatchRangeList matches; -}; - -typedef struct DF_EntityFuzzyItemArray DF_EntityFuzzyItemArray; -struct DF_EntityFuzzyItemArray -{ - DF_EntityFuzzyItem *v; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Rich (Including Inline) Unwind Types - -typedef struct DF_UnwindInlineFrame DF_UnwindInlineFrame; -struct DF_UnwindInlineFrame -{ - DF_UnwindInlineFrame *next; - DF_UnwindInlineFrame *prev; - RDI_InlineSite *inline_site; -}; - -typedef struct DF_UnwindFrame DF_UnwindFrame; -struct DF_UnwindFrame -{ - DF_UnwindInlineFrame *first_inline_frame; - DF_UnwindInlineFrame *last_inline_frame; - U64 inline_frame_count; - void *regs; - RDI_Parsed *rdi; - RDI_Procedure *procedure; -}; - -typedef struct DF_UnwindFrameArray DF_UnwindFrameArray; -struct DF_UnwindFrameArray -{ - DF_UnwindFrame *v; - U64 concrete_frame_count; - U64 inline_frame_count; - U64 total_frame_count; -}; - -typedef struct DF_Unwind DF_Unwind; -struct DF_Unwind -{ - DF_UnwindFrameArray frames; -}; - -//////////////////////////////// -//~ rjf: Line Info Types - -typedef struct DF_Line DF_Line; -struct DF_Line -{ - String8 file_path; - TxtPt pt; - Rng1U64 voff_range; - DI_Key dbgi_key; -}; - -typedef struct DF_LineNode DF_LineNode; -struct DF_LineNode -{ - DF_LineNode *next; - DF_Line v; -}; - -typedef struct DF_LineList DF_LineList; -struct DF_LineList -{ - DF_LineNode *first; - DF_LineNode *last; - U64 count; -}; - -typedef struct DF_LineListArray DF_LineListArray; -struct DF_LineListArray -{ - DF_LineList *v; - U64 count; - DI_KeyList dbgi_keys; -}; - -//////////////////////////////// -//~ rjf: Source <-> Disasm Types - -//- rjf: debug info for mapping src -> disasm - -typedef struct DF_TextLineSrc2DasmInfo DF_TextLineSrc2DasmInfo; -struct DF_TextLineSrc2DasmInfo -{ - Rng1U64 voff_range; - S64 remap_line; - DI_Key dbgi_key; -}; - -typedef struct DF_TextLineSrc2DasmInfoNode DF_TextLineSrc2DasmInfoNode; -struct DF_TextLineSrc2DasmInfoNode -{ - DF_TextLineSrc2DasmInfoNode *next; - DF_TextLineSrc2DasmInfo v; -}; - -typedef struct DF_TextLineSrc2DasmInfoList DF_TextLineSrc2DasmInfoList; -struct DF_TextLineSrc2DasmInfoList -{ - DF_TextLineSrc2DasmInfoNode *first; - DF_TextLineSrc2DasmInfoNode *last; - U64 count; -}; - -typedef struct DF_TextLineSrc2DasmInfoListArray DF_TextLineSrc2DasmInfoListArray; -struct DF_TextLineSrc2DasmInfoListArray -{ - DF_TextLineSrc2DasmInfoList *v; - DI_KeyList dbgi_keys; - U64 count; -}; - -//- rjf: debug info for mapping disasm -> src - -typedef struct DF_TextLineDasm2SrcInfo DF_TextLineDasm2SrcInfo; -struct DF_TextLineDasm2SrcInfo -{ - DI_Key dbgi_key; - DF_Entity *file; - TxtPt pt; - Rng1U64 voff_range; -}; - -typedef struct DF_TextLineDasm2SrcInfoNode DF_TextLineDasm2SrcInfoNode; -struct DF_TextLineDasm2SrcInfoNode -{ - DF_TextLineDasm2SrcInfoNode *next; - DF_TextLineDasm2SrcInfo v; -}; - -typedef struct DF_TextLineDasm2SrcInfoList DF_TextLineDasm2SrcInfoList; -struct DF_TextLineDasm2SrcInfoList -{ - DF_TextLineDasm2SrcInfoNode *first; - DF_TextLineDasm2SrcInfoNode *last; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Interaction Context Register Types - -typedef struct DF_InteractRegs DF_InteractRegs; -struct DF_InteractRegs -{ - DF_Handle module; - DF_Handle process; - DF_Handle thread; - U64 unwind_count; - U64 inline_depth; - DF_Handle window; - DF_Handle panel; - DF_Handle view; - String8 file_path; - TxtPt cursor; - TxtPt mark; - U128 text_key; - TXT_LangKind lang_kind; - Rng1U64 vaddr_range; - Rng1U64 voff_range; - DF_LineList lines; - DI_Key dbgi_key; -}; - -typedef struct DF_InteractRegsNode DF_InteractRegsNode; -struct DF_InteractRegsNode -{ - DF_InteractRegsNode *next; - DF_InteractRegs v; -}; - -//////////////////////////////// -//~ rjf: Evaluation Visualization Types - -//- rjf: expansion key -> view rule table - -typedef struct DF_EvalViewRuleCacheNode DF_EvalViewRuleCacheNode; -struct DF_EvalViewRuleCacheNode -{ - DF_EvalViewRuleCacheNode *hash_next; - DF_EvalViewRuleCacheNode *hash_prev; - DF_ExpandKey key; - U8 *buffer; - U64 buffer_cap; - U64 buffer_string_size; -}; - -typedef struct DF_EvalViewRuleCacheSlot DF_EvalViewRuleCacheSlot; -struct DF_EvalViewRuleCacheSlot -{ - DF_EvalViewRuleCacheNode *first; - DF_EvalViewRuleCacheNode *last; -}; - -typedef struct DF_EvalViewRuleCacheTable DF_EvalViewRuleCacheTable; -struct DF_EvalViewRuleCacheTable -{ - U64 slot_count; - DF_EvalViewRuleCacheSlot *slots; -}; - -//- rjf: 'eval view' entities for sparse-state expandable tree view cache for evaluation visualization - -typedef struct DF_EvalViewKey DF_EvalViewKey; -struct DF_EvalViewKey -{ - U64 u64[2]; -}; - -typedef struct DF_EvalView DF_EvalView; -struct DF_EvalView -{ - // rjf: links - DF_EvalView *hash_next; - DF_EvalView *hash_prev; - - // rjf: key - DF_EvalViewKey key; - - // rjf: arena - Arena *arena; - - // rjf: expansion state - DF_ExpandTreeTable expand_tree_table; - - // rjf: key -> view rule cache - DF_EvalViewRuleCacheTable view_rule_table; -}; - -typedef struct DF_EvalViewSlot DF_EvalViewSlot; -struct DF_EvalViewSlot -{ - DF_EvalView *first; - DF_EvalView *last; -}; - -typedef struct DF_EvalViewCache DF_EvalViewCache; -struct DF_EvalViewCache -{ - DF_EvalViewSlot *slots; - U64 slots_count; -}; - -//- rjf: eval view visualization building - -typedef struct DF_EvalLinkBase DF_EvalLinkBase; -struct DF_EvalLinkBase -{ - U64 offset; -}; - -typedef struct DF_EvalLinkBaseChunkNode DF_EvalLinkBaseChunkNode; -struct DF_EvalLinkBaseChunkNode -{ - DF_EvalLinkBaseChunkNode *next; - DF_EvalLinkBase b[64]; - U64 count; -}; - -typedef struct DF_EvalLinkBaseChunkList DF_EvalLinkBaseChunkList; -struct DF_EvalLinkBaseChunkList -{ - DF_EvalLinkBaseChunkNode *first; - DF_EvalLinkBaseChunkNode *last; - U64 count; -}; - -typedef struct DF_EvalLinkBaseArray DF_EvalLinkBaseArray; -struct DF_EvalLinkBaseArray -{ - DF_EvalLinkBase *v; - U64 count; -}; - -typedef enum DF_EvalVizBlockKind -{ - DF_EvalVizBlockKind_Null, // empty - DF_EvalVizBlockKind_Root, // root of tree or subtree; possibly-expandable expression. - DF_EvalVizBlockKind_Members, // members of struct, class, union - DF_EvalVizBlockKind_EnumMembers, // members of enum - DF_EvalVizBlockKind_Elements, // elements of array - DF_EvalVizBlockKind_Canvas, // escape hatch for arbitrary UI - DF_EvalVizBlockKind_DebugInfoTable, // block of filtered debug info table elements - DF_EvalVizBlockKind_COUNT, -} -DF_EvalVizBlockKind; - -typedef struct DF_EvalVizBlock DF_EvalVizBlock; -struct DF_EvalVizBlock -{ - // rjf: kind & keys - DF_EvalVizBlockKind kind; - DF_ExpandKey parent_key; - DF_ExpandKey key; - S32 depth; - - // rjf: evaluation info - String8 string; - E_Expr *expr; - - // rjf: info about ranges that this block spans - Rng1U64 visual_idx_range; - Rng1U64 semantic_idx_range; - - // rjf: visualization config extensions - DF_CfgTable *cfg_table; - DF_EvalLinkBaseChunkList *link_bases; - E_MemberArray members; - E_EnumValArray enum_vals; - RDI_SectionKind fzy_target; - FZY_ItemArray fzy_backing_items; -}; - -typedef struct DF_EvalVizBlockNode DF_EvalVizBlockNode; -struct DF_EvalVizBlockNode -{ - DF_EvalVizBlockNode *next; - DF_EvalVizBlock v; -}; - -typedef struct DF_EvalVizBlockList DF_EvalVizBlockList; -struct DF_EvalVizBlockList -{ - DF_EvalVizBlockNode *first; - DF_EvalVizBlockNode *last; - U64 count; - U64 total_visual_row_count; - U64 total_semantic_row_count; -}; - -typedef struct DF_EvalVizBlockArray DF_EvalVizBlockArray; -struct DF_EvalVizBlockArray -{ - DF_EvalVizBlock *v; - U64 count; - U64 total_visual_row_count; - U64 total_semantic_row_count; -}; - -typedef U32 DF_EvalVizStringFlags; -enum -{ - DF_EvalVizStringFlag_ReadOnlyDisplayRules = (1<<0), -}; - -typedef struct DF_EvalVizRow DF_EvalVizRow; -struct DF_EvalVizRow -{ - DF_EvalVizRow *next; - - // rjf: block hierarchy info - S32 depth; - DF_ExpandKey parent_key; - DF_ExpandKey key; - - // rjf: row size/scroll info - U64 size_in_rows; - U64 skipped_size_in_rows; - U64 chopped_size_in_rows; - - // rjf: evaluation expression - String8 string; - E_Member *member; - E_Expr *expr; - - // rjf: view rule attachments - DF_CfgTable *cfg_table; - struct DF_GfxViewRuleSpec *expand_ui_rule_spec; - MD_Node *expand_ui_rule_params; - struct DF_GfxViewRuleSpec *value_ui_rule_spec; - MD_Node *value_ui_rule_params; -}; - -typedef struct DF_EvalVizWindowedRowList DF_EvalVizWindowedRowList; -struct DF_EvalVizWindowedRowList -{ - DF_EvalVizRow *first; - DF_EvalVizRow *last; - U64 count; - U64 count_before_visual; - U64 count_before_semantic; -}; - -//////////////////////////////// -//~ rjf: Command Specification Types - -typedef U32 DF_CmdQueryFlags; -enum -{ - DF_CmdQueryFlag_AllowFiles = (1<<0), - DF_CmdQueryFlag_AllowFolders = (1<<1), - DF_CmdQueryFlag_CodeInput = (1<<2), - DF_CmdQueryFlag_KeepOldInput = (1<<3), - DF_CmdQueryFlag_SelectOldInput = (1<<4), - DF_CmdQueryFlag_Required = (1<<5), -}; - -typedef struct DF_CmdQuery DF_CmdQuery; -struct DF_CmdQuery -{ - DF_CmdParamSlot slot; - DF_EntityKind entity_kind; - DF_CmdQueryFlags flags; -}; - -typedef U32 DF_CmdSpecFlags; -enum -{ - DF_CmdSpecFlag_ListInUI = (1<<0), - DF_CmdSpecFlag_ListInIPCDocs = (1<<1), -}; - -typedef struct DF_CmdSpecInfo DF_CmdSpecInfo; -struct DF_CmdSpecInfo -{ - String8 string; - String8 description; - String8 search_tags; - String8 display_name; - DF_CmdSpecFlags flags; - DF_CmdQuery query; - DF_IconKind canonical_icon_kind; -}; - -typedef struct DF_CmdSpec DF_CmdSpec; -struct DF_CmdSpec -{ - DF_CmdSpec *hash_next; - DF_CmdSpecInfo info; - U64 registrar_index; - U64 ordering_index; - U64 run_count; -}; - -typedef struct DF_CmdSpecNode DF_CmdSpecNode; -struct DF_CmdSpecNode -{ - DF_CmdSpecNode *next; - DF_CmdSpec *spec; -}; - -typedef struct DF_CmdSpecList DF_CmdSpecList; -struct DF_CmdSpecList -{ - DF_CmdSpecNode *first; - DF_CmdSpecNode *last; - U64 count; -}; - -typedef struct DF_CmdSpecArray DF_CmdSpecArray; -struct DF_CmdSpecArray -{ - DF_CmdSpec **v; - U64 count; -}; - -typedef struct DF_CmdSpecInfoArray DF_CmdSpecInfoArray; -struct DF_CmdSpecInfoArray -{ - DF_CmdSpecInfo *v; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Command Types - -typedef struct DF_Cmd DF_Cmd; -struct DF_Cmd -{ - DF_CmdParams params; - DF_CmdSpec *spec; -}; - -typedef struct DF_CmdNode DF_CmdNode; -struct DF_CmdNode -{ - DF_CmdNode *next; - DF_CmdNode *prev; - DF_Cmd cmd; -}; - -typedef struct DF_CmdList DF_CmdList; -struct DF_CmdList -{ - DF_CmdNode *first; - DF_CmdNode *last; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Main State Caches - -//- rjf: per-entity-kind state cache - -typedef struct DF_EntityListCache DF_EntityListCache; -struct DF_EntityListCache -{ - Arena *arena; - U64 alloc_gen; - DF_EntityList list; -}; - -//- rjf: auto view rules hash table cache - -typedef struct DF_AutoViewRuleNode DF_AutoViewRuleNode; -struct DF_AutoViewRuleNode -{ - DF_AutoViewRuleNode *next; - String8 type; - String8 view_rule; -}; - -typedef struct DF_AutoViewRuleSlot DF_AutoViewRuleSlot; -struct DF_AutoViewRuleSlot -{ - DF_AutoViewRuleNode *first; - DF_AutoViewRuleNode *last; -}; - -typedef struct DF_AutoViewRuleMapCache DF_AutoViewRuleMapCache; -struct DF_AutoViewRuleMapCache -{ - Arena *arena; - U64 slots_count; - DF_AutoViewRuleSlot *slots; -}; - -//- rjf: per-thread unwind cache - -typedef struct DF_UnwindCacheNode DF_UnwindCacheNode; -struct DF_UnwindCacheNode -{ - DF_UnwindCacheNode *next; - DF_UnwindCacheNode *prev; - U64 reggen; - U64 memgen; - Arena *arena; - DF_Handle thread; - CTRL_Unwind unwind; -}; - -typedef struct DF_UnwindCacheSlot DF_UnwindCacheSlot; -struct DF_UnwindCacheSlot -{ - DF_UnwindCacheNode *first; - DF_UnwindCacheNode *last; -}; - -typedef struct DF_UnwindCache DF_UnwindCache; -struct DF_UnwindCache -{ - U64 slots_count; - DF_UnwindCacheSlot *slots; - DF_UnwindCacheNode *free_node; -}; - -//- rjf: per-run tls-base-vaddr cache - -typedef struct DF_RunTLSBaseCacheNode DF_RunTLSBaseCacheNode; -struct DF_RunTLSBaseCacheNode -{ - DF_RunTLSBaseCacheNode *hash_next; - DF_Handle process; - U64 root_vaddr; - U64 rip_vaddr; - U64 tls_base_vaddr; -}; - -typedef struct DF_RunTLSBaseCacheSlot DF_RunTLSBaseCacheSlot; -struct DF_RunTLSBaseCacheSlot -{ - DF_RunTLSBaseCacheNode *first; - DF_RunTLSBaseCacheNode *last; -}; - -typedef struct DF_RunTLSBaseCache DF_RunTLSBaseCache; -struct DF_RunTLSBaseCache -{ - Arena *arena; - U64 slots_count; - DF_RunTLSBaseCacheSlot *slots; -}; - -//- rjf: per-run locals cache - -typedef struct DF_RunLocalsCacheNode DF_RunLocalsCacheNode; -struct DF_RunLocalsCacheNode -{ - DF_RunLocalsCacheNode *hash_next; - DI_Key dbgi_key; - U64 voff; - E_String2NumMap *locals_map; -}; - -typedef struct DF_RunLocalsCacheSlot DF_RunLocalsCacheSlot; -struct DF_RunLocalsCacheSlot -{ - DF_RunLocalsCacheNode *first; - DF_RunLocalsCacheNode *last; -}; - -typedef struct DF_RunLocalsCache DF_RunLocalsCache; -struct DF_RunLocalsCache -{ - Arena *arena; - U64 table_size; - DF_RunLocalsCacheSlot *table; -}; - -//////////////////////////////// -//~ rjf: File Change Detector Shared Data Structure Types - -typedef struct DF_FileScanNode DF_FileScanNode; -struct DF_FileScanNode -{ - DF_FileScanNode *next; - String8 path; - U64 stamp; -}; - -typedef struct DF_FileScanSlot DF_FileScanSlot; -struct DF_FileScanSlot -{ - DF_FileScanNode *first; - DF_FileScanNode *last; -}; - -//////////////////////////////// -//~ rjf: State Delta History Types - -typedef struct DF_StateDeltaParams DF_StateDeltaParams; -struct DF_StateDeltaParams -{ - void *ptr; - U64 size; - DF_Entity *guard_entity; -}; - -typedef struct DF_StateDelta DF_StateDelta; -struct DF_StateDelta -{ - DF_Handle guard_entity; - U64 vaddr; - String8 data; -}; - -typedef struct DF_StateDeltaNode DF_StateDeltaNode; -struct DF_StateDeltaNode -{ - DF_StateDeltaNode *next; - DF_StateDelta v; -}; - -typedef struct DF_StateDeltaBatch DF_StateDeltaBatch; -struct DF_StateDeltaBatch -{ - DF_StateDeltaBatch *next; - DF_StateDeltaNode *first; - DF_StateDeltaNode *last; -}; - -typedef struct DF_StateDeltaHistory DF_StateDeltaHistory; -struct DF_StateDeltaHistory -{ - Arena *arena; - Arena *side_arenas[Side_COUNT]; // min -> undo; max -> redo - DF_StateDeltaBatch *side_tops[Side_COUNT]; - B32 batch_is_active; -}; - -//////////////////////////////// -//~ rjf: Main State Types - -//- rjf: name allocator types - -typedef struct DF_NameChunkNode DF_NameChunkNode; -struct DF_NameChunkNode -{ - DF_NameChunkNode *next; - U64 size; -}; - -//- rjf: core bundle state type - -typedef struct DF_State DF_State; -struct DF_State -{ - // rjf: top-level state - Arena *arena; - U64 frame_index; - U64 frame_eval_memread_endt_us; - F64 time_in_seconds; - F32 dt; - F32 seconds_til_autosave; - - // rjf: frame info - Arena *frame_arenas[2]; - DI_Scope *frame_di_scope; - - // rjf: interaction registers - DF_InteractRegsNode base_interact_regs; - DF_InteractRegsNode *top_interact_regs; - - // rjf: top-level command batch - Arena *root_cmd_arena; - DF_CmdList root_cmds; - - // rjf: output log key - U128 output_log_key; - - // rjf: history cache - DF_StateDeltaHistory *hist; - - // rjf: name allocator - DF_NameChunkNode *free_name_chunks[8]; - - // rjf: entity state - Arena *entities_arena; - DF_Entity *entities_base; - U64 entities_count; - U64 entities_id_gen; - DF_Entity *entities_root; - DF_Entity *entities_free[2]; // [0] -> normal lifetime, not user defined; [1] -> user defined lifetime (& thus undoable) - U64 entities_free_count; - U64 entities_active_count; - B32 entities_mut_soft_halt; - B32 entities_mut_dbg_info_map; - - // rjf: entity query caches - U64 kind_alloc_gens[DF_EntityKind_COUNT]; - DF_EntityListCache kind_caches[DF_EntityKind_COUNT]; - DF_AutoViewRuleMapCache auto_view_rule_cache; - - // rjf: per-run caches - DF_UnwindCache unwind_cache; - U64 tls_base_cache_reggen_idx; - U64 tls_base_cache_memgen_idx; - DF_RunTLSBaseCache tls_base_caches[2]; - U64 tls_base_cache_gen; - U64 locals_cache_reggen_idx; - DF_RunLocalsCache locals_caches[2]; - U64 locals_cache_gen; - U64 member_cache_reggen_idx; - DF_RunLocalsCache member_caches[2]; - U64 member_cache_gen; - - // rjf: eval view cache - DF_EvalViewCache eval_view_cache; - - // rjf: command specification table - U64 total_registrar_count; - U64 cmd_spec_table_size; - DF_CmdSpec **cmd_spec_table; - - // rjf: view rule specification table - U64 view_rule_spec_table_size; - DF_CoreViewRuleSpec **view_rule_spec_table; - - // rjf: freeze state - DF_HandleList frozen_threads; - DF_HandleNode *free_handle_node; - - // rjf: control thread user -> ctrl driving state - Arena *ctrl_last_run_arena; - DF_RunKind ctrl_last_run_kind; - U64 ctrl_last_run_frame_idx; - DF_Handle ctrl_last_run_thread; - CTRL_RunFlags ctrl_last_run_flags; - CTRL_TrapList ctrl_last_run_traps; - U64 ctrl_run_gen; - B32 ctrl_is_running; - B32 ctrl_soft_halt_issued; - Arena *ctrl_msg_arena; - CTRL_MsgList ctrl_msgs; - U64 ctrl_exception_code_filters[(CTRL_ExceptionCodeKind_COUNT+63)/64]; - - // rjf: control thread ctrl -> user reading state - CTRL_EntityStore *ctrl_entity_store; - Arena *ctrl_stop_arena; - CTRL_Event ctrl_last_stop_event; - - // rjf: config reading state - Arena *cfg_path_arenas[DF_CfgSrc_COUNT]; - String8 cfg_paths[DF_CfgSrc_COUNT]; - U64 cfg_cached_timestamp[DF_CfgSrc_COUNT]; - Arena *cfg_arena; - DF_CfgTable cfg_table; - - // rjf: config writing state - B32 cfg_write_issued[DF_CfgSrc_COUNT]; - Arena *cfg_write_arenas[DF_CfgSrc_COUNT]; - String8List cfg_write_data[DF_CfgSrc_COUNT]; - - // rjf: current path - Arena *current_path_arena; - String8 current_path; -}; - -//////////////////////////////// -//~ rjf: Globals - -read_only global DF_CmdSpec df_g_nil_cmd_spec = {0}; -read_only global DF_CoreViewRuleSpec df_g_nil_core_view_rule_spec = {0}; -read_only global DF_CfgTree df_g_nil_cfg_tree = {&df_g_nil_cfg_tree, DF_CfgSrc_User, &md_nil_node}; -read_only global DF_CfgVal df_g_nil_cfg_val = {&df_g_nil_cfg_val, &df_g_nil_cfg_val, &df_g_nil_cfg_tree, &df_g_nil_cfg_tree}; -read_only global DF_CfgTable df_g_nil_cfg_table = {0, 0, 0, &df_g_nil_cfg_val, &df_g_nil_cfg_val}; -read_only global DF_Entity df_g_nil_entity = -{ - // rjf: tree links - &df_g_nil_entity, - &df_g_nil_entity, - &df_g_nil_entity, - &df_g_nil_entity, - &df_g_nil_entity, - - // rjf: metadata - DF_EntityKind_Nil, - 0, - 0, - 0, - 0, - 0, - 0, - - // rjf: basic equipment - {0}, - {0}, - 0, - 0, - {0}, - 0, - DF_CfgSrc_User, - 0, - - // rjf: ctrl entity equipment - 0, - {0}, - Architecture_Null, - 0, - 0, - 0, - {0}, - 0, - - // rjf: name equipment - {0}, -}; -read_only global DF_EvalView df_g_nil_eval_view = {&df_g_nil_eval_view, &df_g_nil_eval_view}; - -global DF_State *df_state = 0; - -//////////////////////////////// -//~ rjf: Basic Helpers - -internal U64 df_hash_from_seed_string(U64 seed, String8 string); -internal U64 df_hash_from_string(String8 string); -internal U64 df_hash_from_seed_string__case_insensitive(U64 seed, String8 string); -internal U64 df_hash_from_string__case_insensitive(String8 string); - -//////////////////////////////// -//~ rjf: Handle Type Pure Functions - -internal DF_Handle df_handle_zero(void); -internal B32 df_handle_match(DF_Handle a, DF_Handle b); -internal void df_handle_list_push_node(DF_HandleList *list, DF_HandleNode *node); -internal void df_handle_list_push(Arena *arena, DF_HandleList *list, DF_Handle handle); -internal void df_handle_list_remove(DF_HandleList *list, DF_HandleNode *node); -internal DF_HandleNode *df_handle_list_find(DF_HandleList *list, DF_Handle handle); -internal DF_HandleList df_push_handle_list_copy(Arena *arena, DF_HandleList list); - -//////////////////////////////// -//~ rjf: State History Data Structure - -internal DF_StateDeltaHistory *df_state_delta_history_alloc(void); -internal void df_state_delta_history_release(DF_StateDeltaHistory *hist); -internal void df_state_delta_history_batch_begin(DF_StateDeltaHistory *hist); -internal void df_state_delta_history_batch_end(DF_StateDeltaHistory *hist); -#define DF_StateDeltaHistoryBatch(hist) DeferLoop(df_state_delta_history_batch_begin(hist), df_state_delta_history_batch_end(hist)) -internal void df_state_delta_history_push_delta_(DF_StateDeltaHistory *hist, DF_StateDeltaParams *params); -#define df_state_delta_history_push_delta(hist, ...) df_state_delta_history_push_delta_((hist), &(DF_StateDeltaParams){.size = 1, __VA_ARGS__}) -#define df_state_delta_history_push_struct_delta(hist, sptr, ...) df_state_delta_history_push_delta((hist), .ptr = (sptr), .size = sizeof(*(sptr)), __VA_ARGS__) -internal void df_state_delta_history_wind(DF_StateDeltaHistory *hist, Side side); - -//////////////////////////////// -//~ rjf: Sparse Tree Expansion State Data Structure - -//- rjf: keys -internal DF_ExpandKey df_expand_key_make(U64 parent_hash, U64 child_num); -internal DF_ExpandKey df_expand_key_zero(void); -internal B32 df_expand_key_match(DF_ExpandKey a, DF_ExpandKey b); - -//- rjf: table -internal void df_expand_tree_table_init(Arena *arena, DF_ExpandTreeTable *table, U64 slot_count); -internal DF_ExpandNode *df_expand_node_from_key(DF_ExpandTreeTable *table, DF_ExpandKey key); -internal B32 df_expand_key_is_set(DF_ExpandTreeTable *table, DF_ExpandKey key); -internal void df_expand_set_expansion(Arena *arena, DF_ExpandTreeTable *table, DF_ExpandKey parent_key, DF_ExpandKey key, B32 expanded); - -//////////////////////////////// -//~ rjf: Config Type Pure Functions - -internal DF_CfgTree *df_cfg_tree_copy(Arena *arena, DF_CfgTree *src); -internal void df_cfg_table_push_unparsed_string(Arena *arena, DF_CfgTable *table, String8 string, DF_CfgSrc source); -internal DF_CfgTable df_cfg_table_from_inheritance(Arena *arena, DF_CfgTable *src); -internal DF_CfgTable df_cfg_table_copy(Arena *arena, DF_CfgTable *src); -internal DF_CfgVal *df_cfg_val_from_string(DF_CfgTable *table, String8 string); - -//////////////////////////////// -//~ rjf: Debug Info Extraction Type Pure Functions - -internal DF_LineList df_line_list_copy(Arena *arena, DF_LineList *list); - -//////////////////////////////// -//~ rjf: Control Flow Analysis Pure Functions - -internal DF_CtrlFlowInfo df_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DASM_InstFlags exit_points_mask, Architecture arch, U64 vaddr, String8 code); - -//////////////////////////////// -//~ rjf: Command Type Pure Functions - -//- rjf: specs -internal B32 df_cmd_spec_is_nil(DF_CmdSpec *spec); -internal void df_cmd_spec_list_push(Arena *arena, DF_CmdSpecList *list, DF_CmdSpec *spec); -internal DF_CmdSpecArray df_cmd_spec_array_from_list(Arena *arena, DF_CmdSpecList list); -internal int df_qsort_compare_cmd_spec__run_counter(DF_CmdSpec **a, DF_CmdSpec **b); -internal void df_cmd_spec_array_sort_by_run_counter__in_place(DF_CmdSpecArray array); -internal DF_Handle df_handle_from_cmd_spec(DF_CmdSpec *spec); -internal DF_CmdSpec *df_cmd_spec_from_handle(DF_Handle handle); - -//- rjf: string -> command parsing -internal String8 df_cmd_name_part_from_string(String8 string); -internal String8 df_cmd_arg_part_from_string(String8 string); - -//- rjf: command parameter bundles -internal DF_CmdParams df_cmd_params_zero(void); -internal void df_cmd_params_mark_slot(DF_CmdParams *params, DF_CmdParamSlot slot); -internal B32 df_cmd_params_has_slot(DF_CmdParams *params, DF_CmdParamSlot slot); -internal String8 df_cmd_params_apply_spec_query(Arena *arena, DF_CmdParams *params, DF_CmdSpec *spec, String8 query); - -//- rjf: command lists -internal void df_cmd_list_push(Arena *arena, DF_CmdList *cmds, DF_CmdParams *params, DF_CmdSpec *spec); - -//- rjf: string -> core layer command kind -internal DF_CoreCmdKind df_core_cmd_kind_from_string(String8 string); - -//////////////////////////////// -//~ rjf: Entity Type Pure Functions - -//- rjf: nil -internal B32 df_entity_is_nil(DF_Entity *entity); -#define df_require_entity_nonnil(entity, if_nil_stmts) do{if(df_entity_is_nil(entity)){if_nil_stmts;}}while(0) - -//- rjf: handle <-> entity conversions -internal U64 df_index_from_entity(DF_Entity *entity); -internal DF_Handle df_handle_from_entity(DF_Entity *entity); -internal DF_Entity *df_entity_from_handle(DF_Handle handle); -internal DF_EntityList df_entity_list_from_handle_list(Arena *arena, DF_HandleList handles); -internal DF_HandleList df_handle_list_from_entity_list(Arena *arena, DF_EntityList entities); - -//- rjf: entity recursion iterators -internal DF_EntityRec df_entity_rec_df(DF_Entity *entity, DF_Entity *subtree_root, U64 sib_off, U64 child_off); -#define df_entity_rec_df_pre(entity, subtree_root) df_entity_rec_df((entity), (subtree_root), OffsetOf(DF_Entity, next), OffsetOf(DF_Entity, first)) -#define df_entity_rec_df_post(entity, subtree_root) df_entity_rec_df((entity), (subtree_root), OffsetOf(DF_Entity, prev), OffsetOf(DF_Entity, last)) - -//- rjf: ancestor/child introspection -internal DF_Entity *df_entity_child_from_kind(DF_Entity *entity, DF_EntityKind kind); -internal DF_Entity *df_entity_ancestor_from_kind(DF_Entity *entity, DF_EntityKind kind); -internal DF_EntityList df_push_entity_child_list_with_kind(Arena *arena, DF_Entity *entity, DF_EntityKind kind); -internal DF_Entity *df_entity_child_from_name_and_kind(DF_Entity *parent, String8 string, DF_EntityKind kind); - -//- rjf: entity list building -internal void df_entity_list_push(Arena *arena, DF_EntityList *list, DF_Entity *entity); -internal DF_EntityArray df_entity_array_from_list(Arena *arena, DF_EntityList *list); -#define df_first_entity_from_list(list) ((list)->first != 0 ? (list)->first->entity : &df_g_nil_entity) - -//- rjf: entity fuzzy list building -internal DF_EntityFuzzyItemArray df_entity_fuzzy_item_array_from_entity_list_needle(Arena *arena, DF_EntityList *list, String8 needle); -internal DF_EntityFuzzyItemArray df_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, DF_EntityArray *array, String8 needle); - -//- rjf: full path building, from file/folder entities -internal String8 df_full_path_from_entity(Arena *arena, DF_Entity *entity); - -//- rjf: display string entities, for referencing entities in ui -internal String8 df_display_string_from_entity(Arena *arena, DF_Entity *entity); - -//- rjf: extra search tag strings for fuzzy filtering entities -internal String8 df_search_tags_from_entity(Arena *arena, DF_Entity *entity); - -//- rjf: entity -> color operations -internal Vec4F32 df_hsva_from_entity(DF_Entity *entity); -internal Vec4F32 df_rgba_from_entity(DF_Entity *entity); - -//- rjf: entity -> expansion tree keys -internal DF_ExpandKey df_expand_key_from_entity(DF_Entity *entity); -internal DF_ExpandKey df_parent_expand_key_from_entity(DF_Entity *entity); - -//- rjf: entity -> evaluation -internal DF_EntityEval *df_eval_from_entity(Arena *arena, DF_Entity *entity); - -//////////////////////////////// -//~ rjf: Name Allocation - -internal U64 df_name_bucket_idx_from_string_size(U64 size); -internal String8 df_name_alloc(String8 string); -internal void df_name_release(String8 string); - -//////////////////////////////// -//~ rjf: Entity Stateful Functions - -//- rjf: entity mutation notification codepath -internal void df_entity_notify_mutation(DF_Entity *entity); - -//- rjf: entity allocation + tree forming -internal DF_Entity *df_entity_alloc(DF_Entity *parent, DF_EntityKind kind); -internal void df_entity_mark_for_deletion(DF_Entity *entity); -internal void df_entity_release(DF_Entity *entity); -internal void df_entity_change_parent(DF_Entity *entity, DF_Entity *old_parent, DF_Entity *new_parent, DF_Entity *prev_child); - -//- rjf: entity simple equipment -internal void df_entity_equip_txt_pt(DF_Entity *entity, TxtPt point); -internal void df_entity_equip_entity_handle(DF_Entity *entity, DF_Handle handle); -internal void df_entity_equip_disabled(DF_Entity *entity, B32 b32); -internal void df_entity_equip_u64(DF_Entity *entity, U64 u64); -internal void df_entity_equip_color_rgba(DF_Entity *entity, Vec4F32 rgba); -internal void df_entity_equip_color_hsva(DF_Entity *entity, Vec4F32 hsva); -internal void df_entity_equip_cfg_src(DF_Entity *entity, DF_CfgSrc cfg_src); -internal void df_entity_equip_timestamp(DF_Entity *entity, U64 timestamp); - -//- rjf: control layer correllation equipment -internal void df_entity_equip_ctrl_machine_id(DF_Entity *entity, CTRL_MachineID machine_id); -internal void df_entity_equip_ctrl_handle(DF_Entity *entity, DMN_Handle handle); -internal void df_entity_equip_arch(DF_Entity *entity, Architecture arch); -internal void df_entity_equip_ctrl_id(DF_Entity *entity, U32 id); -internal void df_entity_equip_stack_base(DF_Entity *entity, U64 stack_base); -internal void df_entity_equip_vaddr_rng(DF_Entity *entity, Rng1U64 range); -internal void df_entity_equip_vaddr(DF_Entity *entity, U64 vaddr); - -//- rjf: name equipment -internal void df_entity_equip_name(DF_Entity *entity, String8 name); -internal void df_entity_equip_namef(DF_Entity *entity, char *fmt, ...); - -//- rjf: opening folders/files & maintaining the entity model of the filesystem -internal DF_Entity *df_entity_from_path(String8 path, DF_EntityFromPathFlags flags); - -//- rjf: file path map override lookups -internal String8List df_possible_overrides_from_file_path(Arena *arena, String8 file_path); - -//- rjf: top-level state queries -internal DF_Entity *df_entity_root(void); -internal DF_EntityList df_push_entity_list_with_kind(Arena *arena, DF_EntityKind kind); -internal DF_Entity *df_entity_from_id(DF_EntityID id); -internal DF_Entity *df_machine_entity_from_machine_id(CTRL_MachineID machine_id); -internal DF_Entity *df_entity_from_ctrl_handle(CTRL_MachineID machine_id, DMN_Handle handle); -internal DF_Entity *df_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id); -internal DF_Entity *df_entity_from_name_and_kind(String8 string, DF_EntityKind kind); -internal DF_Entity *df_entity_from_u64_and_kind(U64 u64, DF_EntityKind kind); - -//- rjf: entity freezing state -internal void df_set_thread_freeze_state(DF_Entity *thread, B32 frozen); -internal B32 df_entity_is_frozen(DF_Entity *entity); - -//////////////////////////////// -//~ rjf: Command Stateful Functions - -internal void df_register_cmd_specs(DF_CmdSpecInfoArray specs); -internal DF_CmdSpec *df_cmd_spec_from_string(String8 string); -internal DF_CmdSpec *df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind core_cmd_kind); -internal void df_cmd_spec_counter_inc(DF_CmdSpec *spec); -internal DF_CmdSpecList df_push_cmd_spec_list(Arena *arena); - -//////////////////////////////// -//~ rjf: View Rule Spec Stateful Functions - -internal void df_register_core_view_rule_specs(DF_CoreViewRuleSpecInfoArray specs); -internal DF_CoreViewRuleSpec *df_core_view_rule_spec_from_string(String8 string); - -//////////////////////////////// -//~ rjf: Stepping "Trap Net" Builders - -internal CTRL_TrapList df_trap_net_from_thread__step_over_inst(Arena *arena, DF_Entity *thread); -internal CTRL_TrapList df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread); -internal CTRL_TrapList df_trap_net_from_thread__step_into_line(Arena *arena, DF_Entity *thread); - -//////////////////////////////// -//~ rjf: Modules & Debug Info Mappings - -//- rjf: module <=> debug info keys -internal DI_Key df_dbgi_key_from_module(DF_Entity *module); -internal DF_EntityList df_modules_from_dbgi_key(Arena *arena, DI_Key *dbgi_key); - -//- rjf: voff <=> vaddr -internal U64 df_base_vaddr_from_module(DF_Entity *module); -internal U64 df_voff_from_vaddr(DF_Entity *module, U64 vaddr); -internal U64 df_vaddr_from_voff(DF_Entity *module, U64 voff); -internal Rng1U64 df_voff_range_from_vaddr_range(DF_Entity *module, Rng1U64 vaddr_rng); -internal Rng1U64 df_vaddr_range_from_voff_range(DF_Entity *module, Rng1U64 voff_rng); - -//////////////////////////////// -//~ rjf: Debug Info Lookups - -//- rjf: voff|vaddr -> symbol lookups -internal String8 df_symbol_name_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff, B32 decorated); -internal String8 df_symbol_name_from_process_vaddr(Arena *arena, DF_Entity *process, U64 vaddr, B32 decorated); - -//- rjf: symbol -> voff lookups -internal U64 df_voff_from_dbgi_key_symbol_name(DI_Key *dbgi_key, String8 symbol_name); -internal U64 df_type_num_from_dbgi_key_name(DI_Key *dbgi_key, String8 name); - -//- rjf: voff -> line info -internal DF_LineList df_lines_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff); - -//- rjf: file:line -> line info -internal DF_LineListArray df_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64 line_num_range); -internal DF_LineList df_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num); - -//////////////////////////////// -//~ rjf: Process/Thread/Module Info Lookups - -internal DF_Entity *df_module_from_process_vaddr(DF_Entity *process, U64 vaddr); -internal DF_Entity *df_module_from_thread(DF_Entity *thread); -internal U64 df_tls_base_vaddr_from_process_root_rip(DF_Entity *process, U64 root_vaddr, U64 rip_vaddr); -internal Architecture df_architecture_from_entity(DF_Entity *entity); -internal E_String2NumMap *df_push_locals_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbgi_key, U64 voff); -internal E_String2NumMap *df_push_member_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbgi_key, U64 voff); -internal B32 df_set_thread_rip(DF_Entity *thread, U64 vaddr); -internal DF_Entity *df_module_from_thread_candidates(DF_Entity *thread, DF_EntityList *candidates); -internal DF_Unwind df_unwind_from_ctrl_unwind(Arena *arena, DI_Scope *di_scope, DF_Entity *process, CTRL_Unwind *base_unwind); - -//////////////////////////////// -//~ rjf: Target Controls - -//- rjf: control message dispatching -internal void df_push_ctrl_msg(CTRL_Msg *msg); - -//- rjf: control thread running -internal void df_ctrl_run(DF_RunKind run, DF_Entity *run_thread, CTRL_RunFlags flags, CTRL_TrapList *run_traps); - -//- rjf: stopped info from the control thread -internal CTRL_Event df_ctrl_last_stop_event(void); - -//////////////////////////////// -//~ rjf: Evaluation Spaces - -//- rjf: entity <-> eval space -internal DF_Entity *df_entity_from_eval_space(E_Space space); -internal E_Space df_eval_space_from_entity(DF_Entity *entity); - -//- rjf: eval space reads/writes -internal B32 df_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range); -internal B32 df_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range); - -//- rjf: asynchronous streamed reads -> hashes from spaces -internal U128 df_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated); - -//- rjf: space -> entire range -internal Rng1U64 df_whole_range_from_eval_space(E_Space space); - -//////////////////////////////// -//~ rjf: Evaluation Views - -//- rjf: keys -internal DF_EvalViewKey df_eval_view_key_make(U64 v0, U64 v1); -internal DF_EvalViewKey df_eval_view_key_from_string(String8 string); -internal DF_EvalViewKey df_eval_view_key_from_stringf(char *fmt, ...); -internal B32 df_eval_view_key_match(DF_EvalViewKey a, DF_EvalViewKey b); - -//- rjf: cache lookup -internal DF_EvalView *df_eval_view_from_key(DF_EvalViewKey key); - -//- rjf: key -> view rules -internal void df_eval_view_set_key_rule(DF_EvalView *eval_view, DF_ExpandKey key, String8 view_rule_string); -internal String8 df_eval_view_rule_from_key(DF_EvalView *eval_view, DF_ExpandKey key); - -//////////////////////////////// -//~ rjf: Evaluation Visualization - -//- rjf: expr * view rule table -> expr -internal E_Expr *df_expr_from_expr_cfg(Arena *arena, E_Expr *expr, DF_CfgTable *cfg); - -//- rjf: evaluation value string builder helpers -internal String8 df_string_from_ascii_value(Arena *arena, U8 val); -internal String8 df_string_from_hresult_facility_code(U32 code); -internal String8 df_string_from_hresult_code(U32 code); -internal String8 df_string_from_simple_typed_eval(Arena *arena, DF_EvalVizStringFlags flags, U32 radix, E_Eval eval); -internal String8 df_escaped_from_raw_string(Arena *arena, String8 raw); - -//- rjf: type info -> expandability/editablity -internal B32 df_type_key_is_expandable(E_TypeKey type_key); -internal B32 df_type_key_is_editable(E_TypeKey type_key); - -//- rjf: writing values back to child processes -internal B32 df_commit_eval_value_string(E_Eval dst_eval, String8 string); - -//- rjf: type helpers -internal E_MemberArray df_filtered_data_members_from_members_cfg_table(Arena *arena, E_MemberArray members, DF_CfgTable *cfg); -internal DF_EvalLinkBaseChunkList df_eval_link_base_chunk_list_from_eval(Arena *arena, E_TypeKey link_member_type_key, U64 link_member_off, E_Eval eval, U64 cap); -internal DF_EvalLinkBase df_eval_link_base_from_chunk_list_index(DF_EvalLinkBaseChunkList *list, U64 idx); -internal DF_EvalLinkBaseArray df_eval_link_base_array_from_chunk_list(Arena *arena, DF_EvalLinkBaseChunkList *chunks); - -//- rjf: viz block collection building -internal DF_EvalVizBlock *df_eval_viz_block_begin(Arena *arena, DF_EvalVizBlockKind kind, DF_ExpandKey parent_key, DF_ExpandKey key, S32 depth); -internal DF_EvalVizBlock *df_eval_viz_block_split_and_continue(Arena *arena, DF_EvalVizBlockList *list, DF_EvalVizBlock *split_block, U64 split_idx); -internal void df_eval_viz_block_end(DF_EvalVizBlockList *list, DF_EvalVizBlock *block); -internal void df_append_expr_eval_viz_blocks__rec(Arena *arena, DF_EvalView *view, DF_ExpandKey parent_key, DF_ExpandKey key, String8 string, E_Expr *expr, DF_CfgTable *cfg_table, S32 depth, DF_EvalVizBlockList *list_out); -internal DF_EvalVizBlockList df_eval_viz_block_list_from_eval_view_expr_keys(Arena *arena, DF_EvalView *eval_view, DF_CfgTable *cfg_table, String8 expr, DF_ExpandKey parent_key, DF_ExpandKey key); -internal void df_eval_viz_block_list_concat__in_place(DF_EvalVizBlockList *dst, DF_EvalVizBlockList *to_push); - -//- rjf: viz block list <-> table coordinates -internal S64 df_row_num_from_viz_block_list_key(DF_EvalVizBlockList *blocks, DF_ExpandKey key); -internal DF_ExpandKey df_key_from_viz_block_list_row_num(DF_EvalVizBlockList *blocks, S64 row_num); -internal DF_ExpandKey df_parent_key_from_viz_block_list_row_num(DF_EvalVizBlockList *blocks, S64 row_num); - -//- rjf: viz block * index -> expression -internal E_Expr *df_expr_from_eval_viz_block_index(Arena *arena, DF_EvalVizBlock *block, U64 index); - -//- rjf: viz row list building -internal DF_EvalVizRow *df_eval_viz_row_list_push_new(Arena *arena, DF_EvalView *eval_view, DF_EvalVizWindowedRowList *rows, DF_EvalVizBlock *block, DF_ExpandKey key, E_Expr *expr); -internal DF_EvalVizWindowedRowList df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DF_EvalView *eval_view, Rng1S64 visible_range, DF_EvalVizBlockList *blocks); - -//- rjf: viz row -> strings -internal String8 df_expr_string_from_viz_row(Arena *arena, DF_EvalVizRow *row); - -//- rjf: viz row -> expandability/editability -internal B32 df_viz_row_is_expandable(DF_EvalVizRow *row); -internal B32 df_viz_row_is_editable(DF_EvalVizRow *row); - -//- rjf: eval / view rule params tree info extraction -internal U64 df_base_offset_from_eval(E_Eval eval); -internal U64 df_size_from_eval_params(E_Eval eval, MD_Node *params); -internal E_Value df_value_from_params(MD_Node *params); -internal E_TypeKey df_type_key_from_params(MD_Node *params); -internal E_Value df_value_from_params_key(MD_Node *params, String8 key); -internal Rng1U64 df_range_from_eval_params(E_Eval eval, MD_Node *params); -internal TXT_LangKind df_lang_kind_from_eval_params(E_Eval eval, MD_Node *params); -internal Architecture df_architecture_from_eval_params(E_Eval eval, MD_Node *params); -internal Vec2S32 df_dim2s32_from_eval_params(E_Eval eval, MD_Node *params); -internal R_Tex2DFormat df_tex2dformat_from_eval_params(E_Eval eval, MD_Node *params); - -//- rjf: eval <-> entity -internal DF_Entity *df_entity_from_eval_string(String8 string); -internal String8 df_eval_string_from_entity(Arena *arena, DF_Entity *entity); - -//- rjf: eval <-> file path -internal String8 df_file_path_from_eval_string(Arena *arena, String8 string); -internal String8 df_eval_string_from_file_path(Arena *arena, String8 string); - -//////////////////////////////// -//~ rjf: Main State Accessors/Mutators - -//- rjf: frame data -internal F32 df_dt(void); -internal U64 df_frame_index(void); -internal Arena *df_frame_arena(void); -internal F64 df_time_in_seconds(void); - -//- rjf: interaction registers -internal DF_InteractRegs *df_interact_regs(void); -internal DF_InteractRegs *df_base_interact_regs(void); -internal DF_InteractRegs *df_push_interact_regs(void); -internal DF_InteractRegs *df_pop_interact_regs(void); - -//- rjf: undo/redo history -internal DF_StateDeltaHistory *df_state_delta_history(void); - -//- rjf: control state -internal DF_RunKind df_ctrl_last_run_kind(void); -internal U64 df_ctrl_last_run_frame_idx(void); -internal U64 df_ctrl_run_gen(void); -internal B32 df_ctrl_targets_running(void); - -//- rjf: config paths -internal String8 df_cfg_path_from_src(DF_CfgSrc src); - -//- rjf: config state -internal DF_CfgTable *df_cfg_table(void); - -//- rjf: config serialization -internal String8 df_cfg_escaped_from_raw_string(Arena *arena, String8 string); -internal String8 df_cfg_raw_from_escaped_string(Arena *arena, String8 string); -internal String8List df_cfg_strings_from_core(Arena *arena, String8 root_path, DF_CfgSrc source); -internal void df_cfg_push_write_string(DF_CfgSrc src, String8 string); - -//- rjf: current path -internal String8 df_current_path(void); - -//- rjf: entity kind cache -internal DF_EntityList df_query_cached_entity_list_with_kind(DF_EntityKind kind); - -//- rjf: active entity based queries -internal DI_KeyList df_push_active_dbgi_key_list(Arena *arena); -internal DF_EntityList df_push_active_target_list(Arena *arena); - -//- rjf: expand key based entity queries -internal DF_Entity *df_entity_from_expand_key_and_kind(DF_ExpandKey key, DF_EntityKind kind); - -//- rjf: per-run caches -internal CTRL_Unwind df_query_cached_unwind_from_thread(DF_Entity *thread); -internal U64 df_query_cached_rip_from_thread(DF_Entity *thread); -internal U64 df_query_cached_rip_from_thread_unwind(DF_Entity *thread, U64 unwind_count); -internal U64 df_query_cached_tls_base_vaddr_from_process_root_rip(DF_Entity *process, U64 root_vaddr, U64 rip_vaddr); -internal E_String2NumMap *df_query_cached_locals_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff); -internal E_String2NumMap *df_query_cached_member_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff); - -//- rjf: top-level command dispatch -internal void df_push_cmd__root(DF_CmdParams *params, DF_CmdSpec *spec); - -//////////////////////////////// -//~ rjf: Main Layer Top-Level Calls - -internal void df_core_init(CmdLine *cmdln, DF_StateDeltaHistory *hist); -internal DF_CmdList df_core_gather_root_cmds(Arena *arena); -internal void df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt); -internal void df_core_end_frame(void); - -#endif // DF_CORE_H diff --git a/src/df/core/generated/df_core.meta.c b/src/df/core/generated/df_core.meta.c deleted file mode 100644 index fae088d1..00000000 --- a/src/df/core/generated/df_core.meta.c +++ /dev/null @@ -1,583 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -//- GENERATED CODE - -C_LINKAGE_BEGIN -Rng1U64 df_g_cmd_param_slot_range_table[24] = -{ -{0}, -{OffsetOf(DF_CmdParams, window), OffsetOf(DF_CmdParams, window) + sizeof(DF_Handle)}, -{OffsetOf(DF_CmdParams, panel), OffsetOf(DF_CmdParams, panel) + sizeof(DF_Handle)}, -{OffsetOf(DF_CmdParams, dest_panel), OffsetOf(DF_CmdParams, dest_panel) + sizeof(DF_Handle)}, -{OffsetOf(DF_CmdParams, prev_view), OffsetOf(DF_CmdParams, prev_view) + sizeof(DF_Handle)}, -{OffsetOf(DF_CmdParams, view), OffsetOf(DF_CmdParams, view) + sizeof(DF_Handle)}, -{OffsetOf(DF_CmdParams, entity), OffsetOf(DF_CmdParams, entity) + sizeof(DF_Handle)}, -{OffsetOf(DF_CmdParams, entity_list), OffsetOf(DF_CmdParams, entity_list) + sizeof(DF_HandleList)}, -{OffsetOf(DF_CmdParams, string), OffsetOf(DF_CmdParams, string) + sizeof(String8)}, -{OffsetOf(DF_CmdParams, file_path), OffsetOf(DF_CmdParams, file_path) + sizeof(String8)}, -{OffsetOf(DF_CmdParams, text_point), OffsetOf(DF_CmdParams, text_point) + sizeof(TxtPt)}, -{OffsetOf(DF_CmdParams, cmd_spec), OffsetOf(DF_CmdParams, cmd_spec) + sizeof(struct DF_CmdSpec *)}, -{OffsetOf(DF_CmdParams, view_spec), OffsetOf(DF_CmdParams, view_spec) + sizeof(struct DF_ViewSpec *)}, -{OffsetOf(DF_CmdParams, params_tree), OffsetOf(DF_CmdParams, params_tree) + sizeof(MD_Node *)}, -{OffsetOf(DF_CmdParams, os_event), OffsetOf(DF_CmdParams, os_event) + sizeof(struct OS_Event *)}, -{OffsetOf(DF_CmdParams, vaddr), OffsetOf(DF_CmdParams, vaddr) + sizeof(U64)}, -{OffsetOf(DF_CmdParams, voff), OffsetOf(DF_CmdParams, voff) + sizeof(U64)}, -{OffsetOf(DF_CmdParams, index), OffsetOf(DF_CmdParams, index) + sizeof(U64)}, -{OffsetOf(DF_CmdParams, id), OffsetOf(DF_CmdParams, id) + sizeof(U64)}, -{OffsetOf(DF_CmdParams, prefer_dasm), OffsetOf(DF_CmdParams, prefer_dasm) + sizeof(B32)}, -{OffsetOf(DF_CmdParams, force_confirm), OffsetOf(DF_CmdParams, force_confirm) + sizeof(B32)}, -{OffsetOf(DF_CmdParams, dir2), OffsetOf(DF_CmdParams, dir2) + sizeof(Dir2)}, -{OffsetOf(DF_CmdParams, unwind_index), OffsetOf(DF_CmdParams, unwind_index) + sizeof(U64)}, -{OffsetOf(DF_CmdParams, inline_depth), OffsetOf(DF_CmdParams, inline_depth) + sizeof(U64)}, -}; - -DF_IconKind df_g_entity_kind_icon_kind_table[28] = -{ -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Machine, -DF_IconKind_FileOutline, -DF_IconKind_Binoculars, -DF_IconKind_FileOutline, -DF_IconKind_Pin, -DF_IconKind_Binoculars, -DF_IconKind_Binoculars, -DF_IconKind_CircleFilled, -DF_IconKind_CircleFilled, -DF_IconKind_Null, -DF_IconKind_Target, -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Briefcase, -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Threads, -DF_IconKind_Thread, -DF_IconKind_Module, -DF_IconKind_Threads, -DF_IconKind_Module, -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Null, -}; - -String8 df_g_entity_kind_display_string_table[28] = -{ -str8_lit_comp("Nil"), -str8_lit_comp("Root"), -str8_lit_comp("Machine"), -str8_lit_comp("File"), -str8_lit_comp("Auto View Rule"), -str8_lit_comp("File Path Map"), -str8_lit_comp("Watch Pin"), -str8_lit_comp("Watch"), -str8_lit_comp("View Rule"), -str8_lit_comp("Breakpoint"), -str8_lit_comp("Condition"), -str8_lit_comp("Location"), -str8_lit_comp("Target"), -str8_lit_comp("Executable"), -str8_lit_comp("Arguments"), -str8_lit_comp("Working Directory"), -str8_lit_comp("Entry Point"), -str8_lit_comp("Recent Project"), -str8_lit_comp("Source"), -str8_lit_comp("Destination"), -str8_lit_comp("Process"), -str8_lit_comp("Thread"), -str8_lit_comp("Module"), -str8_lit_comp("Pending Thread Name"), -str8_lit_comp("Debug Info Path"), -str8_lit_comp("Conversion Task"), -str8_lit_comp("Conversion Failure"), -str8_lit_comp("EndedProcess"), -}; - -String8 df_g_entity_kind_name_lower_table[28] = -{ -str8_lit_comp("nil"), -str8_lit_comp("root"), -str8_lit_comp("machine"), -str8_lit_comp("file"), -str8_lit_comp("auto_view_rule"), -str8_lit_comp("file_path_map"), -str8_lit_comp("watch_pin"), -str8_lit_comp("watch"), -str8_lit_comp("view_rule"), -str8_lit_comp("breakpoint"), -str8_lit_comp("condition"), -str8_lit_comp("location"), -str8_lit_comp("target"), -str8_lit_comp("executable"), -str8_lit_comp("arguments"), -str8_lit_comp("working_directory"), -str8_lit_comp("entry_point"), -str8_lit_comp("recent_project"), -str8_lit_comp("source"), -str8_lit_comp("dest"), -str8_lit_comp("process"), -str8_lit_comp("thread"), -str8_lit_comp("module"), -str8_lit_comp("pending_thread_name"), -str8_lit_comp("debug_info_path"), -str8_lit_comp("conversion_task"), -str8_lit_comp("conversion_fail"), -str8_lit_comp("ended_process"), -}; - -String8 df_g_entity_kind_name_lower_plural_table[28] = -{ -str8_lit_comp("nils"), -str8_lit_comp("roots"), -str8_lit_comp("machines"), -str8_lit_comp("files"), -str8_lit_comp("auto_view_rules"), -str8_lit_comp("file_path_maps"), -str8_lit_comp("watch_pins"), -str8_lit_comp("watches"), -str8_lit_comp("view_rules"), -str8_lit_comp("breakpoints"), -str8_lit_comp("conditions"), -str8_lit_comp("locations"), -str8_lit_comp("targets"), -str8_lit_comp("executables"), -str8_lit_comp("argumentses"), -str8_lit_comp("working_directories"), -str8_lit_comp("entry_points"), -str8_lit_comp("recent_projects"), -str8_lit_comp("sources"), -str8_lit_comp("dests"), -str8_lit_comp("processes"), -str8_lit_comp("threads"), -str8_lit_comp("modules"), -str8_lit_comp("pending_thread_names"), -str8_lit_comp("debug_info_paths"), -str8_lit_comp("conversion_tasks"), -str8_lit_comp("conversion_fails"), -str8_lit_comp("ended_processes"), -}; - -String8 df_g_entity_kind_name_label_table[28] = -{ -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Expression"), -str8_lit_comp("Expression"), -str8_lit_comp("Expression"), -str8_lit_comp("Label"), -str8_lit_comp("Expression"), -str8_lit_comp("Location"), -str8_lit_comp("Label"), -str8_lit_comp("Executable"), -str8_lit_comp("Arguments"), -str8_lit_comp("Execution Path"), -str8_lit_comp("Symbol Name"), -str8_lit_comp("Path"), -str8_lit_comp("Path"), -str8_lit_comp("Path"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -}; - -DF_EntityKindFlags df_g_entity_kind_flags_table[28] = -{ -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (1*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 1*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (1*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 1*DF_EntityKindFlag_IsSerializedToConfig, -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 1*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 1*DF_EntityKindFlag_IsSerializedToConfig, -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (1*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 1*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 1*DF_EntityKindFlag_IsSerializedToConfig, -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (1*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 1*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (1*DF_EntityKindFlag_CanEnable) | (1*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 1*DF_EntityKindFlag_LeafMutProjectConfig | 1*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 1*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 1*DF_EntityKindFlag_LeafMutProjectConfig | 1*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 1*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 1*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 1*DF_EntityKindFlag_LeafMutProjectConfig | 1*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 1*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 1*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (1*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (1*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 1*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 1*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 1*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 1*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 1*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 1*DF_EntityKindFlag_LeafMutProjectConfig | 1*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 1*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (1*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 1*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 1*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (1*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (1*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_LeafMutUserConfig | 0*DF_EntityKindFlag_LeafMutProjectConfig | 0*DF_EntityKindFlag_LeafMutSoftHalt | 0*DF_EntityKindFlag_LeafMutDebugInfoMap | 0*DF_EntityKindFlag_TreeMutUserConfig | 0*DF_EntityKindFlag_TreeMutProjectConfig | 0*DF_EntityKindFlag_TreeMutSoftHalt | 0*DF_EntityKindFlag_TreeMutDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_NameIsPath | 0*DF_EntityKindFlag_UserDefinedLifetime) | 0*DF_EntityKindFlag_IsSerializedToConfig, -}; - -String8 df_g_cfg_src_string_table[4] = -{ -str8_lit_comp("user"), -str8_lit_comp("project"), -str8_lit_comp("command_line"), -str8_lit_comp("transient"), -}; - -DF_CoreCmdKind df_g_cfg_src_load_cmd_kind_table[4] = -{ -DF_CoreCmdKind_OpenUser, -DF_CoreCmdKind_OpenProject, -DF_CoreCmdKind_Null, -DF_CoreCmdKind_Null, -}; - -DF_CoreCmdKind df_g_cfg_src_write_cmd_kind_table[4] = -{ -DF_CoreCmdKind_WriteUserData, -DF_CoreCmdKind_WriteProjectData, -DF_CoreCmdKind_Null, -DF_CoreCmdKind_Null, -}; - -DF_CoreCmdKind df_g_cfg_src_apply_cmd_kind_table[4] = -{ -DF_CoreCmdKind_ApplyUserData, -DF_CoreCmdKind_ApplyProjectData, -DF_CoreCmdKind_Null, -DF_CoreCmdKind_Null, -}; - -DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[221] = -{ -{ str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("exit"), str8_lit_comp("Exits the debugger."), str8_lit_comp("quit,close,abort"), str8_lit_comp("Exit"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_X}, -{ str8_lit_comp("run_command"), str8_lit_comp("Runs a command from the command palette."), str8_lit_comp("help,cmd"), str8_lit_comp("Run Command"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_CmdSpec, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("error"), str8_lit_comp("Notifies of an error."), str8_lit_comp(""), str8_lit_comp("Error"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("os_event"), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("OS Event"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ 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("Launch and Run"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_EntityList, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Play}, -{ str8_lit_comp("launch_and_init"), str8_lit_comp("Starts debugging a new instance of a target, then stops at the program's entry point."), str8_lit_comp("launch,start,entry,point"), str8_lit_comp("Launch and Initialize"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_EntityList, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_PlayStepForward}, -{ str8_lit_comp("kill"), str8_lit_comp("Kills the specified existing debugged process(es)."), str8_lit_comp("stop,kill"), str8_lit_comp("Kill"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_EntityList, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Stop}, -{ str8_lit_comp("kill_all"), str8_lit_comp("Kills all debugged child processes."), str8_lit_comp("stop,kill,all"), str8_lit_comp("Kill All"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Stop}, -{ str8_lit_comp("detach"), str8_lit_comp("Detaches the specified debugged process."), str8_lit_comp("detach"), str8_lit_comp("Detach"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_EntityList, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, -{ str8_lit_comp("continue"), str8_lit_comp("Continues all halted threads."), str8_lit_comp(""), str8_lit_comp("Continue"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Play}, -{ str8_lit_comp("step_into_inst"), str8_lit_comp("Performs a step that goes into calls, at the instruction level."), str8_lit_comp("single,step,thread"), str8_lit_comp("Step Into (Assembly)"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepInto}, -{ str8_lit_comp("step_over_inst"), str8_lit_comp("Performs a step that skips calls, at the instruction level."), str8_lit_comp("single,step,thread"), str8_lit_comp("Step Over (Assembly)"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepOver}, -{ str8_lit_comp("step_into_line"), str8_lit_comp("Performs a step that goes into calls, at the source code line level."), str8_lit_comp("step,thread"), str8_lit_comp("Step Into (Line)"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepInto}, -{ str8_lit_comp("step_over_line"), str8_lit_comp("Performs a step that skips calls, at the source code line level."), str8_lit_comp("step,thread"), str8_lit_comp("Step Over (Line)"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepOver}, -{ str8_lit_comp("step_out"), str8_lit_comp("Runs to the end of the current function and exits it."), str8_lit_comp(""), str8_lit_comp("Step Out"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepOut}, -{ str8_lit_comp("halt"), str8_lit_comp("Halts all running processes."), str8_lit_comp("pause"), str8_lit_comp("Halt"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Pause}, -{ str8_lit_comp("soft_halt_refresh"), str8_lit_comp("Interrupts all running processes to collect data, and then resumes them."), str8_lit_comp(""), str8_lit_comp("Soft Halt Refresh"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Refresh}, -{ str8_lit_comp("set_thread_ip"), str8_lit_comp("Sets the passed thread's instruction pointer at the passed address."), str8_lit_comp(""), str8_lit_comp("Set Thread IP"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_VirtualAddr, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, -{ str8_lit_comp("run_to_line"), str8_lit_comp("Runs until a particular source line is hit."), str8_lit_comp(""), str8_lit_comp("Run To Line"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Play}, -{ str8_lit_comp("run_to_address"), str8_lit_comp("Runs until a particular address is hit."), str8_lit_comp(""), str8_lit_comp("Run To Address"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_VirtualAddr, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_PlayStepForward}, -{ str8_lit_comp("run"), str8_lit_comp("Runs all targets after starting them if they have not been started yet."), str8_lit_comp("play"), str8_lit_comp("Run"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Play}, -{ str8_lit_comp("restart"), str8_lit_comp("Kills all running processes, then restarts the targets which were used to launch all current processes (if any)."), str8_lit_comp("restart,retry"), str8_lit_comp("Restart"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Redo}, -{ str8_lit_comp("step_into"), str8_lit_comp("Steps once, possibly into function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Into"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepInto}, -{ str8_lit_comp("step_over"), str8_lit_comp("Steps once, always over function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Over"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepOver}, -{ str8_lit_comp("run_to_cursor"), str8_lit_comp("Runs the selected thread to the current cursor."), str8_lit_comp("line"), str8_lit_comp("Run To Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Play}, -{ str8_lit_comp("set_next_statement"), str8_lit_comp("Sets the selected thread's instruction pointer to the cursor's position."), str8_lit_comp(""), str8_lit_comp("Set Next Statement"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, -{ str8_lit_comp("select_thread"), str8_lit_comp("Selects a thread."), str8_lit_comp(""), str8_lit_comp("Select Thread"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, -{ str8_lit_comp("select_unwind"), str8_lit_comp("Selects an unwind frame number for the selected thread."), str8_lit_comp(""), str8_lit_comp("Select Unwind"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("up_one_frame"), str8_lit_comp("Selects the call stack frame above the currently selected."), str8_lit_comp(""), str8_lit_comp("Up One Frame"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_UpArrow}, -{ str8_lit_comp("down_one_frame"), str8_lit_comp("Selects the call stack frame below the currently selected."), str8_lit_comp("callstack,unwind"), str8_lit_comp("Down One Frame"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_DownArrow}, -{ str8_lit_comp("freeze_thread"), str8_lit_comp("Freezes the passed thread."), str8_lit_comp("callstack,unwind"), str8_lit_comp("Freeze Thread"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Locked}, -{ str8_lit_comp("thaw_thread"), str8_lit_comp("Thaws the passed thread."), str8_lit_comp(""), str8_lit_comp("Thaw Thread"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Unlocked}, -{ str8_lit_comp("freeze_process"), str8_lit_comp("Freezes the passed process."), str8_lit_comp(""), str8_lit_comp("Freeze Process"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Locked}, -{ str8_lit_comp("thaw_process"), str8_lit_comp("Thaws the passed process."), str8_lit_comp(""), str8_lit_comp("Thaw Process"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Unlocked}, -{ str8_lit_comp("freeze_machine"), str8_lit_comp("Freezes the passed machine."), str8_lit_comp(""), str8_lit_comp("Freeze Machine"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Machine, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Locked}, -{ str8_lit_comp("thaw_machine"), str8_lit_comp("Thaws the passed machine."), str8_lit_comp(""), str8_lit_comp("Thaw Machine"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Machine, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Unlocked}, -{ str8_lit_comp("freeze_local_machine"), str8_lit_comp("Freezes the local machine."), str8_lit_comp(""), str8_lit_comp("Freeze Local Machine"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Machine}, -{ str8_lit_comp("thaw_local_machine"), str8_lit_comp("Thaws the local machine."), str8_lit_comp(""), str8_lit_comp("Thaw Local Machine"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Machine}, -{ str8_lit_comp("inc_ui_font_scale"), str8_lit_comp("Increases the font size used for UI."), str8_lit_comp(""), str8_lit_comp("Increase UI Font Scale"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("dec_ui_font_scale"), str8_lit_comp("Decreases the font size used for UI."), str8_lit_comp(""), str8_lit_comp("Decrease UI Font Scale"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("inc_code_font_scale"), str8_lit_comp("Increases the font size used for code."), str8_lit_comp(""), str8_lit_comp("Increase Code Font Scale"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("dec_code_font_scale"), str8_lit_comp("Decreases the font size used for code."), str8_lit_comp(""), str8_lit_comp("Decrease Code Font Scale"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("open_window"), str8_lit_comp("Opens a new window."), str8_lit_comp(""), str8_lit_comp("Open New Window"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window}, -{ str8_lit_comp("close_window"), str8_lit_comp("Closes an opened window."), str8_lit_comp(""), str8_lit_comp("Close Window"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window}, -{ str8_lit_comp("toggle_fullscreen"), str8_lit_comp("Toggles fullscreen view on the active window."), str8_lit_comp(""), str8_lit_comp("Toggle Fullscreen"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window}, -{ str8_lit_comp("confirm_accept"), str8_lit_comp("Accepts the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Accept"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("confirm_cancel"), str8_lit_comp("Cancels the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Cancel"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("reset_to_default_panels"), str8_lit_comp("Resets the window to the default panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Default Panel Layout"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window}, -{ str8_lit_comp("reset_to_compact_panels"), str8_lit_comp("Resets the window to the compact panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Compact Panel Layout"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window}, -{ str8_lit_comp("new_panel_left"), str8_lit_comp("Creates a new panel to the left of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Left"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_XSplit}, -{ str8_lit_comp("new_panel_up"), str8_lit_comp("Creates a new panel at the top of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Up"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_YSplit}, -{ str8_lit_comp("new_panel_right"), str8_lit_comp("Creates a new panel to the right of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Right"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_XSplit}, -{ str8_lit_comp("new_panel_down"), str8_lit_comp("Creates a new panel at the bottom of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Down"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_YSplit}, -{ str8_lit_comp("split_panel"), str8_lit_comp("Creates a new panel in a given direction, and moves a tab to it, if specified."), str8_lit_comp(""), str8_lit_comp("Split Panel"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("rotate_panel_columns"), str8_lit_comp("Rotates all panels at the closest column level of the panel hierarchy."), str8_lit_comp(""), str8_lit_comp("Rotate Panel Columns"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("next_panel"), str8_lit_comp("Cycles the active panel forward."), str8_lit_comp(""), str8_lit_comp("Focus Next Panel"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, -{ str8_lit_comp("prev_panel"), str8_lit_comp("Cycles the active panel backwards."), str8_lit_comp(""), str8_lit_comp("Focus Previous Panel"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow}, -{ str8_lit_comp("focus_panel"), str8_lit_comp("Focuses a new panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("focus_panel_right"), str8_lit_comp("Focuses a panel rightward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Right"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, -{ str8_lit_comp("focus_panel_left"), str8_lit_comp("Focuses a panel leftward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Left"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow}, -{ str8_lit_comp("focus_panel_up"), str8_lit_comp("Focuses a panel upward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Up"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_UpArrow}, -{ str8_lit_comp("focus_panel_down"), str8_lit_comp("Focuses a panel downward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Down"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_DownArrow}, -{ str8_lit_comp("undo"), str8_lit_comp("Undoes the previous action."), str8_lit_comp(""), str8_lit_comp("Undo"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Undo}, -{ str8_lit_comp("redo"), str8_lit_comp("Redoes the first previously undone action."), str8_lit_comp(""), str8_lit_comp("Redo"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Redo}, -{ str8_lit_comp("go_back"), str8_lit_comp("Returns to the previously selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Back"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow}, -{ str8_lit_comp("go_forward"), str8_lit_comp("Returns to the next selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Forward"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, -{ str8_lit_comp("close_panel"), str8_lit_comp("Closes the currently active panel."), str8_lit_comp(""), str8_lit_comp("Close Panel"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_ClosePanel}, -{ str8_lit_comp("next_tab"), str8_lit_comp("Focuses the next tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Next Tab"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, -{ str8_lit_comp("prev_tab"), str8_lit_comp("Focuses the previous tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Previous Tab"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow}, -{ str8_lit_comp("move_tab_right"), str8_lit_comp("Moves the selected tab right one slot."), str8_lit_comp(""), str8_lit_comp("Move Tab Right"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow}, -{ str8_lit_comp("move_tab_left"), str8_lit_comp("Moves the selected tab left one slot."), str8_lit_comp(""), str8_lit_comp("Move Tab Left"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow}, -{ str8_lit_comp("open_tab"), str8_lit_comp("Opens a new tab with the parameterized view specification."), str8_lit_comp(""), str8_lit_comp("Open Tab"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("close_tab"), str8_lit_comp("Closes the currently opened tab."), str8_lit_comp(""), str8_lit_comp("Close Tab"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_X}, -{ str8_lit_comp("move_tab"), str8_lit_comp("Moves a tab to a new panel."), str8_lit_comp(""), str8_lit_comp("Move Tab"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("tab_bar_top"), str8_lit_comp("Anchors a panel's tab bar to the top of the panel."), str8_lit_comp(""), str8_lit_comp("Anchor Tab Bar To Top"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_UpArrow}, -{ str8_lit_comp("tab_bar_bottom"), str8_lit_comp("Anchors a panel's tab bar to the bottom of the panel."), str8_lit_comp(""), str8_lit_comp("Anchor Tab Bar To Bottom"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_DownArrow}, -{ str8_lit_comp("set_current_path"), str8_lit_comp("Sets the debugger's current path, which is used as a starting point when browsing for files."), str8_lit_comp(""), str8_lit_comp("Set Current Path"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline}, -{ str8_lit_comp("open"), str8_lit_comp("Opens a file."), str8_lit_comp("code,source,file"), str8_lit_comp("Open"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline}, -{ str8_lit_comp("switch"), str8_lit_comp("Switches to a loaded file."), str8_lit_comp("code,source,file"), str8_lit_comp("Switch"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_File, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline}, -{ str8_lit_comp("switch_to_partner_file"), str8_lit_comp("Switches to the focused file's partner; or from header to implementation or vice versa."), str8_lit_comp("code,source,file"), str8_lit_comp("Switch To Partner File"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline}, -{ str8_lit_comp("go_to_disassembly"), str8_lit_comp("Goes to the disassembly, if any, for a given source code line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("Go To Disassembly"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Glasses}, -{ str8_lit_comp("go_to_source"), str8_lit_comp("Goes to the source code, if any, for a given disassembly line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("Go To Source"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline}, -{ str8_lit_comp("set_file_override_link_src"), str8_lit_comp("Sets the source path for an override file link."), str8_lit_comp(""), str8_lit_comp("Set File Override Link Source"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("set_file_override_link_dst"), str8_lit_comp("Sets the destination path for an override file link."), str8_lit_comp(""), str8_lit_comp("Set File Override Link Destination"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("set_file_replacement_path"), str8_lit_comp("Sets the path which should be used as the replacement for the passed file."), str8_lit_comp(""), str8_lit_comp("Set File Replacement Path"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("set_auto_view_rule_type"), str8_lit_comp("Sets the type for an auto view rule."), str8_lit_comp(""), str8_lit_comp("Set Auto View Rule Type"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("set_auto_view_rule_view_rule"), str8_lit_comp("Sets the view rule string for an auto view rule."), str8_lit_comp(""), str8_lit_comp("Set Auto View Rule View Rule"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ 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("Open User"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Person}, -{ 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("Open Project"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Briefcase}, -{ str8_lit_comp("open_recent_project"), str8_lit_comp("Opens a recently used project file."), str8_lit_comp("project,project,session"), str8_lit_comp("Open Recent Project"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_RecentProject, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Briefcase}, -{ str8_lit_comp("apply_user_data"), str8_lit_comp("Applies user data from the active user file."), str8_lit_comp(""), str8_lit_comp("Apply User Data"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("apply_project_data"), str8_lit_comp("Applies project data from the active project file."), str8_lit_comp(""), str8_lit_comp("Apply Project Data"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("write_user_data"), str8_lit_comp("Writes user data to the active user file."), str8_lit_comp(""), str8_lit_comp("Write User Data"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("write_project_data"), str8_lit_comp("Writes project data to the active project file."), str8_lit_comp(""), str8_lit_comp("Write Project Data"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("edit"), str8_lit_comp("Edits the current selection."), str8_lit_comp(""), str8_lit_comp("Edit"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Pencil}, -{ str8_lit_comp("accept"), str8_lit_comp("Accepts current changes, or answers prompts in the affirmative."), str8_lit_comp(""), str8_lit_comp("Accept"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CheckFilled}, -{ str8_lit_comp("cancel"), str8_lit_comp("Rejects current changes, exits temporary menus, or answers prompts in the negative."), str8_lit_comp(""), str8_lit_comp("Cancel"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_X}, -{ str8_lit_comp("move_left"), str8_lit_comp("Moves the cursor or selection left."), str8_lit_comp(""), str8_lit_comp("Move Left"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_right"), str8_lit_comp("Moves the cursor or selection right."), str8_lit_comp(""), str8_lit_comp("Move Right"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_up"), str8_lit_comp("Moves the cursor or selection up."), str8_lit_comp(""), str8_lit_comp("Move Up"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_down"), str8_lit_comp("Moves the cursor or selection down."), str8_lit_comp(""), str8_lit_comp("Move Down"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_left_select"), str8_lit_comp("Moves the cursor or selection left, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Left Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_right_select"), str8_lit_comp("Moves the cursor or selection right, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Right Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_up_select"), str8_lit_comp("Moves the cursor or selection up, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_down_select"), str8_lit_comp("Moves the cursor or selection down, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_left_chunk"), str8_lit_comp("Moves the cursor or selection left one chunk."), str8_lit_comp(""), str8_lit_comp("Move Left Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_right_chunk"), str8_lit_comp("Moves the cursor or selection right one chunk."), str8_lit_comp(""), str8_lit_comp("Move Right Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_up_chunk"), str8_lit_comp("Moves the cursor or selection up one chunk."), str8_lit_comp(""), str8_lit_comp("Move Up Chunk"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_down_chunk"), str8_lit_comp("Moves the cursor or selection down one chunk."), str8_lit_comp(""), str8_lit_comp("Move Down Chunk"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_up_page"), str8_lit_comp("Moves the cursor or selection up one page."), str8_lit_comp(""), str8_lit_comp("Move Up Page"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_down_page"), str8_lit_comp("Moves the cursor or selection down one page."), str8_lit_comp(""), str8_lit_comp("Move Down Page"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_up_whole"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content."), str8_lit_comp(""), str8_lit_comp("Move Up Whole"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_down_whole"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content."), str8_lit_comp(""), str8_lit_comp("Move Down Whole"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_left_chunk_select"), str8_lit_comp("Moves the cursor or selection left one chunk."), str8_lit_comp(""), str8_lit_comp("Move Left Chunk Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_right_chunk_select"), str8_lit_comp("Moves the cursor or selection right one chunk."), str8_lit_comp(""), str8_lit_comp("Move Right Chunk Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_up_chunk_select"), str8_lit_comp("Moves the cursor or selection up one chunk."), str8_lit_comp(""), str8_lit_comp("Move Up Chunk Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_down_chunk_select"), str8_lit_comp("Moves the cursor or selection down one chunk."), str8_lit_comp(""), str8_lit_comp("Move Down Chunk Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_up_page_select"), str8_lit_comp("Moves the cursor or selection up one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Page Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_down_page_select"), str8_lit_comp("Moves the cursor or selection down one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Page Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_up_whole_select"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Whole Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_down_whole_select"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Whole Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_up_reorder"), str8_lit_comp("Moves the cursor or selection up, while swapping the currently selected element with that upward."), str8_lit_comp(""), str8_lit_comp("Move Up Reorder"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_down_reorder"), str8_lit_comp("Moves the cursor or selection down, while swapping the currently selected element with that downward."), str8_lit_comp(""), str8_lit_comp("Move Down Reorder"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_home"), str8_lit_comp("Moves the cursor to the beginning of the line."), str8_lit_comp(""), str8_lit_comp("Move Home"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_end"), str8_lit_comp("Moves the cursor to the end of the line."), str8_lit_comp(""), str8_lit_comp("Move End"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_home_select"), str8_lit_comp("Moves the cursor to the beginning of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Home Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("move_end_select"), str8_lit_comp("Moves the cursor to the end of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move End Select"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("select_all"), str8_lit_comp("Selects everything possible."), str8_lit_comp(""), str8_lit_comp("Select All"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("delete_single"), str8_lit_comp("Deletes a single element to the right of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Delete Single"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("delete_chunk"), str8_lit_comp("Deletes a chunk to the right of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Delete Chunk"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("backspace_single"), str8_lit_comp("Deletes a single element to the left of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Backspace Single"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("backspace_chunk"), str8_lit_comp("Deletes a chunk to the left of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Backspace Chunk"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("copy"), str8_lit_comp("Copies the active selection to the clipboard."), str8_lit_comp(""), str8_lit_comp("Copy"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Clipboard}, -{ str8_lit_comp("cut"), str8_lit_comp("Copies the active selection to the clipboard, then deletes it."), str8_lit_comp(""), str8_lit_comp("Cut"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Clipboard}, -{ str8_lit_comp("paste"), str8_lit_comp("Pastes the current contents of the clipboard."), str8_lit_comp(""), str8_lit_comp("Paste"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Clipboard}, -{ str8_lit_comp("insert_text"), str8_lit_comp("Inserts the text that was used to cause this command."), str8_lit_comp(""), str8_lit_comp("Insert Text"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("goto_line"), str8_lit_comp("Jumps to a line number in the current code file."), str8_lit_comp(""), str8_lit_comp("Go To Line"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_TextPoint, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, -{ str8_lit_comp("goto_address"), str8_lit_comp("Jumps to an address in the current memory or disassembly view."), str8_lit_comp(""), str8_lit_comp("Go To Address"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_VirtualAddr, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, -{ str8_lit_comp("center_cursor"), str8_lit_comp("Snaps the current code view to center the cursor."), str8_lit_comp(""), str8_lit_comp("Center Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("contain_cursor"), str8_lit_comp("Snaps the current code view to contain the cursor."), str8_lit_comp(""), str8_lit_comp("Contain Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("find_text_forward"), str8_lit_comp("Searches the current code file forward (from the cursor) for a string."), str8_lit_comp(""), str8_lit_comp("Find Text (Forward)"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*1)|(DF_CmdQueryFlag_SelectOldInput*1)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Find}, -{ str8_lit_comp("find_text_backward"), str8_lit_comp("Searches the current code file backwards (from the cursor) for a string."), str8_lit_comp(""), str8_lit_comp("Find Text (Backwards)"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*1)|(DF_CmdQueryFlag_SelectOldInput*1)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Find}, -{ str8_lit_comp("find_next"), str8_lit_comp("Searches the current code file forward (from the cursor) for the last searched string."), str8_lit_comp(""), str8_lit_comp("Find Next"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*1)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, -{ str8_lit_comp("find_prev"), str8_lit_comp("Searches the current code file backwards (from the cursor) for the last searched string."), str8_lit_comp(""), str8_lit_comp("Find Previous"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*1)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, -{ str8_lit_comp("find_thread"), str8_lit_comp("Jumps to the passed thread in either source code, disassembly, or both if they're already open."), str8_lit_comp(""), str8_lit_comp("Find Thread"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Find}, -{ str8_lit_comp("find_selected_thread"), str8_lit_comp("Jumps to the selected thread in either source code, disassembly, or both if they're already open."), str8_lit_comp(""), str8_lit_comp("Find Selected Thread"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, -{ str8_lit_comp("goto_name"), str8_lit_comp("Searches for the passed string as a file, a symbol in debug info, and more, then jumps to it if possible."), str8_lit_comp(""), str8_lit_comp("Go To Name"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, -{ str8_lit_comp("goto_name_at_cursor"), str8_lit_comp("Searches for the text at the cursor as a file, a symbol in debug info, and more, then jumps to it if possible."), str8_lit_comp(""), str8_lit_comp("Go To Name At Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("toggle_watch_expr"), str8_lit_comp("Adds or removes an expression to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("toggle_watch_expr_at_cursor"), str8_lit_comp("Adds or removes the expression that the cursor or selection is currently over to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression At Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("toggle_watch_expr_at_mouse"), str8_lit_comp("Adds or removes the expression that the mouse is currently over to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression At Mouse"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("set_columns"), str8_lit_comp("Sets the number of columns for a memory view."), str8_lit_comp(""), str8_lit_comp("Set Columns"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Index, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Thumbnails}, -{ str8_lit_comp("toggle_address_visibility"), str8_lit_comp("Toggles the visibility of addresses in a disassembly view."), str8_lit_comp(""), str8_lit_comp("Toggle Address Visibility"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Thumbnails}, -{ str8_lit_comp("toggle_code_bytes_visibility"), str8_lit_comp("Toggles the visibility of machine code bytes in a disassembly view."), str8_lit_comp(""), str8_lit_comp("Toggle Code Bytes Visibility"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Thumbnails}, -{ str8_lit_comp("enable_entity"), str8_lit_comp("Enables an entity."), str8_lit_comp(""), str8_lit_comp("Enable Entity"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("disable_entity"), str8_lit_comp("Disables an entity."), str8_lit_comp(""), str8_lit_comp("Disable Entity"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("freeze_entity"), str8_lit_comp("Freezes an entity."), str8_lit_comp(""), str8_lit_comp("Freeze Entity"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("thaw_entity"), str8_lit_comp("Thaws an entity."), str8_lit_comp(""), str8_lit_comp("Thaw Entity"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("remove_entity"), str8_lit_comp("Removes an entity."), str8_lit_comp(""), str8_lit_comp("Remove Entity"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("name_entity"), str8_lit_comp("Equips an entity with a name."), str8_lit_comp(""), str8_lit_comp("Name Entity"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("edit_entity"), str8_lit_comp("Opens the editor for an entity."), str8_lit_comp(""), str8_lit_comp("Edit Entity"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("duplicate_entity"), str8_lit_comp("Duplicates an entity."), str8_lit_comp(""), str8_lit_comp("Duplicate Entity"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("relocate_entity"), str8_lit_comp("Relocates an entity."), str8_lit_comp(""), str8_lit_comp("Relocate Entity"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("add_breakpoint"), str8_lit_comp("Places a breakpoint at a given location (file path and line number, address, or symbol name)."), str8_lit_comp(""), str8_lit_comp("Add Breakpoint"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled}, -{ str8_lit_comp("add_address_breakpoint"), str8_lit_comp("Places a breakpoint on the specified address."), str8_lit_comp(""), str8_lit_comp("Add Address Breakpoint"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_VirtualAddr, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CircleFilled}, -{ str8_lit_comp("add_function_breakpoint"), str8_lit_comp("Places a breakpoint on the first address(es) of the specified function."), str8_lit_comp(""), str8_lit_comp("Add Function Breakpoint"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CircleFilled}, -{ str8_lit_comp("toggle_breakpoint"), str8_lit_comp("Places or removes a breakpoint at a given location (file path and line number, address, or symbol name)."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled}, -{ str8_lit_comp("remove_breakpoint"), str8_lit_comp("Removes an existing breakpoint."), str8_lit_comp(""), str8_lit_comp("Remove Breakpoint"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Breakpoint, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Trash}, -{ str8_lit_comp("enable_breakpoint"), str8_lit_comp("Enables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Enable Breakpoint"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Breakpoint, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckFilled}, -{ str8_lit_comp("disable_breakpoint"), str8_lit_comp("Disables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Disable Breakpoint"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Breakpoint, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckHollow}, -{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("toggle_breakpoint_cursor"), str8_lit_comp("Places or removes a breakpoint on the line on which the active cursor sits."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint At Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled}, -{ str8_lit_comp("toggle_watch_pin_at_cursor"), str8_lit_comp("Places or removes a watch pin at the cursor on the currently active file."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin At Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("add_target"), str8_lit_comp("Adds a new target."), str8_lit_comp("application,executable,debug"), str8_lit_comp("Add Target"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Target}, -{ str8_lit_comp("remove_target"), str8_lit_comp("Removes an existing target."), str8_lit_comp("delete,remove,target"), str8_lit_comp("Remove Target"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Trash}, -{ str8_lit_comp("edit_target"), str8_lit_comp("Edits an existing target."), str8_lit_comp(""), str8_lit_comp("Edit Target"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Pencil}, -{ str8_lit_comp("select_target"), str8_lit_comp("Selects a target."), str8_lit_comp(""), str8_lit_comp("Select Target"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Target}, -{ str8_lit_comp("enable_target"), str8_lit_comp("Enables a target, in addition to all targets currently enabled."), str8_lit_comp(""), str8_lit_comp("Enable Target"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckFilled}, -{ str8_lit_comp("disable_target"), str8_lit_comp("Disables a target."), str8_lit_comp(""), str8_lit_comp("Disable Target"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckHollow}, -{ str8_lit_comp("retry_ended_process"), str8_lit_comp("Launches a new process with the same options as the passed ended process."), str8_lit_comp(""), str8_lit_comp("Retry Ended Process"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("attach"), str8_lit_comp("Attaches to a process that is already running on the local machine."), str8_lit_comp(""), str8_lit_comp("Attach"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_ID, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, -{ str8_lit_comp("register_as_jit_debugger"), str8_lit_comp("Registers the RAD debugger as the just-in-time (JIT) debugger used by the operating system."), str8_lit_comp(""), str8_lit_comp("Register As Just-In-Time (JIT) Debugger"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("entity_ref_fast_path"), str8_lit_comp("Activates the default behavior when clicking an entity reference."), str8_lit_comp(""), str8_lit_comp("Entity Reference Fast Path"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("spawn_entity_view"), str8_lit_comp("Spawns a new view, given an entity and other parameterizations."), str8_lit_comp(""), str8_lit_comp("Spawn Entity View"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("find_code_location"), str8_lit_comp("Finds a specific source code location given file, line, and column coordinates. Opens the file if necessary."), str8_lit_comp(""), str8_lit_comp("Find Code Location"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline}, -{ str8_lit_comp("filter"), str8_lit_comp("Begins filtering the active view."), str8_lit_comp("sort,search,filter,find"), str8_lit_comp("Filter"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, -{ str8_lit_comp("apply_filter"), str8_lit_comp("Applies the typed filter to the active view."), str8_lit_comp("sort,search,filter,find,apply"), str8_lit_comp("Apply Filter"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, -{ str8_lit_comp("clear_filter"), str8_lit_comp("Clears the filter applied to the active view."), str8_lit_comp("sort,search,filter,find,clear"), str8_lit_comp("Clear Filter"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find}, -{ str8_lit_comp("getting_started"), str8_lit_comp("Opens the menu for information on getting started."), str8_lit_comp("tutorial,help"), str8_lit_comp("Getting Started"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_QuestionMark}, -{ str8_lit_comp("commands"), str8_lit_comp("Opens the list of all commands."), str8_lit_comp(""), str8_lit_comp("Commands"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_List}, -{ str8_lit_comp("target"), str8_lit_comp("Opens the editor for a target."), str8_lit_comp(""), str8_lit_comp("Target"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Target}, -{ str8_lit_comp("targets"), str8_lit_comp("Opens the list of all targets."), str8_lit_comp(""), str8_lit_comp("Targets"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Target}, -{ str8_lit_comp("file_path_map"), str8_lit_comp("Opens the file path mapping editor."), str8_lit_comp(""), str8_lit_comp("File Path Map"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline}, -{ str8_lit_comp("auto_view_rules"), str8_lit_comp("Opens the auto view rule editor."), str8_lit_comp(""), str8_lit_comp("Auto View Rules"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("breakpoints"), str8_lit_comp("Opens the breakpoints view."), str8_lit_comp(""), str8_lit_comp("Breakpoints"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled}, -{ str8_lit_comp("watch_pins"), str8_lit_comp("Opens the watch pins view."), str8_lit_comp(""), str8_lit_comp("Watch Pins"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Pin}, -{ str8_lit_comp("scheduler"), str8_lit_comp("Opens the scheduler view, for process and thread controls."), str8_lit_comp("threads,processes,targets"), str8_lit_comp("Scheduler"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Scheduler}, -{ str8_lit_comp("call_stack"), str8_lit_comp("Opens the call stack view."), str8_lit_comp("callstack,thread,unwind"), str8_lit_comp("Call Stack"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Thread}, -{ str8_lit_comp("modules"), str8_lit_comp("Opens the modules view."), str8_lit_comp(""), str8_lit_comp("Modules"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Module}, -{ str8_lit_comp("watch"), str8_lit_comp("Opens a watch view."), str8_lit_comp(""), str8_lit_comp("Watch"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("locals"), str8_lit_comp("Opens a locals view."), str8_lit_comp(""), str8_lit_comp("Locals"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("registers"), str8_lit_comp("Opens a registers view."), str8_lit_comp(""), str8_lit_comp("Registers"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("globals"), str8_lit_comp("Opens a globals view."), str8_lit_comp(""), str8_lit_comp("Globals"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("thread_locals"), str8_lit_comp("Opens a thread locals view."), str8_lit_comp(""), str8_lit_comp("Thread Locals"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("types"), str8_lit_comp("Opens a types view."), str8_lit_comp(""), str8_lit_comp("Types"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("procedures"), str8_lit_comp("Opens a procedures view."), str8_lit_comp(""), str8_lit_comp("Procedures"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars}, -{ str8_lit_comp("pending_file"), str8_lit_comp("Opens a view which asynchronously analyzes the file path parameter, then picks an appropriate viewer for it."), str8_lit_comp(""), str8_lit_comp("Pending File"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline}, -{ str8_lit_comp("disassembly"), str8_lit_comp("Opens the disassembly view."), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Glasses}, -{ str8_lit_comp("output"), str8_lit_comp("Opens an output view."), str8_lit_comp(""), str8_lit_comp("Output"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_List}, -{ str8_lit_comp("memory"), str8_lit_comp("Opens a memory view."), str8_lit_comp(""), str8_lit_comp("Memory"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Grid}, -{ str8_lit_comp("exception_filters"), str8_lit_comp("Opens the exception filters view."), str8_lit_comp("exceptions,filters"), str8_lit_comp("Exception Filters"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Gear}, -{ str8_lit_comp("settings"), str8_lit_comp("Opens the settings view."), str8_lit_comp("theme,color,scheme,options"), str8_lit_comp("Settings"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Gear}, -{ str8_lit_comp("pick_file"), str8_lit_comp("Opens the file browser to pick a file."), str8_lit_comp(""), str8_lit_comp("Pick File"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline}, -{ str8_lit_comp("pick_folder"), str8_lit_comp("Opens the file browser to pick a folder."), str8_lit_comp(""), str8_lit_comp("Pick Folder"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*1)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FolderOpenFilled}, -{ str8_lit_comp("pick_file_or_folder"), str8_lit_comp("Opens the file browser to pick a file or folder."), str8_lit_comp(""), str8_lit_comp("Pick File/Folder"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*1)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline}, -{ str8_lit_comp("complete_query"), str8_lit_comp("Completes a query."), str8_lit_comp(""), str8_lit_comp("Complete Query"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("cancel_query"), str8_lit_comp("Cancels a query."), str8_lit_comp(""), str8_lit_comp("Cancel Query"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("toggle_dev_menu"), str8_lit_comp("Opens and closes the developer menu."), str8_lit_comp(""), str8_lit_comp("Toggle Developer Menu"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("log_marker"), str8_lit_comp("Logs a marker in the application log, to denote specific points in time within the log."), str8_lit_comp(""), str8_lit_comp("Log Marker"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -}; - -DF_CoreViewRuleSpecInfo df_g_core_view_rule_spec_info_table[21] = -{ -{str8_lit_comp("default"), str8_lit_comp("Default"), str8_lit_comp(""), str8_lit_comp(""), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(default) , }, -{str8_lit_comp("array"), str8_lit_comp("Array"), str8_lit_comp("x:{expr}"), str8_lit_comp("Specifies that a pointer points to N elements, rather than only 1."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(array) , 0, }, -{str8_lit_comp("slice"), str8_lit_comp("Slice"), str8_lit_comp(""), str8_lit_comp("Specifies that a pointer within a struct, also containing an integer, points to the number of elements encoded by the integer."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(slice) , 0, }, -{str8_lit_comp("list"), str8_lit_comp("List"), str8_lit_comp("x:{member}"), str8_lit_comp("Specifies that some struct, union, or class forms the top of a linked list, and the member which points at the following element in the list."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(list) , }, -{str8_lit_comp("bswap"), str8_lit_comp("Byte Swap"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should be byte-swapped, such that their endianness is reversed."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(bswap) , 0, }, -{str8_lit_comp("cast"), str8_lit_comp("Cast"), str8_lit_comp("x:{type}"), str8_lit_comp("Specifies that the expression to which the view rule is applied should be casted to the provided type."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(cast) , 0, }, -{str8_lit_comp("dec"), str8_lit_comp("Decimal Base (Base 10)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-10 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, -{str8_lit_comp("bin"), str8_lit_comp("Binary Base (Base 2)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-2 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, -{str8_lit_comp("oct"), str8_lit_comp("Octal Base (Base 8)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-8 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, -{str8_lit_comp("hex"), str8_lit_comp("Hexadecimal Base (Base 16)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-16 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, -{str8_lit_comp("only"), str8_lit_comp("Only Specified Members"), str8_lit_comp("x:{member}"), str8_lit_comp("Specifies that only the specified members should appear in struct, union, or class evaluations."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(only) , }, -{str8_lit_comp("omit"), str8_lit_comp("Omit Specified Members"), str8_lit_comp("x:{member}"), str8_lit_comp("Omits a list of member names from appearing in struct, union, or class evaluations."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(omit) , }, -{str8_lit_comp("no_addr"), str8_lit_comp("Disable Address Values"), str8_lit_comp(""), str8_lit_comp("Displays only what pointers point to, if possible, without the pointer's address value."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, -{str8_lit_comp("checkbox"), str8_lit_comp("Checkbox"), str8_lit_comp(""), str8_lit_comp("Displays simple integer values as checkboxes, encoding zero or nonzero values."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, -{str8_lit_comp("color_rgba"), str8_lit_comp("Color (RGBA)"), str8_lit_comp(""), str8_lit_comp("Displays as a color, interpreting the data as encoding R, G, B, and A values."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(color_rgba) , }, -{str8_lit_comp("text"), str8_lit_comp("Text"), str8_lit_comp("x:{'lang':lang, 'size':expr}"), str8_lit_comp("Displays as text."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(text) , }, -{str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), str8_lit_comp("x:{'arch':arch, 'size':expr}"), str8_lit_comp("Displays as disassembled instructions, interpreting the data as raw machine code."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(disasm) , }, -{str8_lit_comp("memory"), str8_lit_comp("Memory"), str8_lit_comp("x:{'size':expr}"), str8_lit_comp("Displays as a raw memory grid."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(memory) , }, -{str8_lit_comp("graph"), str8_lit_comp("Graph"), str8_lit_comp(""), str8_lit_comp("Displays as a pointer graph, visualizing nodes and edges formed by pointers directly."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(graph) , }, -{str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), str8_lit_comp("x:{'w':expr, 'h':expr, 'fmt':tex2dformat}"), str8_lit_comp("Displays as a bitmap, interpreting the data as raw pixel data."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(bitmap) , }, -{str8_lit_comp("geo3d"), str8_lit_comp("Geometry (3D)"), str8_lit_comp("x:{'count':expr, 'vtx':expr, 'vtx_size':expr}"), str8_lit_comp("Displays as geometry, interpreting the data as index or vertex data."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_ExprResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(geo3d) , }, -}; - -String8 df_g_icon_kind_text_table[69] = -{ -str8_lit_comp(""), -str8_lit_comp("b"), -str8_lit_comp("c"), -str8_lit_comp("B"), -str8_lit_comp("C"), -str8_lit_comp("f"), -str8_lit_comp("F"), -str8_lit_comp("g"), -str8_lit_comp("h"), -str8_lit_comp("r"), -str8_lit_comp("s"), -str8_lit_comp("i"), -str8_lit_comp("w"), -str8_lit_comp("W"), -str8_lit_comp("k"), -str8_lit_comp("K"), -str8_lit_comp("L"), -str8_lit_comp("R"), -str8_lit_comp("U"), -str8_lit_comp("D"), -str8_lit_comp("G"), -str8_lit_comp("P"), -str8_lit_comp("3"), -str8_lit_comp("p"), -str8_lit_comp("O"), -str8_lit_comp("o"), -str8_lit_comp("!"), -str8_lit_comp("1"), -str8_lit_comp("<"), -str8_lit_comp(">"), -str8_lit_comp("^"), -str8_lit_comp("v"), -str8_lit_comp("9"), -str8_lit_comp("0"), -str8_lit_comp("7"), -str8_lit_comp("8"), -str8_lit_comp("+"), -str8_lit_comp("-"), -str8_lit_comp("'"), -str8_lit_comp("\""), -str8_lit_comp("M"), -str8_lit_comp("."), -str8_lit_comp("x"), -str8_lit_comp("q"), -str8_lit_comp("j"), -str8_lit_comp("u"), -str8_lit_comp("m"), -str8_lit_comp("n"), -str8_lit_comp("l"), -str8_lit_comp("a"), -str8_lit_comp("z"), -str8_lit_comp("y"), -str8_lit_comp("X"), -str8_lit_comp("Y"), -str8_lit_comp("S"), -str8_lit_comp("T"), -str8_lit_comp("Z"), -str8_lit_comp("d"), -str8_lit_comp("N"), -str8_lit_comp("E"), -str8_lit_comp("H"), -str8_lit_comp("e"), -str8_lit_comp("I"), -str8_lit_comp("J"), -str8_lit_comp("A"), -str8_lit_comp("?"), -str8_lit_comp("4"), -str8_lit_comp("5"), -str8_lit_comp("c"), -}; - -C_LINKAGE_END - diff --git a/src/df/core/generated/df_core.meta.h b/src/df/core/generated/df_core.meta.h deleted file mode 100644 index a1d567d3..00000000 --- a/src/df/core/generated/df_core.meta.h +++ /dev/null @@ -1,489 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -//- GENERATED CODE - -#ifndef DF_CORE_META_H -#define DF_CORE_META_H - -typedef enum DF_CfgSrc -{ -DF_CfgSrc_User, -DF_CfgSrc_Project, -DF_CfgSrc_CommandLine, -DF_CfgSrc_Transient, -DF_CfgSrc_COUNT, -} DF_CfgSrc; - -typedef enum DF_EntityKind -{ -DF_EntityKind_Nil, -DF_EntityKind_Root, -DF_EntityKind_Machine, -DF_EntityKind_File, -DF_EntityKind_AutoViewRule, -DF_EntityKind_FilePathMap, -DF_EntityKind_WatchPin, -DF_EntityKind_Watch, -DF_EntityKind_ViewRule, -DF_EntityKind_Breakpoint, -DF_EntityKind_Condition, -DF_EntityKind_Location, -DF_EntityKind_Target, -DF_EntityKind_Executable, -DF_EntityKind_Arguments, -DF_EntityKind_WorkingDirectory, -DF_EntityKind_EntryPoint, -DF_EntityKind_RecentProject, -DF_EntityKind_Source, -DF_EntityKind_Dest, -DF_EntityKind_Process, -DF_EntityKind_Thread, -DF_EntityKind_Module, -DF_EntityKind_PendingThreadName, -DF_EntityKind_DebugInfoPath, -DF_EntityKind_ConversionTask, -DF_EntityKind_ConversionFail, -DF_EntityKind_EndedProcess, -DF_EntityKind_COUNT, -} DF_EntityKind; - -typedef enum DF_CoreCmdKind -{ -DF_CoreCmdKind_Null, -DF_CoreCmdKind_Exit, -DF_CoreCmdKind_RunCommand, -DF_CoreCmdKind_Error, -DF_CoreCmdKind_OSEvent, -DF_CoreCmdKind_LaunchAndRun, -DF_CoreCmdKind_LaunchAndInit, -DF_CoreCmdKind_Kill, -DF_CoreCmdKind_KillAll, -DF_CoreCmdKind_Detach, -DF_CoreCmdKind_Continue, -DF_CoreCmdKind_StepIntoInst, -DF_CoreCmdKind_StepOverInst, -DF_CoreCmdKind_StepIntoLine, -DF_CoreCmdKind_StepOverLine, -DF_CoreCmdKind_StepOut, -DF_CoreCmdKind_Halt, -DF_CoreCmdKind_SoftHaltRefresh, -DF_CoreCmdKind_SetThreadIP, -DF_CoreCmdKind_RunToLine, -DF_CoreCmdKind_RunToAddress, -DF_CoreCmdKind_Run, -DF_CoreCmdKind_Restart, -DF_CoreCmdKind_StepInto, -DF_CoreCmdKind_StepOver, -DF_CoreCmdKind_RunToCursor, -DF_CoreCmdKind_SetNextStatement, -DF_CoreCmdKind_SelectThread, -DF_CoreCmdKind_SelectUnwind, -DF_CoreCmdKind_UpOneFrame, -DF_CoreCmdKind_DownOneFrame, -DF_CoreCmdKind_FreezeThread, -DF_CoreCmdKind_ThawThread, -DF_CoreCmdKind_FreezeProcess, -DF_CoreCmdKind_ThawProcess, -DF_CoreCmdKind_FreezeMachine, -DF_CoreCmdKind_ThawMachine, -DF_CoreCmdKind_FreezeLocalMachine, -DF_CoreCmdKind_ThawLocalMachine, -DF_CoreCmdKind_IncUIFontScale, -DF_CoreCmdKind_DecUIFontScale, -DF_CoreCmdKind_IncCodeFontScale, -DF_CoreCmdKind_DecCodeFontScale, -DF_CoreCmdKind_OpenWindow, -DF_CoreCmdKind_CloseWindow, -DF_CoreCmdKind_ToggleFullscreen, -DF_CoreCmdKind_ConfirmAccept, -DF_CoreCmdKind_ConfirmCancel, -DF_CoreCmdKind_ResetToDefaultPanels, -DF_CoreCmdKind_ResetToCompactPanels, -DF_CoreCmdKind_NewPanelLeft, -DF_CoreCmdKind_NewPanelUp, -DF_CoreCmdKind_NewPanelRight, -DF_CoreCmdKind_NewPanelDown, -DF_CoreCmdKind_SplitPanel, -DF_CoreCmdKind_RotatePanelColumns, -DF_CoreCmdKind_NextPanel, -DF_CoreCmdKind_PrevPanel, -DF_CoreCmdKind_FocusPanel, -DF_CoreCmdKind_FocusPanelRight, -DF_CoreCmdKind_FocusPanelLeft, -DF_CoreCmdKind_FocusPanelUp, -DF_CoreCmdKind_FocusPanelDown, -DF_CoreCmdKind_Undo, -DF_CoreCmdKind_Redo, -DF_CoreCmdKind_GoBack, -DF_CoreCmdKind_GoForward, -DF_CoreCmdKind_ClosePanel, -DF_CoreCmdKind_NextTab, -DF_CoreCmdKind_PrevTab, -DF_CoreCmdKind_MoveTabRight, -DF_CoreCmdKind_MoveTabLeft, -DF_CoreCmdKind_OpenTab, -DF_CoreCmdKind_CloseTab, -DF_CoreCmdKind_MoveTab, -DF_CoreCmdKind_TabBarTop, -DF_CoreCmdKind_TabBarBottom, -DF_CoreCmdKind_SetCurrentPath, -DF_CoreCmdKind_Open, -DF_CoreCmdKind_Switch, -DF_CoreCmdKind_SwitchToPartnerFile, -DF_CoreCmdKind_GoToDisassembly, -DF_CoreCmdKind_GoToSource, -DF_CoreCmdKind_SetFileOverrideLinkSrc, -DF_CoreCmdKind_SetFileOverrideLinkDst, -DF_CoreCmdKind_SetFileReplacementPath, -DF_CoreCmdKind_SetAutoViewRuleType, -DF_CoreCmdKind_SetAutoViewRuleViewRule, -DF_CoreCmdKind_OpenUser, -DF_CoreCmdKind_OpenProject, -DF_CoreCmdKind_OpenRecentProject, -DF_CoreCmdKind_ApplyUserData, -DF_CoreCmdKind_ApplyProjectData, -DF_CoreCmdKind_WriteUserData, -DF_CoreCmdKind_WriteProjectData, -DF_CoreCmdKind_Edit, -DF_CoreCmdKind_Accept, -DF_CoreCmdKind_Cancel, -DF_CoreCmdKind_MoveLeft, -DF_CoreCmdKind_MoveRight, -DF_CoreCmdKind_MoveUp, -DF_CoreCmdKind_MoveDown, -DF_CoreCmdKind_MoveLeftSelect, -DF_CoreCmdKind_MoveRightSelect, -DF_CoreCmdKind_MoveUpSelect, -DF_CoreCmdKind_MoveDownSelect, -DF_CoreCmdKind_MoveLeftChunk, -DF_CoreCmdKind_MoveRightChunk, -DF_CoreCmdKind_MoveUpChunk, -DF_CoreCmdKind_MoveDownChunk, -DF_CoreCmdKind_MoveUpPage, -DF_CoreCmdKind_MoveDownPage, -DF_CoreCmdKind_MoveUpWhole, -DF_CoreCmdKind_MoveDownWhole, -DF_CoreCmdKind_MoveLeftChunkSelect, -DF_CoreCmdKind_MoveRightChunkSelect, -DF_CoreCmdKind_MoveUpChunkSelect, -DF_CoreCmdKind_MoveDownChunkSelect, -DF_CoreCmdKind_MoveUpPageSelect, -DF_CoreCmdKind_MoveDownPageSelect, -DF_CoreCmdKind_MoveUpWholeSelect, -DF_CoreCmdKind_MoveDownWholeSelect, -DF_CoreCmdKind_MoveUpReorder, -DF_CoreCmdKind_MoveDownReorder, -DF_CoreCmdKind_MoveHome, -DF_CoreCmdKind_MoveEnd, -DF_CoreCmdKind_MoveHomeSelect, -DF_CoreCmdKind_MoveEndSelect, -DF_CoreCmdKind_SelectAll, -DF_CoreCmdKind_DeleteSingle, -DF_CoreCmdKind_DeleteChunk, -DF_CoreCmdKind_BackspaceSingle, -DF_CoreCmdKind_BackspaceChunk, -DF_CoreCmdKind_Copy, -DF_CoreCmdKind_Cut, -DF_CoreCmdKind_Paste, -DF_CoreCmdKind_InsertText, -DF_CoreCmdKind_GoToLine, -DF_CoreCmdKind_GoToAddress, -DF_CoreCmdKind_CenterCursor, -DF_CoreCmdKind_ContainCursor, -DF_CoreCmdKind_FindTextForward, -DF_CoreCmdKind_FindTextBackward, -DF_CoreCmdKind_FindNext, -DF_CoreCmdKind_FindPrev, -DF_CoreCmdKind_FindThread, -DF_CoreCmdKind_FindSelectedThread, -DF_CoreCmdKind_GoToName, -DF_CoreCmdKind_GoToNameAtCursor, -DF_CoreCmdKind_ToggleWatchExpression, -DF_CoreCmdKind_ToggleWatchExpressionAtCursor, -DF_CoreCmdKind_ToggleWatchExpressionAtMouse, -DF_CoreCmdKind_SetColumns, -DF_CoreCmdKind_ToggleAddressVisibility, -DF_CoreCmdKind_ToggleCodeBytesVisibility, -DF_CoreCmdKind_EnableEntity, -DF_CoreCmdKind_DisableEntity, -DF_CoreCmdKind_FreezeEntity, -DF_CoreCmdKind_ThawEntity, -DF_CoreCmdKind_RemoveEntity, -DF_CoreCmdKind_NameEntity, -DF_CoreCmdKind_EditEntity, -DF_CoreCmdKind_DuplicateEntity, -DF_CoreCmdKind_RelocateEntity, -DF_CoreCmdKind_AddBreakpoint, -DF_CoreCmdKind_AddAddressBreakpoint, -DF_CoreCmdKind_AddFunctionBreakpoint, -DF_CoreCmdKind_ToggleBreakpoint, -DF_CoreCmdKind_RemoveBreakpoint, -DF_CoreCmdKind_EnableBreakpoint, -DF_CoreCmdKind_DisableBreakpoint, -DF_CoreCmdKind_AddWatchPin, -DF_CoreCmdKind_ToggleWatchPin, -DF_CoreCmdKind_ToggleBreakpointAtCursor, -DF_CoreCmdKind_ToggleWatchPinAtCursor, -DF_CoreCmdKind_AddTarget, -DF_CoreCmdKind_RemoveTarget, -DF_CoreCmdKind_EditTarget, -DF_CoreCmdKind_SelectTarget, -DF_CoreCmdKind_EnableTarget, -DF_CoreCmdKind_DisableTarget, -DF_CoreCmdKind_RetryEndedProcess, -DF_CoreCmdKind_Attach, -DF_CoreCmdKind_RegisterAsJITDebugger, -DF_CoreCmdKind_EntityRefFastPath, -DF_CoreCmdKind_SpawnEntityView, -DF_CoreCmdKind_FindCodeLocation, -DF_CoreCmdKind_Filter, -DF_CoreCmdKind_ApplyFilter, -DF_CoreCmdKind_ClearFilter, -DF_CoreCmdKind_GettingStarted, -DF_CoreCmdKind_Commands, -DF_CoreCmdKind_Target, -DF_CoreCmdKind_Targets, -DF_CoreCmdKind_FilePathMap, -DF_CoreCmdKind_AutoViewRules, -DF_CoreCmdKind_Breakpoints, -DF_CoreCmdKind_WatchPins, -DF_CoreCmdKind_Scheduler, -DF_CoreCmdKind_CallStack, -DF_CoreCmdKind_Modules, -DF_CoreCmdKind_Watch, -DF_CoreCmdKind_Locals, -DF_CoreCmdKind_Registers, -DF_CoreCmdKind_Globals, -DF_CoreCmdKind_ThreadLocals, -DF_CoreCmdKind_Types, -DF_CoreCmdKind_Procedures, -DF_CoreCmdKind_PendingFile, -DF_CoreCmdKind_Disassembly, -DF_CoreCmdKind_Output, -DF_CoreCmdKind_Memory, -DF_CoreCmdKind_ExceptionFilters, -DF_CoreCmdKind_Settings, -DF_CoreCmdKind_PickFile, -DF_CoreCmdKind_PickFolder, -DF_CoreCmdKind_PickFileOrFolder, -DF_CoreCmdKind_CompleteQuery, -DF_CoreCmdKind_CancelQuery, -DF_CoreCmdKind_ToggleDevMenu, -DF_CoreCmdKind_LogMarker, -DF_CoreCmdKind_COUNT, -} DF_CoreCmdKind; - -typedef enum DF_IconKind -{ -DF_IconKind_Null, -DF_IconKind_FolderOpenOutline, -DF_IconKind_FolderClosedOutline, -DF_IconKind_FolderOpenFilled, -DF_IconKind_FolderClosedFilled, -DF_IconKind_FileOutline, -DF_IconKind_FileFilled, -DF_IconKind_Play, -DF_IconKind_PlayStepForward, -DF_IconKind_Pause, -DF_IconKind_Stop, -DF_IconKind_Info, -DF_IconKind_WarningSmall, -DF_IconKind_WarningBig, -DF_IconKind_Unlocked, -DF_IconKind_Locked, -DF_IconKind_LeftArrow, -DF_IconKind_RightArrow, -DF_IconKind_UpArrow, -DF_IconKind_DownArrow, -DF_IconKind_Gear, -DF_IconKind_Pencil, -DF_IconKind_Trash, -DF_IconKind_Pin, -DF_IconKind_RadioHollow, -DF_IconKind_RadioFilled, -DF_IconKind_CheckHollow, -DF_IconKind_CheckFilled, -DF_IconKind_LeftCaret, -DF_IconKind_RightCaret, -DF_IconKind_UpCaret, -DF_IconKind_DownCaret, -DF_IconKind_UpScroll, -DF_IconKind_DownScroll, -DF_IconKind_LeftScroll, -DF_IconKind_RightScroll, -DF_IconKind_Add, -DF_IconKind_Minus, -DF_IconKind_Thread, -DF_IconKind_Threads, -DF_IconKind_Machine, -DF_IconKind_CircleFilled, -DF_IconKind_X, -DF_IconKind_Refresh, -DF_IconKind_Undo, -DF_IconKind_Redo, -DF_IconKind_Save, -DF_IconKind_Window, -DF_IconKind_Target, -DF_IconKind_Clipboard, -DF_IconKind_Scheduler, -DF_IconKind_Module, -DF_IconKind_XSplit, -DF_IconKind_YSplit, -DF_IconKind_ClosePanel, -DF_IconKind_StepInto, -DF_IconKind_StepOver, -DF_IconKind_StepOut, -DF_IconKind_Find, -DF_IconKind_Palette, -DF_IconKind_Thumbnails, -DF_IconKind_Glasses, -DF_IconKind_Binoculars, -DF_IconKind_List, -DF_IconKind_Grid, -DF_IconKind_QuestionMark, -DF_IconKind_Person, -DF_IconKind_Briefcase, -DF_IconKind_Dot, -DF_IconKind_COUNT, -} DF_IconKind; - -typedef enum DF_CoreViewRuleKind -{ -DF_CoreViewRuleKind_Default, -DF_CoreViewRuleKind_Array, -DF_CoreViewRuleKind_Slice, -DF_CoreViewRuleKind_List, -DF_CoreViewRuleKind_ByteSwap, -DF_CoreViewRuleKind_Cast, -DF_CoreViewRuleKind_BaseDec, -DF_CoreViewRuleKind_BaseBin, -DF_CoreViewRuleKind_BaseOct, -DF_CoreViewRuleKind_BaseHex, -DF_CoreViewRuleKind_Only, -DF_CoreViewRuleKind_Omit, -DF_CoreViewRuleKind_NoAddr, -DF_CoreViewRuleKind_Checkbox, -DF_CoreViewRuleKind_ColorRGBA, -DF_CoreViewRuleKind_Text, -DF_CoreViewRuleKind_Disasm, -DF_CoreViewRuleKind_Memory, -DF_CoreViewRuleKind_Graph, -DF_CoreViewRuleKind_Bitmap, -DF_CoreViewRuleKind_Geo3D, -DF_CoreViewRuleKind_COUNT, -} DF_CoreViewRuleKind; - -typedef enum DF_CmdParamSlot -{ -DF_CmdParamSlot_Null, -DF_CmdParamSlot_Window, -DF_CmdParamSlot_Panel, -DF_CmdParamSlot_DestPanel, -DF_CmdParamSlot_PrevView, -DF_CmdParamSlot_View, -DF_CmdParamSlot_Entity, -DF_CmdParamSlot_EntityList, -DF_CmdParamSlot_String, -DF_CmdParamSlot_FilePath, -DF_CmdParamSlot_TextPoint, -DF_CmdParamSlot_CmdSpec, -DF_CmdParamSlot_ViewSpec, -DF_CmdParamSlot_ParamsTree, -DF_CmdParamSlot_OSEvent, -DF_CmdParamSlot_VirtualAddr, -DF_CmdParamSlot_VirtualOff, -DF_CmdParamSlot_Index, -DF_CmdParamSlot_ID, -DF_CmdParamSlot_PreferDisassembly, -DF_CmdParamSlot_ForceConfirm, -DF_CmdParamSlot_Dir2, -DF_CmdParamSlot_UnwindIndex, -DF_CmdParamSlot_InlineDepth, -DF_CmdParamSlot_COUNT, -} DF_CmdParamSlot; - -typedef struct DF_CmdParams DF_CmdParams; -struct DF_CmdParams -{ -U64 slot_props[(DF_CmdParamSlot_COUNT + 63) / 64]; -DF_Handle window; -DF_Handle panel; -DF_Handle dest_panel; -DF_Handle prev_view; -DF_Handle view; -DF_Handle entity; -DF_HandleList entity_list; -String8 string; -String8 file_path; -TxtPt text_point; -struct DF_CmdSpec * cmd_spec; -struct DF_ViewSpec * view_spec; -MD_Node * params_tree; -struct OS_Event * os_event; -U64 vaddr; -U64 voff; -U64 index; -U64 id; -B32 prefer_dasm; -B32 force_confirm; -Dir2 dir2; -U64 unwind_index; -U64 inline_depth; -}; - -DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(array); -DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(slice); -DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(bswap); -DF_CORE_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(cast); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(list); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(only); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(omit); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(color_rgba); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(text); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(disasm); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(memory); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(graph); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(bitmap); -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(geo3d); -global B32 DEV_telemetry_capture = 0; -global B32 DEV_simulate_lag = 0; -global B32 DEV_draw_ui_text_pos = 0; -global B32 DEV_draw_ui_focus_debug = 0; -global B32 DEV_draw_ui_box_heatmap = 0; -global B32 DEV_eval_compiler_tooltips = 0; -global B32 DEV_eval_watch_key_tooltips = 0; -global B32 DEV_cmd_context_tooltips = 0; -global B32 DEV_scratch_mouse_draw = 0; -global B32 DEV_updating_indicator = 0; -struct {B32 *value_ptr; String8 name;} DEV_toggle_table[] = -{ -{&DEV_telemetry_capture, str8_lit_comp("telemetry_capture")}, -{&DEV_simulate_lag, str8_lit_comp("simulate_lag")}, -{&DEV_draw_ui_text_pos, str8_lit_comp("draw_ui_text_pos")}, -{&DEV_draw_ui_focus_debug, str8_lit_comp("draw_ui_focus_debug")}, -{&DEV_draw_ui_box_heatmap, str8_lit_comp("draw_ui_box_heatmap")}, -{&DEV_eval_compiler_tooltips, str8_lit_comp("eval_compiler_tooltips")}, -{&DEV_eval_watch_key_tooltips, str8_lit_comp("eval_watch_key_tooltips")}, -{&DEV_cmd_context_tooltips, str8_lit_comp("cmd_context_tooltips")}, -{&DEV_scratch_mouse_draw, str8_lit_comp("scratch_mouse_draw")}, -{&DEV_updating_indicator, str8_lit_comp("updating_indicator")}, -}; -C_LINKAGE_BEGIN -extern Rng1U64 df_g_cmd_param_slot_range_table[24]; -extern DF_IconKind df_g_entity_kind_icon_kind_table[28]; -extern String8 df_g_entity_kind_display_string_table[28]; -extern String8 df_g_entity_kind_name_lower_table[28]; -extern String8 df_g_entity_kind_name_lower_plural_table[28]; -extern String8 df_g_entity_kind_name_label_table[28]; -extern DF_EntityKindFlags df_g_entity_kind_flags_table[28]; -extern String8 df_g_cfg_src_string_table[4]; -extern DF_CoreCmdKind df_g_cfg_src_load_cmd_kind_table[4]; -extern DF_CoreCmdKind df_g_cfg_src_write_cmd_kind_table[4]; -extern DF_CoreCmdKind df_g_cfg_src_apply_cmd_kind_table[4]; -extern String8 df_g_icon_kind_text_table[69]; - -C_LINKAGE_END - -#endif // DF_CORE_META_H diff --git a/src/df/df_inc.c b/src/df/df_inc.c deleted file mode 100644 index f81c032d..00000000 --- a/src/df/df_inc.c +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -#include "df/core/df_core.c" -#include "df/gfx/df_gfx.c" -#include "df/gfx/df_views.c" -#include "df/gfx/df_view_rules.c" diff --git a/src/df/df_inc.h b/src/df/df_inc.h deleted file mode 100644 index edbb7d3e..00000000 --- a/src/df/df_inc.h +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -#ifndef DEBUG_FRONTEND_INC_H -#define DEBUG_FRONTEND_INC_H - -#include "df/core/df_core.h" -#include "df/gfx/df_gfx.h" -#include "df/gfx/df_views.h" -#include "df/gfx/df_view_rules.h" - -#endif // DEBUG_FRONTEND_INC_H diff --git a/src/draw/draw.c b/src/draw/draw.c index 8ea35c3e..c09e375f 100644 --- a/src/draw/draw.c +++ b/src/draw/draw.c @@ -4,24 +4,24 @@ //////////////////////////////// //~ rjf: Generated Code -#define D_StackPushImpl(name_upper, name_lower, type, val) \ -D_Bucket *bucket = d_top_bucket();\ +#define DR_StackPushImpl(name_upper, name_lower, type, val) \ +DR_Bucket *bucket = dr_top_bucket();\ type old_val = bucket->top_##name_lower->v;\ -D_##name_upper##Node *node = push_array(d_thread_ctx->arena, D_##name_upper##Node, 1);\ +DR_##name_upper##Node *node = push_array(dr_thread_ctx->arena, DR_##name_upper##Node, 1);\ node->v = (val);\ SLLStackPush(bucket->top_##name_lower, node);\ bucket->stack_gen += 1;\ return old_val -#define D_StackPopImpl(name_upper, name_lower, type) \ -D_Bucket *bucket = d_top_bucket();\ +#define DR_StackPopImpl(name_upper, name_lower, type) \ +DR_Bucket *bucket = dr_top_bucket();\ type popped_val = bucket->top_##name_lower->v;\ SLLStackPop(bucket->top_##name_lower);\ bucket->stack_gen += 1;\ return popped_val -#define D_StackTopImpl(name_upper, name_lower, type) \ -D_Bucket *bucket = d_top_bucket();\ +#define DR_StackTopImpl(name_upper, name_lower, type) \ +DR_Bucket *bucket = dr_top_bucket();\ type top_val = bucket->top_##name_lower->v;\ return top_val @@ -31,7 +31,7 @@ return top_val //~ rjf: Basic Helpers internal U64 -d_hash_from_string(String8 string) +dr_hash_from_string(String8 string) { U64 result = 5381; for(U64 i = 0; i < string.size; i += 1) @@ -45,9 +45,9 @@ d_hash_from_string(String8 string) //~ rjf: Fancy String Type Functions internal void -d_fancy_string_list_push(Arena *arena, D_FancyStringList *list, D_FancyString *str) +dr_fancy_string_list_push(Arena *arena, DR_FancyStringList *list, DR_FancyString *str) { - D_FancyStringNode *n = push_array_no_zero(arena, D_FancyStringNode, 1); + DR_FancyStringNode *n = push_array_no_zero(arena, DR_FancyStringNode, 1); MemoryCopyStruct(&n->v, str); SLLQueuePush(list->first, list->last, n); list->node_count += 1; @@ -55,7 +55,7 @@ d_fancy_string_list_push(Arena *arena, D_FancyStringList *list, D_FancyString *s } internal void -d_fancy_string_list_concat_in_place(D_FancyStringList *dst, D_FancyStringList *to_push) +dr_fancy_string_list_concat_in_place(DR_FancyStringList *dst, DR_FancyStringList *to_push) { if(dst->last != 0 && to_push->first != 0) { @@ -72,13 +72,13 @@ d_fancy_string_list_concat_in_place(D_FancyStringList *dst, D_FancyStringList *t } internal String8 -d_string_from_fancy_string_list(Arena *arena, D_FancyStringList *list) +dr_string_from_fancy_string_list(Arena *arena, DR_FancyStringList *list) { String8 result = {0}; result.size = list->total_size; result.str = push_array_no_zero(arena, U8, result.size); U64 idx = 0; - for(D_FancyStringNode *n = list->first; n != 0; n = n->next) + for(DR_FancyStringNode *n = list->first; n != 0; n = n->next) { MemoryCopy(result.str+idx, n->v.string.str, n->v.string.size); idx += n->v.string.size; @@ -86,15 +86,15 @@ d_string_from_fancy_string_list(Arena *arena, D_FancyStringList *list) return result; } -internal D_FancyRunList -d_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, FNT_RasterFlags flags, D_FancyStringList *strs) +internal DR_FancyRunList +dr_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, FNT_RasterFlags flags, DR_FancyStringList *strs) { ProfBeginFunction(); - D_FancyRunList run_list = {0}; + DR_FancyRunList run_list = {0}; F32 base_align_px = 0; - for(D_FancyStringNode *n = strs->first; n != 0; n = n->next) + for(DR_FancyStringNode *n = strs->first; n != 0; n = n->next) { - D_FancyRunNode *dst_n = push_array(arena, D_FancyRunNode, 1); + DR_FancyRunNode *dst_n = push_array(arena, DR_FancyRunNode, 1); dst_n->v.run = fnt_push_run_from_string(arena, n->v.font, n->v.size, base_align_px, tab_size_px, flags, n->v.string); dst_n->v.color = n->v.color; dst_n->v.underline_thickness = n->v.underline_thickness; @@ -109,13 +109,13 @@ d_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, FNT_Raste return run_list; } -internal D_FancyRunList -d_fancy_run_list_copy(Arena *arena, D_FancyRunList *src) +internal DR_FancyRunList +dr_fancy_run_list_copy(Arena *arena, DR_FancyRunList *src) { - D_FancyRunList dst = {0}; - for(D_FancyRunNode *src_n = src->first; src_n != 0; src_n = src_n->next) + DR_FancyRunList dst = {0}; + for(DR_FancyRunNode *src_n = src->first; src_n != 0; src_n = src_n->next) { - D_FancyRunNode *dst_n = push_array(arena, D_FancyRunNode, 1); + DR_FancyRunNode *dst_n = push_array(arena, DR_FancyRunNode, 1); SLLQueuePush(dst.first, dst.last, dst_n); MemoryCopyStruct(&dst_n->v, &src_n->v); dst_n->v.run.pieces = fnt_piece_array_copy(arena, &src_n->v.run.pieces); @@ -131,22 +131,22 @@ d_fancy_run_list_copy(Arena *arena, D_FancyRunList *src) // (Frame boundaries) internal void -d_begin_frame(void) +dr_begin_frame(void) { - if(d_thread_ctx == 0) + if(dr_thread_ctx == 0) { Arena *arena = arena_alloc(.reserve_size = GB(64), .commit_size = MB(8)); - d_thread_ctx = push_array(arena, D_ThreadCtx, 1); - d_thread_ctx->arena = arena; - d_thread_ctx->arena_frame_start_pos = arena_pos(arena); + dr_thread_ctx = push_array(arena, DR_ThreadCtx, 1); + dr_thread_ctx->arena = arena; + dr_thread_ctx->arena_frame_start_pos = arena_pos(arena); } - arena_pop_to(d_thread_ctx->arena, d_thread_ctx->arena_frame_start_pos); - d_thread_ctx->free_bucket_selection = 0; - d_thread_ctx->top_bucket = 0; + arena_pop_to(dr_thread_ctx->arena, dr_thread_ctx->arena_frame_start_pos); + dr_thread_ctx->free_bucket_selection = 0; + dr_thread_ctx->top_bucket = 0; } internal void -d_submit_bucket(OS_Handle os_window, R_Handle r_window, D_Bucket *bucket) +dr_submit_bucket(OS_Handle os_window, R_Handle r_window, DR_Bucket *bucket) { r_window_submit(os_window, r_window, &bucket->passes); } @@ -156,45 +156,45 @@ d_submit_bucket(OS_Handle os_window, R_Handle r_window, D_Bucket *bucket) // // (Bucket: Handle to sequence of many render passes, constructed by this layer) -internal D_Bucket * -d_bucket_make(void) +internal DR_Bucket * +dr_bucket_make(void) { - D_Bucket *bucket = push_array(d_thread_ctx->arena, D_Bucket, 1); - D_BucketStackInits(bucket); + DR_Bucket *bucket = push_array(dr_thread_ctx->arena, DR_Bucket, 1); + DR_BucketStackInits(bucket); return bucket; } internal void -d_push_bucket(D_Bucket *bucket) +dr_push_bucket(DR_Bucket *bucket) { - D_BucketSelectionNode *node = d_thread_ctx->free_bucket_selection; + DR_BucketSelectionNode *node = dr_thread_ctx->free_bucket_selection; if(node) { - SLLStackPop(d_thread_ctx->free_bucket_selection); + SLLStackPop(dr_thread_ctx->free_bucket_selection); } else { - node = push_array(d_thread_ctx->arena, D_BucketSelectionNode, 1); + node = push_array(dr_thread_ctx->arena, DR_BucketSelectionNode, 1); } - SLLStackPush(d_thread_ctx->top_bucket, node); + SLLStackPush(dr_thread_ctx->top_bucket, node); node->bucket = bucket; } internal void -d_pop_bucket(void) +dr_pop_bucket(void) { - D_BucketSelectionNode *node = d_thread_ctx->top_bucket; - SLLStackPop(d_thread_ctx->top_bucket); - SLLStackPush(d_thread_ctx->free_bucket_selection, node); + DR_BucketSelectionNode *node = dr_thread_ctx->top_bucket; + SLLStackPop(dr_thread_ctx->top_bucket); + SLLStackPush(dr_thread_ctx->free_bucket_selection, node); } -internal D_Bucket * -d_top_bucket(void) +internal DR_Bucket * +dr_top_bucket(void) { - D_Bucket *bucket = 0; - if(d_thread_ctx->top_bucket != 0) + DR_Bucket *bucket = 0; + if(dr_thread_ctx->top_bucket != 0) { - bucket = d_thread_ctx->top_bucket->bucket; + bucket = dr_thread_ctx->top_bucket->bucket; } return bucket; } @@ -214,10 +214,10 @@ d_top_bucket(void) //- rjf: rectangles internal inline R_Rect2DInst * -d_rect(Rng2F32 dst, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness) +dr_rect(Rng2F32 dst, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness) { - Arena *arena = d_thread_ctx->arena; - D_Bucket *bucket = d_top_bucket(); + Arena *arena = dr_thread_ctx->arena; + DR_Bucket *bucket = dr_top_bucket(); R_Pass *pass = r_pass_from_kind(arena, &bucket->passes, R_PassKind_UI); R_PassParams_UI *params = pass->params_ui; R_BatchGroup2DList *rects = ¶ms->rects; @@ -255,10 +255,10 @@ d_rect(Rng2F32 dst, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 //- rjf: images internal inline R_Rect2DInst * -d_img(Rng2F32 dst, Rng2F32 src, R_Handle texture, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness) +dr_img(Rng2F32 dst, Rng2F32 src, R_Handle texture, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness) { - Arena *arena = d_thread_ctx->arena; - D_Bucket *bucket = d_top_bucket(); + Arena *arena = dr_thread_ctx->arena; + DR_Bucket *bucket = dr_top_bucket(); R_Pass *pass = r_pass_from_kind(arena, &bucket->passes, R_PassKind_UI); R_PassParams_UI *params = pass->params_ui; R_BatchGroup2DList *rects = ¶ms->rects; @@ -300,14 +300,14 @@ d_img(Rng2F32 dst, Rng2F32 src, R_Handle texture, Vec4F32 color, F32 corner_radi //- rjf: blurs internal R_PassParams_Blur * -d_blur(Rng2F32 rect, F32 blur_size, F32 corner_radius) +dr_blur(Rng2F32 rect, F32 blur_size, F32 corner_radius) { - Arena *arena = d_thread_ctx->arena; - D_Bucket *bucket = d_top_bucket(); + Arena *arena = dr_thread_ctx->arena; + DR_Bucket *bucket = dr_top_bucket(); R_Pass *pass = r_pass_from_kind(arena, &bucket->passes, R_PassKind_Blur); R_PassParams_Blur *params = pass->params_blur; params->rect = rect; - params->clip = d_top_clip(); + params->clip = dr_top_clip(); params->blur_size = blur_size; params->corner_radii[Corner_00] = corner_radius; params->corner_radii[Corner_01] = corner_radius; @@ -319,10 +319,10 @@ d_blur(Rng2F32 rect, F32 blur_size, F32 corner_radius) //- rjf: 3d rendering pass params internal R_PassParams_Geo3D * -d_geo3d_begin(Rng2F32 viewport, Mat4x4F32 view, Mat4x4F32 projection) +dr_geo3d_begin(Rng2F32 viewport, Mat4x4F32 view, Mat4x4F32 projection) { - Arena *arena = d_thread_ctx->arena; - D_Bucket *bucket = d_top_bucket(); + Arena *arena = dr_thread_ctx->arena; + DR_Bucket *bucket = dr_top_bucket(); R_Pass *pass = r_pass_from_kind(arena, &bucket->passes, R_PassKind_Geo3D); R_PassParams_Geo3D *params = pass->params_geo3d; params->viewport = viewport; @@ -334,10 +334,10 @@ d_geo3d_begin(Rng2F32 viewport, Mat4x4F32 view, Mat4x4F32 projection) //- rjf: meshes internal R_Mesh3DInst * -d_mesh(R_Handle mesh_vertices, R_Handle mesh_indices, R_GeoTopologyKind mesh_geo_topology, R_GeoVertexFlags mesh_geo_vertex_flags, R_Handle albedo_tex, Mat4x4F32 inst_xform) +dr_mesh(R_Handle mesh_vertices, R_Handle mesh_indices, R_GeoTopologyKind mesh_geo_topology, R_GeoVertexFlags mesh_geo_vertex_flags, R_Handle albedo_tex, Mat4x4F32 inst_xform) { - Arena *arena = d_thread_ctx->arena; - D_Bucket *bucket = d_top_bucket(); + Arena *arena = dr_thread_ctx->arena; + DR_Bucket *bucket = dr_top_bucket(); R_Pass *pass = r_pass_from_kind(arena, &bucket->passes, R_PassKind_Geo3D); R_PassParams_Geo3D *params = pass->params_geo3d; @@ -362,9 +362,9 @@ d_mesh(R_Handle mesh_vertices, R_Handle mesh_indices, R_GeoTopologyKind mesh_geo (U64)mesh_geo_vertex_flags, albedo_tex.u64[0], albedo_tex.u64[1], - (U64)d_top_tex2d_sample_kind(), + (U64)dr_top_tex2d_sample_kind(), }; - hash = d_hash_from_string(str8((U8 *)buffer, sizeof(buffer))); + hash = dr_hash_from_string(str8((U8 *)buffer, sizeof(buffer))); slot_idx = hash%params->mesh_batches.slots_count; } @@ -393,7 +393,7 @@ d_mesh(R_Handle mesh_vertices, R_Handle mesh_indices, R_GeoTopologyKind mesh_geo node->params.mesh_geo_topology = mesh_geo_topology; node->params.mesh_geo_vertex_flags = mesh_geo_vertex_flags; node->params.albedo_tex = albedo_tex; - node->params.albedo_tex_sample_kind = d_top_tex2d_sample_kind(); + node->params.albedo_tex_sample_kind = dr_top_tex2d_sample_kind(); node->params.xform = mat_4x4f32(1.f); } @@ -406,12 +406,12 @@ d_mesh(R_Handle mesh_vertices, R_Handle mesh_indices, R_GeoTopologyKind mesh_geo //- rjf: collating one pre-prepped bucket into parent bucket internal void -d_sub_bucket(D_Bucket *bucket) +dr_sub_bucket(DR_Bucket *bucket) { - Arena *arena = d_thread_ctx->arena; - D_Bucket *src = bucket; - D_Bucket *dst = d_top_bucket(); - Rng2F32 dst_clip = d_top_clip(); + Arena *arena = dr_thread_ctx->arena; + DR_Bucket *src = bucket; + DR_Bucket *dst = dr_top_bucket(); + Rng2F32 dst_clip = dr_top_clip(); B32 dst_clip_is_set = !(dst_clip.x0 == 0 && dst_clip.x1 == 0 && dst_clip.y0 == 0 && dst_clip.y1 == 0); for(R_PassNode *n = src->passes.first; n != 0; n = n->next) @@ -434,7 +434,7 @@ d_sub_bucket(D_Bucket *bucket) dst_ui->rects.count += 1; MemoryCopyStruct(&dst_group_n->params, &src_group_n->params); dst_group_n->batches = src_group_n->batches; - dst_group_n->params.xform = d_top_xform2d(); + dst_group_n->params.xform = dr_top_xform2d(); if(dst_clip_is_set) { B32 clip_is_set = !(dst_group_n->params.clip.x0 == 0 && @@ -455,7 +455,7 @@ d_sub_bucket(D_Bucket *bucket) //- rjf: text internal void -d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 max_x, FNT_Run trailer_run) +dr_truncated_fancy_run_list(Vec2F32 p, DR_FancyRunList *list, F32 max_x, FNT_Run trailer_run) { ProfBeginFunction(); @@ -467,9 +467,9 @@ d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 max_x, FNT_Run t B32 trailer_found = 0; Vec4F32 last_color = {0}; U64 byte_off = 0; - for(D_FancyRunNode *n = list->first; n != 0; n = n->next) + for(DR_FancyRunNode *n = list->first; n != 0; n = n->next) { - D_FancyRun *fr = &n->v; + DR_FancyRun *fr = &n->v; Rng1F32 pixel_range = {0}; { pixel_range.min = 100000; @@ -501,8 +501,8 @@ d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 max_x, FNT_Run t p.y + piece->offset.y + size.y); if(!r_handle_match(texture, r_handle_zero())) { - d_img(dst, src, texture, fr->color, 0, 0, 0); - //d_rect(dst, v4f32(0, 1, 0, 0.5f), 0, 1.f, 0.f); + dr_img(dst, src, texture, fr->color, 0, 0, 0); + //dr_rect(dst, v4f32(0, 1, 0, 0.5f), 0, 1.f, 0.f); } advance += piece->advance; pixel_range.min = Min(pre_advance, pixel_range.min); @@ -510,15 +510,15 @@ d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 max_x, FNT_Run t } if(fr->underline_thickness > 0) { - d_rect(r2f32p(p.x + pixel_range.min, - p.y+fr->run.descent+fr->run.descent/8, - p.x + pixel_range.max, - p.y+fr->run.descent+fr->run.descent/8+fr->underline_thickness), - fr->color, 0, 0, 0.8f); + dr_rect(r2f32p(p.x + pixel_range.min, + p.y+fr->run.descent+fr->run.descent/8, + p.x + pixel_range.max, + p.y+fr->run.descent+fr->run.descent/8+fr->underline_thickness), + fr->color, 0, 0, 0.8f); } if(fr->strikethrough_thickness > 0) { - d_rect(r2f32p(p.x+pre_advance, p.y+fr->run.descent - fr->run.ascent/2, p.x+advance, p.y+fr->run.descent - fr->run.ascent/2 + fr->strikethrough_thickness), fr->color, 0, 0, 1.f); + dr_rect(r2f32p(p.x+pre_advance, p.y+fr->run.descent - fr->run.ascent/2, p.x+advance, p.y+fr->run.descent - fr->run.ascent/2 + fr->strikethrough_thickness), fr->color, 0, 0, 1.f); } if(trailer_found) { @@ -547,7 +547,7 @@ d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 max_x, FNT_Run t p.y + piece->offset.y + size.y); if(!r_handle_match(texture, r_handle_zero())) { - d_img(dst, src, texture, trailer_piece_color, 0, 0, 0); + dr_img(dst, src, texture, trailer_piece_color, 0, 0, 0); trailer_piece_color.w *= 0.5f; } advance += piece->advance; @@ -558,7 +558,7 @@ d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 max_x, FNT_Run t } internal void -d_truncated_fancy_run_fuzzy_matches(Vec2F32 p, D_FancyRunList *list, F32 max_x, FuzzyMatchRangeList *ranges, Vec4F32 color) +dr_truncated_fancy_run_fuzzy_matches(Vec2F32 p, DR_FancyRunList *list, F32 max_x, FuzzyMatchRangeList *ranges, Vec4F32 color) { for(FuzzyMatchRangeNode *match_n = ranges->first; match_n != 0; match_n = match_n->next) { @@ -573,9 +573,9 @@ d_truncated_fancy_run_fuzzy_matches(Vec2F32 p, D_FancyRunList *list, F32 max_x, F32 advance = 0; F32 ascent = 0; F32 descent = 0; - for(D_FancyRunNode *fr_n = list->first; fr_n != 0; fr_n = fr_n->next) + for(DR_FancyRunNode *fr_n = list->first; fr_n != 0; fr_n = fr_n->next) { - D_FancyRun *fr = &fr_n->v; + DR_FancyRun *fr = &fr_n->v; FNT_Run *run = &fr->run; ascent = run->ascent; descent = run->descent; @@ -601,13 +601,13 @@ d_truncated_fancy_run_fuzzy_matches(Vec2F32 p, D_FancyRunList *list, F32 max_x, p.y - descent - ascent + ascent/8.f + list->dim.y); rect.x0 = Min(rect.x0, p.x+max_x); rect.x1 = Min(rect.x1, p.x+max_x); - d_rect(rect, color, (descent+ascent)/4.f, 0, 1.f); + dr_rect(rect, color, (descent+ascent)/4.f, 0, 1.f); } } } internal void -d_text_run(Vec2F32 p, Vec4F32 color, FNT_Run run) +dr_text_run(Vec2F32 p, Vec4F32 color, FNT_Run run) { F32 advance = 0; FNT_Piece *piece_first = run.pieces.v; @@ -625,17 +625,17 @@ d_text_run(Vec2F32 p, Vec4F32 color, FNT_Run run) p.y + piece->offset.y + size.y); if(size.x != 0 && size.y != 0 && !r_handle_match(texture, r_handle_zero())) { - d_img(dst, src, texture, color, 0, 0, 0); + dr_img(dst, src, texture, color, 0, 0, 0); } advance += piece->advance; } } internal void -d_text(FNT_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, FNT_RasterFlags flags, Vec2F32 p, Vec4F32 color, String8 string) +dr_text(FNT_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, FNT_RasterFlags flags, Vec2F32 p, Vec4F32 color, String8 string) { Temp scratch = scratch_begin(0, 0); FNT_Run run = fnt_push_run_from_string(scratch.arena, font, size, base_align_px, tab_size_px, flags, string); - d_text_run(p, color, run); + dr_text_run(p, color, run); scratch_end(scratch); } diff --git a/src/draw/draw.h b/src/draw/draw.h index 89898eaf..3a99f46b 100644 --- a/src/draw/draw.h +++ b/src/draw/draw.h @@ -7,8 +7,8 @@ //////////////////////////////// //~ rjf: Fancy String Types -typedef struct D_FancyString D_FancyString; -struct D_FancyString +typedef struct DR_FancyString DR_FancyString; +struct DR_FancyString { FNT_Tag font; String8 string; @@ -18,24 +18,24 @@ struct D_FancyString F32 strikethrough_thickness; }; -typedef struct D_FancyStringNode D_FancyStringNode; -struct D_FancyStringNode +typedef struct DR_FancyStringNode DR_FancyStringNode; +struct DR_FancyStringNode { - D_FancyStringNode *next; - D_FancyString v; + DR_FancyStringNode *next; + DR_FancyString v; }; -typedef struct D_FancyStringList D_FancyStringList; -struct D_FancyStringList +typedef struct DR_FancyStringList DR_FancyStringList; +struct DR_FancyStringList { - D_FancyStringNode *first; - D_FancyStringNode *last; + DR_FancyStringNode *first; + DR_FancyStringNode *last; U64 node_count; U64 total_size; }; -typedef struct D_FancyRun D_FancyRun; -struct D_FancyRun +typedef struct DR_FancyRun DR_FancyRun; +struct DR_FancyRun { FNT_Run run; Vec4F32 color; @@ -43,18 +43,18 @@ struct D_FancyRun F32 strikethrough_thickness; }; -typedef struct D_FancyRunNode D_FancyRunNode; -struct D_FancyRunNode +typedef struct DR_FancyRunNode DR_FancyRunNode; +struct DR_FancyRunNode { - D_FancyRunNode *next; - D_FancyRun v; + DR_FancyRunNode *next; + DR_FancyRun v; }; -typedef struct D_FancyRunList D_FancyRunList; -struct D_FancyRunList +typedef struct DR_FancyRunList DR_FancyRunList; +struct DR_FancyRunList { - D_FancyRunNode *first; - D_FancyRunNode *last; + DR_FancyRunNode *first; + DR_FancyRunNode *last; U64 node_count; Vec2F32 dim; }; @@ -67,94 +67,94 @@ struct D_FancyRunList //////////////////////////////// //~ rjf: Draw Bucket Types -typedef struct D_Bucket D_Bucket; -struct D_Bucket +typedef struct DR_Bucket DR_Bucket; +struct DR_Bucket { R_PassList passes; U64 stack_gen; U64 last_cmd_stack_gen; - D_BucketStackDecls; + DR_BucketStackDecls; }; //////////////////////////////// //~ rjf: Thread Context -typedef struct D_BucketSelectionNode D_BucketSelectionNode; -struct D_BucketSelectionNode +typedef struct DR_BucketSelectionNode DR_BucketSelectionNode; +struct DR_BucketSelectionNode { - D_BucketSelectionNode *next; - D_Bucket *bucket; + DR_BucketSelectionNode *next; + DR_Bucket *bucket; }; -typedef struct D_ThreadCtx D_ThreadCtx; -struct D_ThreadCtx +typedef struct DR_ThreadCtx DR_ThreadCtx; +struct DR_ThreadCtx { Arena *arena; U64 arena_frame_start_pos; - D_BucketSelectionNode *top_bucket; - D_BucketSelectionNode *free_bucket_selection; + DR_BucketSelectionNode *top_bucket; + DR_BucketSelectionNode *free_bucket_selection; }; //////////////////////////////// //~ rjf: Globals -thread_static D_ThreadCtx *d_thread_ctx = 0; +thread_static DR_ThreadCtx *dr_thread_ctx = 0; //////////////////////////////// //~ rjf: Basic Helpers -internal U64 d_hash_from_string(String8 string); +internal U64 dr_hash_from_string(String8 string); //////////////////////////////// //~ rjf: Fancy String Type Functions -internal void d_fancy_string_list_push(Arena *arena, D_FancyStringList *list, D_FancyString *str); -internal void d_fancy_string_list_concat_in_place(D_FancyStringList *dst, D_FancyStringList *to_push); -internal String8 d_string_from_fancy_string_list(Arena *arena, D_FancyStringList *list); -internal D_FancyRunList d_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, FNT_RasterFlags flags, D_FancyStringList *strs); -internal D_FancyRunList d_fancy_run_list_copy(Arena *arena, D_FancyRunList *src); +internal void dr_fancy_string_list_push(Arena *arena, DR_FancyStringList *list, DR_FancyString *str); +internal void dr_fancy_string_list_concat_in_place(DR_FancyStringList *dst, DR_FancyStringList *to_push); +internal String8 dr_string_from_fancy_string_list(Arena *arena, DR_FancyStringList *list); +internal DR_FancyRunList dr_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, FNT_RasterFlags flags, DR_FancyStringList *strs); +internal DR_FancyRunList dr_fancy_run_list_copy(Arena *arena, DR_FancyRunList *src); //////////////////////////////// //~ rjf: Top-Level API // // (Frame boundaries & bucket submission) -internal void d_begin_frame(void); -internal void d_submit_bucket(OS_Handle os_window, R_Handle r_window, D_Bucket *bucket); +internal void dr_begin_frame(void); +internal void dr_submit_bucket(OS_Handle os_window, R_Handle r_window, DR_Bucket *bucket); //////////////////////////////// //~ rjf: Bucket Construction & Selection API // // (Bucket: Handle to sequence of many render passes, constructed by this layer) -internal D_Bucket *d_bucket_make(void); -internal void d_push_bucket(D_Bucket *bucket); -internal void d_pop_bucket(void); -internal D_Bucket *d_top_bucket(void); -#define D_BucketScope(b) DeferLoop(d_push_bucket(b), d_pop_bucket()) +internal DR_Bucket *dr_bucket_make(void); +internal void dr_push_bucket(DR_Bucket *bucket); +internal void dr_pop_bucket(void); +internal DR_Bucket *dr_top_bucket(void); +#define D_BucketScope(b) DeferLoop(dr_push_bucket(b), dr_pop_bucket()) //////////////////////////////// //~ rjf: Bucket Stacks // // (Pushing/popping implicit draw parameters) -internal R_Tex2DSampleKind d_push_tex2d_sample_kind(R_Tex2DSampleKind v); -internal Mat3x3F32 d_push_xform2d(Mat3x3F32 v); -internal Rng2F32 d_push_clip(Rng2F32 v); -internal F32 d_push_transparency(F32 v); -internal R_Tex2DSampleKind d_pop_tex2d_sample_kind(void); -internal Mat3x3F32 d_pop_xform2d(void); -internal Rng2F32 d_pop_clip(void); -internal F32 d_pop_transparency(void); -internal R_Tex2DSampleKind d_top_tex2d_sample_kind(void); -internal Mat3x3F32 d_top_xform2d(void); -internal Rng2F32 d_top_clip(void); -internal F32 d_top_transparency(void); +internal R_Tex2DSampleKind dr_push_tex2d_sample_kind(R_Tex2DSampleKind v); +internal Mat3x3F32 dr_push_xform2d(Mat3x3F32 v); +internal Rng2F32 dr_push_clip(Rng2F32 v); +internal F32 dr_push_transparency(F32 v); +internal R_Tex2DSampleKind dr_pop_tex2d_sample_kind(void); +internal Mat3x3F32 dr_pop_xform2d(void); +internal Rng2F32 dr_pop_clip(void); +internal F32 dr_pop_transparency(void); +internal R_Tex2DSampleKind dr_top_tex2d_sample_kind(void); +internal Mat3x3F32 dr_top_xform2d(void); +internal Rng2F32 dr_top_clip(void); +internal F32 dr_top_transparency(void); -#define D_Tex2DSampleKindScope(v) DeferLoop(d_push_tex2d_sample_kind(v), d_pop_tex2d_sample_kind()) -#define D_XForm2DScope(v) DeferLoop(d_push_xform2d(v), d_pop_xform2d()) -#define D_ClipScope(v) DeferLoop(d_push_clip(v), d_pop_clip()) -#define D_TransparencyScope(v) DeferLoop(d_push_transparency(v), d_pop_transparency()) +#define DR_Tex2DSampleKindScope(v) DeferLoop(dr_push_tex2d_sample_kind(v), dr_pop_tex2d_sample_kind()) +#define DR_XForm2DScope(v) DeferLoop(dr_push_xform2d(v), dr_pop_xform2d()) +#define DR_ClipScope(v) DeferLoop(dr_push_clip(v), dr_pop_clip()) +#define DR_TransparencyScope(v) DeferLoop(dr_push_transparency(v), dr_pop_transparency()) //////////////////////////////// //~ rjf: Core Draw Calls @@ -162,30 +162,30 @@ internal F32 d_top_transparency(void); // (Apply to the calling thread's currently selected bucket) //- rjf: rectangles -internal inline R_Rect2DInst *d_rect(Rng2F32 dst, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness); +internal inline R_Rect2DInst *dr_rect(Rng2F32 dst, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness); //- rjf: images -internal inline R_Rect2DInst *d_img(Rng2F32 dst, Rng2F32 src, R_Handle texture, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness); +internal inline R_Rect2DInst *dr_img(Rng2F32 dst, Rng2F32 src, R_Handle texture, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness); //- rjf: blurs -internal R_PassParams_Blur *d_blur(Rng2F32 rect, F32 blur_size, F32 corner_radius); +internal R_PassParams_Blur *dr_blur(Rng2F32 rect, F32 blur_size, F32 corner_radius); //- rjf: 3d rendering pass params -internal R_PassParams_Geo3D *d_geo3d_begin(Rng2F32 viewport, Mat4x4F32 view, Mat4x4F32 projection); +internal R_PassParams_Geo3D *dr_geo3d_begin(Rng2F32 viewport, Mat4x4F32 view, Mat4x4F32 projection); //- rjf: meshes -internal R_Mesh3DInst *d_mesh(R_Handle mesh_vertices, R_Handle mesh_indices, R_GeoTopologyKind mesh_geo_topology, R_GeoVertexFlags mesh_geo_vertex_flags, R_Handle albedo_tex, Mat4x4F32 inst_xform); +internal R_Mesh3DInst *dr_mesh(R_Handle mesh_vertices, R_Handle mesh_indices, R_GeoTopologyKind mesh_geo_topology, R_GeoVertexFlags mesh_geo_vertex_flags, R_Handle albedo_tex, Mat4x4F32 inst_xform); //- rjf: collating one pre-prepped bucket into parent bucket -internal void d_sub_bucket(D_Bucket *bucket); +internal void dr_sub_bucket(DR_Bucket *bucket); //////////////////////////////// //~ rjf: Draw Call Helpers //- rjf: text -internal void d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 max_x, FNT_Run trailer_run); -internal void d_truncated_fancy_run_fuzzy_matches(Vec2F32 p, D_FancyRunList *list, F32 max_x, FuzzyMatchRangeList *ranges, Vec4F32 color); -internal void d_text_run(Vec2F32 p, Vec4F32 color, FNT_Run run); -internal void d_text(FNT_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, FNT_RasterFlags flags, Vec2F32 p, Vec4F32 color, String8 string); +internal void dr_truncated_fancy_run_list(Vec2F32 p, DR_FancyRunList *list, F32 max_x, FNT_Run trailer_run); +internal void dr_truncated_fancy_run_fuzzy_matches(Vec2F32 p, DR_FancyRunList *list, F32 max_x, FuzzyMatchRangeList *ranges, Vec4F32 color); +internal void dr_text_run(Vec2F32 p, Vec4F32 color, FNT_Run run); +internal void dr_text(FNT_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, FNT_RasterFlags flags, Vec2F32 p, Vec4F32 color, String8 string); #endif // DRAW_H diff --git a/src/draw/draw.mdesk b/src/draw/draw.mdesk index 5de25390..981b3bb2 100644 --- a/src/draw/draw.mdesk +++ b/src/draw/draw.mdesk @@ -2,7 +2,7 @@ // Licensed under the MIT license (https://opensource.org/license/mit/) @table(name, name_lower, type, default_init) -D_StackTable: +DR_StackTable: { {Tex2DSampleKind tex2d_sample_kind R_Tex2DSampleKind `R_Tex2DSampleKind_Nearest` } {XForm2D xform2d Mat3x3F32 `{1, 0, 0, 0, 1, 0, 0, 0, 1}` } @@ -12,47 +12,47 @@ D_StackTable: @gen { - @expand(D_StackTable a) `typedef struct D_$(a.name)Node D_$(a.name)Node; struct D_$(a.name)Node {D_$(a.name)Node *next; $(a.type) v;};`; + @expand(DR_StackTable a) `typedef struct DR_$(a.name)Node DR_$(a.name)Node; struct DR_$(a.name)Node {DR_$(a.name)Node *next; $(a.type) v;};`; } @gen { - `#define D_BucketStackDecls struct{\\`; - @expand(D_StackTable a) `D_$(a.name)Node *top_$(a.name_lower);\\`; + `#define DR_BucketStackDecls struct{\\`; + @expand(DR_StackTable a) `DR_$(a.name)Node *top_$(a.name_lower);\\`; `}`; } @gen { - @expand(D_StackTable a) `read_only global D_$(a.name)Node d_nil_$(a.name_lower) = {0, $(a.default_init)};`; + @expand(DR_StackTable a) `read_only global DR_$(a.name)Node dr_nil_$(a.name_lower) = {0, $(a.default_init)};`; } @gen { - `#define D_BucketStackInits(b) do{\\`; - @expand(D_StackTable a) `(b)->top_$(a.name_lower) = &d_nil_$(a.name_lower);\\`; + `#define DR_BucketStackInits(b) do{\\`; + @expand(DR_StackTable a) `(b)->top_$(a.name_lower) = &dr_nil_$(a.name_lower);\\`; `}while(0)`; } @gen { `#if 0`; - @expand(D_StackTable a) `internal $(a.type) $(=>35) d_push_$(a.name_lower)($(a.type) v);`; - @expand(D_StackTable a) `internal $(a.type) $(=>35) d_pop_$(a.name_lower)(void);`; - @expand(D_StackTable a) `internal $(a.type) $(=>35) d_top_$(a.name_lower)(void);`; + @expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_push_$(a.name_lower)($(a.type) v);`; + @expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_pop_$(a.name_lower)(void);`; + @expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_top_$(a.name_lower)(void);`; `#endif`; } @gen @c_file { - @expand(D_StackTable a) `internal $(a.type) $(=>35) d_push_$(a.name_lower)($(a.type) v) {D_StackPushImpl($(a.name), $(a.name_lower), $(a.type), v);}`; - @expand(D_StackTable a) `internal $(a.type) $(=>35) d_pop_$(a.name_lower)(void) {D_StackPopImpl($(a.name), $(a.name_lower), $(a.type));}`; - @expand(D_StackTable a) `internal $(a.type) $(=>35) d_top_$(a.name_lower)(void) {D_StackTopImpl($(a.name), $(a.name_lower), $(a.type));}`; + @expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_push_$(a.name_lower)($(a.type) v) {DR_StackPushImpl($(a.name), $(a.name_lower), $(a.type), v);}`; + @expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_pop_$(a.name_lower)(void) {DR_StackPopImpl($(a.name), $(a.name_lower), $(a.type));}`; + @expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_top_$(a.name_lower)(void) {DR_StackTopImpl($(a.name), $(a.name_lower), $(a.type));}`; } @gen { `#if 0`; - @expand(D_StackTable a) `#define D_$(a.name)Scope(v) $(=>35) DeferLoop(d_push_$(a.name_lower)(v), d_pop_$(a.name_lower)())`; + @expand(DR_StackTable a) `#define DR_$(a.name)Scope(v) $(=>35) DeferLoop(dr_push_$(a.name_lower)(v), dr_pop_$(a.name_lower)())`; `#endif`; } diff --git a/src/draw/generated/draw.meta.c b/src/draw/generated/draw.meta.c index e880ba2d..aa5e65c0 100644 --- a/src/draw/generated/draw.meta.c +++ b/src/draw/generated/draw.meta.c @@ -3,15 +3,15 @@ //- GENERATED CODE -internal R_Tex2DSampleKind d_push_tex2d_sample_kind(R_Tex2DSampleKind v) {D_StackPushImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind, v);} -internal Mat3x3F32 d_push_xform2d(Mat3x3F32 v) {D_StackPushImpl(XForm2D, xform2d, Mat3x3F32, v);} -internal Rng2F32 d_push_clip(Rng2F32 v) {D_StackPushImpl(Clip, clip, Rng2F32, v);} -internal F32 d_push_transparency(F32 v) {D_StackPushImpl(Transparency, transparency, F32, v);} -internal R_Tex2DSampleKind d_pop_tex2d_sample_kind(void) {D_StackPopImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind);} -internal Mat3x3F32 d_pop_xform2d(void) {D_StackPopImpl(XForm2D, xform2d, Mat3x3F32);} -internal Rng2F32 d_pop_clip(void) {D_StackPopImpl(Clip, clip, Rng2F32);} -internal F32 d_pop_transparency(void) {D_StackPopImpl(Transparency, transparency, F32);} -internal R_Tex2DSampleKind d_top_tex2d_sample_kind(void) {D_StackTopImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind);} -internal Mat3x3F32 d_top_xform2d(void) {D_StackTopImpl(XForm2D, xform2d, Mat3x3F32);} -internal Rng2F32 d_top_clip(void) {D_StackTopImpl(Clip, clip, Rng2F32);} -internal F32 d_top_transparency(void) {D_StackTopImpl(Transparency, transparency, F32);} +internal R_Tex2DSampleKind dr_push_tex2d_sample_kind(R_Tex2DSampleKind v) {DR_StackPushImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind, v);} +internal Mat3x3F32 dr_push_xform2d(Mat3x3F32 v) {DR_StackPushImpl(XForm2D, xform2d, Mat3x3F32, v);} +internal Rng2F32 dr_push_clip(Rng2F32 v) {DR_StackPushImpl(Clip, clip, Rng2F32, v);} +internal F32 dr_push_transparency(F32 v) {DR_StackPushImpl(Transparency, transparency, F32, v);} +internal R_Tex2DSampleKind dr_pop_tex2d_sample_kind(void) {DR_StackPopImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind);} +internal Mat3x3F32 dr_pop_xform2d(void) {DR_StackPopImpl(XForm2D, xform2d, Mat3x3F32);} +internal Rng2F32 dr_pop_clip(void) {DR_StackPopImpl(Clip, clip, Rng2F32);} +internal F32 dr_pop_transparency(void) {DR_StackPopImpl(Transparency, transparency, F32);} +internal R_Tex2DSampleKind dr_top_tex2d_sample_kind(void) {DR_StackTopImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind);} +internal Mat3x3F32 dr_top_xform2d(void) {DR_StackTopImpl(XForm2D, xform2d, Mat3x3F32);} +internal Rng2F32 dr_top_clip(void) {DR_StackTopImpl(Clip, clip, Rng2F32);} +internal F32 dr_top_transparency(void) {DR_StackTopImpl(Transparency, transparency, F32);} diff --git a/src/draw/generated/draw.meta.h b/src/draw/generated/draw.meta.h index 20c5ba21..350048e1 100644 --- a/src/draw/generated/draw.meta.h +++ b/src/draw/generated/draw.meta.h @@ -6,44 +6,44 @@ #ifndef DRAW_META_H #define DRAW_META_H -typedef struct D_Tex2DSampleKindNode D_Tex2DSampleKindNode; struct D_Tex2DSampleKindNode {D_Tex2DSampleKindNode *next; R_Tex2DSampleKind v;}; -typedef struct D_XForm2DNode D_XForm2DNode; struct D_XForm2DNode {D_XForm2DNode *next; Mat3x3F32 v;}; -typedef struct D_ClipNode D_ClipNode; struct D_ClipNode {D_ClipNode *next; Rng2F32 v;}; -typedef struct D_TransparencyNode D_TransparencyNode; struct D_TransparencyNode {D_TransparencyNode *next; F32 v;}; -#define D_BucketStackDecls struct{\ -D_Tex2DSampleKindNode *top_tex2d_sample_kind;\ -D_XForm2DNode *top_xform2d;\ -D_ClipNode *top_clip;\ -D_TransparencyNode *top_transparency;\ +typedef struct DR_Tex2DSampleKindNode DR_Tex2DSampleKindNode; struct DR_Tex2DSampleKindNode {DR_Tex2DSampleKindNode *next; R_Tex2DSampleKind v;}; +typedef struct DR_XForm2DNode DR_XForm2DNode; struct DR_XForm2DNode {DR_XForm2DNode *next; Mat3x3F32 v;}; +typedef struct DR_ClipNode DR_ClipNode; struct DR_ClipNode {DR_ClipNode *next; Rng2F32 v;}; +typedef struct DR_TransparencyNode DR_TransparencyNode; struct DR_TransparencyNode {DR_TransparencyNode *next; F32 v;}; +#define DR_BucketStackDecls struct{\ +DR_Tex2DSampleKindNode *top_tex2d_sample_kind;\ +DR_XForm2DNode *top_xform2d;\ +DR_ClipNode *top_clip;\ +DR_TransparencyNode *top_transparency;\ } -read_only global D_Tex2DSampleKindNode d_nil_tex2d_sample_kind = {0, R_Tex2DSampleKind_Nearest}; -read_only global D_XForm2DNode d_nil_xform2d = {0, {1, 0, 0, 0, 1, 0, 0, 0, 1}}; -read_only global D_ClipNode d_nil_clip = {0, {0}}; -read_only global D_TransparencyNode d_nil_transparency = {0, 0}; -#define D_BucketStackInits(b) do{\ -(b)->top_tex2d_sample_kind = &d_nil_tex2d_sample_kind;\ -(b)->top_xform2d = &d_nil_xform2d;\ -(b)->top_clip = &d_nil_clip;\ -(b)->top_transparency = &d_nil_transparency;\ +read_only global DR_Tex2DSampleKindNode dr_nil_tex2d_sample_kind = {0, R_Tex2DSampleKind_Nearest}; +read_only global DR_XForm2DNode dr_nil_xform2d = {0, {1, 0, 0, 0, 1, 0, 0, 0, 1}}; +read_only global DR_ClipNode dr_nil_clip = {0, {0}}; +read_only global DR_TransparencyNode dr_nil_transparency = {0, 0}; +#define DR_BucketStackInits(b) do{\ +(b)->top_tex2d_sample_kind = &dr_nil_tex2d_sample_kind;\ +(b)->top_xform2d = &dr_nil_xform2d;\ +(b)->top_clip = &dr_nil_clip;\ +(b)->top_transparency = &dr_nil_transparency;\ }while(0) #if 0 -internal R_Tex2DSampleKind d_push_tex2d_sample_kind(R_Tex2DSampleKind v); -internal Mat3x3F32 d_push_xform2d(Mat3x3F32 v); -internal Rng2F32 d_push_clip(Rng2F32 v); -internal F32 d_push_transparency(F32 v); -internal R_Tex2DSampleKind d_pop_tex2d_sample_kind(void); -internal Mat3x3F32 d_pop_xform2d(void); -internal Rng2F32 d_pop_clip(void); -internal F32 d_pop_transparency(void); -internal R_Tex2DSampleKind d_top_tex2d_sample_kind(void); -internal Mat3x3F32 d_top_xform2d(void); -internal Rng2F32 d_top_clip(void); -internal F32 d_top_transparency(void); +internal R_Tex2DSampleKind dr_push_tex2d_sample_kind(R_Tex2DSampleKind v); +internal Mat3x3F32 dr_push_xform2d(Mat3x3F32 v); +internal Rng2F32 dr_push_clip(Rng2F32 v); +internal F32 dr_push_transparency(F32 v); +internal R_Tex2DSampleKind dr_pop_tex2d_sample_kind(void); +internal Mat3x3F32 dr_pop_xform2d(void); +internal Rng2F32 dr_pop_clip(void); +internal F32 dr_pop_transparency(void); +internal R_Tex2DSampleKind dr_top_tex2d_sample_kind(void); +internal Mat3x3F32 dr_top_xform2d(void); +internal Rng2F32 dr_top_clip(void); +internal F32 dr_top_transparency(void); #endif #if 0 -#define D_Tex2DSampleKindScope(v) DeferLoop(d_push_tex2d_sample_kind(v), d_pop_tex2d_sample_kind()) -#define D_XForm2DScope(v) DeferLoop(d_push_xform2d(v), d_pop_xform2d()) -#define D_ClipScope(v) DeferLoop(d_push_clip(v), d_pop_clip()) -#define D_TransparencyScope(v) DeferLoop(d_push_transparency(v), d_pop_transparency()) +#define DR_Tex2DSampleKindScope(v) DeferLoop(dr_push_tex2d_sample_kind(v), dr_pop_tex2d_sample_kind()) +#define DR_XForm2DScope(v) DeferLoop(dr_push_xform2d(v), dr_pop_xform2d()) +#define DR_ClipScope(v) DeferLoop(dr_push_clip(v), dr_pop_clip()) +#define DR_TransparencyScope(v) DeferLoop(dr_push_transparency(v), dr_pop_transparency()) #endif #endif // DRAW_META_H diff --git a/src/raddbg/raddbg.c b/src/raddbg/raddbg.c index 1e77a200..004e62f9 100644 --- a/src/raddbg/raddbg.c +++ b/src/raddbg/raddbg.c @@ -19,7 +19,7 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) main_thread_log = log_alloc(); String8 user_program_data_path = os_get_process_info()->user_program_data_path; String8 user_data_folder = push_str8f(scratch.arena, "%S/raddbg/logs", user_program_data_path); - main_thread_log_path = push_str8f(df_state->arena, "%S/ui_thread.raddbg_log", user_data_folder); + main_thread_log_path = push_str8f(d_state->arena, "%S/ui_thread.raddbg_log", user_data_folder); os_make_directory(user_data_folder); os_write_data_to_file_path(main_thread_log_path, str8_zero()); } @@ -106,8 +106,8 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) df_gfx_request_frame(); df_unbind_spec(df_gfx_state->bind_change_cmd_spec, df_gfx_state->bind_change_binding); df_gfx_state->bind_change_active = 0; - DF_CmdParams p = df_cmd_params_from_gfx(); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(df_g_cfg_src_write_cmd_kind_table[DF_CfgSrc_User])); + D_CmdParams p = df_cmd_params_from_gfx(); + d_push_cmd__root(&p, d_cmd_spec_from_kind(d_cfg_src_write_cmd_kind_table[D_CfgSrc_User])); } for(OS_Event *event = events.first, *next = 0; event != 0; event = next) { @@ -134,8 +134,8 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) U32 codepoint = os_codepoint_from_event_flags_and_key(event->flags, event->key); os_text(&events, os_handle_zero(), codepoint); os_eat_event(&events, event); - DF_CmdParams p = df_cmd_params_from_gfx(); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(df_g_cfg_src_write_cmd_kind_table[DF_CfgSrc_User])); + D_CmdParams p = df_cmd_params_from_gfx(); + d_push_cmd__root(&p, d_cmd_spec_from_kind(d_cfg_src_write_cmd_kind_table[D_CfgSrc_User])); df_gfx_request_frame(); break; } @@ -153,7 +153,7 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) { next = event->next; DF_Window *window = df_window_from_os_handle(event->window); - DF_CmdParams params = window ? df_cmd_params_from_window(window) : df_cmd_params_from_gfx(); + D_CmdParams params = window ? df_cmd_params_from_window(window) : df_cmd_params_from_gfx(); B32 take = 0; B32 skip = 0; @@ -168,8 +168,8 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) if(!take && event->kind == OS_EventKind_WindowClose && window != 0) { take = 1; - DF_CmdParams params = df_cmd_params_from_window(window); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseWindow)); + D_CmdParams params = df_cmd_params_from_window(window); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_CloseWindow)); } //- rjf: try menu bar operations @@ -213,19 +213,19 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) if(!take && event->kind == OS_EventKind_Press) { DF_Binding binding = {event->key, event->flags}; - DF_CmdSpecList spec_candidates = df_cmd_spec_list_from_binding(scratch.arena, binding); - if(spec_candidates.first != 0 && !df_cmd_spec_is_nil(spec_candidates.first->spec)) + D_CmdSpecList spec_candidates = df_cmd_spec_list_from_binding(scratch.arena, binding); + if(spec_candidates.first != 0 && !d_cmd_spec_is_nil(spec_candidates.first->spec)) { - DF_CmdSpec *run_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand); - DF_CmdSpec *spec = spec_candidates.first->spec; + D_CmdSpec *run_spec = d_cmd_spec_from_kind(D_CmdKind_RunCommand); + D_CmdSpec *spec = spec_candidates.first->spec; if(run_spec != spec) { params.cmd_spec = spec; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_CmdSpec); } U32 hit_char = os_codepoint_from_event_flags_and_key(event->flags, event->key); take = 1; - df_push_cmd__root(¶ms, run_spec); + d_push_cmd__root(¶ms, run_spec); if(event->flags & OS_EventFlag_Alt) { window->menu_bar_focus_press_started = 0; @@ -243,10 +243,10 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) { String32 insertion32 = str32(&event->character, 1); String8 insertion8 = str8_from_32(scratch.arena, insertion32); - DF_CmdSpec *spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_InsertText); + D_CmdSpec *spec = d_cmd_spec_from_kind(D_CmdKind_InsertText); params.string = insertion8; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, spec); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, spec); df_gfx_request_frame(); take = 1; if(event->flags & OS_EventFlag_Alt) @@ -260,7 +260,7 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) { take = 1; params.os_event = event; - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_OSEvent)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_OSEvent)); } //- rjf: take @@ -274,13 +274,13 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) ////////////////////////////// //- rjf: gather root-level commands // - DF_CmdList cmds = df_core_gather_root_cmds(scratch.arena); + D_CmdList cmds = d_gather_root_cmds(scratch.arena); ////////////////////////////// //- rjf: begin frame // { - df_core_begin_frame(scratch.arena, &cmds, dt); + d_begin_frame(scratch.arena, &cmds, dt); df_gfx_begin_frame(scratch.arena, &cmds); } @@ -329,7 +329,7 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) //- rjf: update & render // { - d_begin_frame(); + dr_begin_frame(); for(DF_Window *w = df_gfx_state->first_window; w != 0; w = w->next) { B32 window_is_focused = os_window_is_focused(w->os); @@ -337,12 +337,12 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) { last_focused_window = df_handle_from_window(w); } - df_push_interact_regs(); + d_push_interact_regs(); df_window_update_and_render(scratch.arena, w, &cmds); - DF_InteractRegs *window_regs = df_pop_interact_regs(); + D_InteractRegs *window_regs = d_pop_interact_regs(); if(df_window_from_handle(last_focused_window) == w) { - MemoryCopyStruct(df_interact_regs(), window_regs); + MemoryCopyStruct(d_interact_regs(), window_regs); } } } @@ -352,7 +352,7 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) // { df_gfx_end_frame(); - df_core_end_frame(); + d_end_frame(); } ////////////////////////////// @@ -363,7 +363,7 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) for(DF_Window *w = df_gfx_state->first_window; w != 0; w = w->next) { r_window_begin_frame(w->os, w->r); - d_submit_bucket(w->os, w->r, w->draw_bucket); + dr_submit_bucket(w->os, w->r, w->draw_bucket); r_window_end_frame(w->os, w->r); } r_end_frame(); @@ -374,15 +374,15 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) // if(os_handle_match(repaint_window_handle, os_handle_zero())) { - DF_HandleList windows_to_show = {0}; + D_HandleList windows_to_show = {0}; for(DF_Window *w = df_gfx_state->first_window; w != 0; w = w->next) { if(w->frames_alive == 1) { - df_handle_list_push(scratch.arena, &windows_to_show, df_handle_from_window(w)); + d_handle_list_push(scratch.arena, &windows_to_show, df_handle_from_window(w)); } } - for(DF_HandleNode *n = windows_to_show.first; n != 0; n = n->next) + for(D_HandleNode *n = windows_to_show.first; n != 0; n = n->next) { DF_Window *window = df_window_from_handle(n->handle); os_window_first_paint(window->os); @@ -405,9 +405,9 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) os_append_data_to_file_path(main_thread_log_path, log.strings[LogMsgKind_Info]); if(log.strings[LogMsgKind_UserError].size != 0) { - DF_CmdParams p = df_cmd_params_from_gfx(); + D_CmdParams p = df_cmd_params_from_gfx(); p.string = log.strings[LogMsgKind_UserError]; - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_push_cmd__root(&p, d_cmd_spec_from_kind(D_CmdKind_Error)); } } diff --git a/src/raddbg/raddbg.h b/src/raddbg/raddbg.h index 259550b0..d1c8c65f 100644 --- a/src/raddbg/raddbg.h +++ b/src/raddbg/raddbg.h @@ -472,7 +472,7 @@ global OS_Handle ipc_s2m_ring_mutex = {0}; global OS_Handle ipc_s2m_ring_cv = {0}; //- rjf: last focused window -global DF_Handle last_focused_window = {0}; +global D_Handle last_focused_window = {0}; //- rjf: frame time history global U64 frame_time_us_history[64] = {0}; diff --git a/src/raddbg/raddbg_main.c b/src/raddbg/raddbg_main.c index ec33e5a7..3b7e4c72 100644 --- a/src/raddbg/raddbg_main.c +++ b/src/raddbg/raddbg_main.c @@ -63,7 +63,8 @@ #include "font_cache/font_cache.h" #include "draw/draw.h" #include "ui/ui_inc.h" -#include "df/df_inc.h" +#include "dbg_engine/dbg_engine_inc.h" +#include "dbg_gfx/dbg_gfx_inc.h" #include "raddbg.h" //- rjf: [c] @@ -102,7 +103,8 @@ #include "font_cache/font_cache.c" #include "draw/draw.c" #include "ui/ui_inc.c" -#include "df/df_inc.c" +#include "dbg_engine/dbg_engine_inc.c" +#include "dbg_gfx/dbg_gfx_inc.c" #include "raddbg.c" //////////////////////////////// @@ -234,9 +236,9 @@ entry_point(CmdLine *cmd_line) tex_init(); geo_init(); fnt_init(); - DF_StateDeltaHistory *hist = df_state_delta_history_alloc(); - df_core_init(cmd_line, hist); - df_gfx_init(update_and_render, df_state_delta_history()); + D_StateDeltaHistory *hist = d_state_delta_history_alloc(); + d_init(cmd_line, hist); + df_gfx_init(update_and_render, d_state_delta_history()); } //- rjf: setup initial target from command line args @@ -245,8 +247,8 @@ entry_point(CmdLine *cmd_line) if(args.node_count > 0 && args.first->string.size != 0) { Temp scratch = scratch_begin(0, 0); - DF_Entity *target = df_entity_alloc(df_entity_root(), DF_EntityKind_Target); - df_entity_equip_cfg_src(target, DF_CfgSrc_CommandLine); + D_Entity *target = d_entity_alloc(d_entity_root(), D_EntityKind_Target); + d_entity_equip_cfg_src(target, D_CfgSrc_CommandLine); String8List passthrough_args_list = {0}; for(String8Node *n = args.first->next; n != 0; n = n->next) { @@ -260,14 +262,14 @@ entry_point(CmdLine *cmd_line) if(args.first->string.size != 0) { String8 exe_name = args.first->string; - DF_Entity *exe = df_entity_alloc(target, DF_EntityKind_Executable); + D_Entity *exe = d_entity_alloc(target, D_EntityKind_Executable); PathStyle style = path_style_from_str8(exe_name); if(style == PathStyle_Relative) { exe_name = push_str8f(scratch.arena, "%S/%S", current_path, exe_name); exe_name = path_normalized_from_string(scratch.arena, exe_name); } - df_entity_equip_name(exe, exe_name); + d_entity_equip_name(exe, exe_name); } // rjf: equip working directory @@ -275,8 +277,8 @@ entry_point(CmdLine *cmd_line) if(path_part_of_arg.size != 0) { String8 path = push_str8f(scratch.arena, "%S/", path_part_of_arg); - DF_Entity *wdir = df_entity_alloc(target, DF_EntityKind_WorkingDirectory); - df_entity_equip_name(wdir, path); + D_Entity *wdir = d_entity_alloc(target, D_EntityKind_WorkingDirectory); + d_entity_equip_name(wdir, path); } // rjf: equip args @@ -284,8 +286,8 @@ entry_point(CmdLine *cmd_line) String8 args_str = str8_list_join(scratch.arena, &passthrough_args_list, &join); if(args_str.size != 0) { - DF_Entity *args_entity = df_entity_alloc(target, DF_EntityKind_Arguments); - df_entity_equip_name(args_entity, args_str); + D_Entity *args_entity = d_entity_alloc(target, D_EntityKind_Arguments); + d_entity_equip_name(args_entity, args_str); } scratch_end(scratch); } @@ -350,32 +352,32 @@ entry_point(CmdLine *cmd_line) if(dst_window != 0) { dst_window->window_temporarily_focused_ipc = 1; - String8 cmd_spec_string = df_cmd_name_part_from_string(msg); - DF_CmdSpec *cmd_spec = df_cmd_spec_from_string(cmd_spec_string); - if(!df_cmd_spec_is_nil(cmd_spec)) + String8 cmd_spec_string = d_cmd_name_part_from_string(msg); + D_CmdSpec *cmd_spec = d_cmd_spec_from_string(cmd_spec_string); + if(!d_cmd_spec_is_nil(cmd_spec)) { - DF_CmdParams params = df_cmd_params_from_window(dst_window); - String8 error = df_cmd_params_apply_spec_query(scratch.arena, ¶ms, cmd_spec, df_cmd_arg_part_from_string(msg)); + D_CmdParams params = df_cmd_params_from_window(dst_window); + String8 error = d_cmd_params_apply_spec_query(scratch.arena, ¶ms, cmd_spec, d_cmd_arg_part_from_string(msg)); if(error.size == 0) { - df_push_cmd__root(¶ms, cmd_spec); + d_push_cmd__root(¶ms, cmd_spec); df_gfx_request_frame(); } else { - DF_CmdParams params = df_cmd_params_from_window(dst_window); + D_CmdParams params = df_cmd_params_from_window(dst_window); params.string = error; - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Error)); df_gfx_request_frame(); } } else { - DF_CmdParams params = df_cmd_params_from_window(dst_window); + D_CmdParams params = df_cmd_params_from_window(dst_window); params.string = push_str8f(scratch.arena, "\"%S\" is not a command.", cmd_spec_string); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_String); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error)); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_String); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Error)); df_gfx_request_frame(); } } @@ -391,26 +393,26 @@ entry_point(CmdLine *cmd_line) if(auto_run) { auto_run = 0; - DF_CmdParams params = df_cmd_params_from_gfx(); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_LaunchAndRun)); + D_CmdParams params = df_cmd_params_from_gfx(); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_LaunchAndRun)); } //- rjf: auto step if(auto_step) { auto_step = 0; - DF_CmdParams params = df_cmd_params_from_gfx(); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_StepInto)); + D_CmdParams params = df_cmd_params_from_gfx(); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_StepInto)); } //- rjf: jit attach if(jit_attach) { jit_attach = 0; - DF_CmdParams params = df_cmd_params_from_gfx(); - df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_ID); + D_CmdParams params = df_cmd_params_from_gfx(); + d_cmd_params_mark_slot(¶ms, D_CmdParamSlot_ID); params.id = jit_pid; - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Attach)); + d_push_cmd__root(¶ms, d_cmd_spec_from_kind(D_CmdKind_Attach)); } //- rjf: quit if no windows are left diff --git a/src/render/d3d11/render_d3d11.c b/src/render/d3d11/render_d3d11.c index 25389300..d3aa0333 100644 --- a/src/render/d3d11/render_d3d11.c +++ b/src/render/d3d11/render_d3d11.c @@ -1,8 +1,8 @@ // Copyright (c) 2024 Epic Games Tools // Licensed under the MIT license (https://opensource.org/license/mit/) -#undef RADDBG_LAYER_COLOR -#define RADDBG_LAYER_COLOR 0.80f, 0.60f, 0.20f +#undef MARKUP_LAYER_COLOR +#define MARKUP_LAYER_COLOR 0.80f, 0.60f, 0.20f //////////////////////////////// //~ rjf: Input Layout Element Tables diff --git a/src/ui/ui_basic_widgets.c b/src/ui/ui_basic_widgets.c index 83b5949f..bdcc750d 100644 --- a/src/ui/ui_basic_widgets.c +++ b/src/ui/ui_basic_widgets.c @@ -160,8 +160,8 @@ internal UI_BOX_CUSTOM_DRAW(ui_line_edit_draw) box->rect.y1-2.f, }; Rng2F32 select_rect = union_2f32(cursor_rect, mark_rect); - d_rect(select_rect, select_color, font_size/2.f, 0, 1.f); - d_rect(cursor_rect, cursor_color, 0.f, 0, 1.f); + dr_rect(select_rect, select_color, font_size/2.f, 0, 1.f); + dr_rect(cursor_rect, cursor_color, 0.f, 0, 1.f); } internal UI_Signal @@ -347,12 +347,12 @@ internal UI_BOX_CUSTOM_DRAW(ui_image_draw) UI_ImageDrawData *draw_data = (UI_ImageDrawData *)user_data; if(r_handle_match(draw_data->texture, r_handle_zero())) { - R_Rect2DInst *inst = d_rect(box->rect, v4f32(0, 0, 0, 0), 0, 0, 1.f); + R_Rect2DInst *inst = dr_rect(box->rect, v4f32(0, 0, 0, 0), 0, 0, 1.f); MemoryCopyArray(inst->corner_radii, box->corner_radii); } - else D_Tex2DSampleKindScope(draw_data->sample_kind) + else DR_Tex2DSampleKindScope(draw_data->sample_kind) { - R_Rect2DInst *inst = d_img(box->rect, draw_data->region, draw_data->texture, draw_data->tint, 0, 0, 0); + R_Rect2DInst *inst = dr_img(box->rect, draw_data->region, draw_data->texture, draw_data->tint, 0, 0, 0); MemoryCopyArray(inst->corner_radii, box->corner_radii); } if(draw_data->blur > 0.01f) @@ -365,7 +365,7 @@ internal UI_BOX_CUSTOM_DRAW(ui_image_draw) clip = intersect_2f32(b->rect, clip); } } - R_PassParams_Blur *blur = d_blur(intersect_2f32(clip, box->rect), draw_data->blur, 0); + R_PassParams_Blur *blur = dr_blur(intersect_2f32(clip, box->rect), draw_data->blur, 0); MemoryCopyArray(blur->corner_radii, box->corner_radii); } } @@ -569,13 +569,13 @@ internal UI_BOX_CUSTOM_DRAW(ui_sat_val_picker_draw) // rjf: white -> rgb background { - R_Rect2DInst *inst = d_rect(pad_2f32(box->rect, -1.f), v4f32(hue_rgb.x, hue_rgb.y, hue_rgb.z, 1), 4.f, 0, 1.f); + R_Rect2DInst *inst = dr_rect(pad_2f32(box->rect, -1.f), v4f32(hue_rgb.x, hue_rgb.y, hue_rgb.z, 1), 4.f, 0, 1.f); inst->colors[Corner_00] = inst->colors[Corner_01] = v4f32(1, 1, 1, 1); } // rjf: black gradient overlay { - R_Rect2DInst *inst = d_rect(pad_2f32(box->rect, -1.f), v4f32(0, 0, 0, 0), 4.f, 0, 1.f); + R_Rect2DInst *inst = dr_rect(pad_2f32(box->rect, -1.f), v4f32(0, 0, 0, 0), 4.f, 0, 1.f); inst->colors[Corner_01] = v4f32(0, 0, 0, 1); inst->colors[Corner_11] = v4f32(0, 0, 0, 1); } @@ -589,7 +589,7 @@ internal UI_BOX_CUSTOM_DRAW(ui_sat_val_picker_draw) center.y - half_size, center.x + half_size, center.y + half_size); - d_rect(rect, v4f32(1, 1, 1, 1), half_size/2, 2.f, 1.f); + dr_rect(rect, v4f32(1, 1, 1, 1), half_size/2, 2.f, 1.f); } } @@ -680,7 +680,7 @@ internal UI_BOX_CUSTOM_DRAW(ui_hue_picker_draw) Vec3F32 rgb1 = rgb_from_hsv(v3f32(hue1, 1, 1)); Vec4F32 rgba0 = v4f32(rgb0.x, rgb0.y, rgb0.z, 1); Vec4F32 rgba1 = v4f32(rgb1.x, rgb1.y, rgb1.z, 1); - R_Rect2DInst *inst = d_rect(rect, v4f32(0, 0, 0, 0), 0, 0, 0.f); + R_Rect2DInst *inst = dr_rect(rect, v4f32(0, 0, 0, 0), 0, 0, 0.f); inst->colors[Corner_00] = rgba0; inst->colors[Corner_01] = rgba1; inst->colors[Corner_10] = rgba0; @@ -698,7 +698,7 @@ internal UI_BOX_CUSTOM_DRAW(ui_hue_picker_draw) center.y - 2.f, center.x + half_size, center.y + 2.f); - d_rect(rect, v4f32(1, 1, 1, 1), half_size/2, 2.f, 1.f); + dr_rect(rect, v4f32(1, 1, 1, 1), half_size/2, 2.f, 1.f); } } @@ -772,7 +772,7 @@ internal UI_BOX_CUSTOM_DRAW(ui_alpha_picker_draw) Vec2F32 center = center_2f32(rect); rect.x0 += (center.x - rect.x0) * 0.3f; rect.x1 += (center.x - rect.x1) * 0.3f; - R_Rect2DInst *inst = d_rect(rect, v4f32(0, 0, 0, 0), 0, 0, 0); + R_Rect2DInst *inst = dr_rect(rect, v4f32(0, 0, 0, 0), 0, 0, 0); inst->colors[Corner_00] = inst->colors[Corner_10] = v4f32(1, 1, 1, 1); } @@ -785,7 +785,7 @@ internal UI_BOX_CUSTOM_DRAW(ui_alpha_picker_draw) center.y - 2.f, center.x + half_size, center.y + 2.f); - d_rect(rect, v4f32(1, 1, 1, 1), half_size/2, 2.f, 1.f); + dr_rect(rect, v4f32(1, 1, 1, 1), half_size/2, 2.f, 1.f); } } diff --git a/src/ui/ui_core.c b/src/ui/ui_core.c index 40225f28..1a067018 100644 --- a/src/ui/ui_core.c +++ b/src/ui/ui_core.c @@ -1,8 +1,8 @@ // Copyright (c) 2024 Epic Games Tools // Licensed under the MIT license (https://opensource.org/license/mit/) -#undef RADDBG_LAYER_COLOR -#define RADDBG_LAYER_COLOR 0.80f, 0.40f, 0.35f +#undef MARKUP_LAYER_COLOR +#define MARKUP_LAYER_COLOR 0.80f, 0.40f, 0.35f //////////////////////////////// //~ rjf: Globals @@ -719,10 +719,10 @@ ui_string_hover_string(Arena *arena) return result; } -internal D_FancyRunList +internal DR_FancyRunList ui_string_hover_runs(Arena *arena) { - D_FancyRunList result = d_fancy_run_list_copy(arena, &ui_state->string_hover_fancy_runs); + DR_FancyRunList result = dr_fancy_run_list_copy(arena, &ui_state->string_hover_fancy_runs); return result; } @@ -1490,7 +1490,7 @@ ui_end_build(void) { arena_clear(ui_state->string_hover_arena); ui_state->string_hover_string = push_str8_copy(ui_state->string_hover_arena, box_display_string); - ui_state->string_hover_fancy_runs = d_fancy_run_list_copy(ui_state->string_hover_arena, &b->display_string_runs); + ui_state->string_hover_fancy_runs = dr_fancy_run_list_copy(ui_state->string_hover_arena, &b->display_string_runs); ui_state->string_hover_begin_us = os_now_microseconds(); } ui_state->string_hover_build_index = ui_state->build_index; @@ -2366,9 +2366,9 @@ ui_box_equip_display_string(UI_Box *box, String8 string) if(box->flags & UI_BoxFlag_DrawText && (box->fastpath_codepoint == 0 || !(box->flags & UI_BoxFlag_DrawTextFastpathCodepoint))) { String8 display_string = ui_box_display_string(box); - D_FancyStringNode fancy_string_n = {0, {box->font, display_string, box->palette->colors[text_color_code], box->font_size, 0, 0}}; - D_FancyStringList fancy_strings = {&fancy_string_n, &fancy_string_n, 1}; - box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->text_raster_flags, &fancy_strings); + DR_FancyStringNode fancy_string_n = {0, {box->font, display_string, box->palette->colors[text_color_code], box->font_size, 0, 0}}; + DR_FancyStringList fancy_strings = {&fancy_string_n, &fancy_string_n, 1}; + box->display_string_runs = dr_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->text_raster_flags, &fancy_strings); } else if(box->flags & UI_BoxFlag_DrawText && box->flags & UI_BoxFlag_DrawTextFastpathCodepoint && box->fastpath_codepoint != 0) { @@ -2379,17 +2379,17 @@ ui_box_equip_display_string(UI_Box *box, String8 string) U64 fpcp_pos = str8_find_needle(display_string, 0, fpcp, StringMatchFlag_CaseInsensitive); if(fpcp_pos < display_string.size) { - D_FancyStringNode pst_fancy_string_n = {0, {box->font, str8_skip(display_string, fpcp_pos+fpcp.size), box->palette->colors[text_color_code], box->font_size, 0, 0}}; - D_FancyStringNode cdp_fancy_string_n = {&pst_fancy_string_n, {box->font, str8_substr(display_string, r1u64(fpcp_pos, fpcp_pos+fpcp.size)), box->palette->colors[text_color_code], box->font_size, 3.f, 0}}; - D_FancyStringNode pre_fancy_string_n = {&cdp_fancy_string_n, {box->font, str8_prefix(display_string, fpcp_pos), box->palette->colors[text_color_code], box->font_size, 0, 0}}; - D_FancyStringList fancy_strings = {&pre_fancy_string_n, &pst_fancy_string_n, 3}; - box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->text_raster_flags, &fancy_strings); + DR_FancyStringNode pst_fancy_string_n = {0, {box->font, str8_skip(display_string, fpcp_pos+fpcp.size), box->palette->colors[text_color_code], box->font_size, 0, 0}}; + DR_FancyStringNode cdp_fancy_string_n = {&pst_fancy_string_n, {box->font, str8_substr(display_string, r1u64(fpcp_pos, fpcp_pos+fpcp.size)), box->palette->colors[text_color_code], box->font_size, 3.f, 0}}; + DR_FancyStringNode pre_fancy_string_n = {&cdp_fancy_string_n, {box->font, str8_prefix(display_string, fpcp_pos), box->palette->colors[text_color_code], box->font_size, 0, 0}}; + DR_FancyStringList fancy_strings = {&pre_fancy_string_n, &pst_fancy_string_n, 3}; + box->display_string_runs = dr_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->text_raster_flags, &fancy_strings); } else { - D_FancyStringNode fancy_string_n = {0, {box->font, display_string, box->palette->colors[UI_ColorCode_Text], box->font_size, 0, 0}}; - D_FancyStringList fancy_strings = {&fancy_string_n, &fancy_string_n, 1}; - box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->text_raster_flags, &fancy_strings); + DR_FancyStringNode fancy_string_n = {0, {box->font, display_string, box->palette->colors[UI_ColorCode_Text], box->font_size, 0, 0}}; + DR_FancyStringList fancy_strings = {&fancy_string_n, &fancy_string_n, 1}; + box->display_string_runs = dr_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->text_raster_flags, &fancy_strings); } scratch_end(scratch); } @@ -2397,19 +2397,19 @@ ui_box_equip_display_string(UI_Box *box, String8 string) } internal void -ui_box_equip_display_fancy_strings(UI_Box *box, D_FancyStringList *strings) +ui_box_equip_display_fancy_strings(UI_Box *box, DR_FancyStringList *strings) { box->flags |= UI_BoxFlag_HasDisplayString; - box->string = d_string_from_fancy_string_list(ui_build_arena(), strings); - box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->text_raster_flags, strings); + box->string = dr_string_from_fancy_string_list(ui_build_arena(), strings); + box->display_string_runs = dr_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->text_raster_flags, strings); } internal inline void -ui_box_equip_display_string_fancy_runs(UI_Box *box, String8 string, D_FancyRunList *runs) +ui_box_equip_display_string_fancy_runs(UI_Box *box, String8 string, DR_FancyRunList *runs) { box->flags |= UI_BoxFlag_HasDisplayString; box->string = push_str8_copy(ui_build_arena(), string); - box->display_string_runs = d_fancy_run_list_copy(ui_build_arena(), runs); + box->display_string_runs = dr_fancy_run_list_copy(ui_build_arena(), runs); } internal inline void @@ -2420,12 +2420,12 @@ ui_box_equip_fuzzy_match_ranges(UI_Box *box, FuzzyMatchRangeList *matches) } internal void -ui_box_equip_draw_bucket(UI_Box *box, D_Bucket *bucket) +ui_box_equip_draw_bucket(UI_Box *box, DR_Bucket *bucket) { box->flags |= UI_BoxFlag_DrawBucket; if(box->draw_bucket != 0) { - D_BucketScope(box->draw_bucket) d_sub_bucket(bucket); + D_BucketScope(box->draw_bucket) dr_sub_bucket(bucket); } else { diff --git a/src/ui/ui_core.h b/src/ui/ui_core.h index f1bdf8de..86486ccf 100644 --- a/src/ui/ui_core.h +++ b/src/ui/ui_core.h @@ -418,7 +418,7 @@ struct UI_Box OS_Cursor hover_cursor; U32 fastpath_codepoint; UI_Key group_key; - D_Bucket *draw_bucket; + DR_Bucket *draw_bucket; UI_BoxCustomDrawFunctionType *custom_draw; void *custom_draw_user_data; UI_Palette *palette; @@ -433,7 +433,7 @@ struct UI_Box F32 text_padding; //- rjf: per-build artifacts - D_FancyRunList display_string_runs; + DR_FancyRunList display_string_runs; Rng2F32 rect; Vec2F32 fixed_position_animated; Vec2F32 position_delta; @@ -636,7 +636,7 @@ struct UI_State String8 drag_state_data; Arena *string_hover_arena; String8 string_hover_string; - D_FancyRunList string_hover_fancy_runs; + DR_FancyRunList string_hover_fancy_runs; U64 string_hover_begin_us; U64 string_hover_build_index; U64 last_time_mousemoved_us; @@ -769,7 +769,7 @@ internal String8 ui_get_drag_data(U64 min_required_size); //- rjf: hovered string info internal B32 ui_string_hover_active(void); -internal D_FancyRunList ui_string_hover_runs(Arena *arena); +internal DR_FancyRunList ui_string_hover_runs(Arena *arena); //- rjf: interaction keys internal UI_Key ui_hot_key(void); @@ -836,10 +836,10 @@ internal UI_Box * ui_build_box_from_stringf(UI_BoxFlags flags, char *fm //- rjf: box node equipment internal inline void ui_box_equip_display_string(UI_Box *box, String8 string); -internal inline void ui_box_equip_display_fancy_strings(UI_Box *box, D_FancyStringList *strings); -internal inline void ui_box_equip_display_string_fancy_runs(UI_Box *box, String8 string, D_FancyRunList *runs); +internal inline void ui_box_equip_display_fancy_strings(UI_Box *box, DR_FancyStringList *strings); +internal inline void ui_box_equip_display_string_fancy_runs(UI_Box *box, String8 string, DR_FancyRunList *runs); internal inline void ui_box_equip_fuzzy_match_ranges(UI_Box *box, FuzzyMatchRangeList *matches); -internal inline void ui_box_equip_draw_bucket(UI_Box *box, D_Bucket *bucket); +internal inline void ui_box_equip_draw_bucket(UI_Box *box, DR_Bucket *bucket); internal inline void ui_box_equip_custom_draw(UI_Box *box, UI_BoxCustomDrawFunctionType *custom_draw, void *user_data); //- rjf: box accessors / queries diff --git a/src/ui/ui_inc.c b/src/ui/ui_inc.c index 50390e9b..7d4e8378 100644 --- a/src/ui/ui_inc.c +++ b/src/ui/ui_inc.c @@ -1,8 +1,8 @@ // Copyright (c) 2024 Epic Games Tools // Licensed under the MIT license (https://opensource.org/license/mit/) -#undef RADDBG_LAYER_COLOR -#define RADDBG_LAYER_COLOR 0.70f, 0.30f, 0.15f +#undef MARKUP_LAYER_COLOR +#define MARKUP_LAYER_COLOR 0.70f, 0.30f, 0.15f #include "ui_core.c" #include "ui_basic_widgets.c"