From 14db7dbab482ccebac62e2386b67921213ed21be Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Wed, 31 Jan 2024 10:39:18 -0800 Subject: [PATCH] stub out globals, thread-locals, types views; eliminate unnecssary uniquifier u64 in expand tree hash keys - simplify eval watch views to using a single eval view for the entire view, rather than allocating one per root expression. expand keys are now simply comprised of parent hash * child num --- src/df/core/df_core.c | 30 ++-- src/df/core/df_core.h | 5 +- src/df/core/df_core.mdesk | 5 +- src/df/core/generated/df_core.meta.c | 5 +- src/df/core/generated/df_core.meta.h | 3 + src/df/gfx/df_gfx.c | 18 ++- src/df/gfx/df_gfx.mdesk | 80 +--------- src/df/gfx/df_view_rule_hooks.c | 10 +- src/df/gfx/df_views.c | 211 ++++++++++++++++++--------- src/df/gfx/df_views.h | 27 +++- src/df/gfx/generated/df_gfx.meta.h | 136 +++-------------- 11 files changed, 229 insertions(+), 301 deletions(-) diff --git a/src/df/core/df_core.c b/src/df/core/df_core.c index 8b83ef00..10ef5828 100644 --- a/src/df/core/df_core.c +++ b/src/df/core/df_core.c @@ -204,11 +204,10 @@ df_state_delta_history_wind(DF_StateDeltaHistory *hist, Side side) //- rjf: keys internal DF_ExpandKey -df_expand_key_make(U64 uniquifier, U64 parent_hash, U64 child_num) +df_expand_key_make(U64 parent_hash, U64 child_num) { DF_ExpandKey key; { - key.uniquifier = uniquifier; key.parent_hash = parent_hash; key.child_num = child_num; } @@ -233,7 +232,6 @@ df_hash_from_expand_key(DF_ExpandKey key) { U64 data[] = { - key.uniquifier, key.child_num, }; U64 hash = df_hash_from_seed_string(key.parent_hash, str8((U8 *)data, sizeof(data))); @@ -5262,7 +5260,7 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie memblock->eval = udt_eval; memblock->cfg_table = *cfg_table; memblock->parent_key = key; - memblock->key = df_expand_key_make(key.uniquifier, df_hash_from_expand_key(key), 0); + memblock->key = df_expand_key_make(df_hash_from_expand_key(key), 0); memblock->visual_idx_range = r1u64(0, filtered_data_members.count); memblock->semantic_idx_range = r1u64(0, filtered_data_members.count); memblock->depth = depth+1; @@ -5289,7 +5287,7 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie // rjf: build inheriting cfg table DF_CfgTable child_cfg = *cfg_table; { - String8 view_rule_string = df_eval_view_rule_from_key(eval_view, df_expand_key_make(key.uniquifier, df_hash_from_expand_key(key), child_num)); + String8 view_rule_string = df_eval_view_rule_from_key(eval_view, df_expand_key_make(df_hash_from_expand_key(key), child_num)); child_cfg = df_cfg_table_from_inheritance(arena, cfg_table); if(view_rule_string.size != 0) { @@ -5320,7 +5318,7 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie next_memblock->eval = udt_eval; next_memblock->cfg_table = *cfg_table; next_memblock->parent_key = key; - next_memblock->key = df_expand_key_make(key.uniquifier, df_hash_from_expand_key(key), 0); + next_memblock->key = df_expand_key_make(df_hash_from_expand_key(key), 0); next_memblock->visual_idx_range = r1u64(child_idx+1, filtered_data_members.count); next_memblock->semantic_idx_range= r1u64(child_idx+1, filtered_data_members.count); next_memblock->depth = depth+1; @@ -5381,7 +5379,7 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie linkblock->link_member_off = link_member->off; linkblock->cfg_table = *cfg_table; linkblock->parent_key = key; - linkblock->key = df_expand_key_make(key.uniquifier, df_hash_from_expand_key(key), 0); + linkblock->key = df_expand_key_make(df_hash_from_expand_key(key), 0); linkblock->visual_idx_range = r1u64(0, link_bases.count); linkblock->semantic_idx_range = r1u64(0, link_bases.count); linkblock->depth = depth+1; @@ -5408,7 +5406,7 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie // rjf: build inheriting cfg table DF_CfgTable child_cfg = *cfg_table; { - String8 view_rule_string = df_eval_view_rule_from_key(eval_view, df_expand_key_make(key.uniquifier, df_hash_from_expand_key(key), child_num)); + String8 view_rule_string = df_eval_view_rule_from_key(eval_view, df_expand_key_make(df_hash_from_expand_key(key), child_num)); child_cfg = df_cfg_table_from_inheritance(arena, cfg_table); if(view_rule_string.size != 0) { @@ -5441,7 +5439,7 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie next_linkblock->link_member_off = link_member->off; next_linkblock->cfg_table = *cfg_table; next_linkblock->parent_key = key; - next_linkblock->key = df_expand_key_make(key.uniquifier, df_hash_from_expand_key(key), 0); + next_linkblock->key = df_expand_key_make(df_hash_from_expand_key(key), 0); next_linkblock->visual_idx_range = r1u64(child_idx+1, link_bases.count); next_linkblock->semantic_idx_range = r1u64(child_idx+1, link_bases.count); next_linkblock->depth = depth+1; @@ -5473,7 +5471,7 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie elemblock->eval = arr_eval; elemblock->cfg_table = *cfg_table; elemblock->parent_key = key; - elemblock->key = df_expand_key_make(key.uniquifier, df_hash_from_expand_key(key), 0); + elemblock->key = df_expand_key_make(df_hash_from_expand_key(key), 0); elemblock->visual_idx_range = r1u64(0, array_count); elemblock->semantic_idx_range = r1u64(0, array_count); elemblock->depth = depth+1; @@ -5500,7 +5498,7 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie // rjf: build inheriting cfg table DF_CfgTable child_cfg = *cfg_table; { - String8 view_rule_string = df_eval_view_rule_from_key(eval_view, df_expand_key_make(key.uniquifier, df_hash_from_expand_key(key), child_num)); + String8 view_rule_string = df_eval_view_rule_from_key(eval_view, df_expand_key_make(df_hash_from_expand_key(key), child_num)); child_cfg = df_cfg_table_from_inheritance(arena, cfg_table); if(view_rule_string.size != 0) { @@ -5528,7 +5526,7 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie next_elemblock->eval = arr_eval; next_elemblock->cfg_table = *cfg_table; next_elemblock->parent_key = key; - next_elemblock->key = df_expand_key_make(key.uniquifier, df_hash_from_expand_key(key), 0); + next_elemblock->key = df_expand_key_make(df_hash_from_expand_key(key), 0); next_elemblock->visual_idx_range = r1u64(child_idx+1, array_count); next_elemblock->semantic_idx_range = r1u64(child_idx+1, array_count); next_elemblock->depth = depth+1; @@ -5546,7 +5544,7 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie ProfScope("build viz blocks for ptr-to-ptrs") { String8 subexpr = push_str8f(arena, "*(%S)", string); - df_append_viz_blocks_for_parent__rec(arena, scope, eval_view, ctrl_ctx, parse_ctx, key, df_expand_key_make(key.uniquifier, df_hash_from_expand_key(key), 1), subexpr, ptr_eval, cfg_table, depth+1, list_out); + df_append_viz_blocks_for_parent__rec(arena, scope, eval_view, ctrl_ctx, parse_ctx, key, df_expand_key_make(df_hash_from_expand_key(key), 1), subexpr, ptr_eval, cfg_table, depth+1, list_out); } scratch_end(scratch); @@ -5554,13 +5552,13 @@ df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalVie } internal DF_EvalVizBlockList -df_eval_viz_block_list_from_eval_view_expr(Arena *arena, DBGI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_EvalView *eval_view, String8 expr) +df_eval_viz_block_list_from_eval_view_expr_num(Arena *arena, DBGI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_EvalView *eval_view, String8 expr, U64 num) { ProfBeginFunction(); DF_EvalVizBlockList blocks = {0}; { - DF_ExpandKey start_parent_key = df_expand_key_make((U64)eval_view, 0, 0); - DF_ExpandKey start_key = df_expand_key_make((U64)eval_view, 5381, 1); + DF_ExpandKey start_parent_key = df_expand_key_make(5381, 0); + DF_ExpandKey start_key = df_expand_key_from_eval_view_root_expr_num(eval_view, expr, num); DF_Eval eval = df_eval_from_string(arena, scope, ctrl_ctx, parse_ctx, expr); U64 expr_comma_pos = str8_find_needle(expr, 0, str8_lit(","), 0); String8List default_view_rules = {0}; diff --git a/src/df/core/df_core.h b/src/df/core/df_core.h index 0869e50c..040e8ff5 100644 --- a/src/df/core/df_core.h +++ b/src/df/core/df_core.h @@ -35,7 +35,6 @@ struct DF_HandleList typedef struct DF_ExpandKey DF_ExpandKey; struct DF_ExpandKey { - U64 uniquifier; U64 parent_hash; U64 child_num; }; @@ -1282,7 +1281,7 @@ 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 uniquifier, U64 parent_hash, U64 child_num); +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); @@ -1601,7 +1600,7 @@ internal DF_EvalLinkBaseArray df_eval_link_base_array_from_chunk_list(Arena *are //- rjf: watch tree visualization internal void df_append_viz_blocks_for_parent__rec(Arena *arena, DBGI_Scope *scope, DF_EvalView *view, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_ExpandKey parent_key, DF_ExpandKey key, String8 string, DF_Eval eval, DF_CfgTable *cfg_table, S32 depth, DF_EvalVizBlockList *list_out); -internal DF_EvalVizBlockList df_eval_viz_block_list_from_eval_view_expr(Arena *arena, DBGI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_EvalView *eval_view, String8 expr); +internal DF_EvalVizBlockList df_eval_viz_block_list_from_eval_view_expr_num(Arena *arena, DBGI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_EvalView *eval_view, String8 expr, U64 num); internal void df_eval_viz_block_list_concat__in_place(DF_EvalVizBlockList *dst, DF_EvalVizBlockList *to_push); //////////////////////////////// diff --git a/src/df/core/df_core.mdesk b/src/df/core/df_core.mdesk index 6950a4a8..5b83f0e8 100644 --- a/src/df/core/df_core.mdesk +++ b/src/df/core/df_core.mdesk @@ -366,7 +366,10 @@ DF_CoreCmdTable:// | | | {Code 1 Null Nil 0 0 0 0 0 0 FileOutline "code" "Code" "Opens the code view for an already-loaded file." "" } {Watch 0 Null Nil 0 0 0 0 0 0 Binoculars "watch" "Watch" "Opens a watch view." "" } {Locals 0 Null Nil 0 0 0 0 0 0 Binoculars "locals" "Locals" "Opens a locals view." "" } - {Registers 0 Null Nil 0 0 0 0 0 0 Binoculars "registers" "Registers" "Opens a registers view for the currently selected thread." "" } + {Registers 0 Null Nil 0 0 0 0 0 0 Binoculars "registers" "Registers" "Opens a registers view." "" } + {Globals 0 Null Nil 0 0 0 0 0 0 Binoculars "globals" "Globals" "Opens a globals view." "" } + {ThreadLocals 0 Null Nil 0 0 0 0 0 0 Binoculars "thread_locals" "Thread Locals" "Opens a thread locals view." "" } + {Types 0 Null Nil 0 0 0 0 0 0 Binoculars "types" "Types" "Opens a types view." "" } {Output 0 Null Nil 0 0 0 0 0 0 List "output" "Output" "Opens an output view." "" } {Memory 0 Null Nil 0 0 0 0 0 0 Grid "memory" "Memory" "Opens a memory view." "" } {Disassembly 0 Null Nil 0 0 0 0 0 0 Glasses "disassembly" "Disassembly" "Opens the disassembly view." "disasm" } diff --git a/src/df/core/generated/df_core.meta.c b/src/df/core/generated/df_core.meta.c index a5e96dc3..71e9f868 100644 --- a/src/df/core/generated/df_core.meta.c +++ b/src/df/core/generated/df_core.meta.c @@ -190,7 +190,10 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[] = { str8_lit_comp("code"), str8_lit_comp("Opens the code view for an already-loaded file."), str8_lit_comp(""), str8_lit_comp("Code"), (DF_CmdSpecFlag_OmitFromLists*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("watch"), str8_lit_comp("Opens a watch view."), str8_lit_comp(""), str8_lit_comp("Watch"), (DF_CmdSpecFlag_OmitFromLists*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("locals"), str8_lit_comp("Opens a locals view."), str8_lit_comp(""), str8_lit_comp("Locals"), (DF_CmdSpecFlag_OmitFromLists*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("registers"), str8_lit_comp("Opens a registers view for the currently selected thread."), str8_lit_comp(""), str8_lit_comp("Registers"), (DF_CmdSpecFlag_OmitFromLists*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("registers"), str8_lit_comp("Opens a registers view."), str8_lit_comp(""), str8_lit_comp("Registers"), (DF_CmdSpecFlag_OmitFromLists*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("globals"), str8_lit_comp("Opens a globals view."), str8_lit_comp(""), str8_lit_comp("Globals"), (DF_CmdSpecFlag_OmitFromLists*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("thread_locals"), str8_lit_comp("Opens a thread locals view."), str8_lit_comp(""), str8_lit_comp("Thread Locals"), (DF_CmdSpecFlag_OmitFromLists*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("types"), str8_lit_comp("Opens a types view."), str8_lit_comp(""), str8_lit_comp("Types"), (DF_CmdSpecFlag_OmitFromLists*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("output"), str8_lit_comp("Opens an output view."), str8_lit_comp(""), str8_lit_comp("Output"), (DF_CmdSpecFlag_OmitFromLists*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("memory"), str8_lit_comp("Opens a memory view."), str8_lit_comp(""), str8_lit_comp("Memory"), (DF_CmdSpecFlag_OmitFromLists*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_Grid}, { str8_lit_comp("disassembly"), str8_lit_comp("Opens the disassembly view."), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), (DF_CmdSpecFlag_OmitFromLists*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_Glasses}, diff --git a/src/df/core/generated/df_core.meta.h b/src/df/core/generated/df_core.meta.h index 86b026f0..2577738d 100644 --- a/src/df/core/generated/df_core.meta.h +++ b/src/df/core/generated/df_core.meta.h @@ -243,6 +243,9 @@ DF_CoreCmdKind_Code, DF_CoreCmdKind_Watch, DF_CoreCmdKind_Locals, DF_CoreCmdKind_Registers, +DF_CoreCmdKind_Globals, +DF_CoreCmdKind_ThreadLocals, +DF_CoreCmdKind_Types, DF_CoreCmdKind_Output, DF_CoreCmdKind_Memory, DF_CoreCmdKind_Disassembly, diff --git a/src/df/gfx/df_gfx.c b/src/df/gfx/df_gfx.c index 714e0d97..45cd45a0 100644 --- a/src/df/gfx/df_gfx.c +++ b/src/df/gfx/df_gfx.c @@ -3991,7 +3991,7 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D 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_EvalVizBlockList viz_blocks = df_eval_viz_block_list_from_eval_view_expr(scratch.arena, scope, &ctrl_ctx, &parse_ctx, eval_view, expr); + DF_EvalVizBlockList viz_blocks = df_eval_viz_block_list_from_eval_view_expr_num(scratch.arena, scope, &ctrl_ctx, &parse_ctx, eval_view, expr, 1); DF_EvalVizWindowedRowList viz_rows = df_eval_viz_windowed_row_list_from_viz_block_list(scratch.arena, scope, &ctrl_ctx, &parse_ctx, 10, ui_top_font(), ui_top_font_size(), r1s64(0, 50), &viz_blocks); //- rjf: animate @@ -4338,6 +4338,9 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D DF_CoreCmdKind_Watch, DF_CoreCmdKind_Locals, DF_CoreCmdKind_Registers, + DF_CoreCmdKind_Globals, + DF_CoreCmdKind_ThreadLocals, + DF_CoreCmdKind_Types, DF_CoreCmdKind_Breakpoints, DF_CoreCmdKind_WatchPins, DF_CoreCmdKind_FilePathMap, @@ -4356,6 +4359,9 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D 'w', 'l', 'r', + 0, + 0, + 0, 'b', 'h', 'p', @@ -7028,7 +7034,7 @@ df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DBGI_Scope *scop // rjf: get keys for this row DF_ExpandKey parent_key = block->parent_key; - DF_ExpandKey key = df_expand_key_make((U64)block->eval_view, df_hash_from_expand_key(parent_key), idx+1); + DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(parent_key), idx+1); // rjf: get member eval DF_Eval member_eval = zero_struct; @@ -7113,7 +7119,7 @@ df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DBGI_Scope *scop { // rjf: get keys for this row DF_ExpandKey parent_key = block->parent_key; - DF_ExpandKey key = df_expand_key_make((U64)block->eval_view, df_hash_from_expand_key(parent_key), idx+1); + DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(parent_key), idx+1); // rjf: get eval for this element DF_Eval elem_eval = zero_struct; @@ -7196,7 +7202,7 @@ df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DBGI_Scope *scop { // rjf: get keys for this row DF_ExpandKey parent_key = block->parent_key; - DF_ExpandKey key = df_expand_key_make((U64)block->eval_view, df_hash_from_expand_key(parent_key), idx+1); + DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(parent_key), idx+1); // rjf: get link base DF_EvalLinkBase *link_base = &link_bases.v[idx]; @@ -7276,7 +7282,7 @@ df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DBGI_Scope *scop if(num_skipped_visual < block_num_visual_rows) { DF_ExpandKey parent_key = block->parent_key; - DF_ExpandKey key = df_expand_key_make((U64)block->eval_view, df_hash_from_expand_key(parent_key), 1); + DF_ExpandKey key = df_expand_key_make(df_hash_from_expand_key(parent_key), 1); DF_EvalVizRow *row = push_array(arena, DF_EvalVizRow, 1); row->flags = DF_EvalVizRowFlag_Canvas; row->eval_view = block->eval_view; @@ -8654,7 +8660,7 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity) entity_color_weak = entity_color; entity_color_weak.w *= 0.5f; } - UI_TextColor(entity_color_weak) + UI_TextColor(df_rgba_from_theme_color(DF_ThemeColor_WeakText)) UI_TextAlignment(UI_TextAlign_Center) UI_Font(df_font_from_slot(DF_FontSlot_Icons)) UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons)) diff --git a/src/df/gfx/df_gfx.mdesk b/src/df/gfx/df_gfx.mdesk index dd0be3ae..de430a6b 100644 --- a/src/df/gfx/df_gfx.mdesk +++ b/src/df/gfx/df_gfx.mdesk @@ -200,6 +200,9 @@ DF_GfxViewTable: { Watch "watch" "Watch" Null Binoculars 0 1 0 1 "The familiar 'watch window' debugger interface. Allows the inputting of a number of expressions. Each expression in the table is evaluated within the context of the selected thread's selected call stack frame. If applicable (depending on visualization rules and the expression's type), these expressions may be hierarchically expanded, which displays children as more rows in the table. The values of these expressions may also be edited, and if possible, can be used to write to registers or memory in attached processes. Also contains a new *view rule* column, not found in other major debuggers, which allows per-row specification of various visualization rules. These view rules may be used to visualize and inspect the evaluation of expressions in a variety of ways. To learn more, read the 'View Rules' section." } { Locals "locals" "Locals" Null Binoculars 0 1 0 1 "Nearly identical to `Watch`, but automatically filled with local variables found within the selected call stack frame of the selected thread, according to the associated debug info. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." } { Registers "registers" "Registers" Null Binoculars 0 1 0 1 "Nearly identical to `Watch`, but automatically filled with all register names according to the selected thread's architecture. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." } + { Globals "globals" "Globals" Null Binoculars 0 1 0 1 "Nearly identical to `Watch`, but automatically filled with all global variables within the selected thread's module. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." } + { ThreadLocals "thread_locals" "Thread Locals" Null Binoculars 0 1 0 1 "Nearly identical to `Watch`, but automatically filled with all thread local variables within the selected thread's module. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." } + { Types "types" "Types" Null Binoculars 0 1 0 1 "Nearly identical to `Watch`, but automatically filled with all types within the selected thread's module. View rules can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." } { Output "output" "Output" Null List 0 1 0 1 "Displays textual output from the selected thread's containing process." } { Memory "memory" "Memory" Null Grid 0 1 1 1 "A familiar hex-editor-like interface for viewing memory of attached processes." } { Breakpoints "breakpoints" "Breakpoints" Null CircleFilled 0 1 0 1 "Displays a table of all breakpoints, containing information about each breakpoint's name, location, and hit count. Also contains per-breakpoint controls for enabling, deleting, or editing each breakpoint. For more information on breakpoints and their features, read the 'Breakpoints' section." } @@ -208,69 +211,6 @@ DF_GfxViewTable: { Theme "theme" "Theme" Null Palette 0 1 0 1 "An interface for modifying the colors used in the debugger's UI. Allows selecting a theme preset, loading a theme from a file, and modifying individual colors within a theme." } } -//////////////////////////////// -//~ rjf: Default Command -> View Map - -@table(cmd view entity_kind_lock) -DF_CmdSpec2ViewSpecMap: -{ - {"launch_and_run" "entity_lister" Target } - {"launch_and_init" "entity_lister" Target } - {"kill" "entity_lister" Process } - {"detach" "entity_lister" Process } - {"select_thread" "entity_lister" Thread } - {"select_thread_window" "entity_lister" Thread } - {"select_thread_view" "entity_lister" Thread } - {"freeze_thread" "entity_lister" Thread } - {"thaw_thread" "entity_lister" Thread } - {"freeze_process" "entity_lister" Process } - {"thaw_process" "entity_lister" Process } - {"freeze_machine" "entity_lister" Machine } - {"thaw_machine" "entity_lister" Machine } - {"set_current_path" "file_system" Null } - {"open" "file_system" Null } - {"reload" "entity_lister" File } - {"switch" "entity_lister" File } - {"load_user" "file_system" Null } - {"load_profile" "file_system" Null } - {"find_thread" "entity_lister" Thread } - {"open_thread_disasm" "entity_lister" Thread } - {"open_file_memory" "entity_lister" File } - {"open_process_memory" "entity_lister" Process } - {"remove_breakpoint" "entity_lister" Breakpoint } - {"edit_breakpoint" "entity_lister" Breakpoint } - {"enable_breakpoint" "entity_lister" Breakpoint } - {"disable_breakpoint" "entity_lister" Breakpoint } - {"edit_breakpoint" "entity_lister" Breakpoint } - {"add_target" "file_system" Null } - {"remove_target" "entity_lister" Target } - {"edit_target" "entity_lister" Target } - {"retry_ended_process" "entity_lister" EndedProcess } - {"attach" "system_processes" Null } - {"commands" "commands" Null } - {"target_editor" "target" Null } - {"targets" "targets" Null } - {"file_path_map" "file_path_map" Null } - {"scheduler" "scheduler" Null } - {"call_stack" "call_stack" Null } - {"modules" "modules" Null } - {"pending_entity" "pending_entity" Null } - {"code" "code" Null } - {"watch" "watch" Null } - {"locals" "locals" Null } - {"registers" "registers" Null } - {"output" "output" Null } - {"memory" "memory" Null } - {"disassembly" "disassembly" Null } - {"breakpoints" "breakpoints" Null } - {"watch_pins" "watch_pins" Null } - {"exception_filters" "exception_filters" Null } - {"theme" "theme" Null } - {"pick_file" "file_system" Null } - {"clear_diag_log" "entity_lister" DiagLog } - {"open_diag_log" "entity_lister" DiagLog } -} - //////////////////////////////// //~ rjf: Command Parameter Slot -> View @@ -558,20 +498,6 @@ df_g_theme_preset_colors_table: @expand(DF_ThemePresetTable a) `df_g_theme_preset_colors__$(a.name_lower),`; } -//- rjf: default cmd -> view tables - -@table_gen_data(type: String8, fallback:`{0}`) -df_g_cmd2view_table_src: -{ - @expand(DF_CmdSpec2ViewSpecMap a) `str8_lit_comp("$(a.cmd)"),` -} - -@table_gen_data(type: String8, fallback:`{0}`) -df_g_cmd2view_table_dst: -{ - @expand(DF_CmdSpec2ViewSpecMap a) `str8_lit_comp("$(a.view)"),` -} - //- rjf: cmd param slot -> view spec tables @table_gen_data(type: DF_CmdParamSlot, fallback:`DF_CmdParamSlot_Null`) diff --git a/src/df/gfx/df_view_rule_hooks.c b/src/df/gfx/df_view_rule_hooks.c index 6b53f149..50f43ab8 100644 --- a/src/df/gfx/df_view_rule_hooks.c +++ b/src/df/gfx/df_view_rule_hooks.c @@ -489,7 +489,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(rgba) block->eval = eval; block->cfg_table = *cfg_table; block->parent_key = key; - block->key = df_expand_key_make((U64)eval_view, df_hash_from_expand_key(key), 1); + block->key = df_expand_key_make(df_hash_from_expand_key(key), 1); block->visual_idx_range = r1u64(0, 8); block->semantic_idx_range = r1u64(0, 1); block->depth = depth; @@ -663,7 +663,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(text) block->eval = eval; block->cfg_table = *cfg_table; block->parent_key = key; - block->key = df_expand_key_make((U64)eval_view, df_hash_from_expand_key(key), 1); + block->key = df_expand_key_make(df_hash_from_expand_key(key), 1); block->visual_idx_range = r1u64(0, 8); block->semantic_idx_range = r1u64(0, 1); block->depth = depth; @@ -772,7 +772,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(disasm) block->eval = eval; block->cfg_table = *cfg_table; block->parent_key = key; - block->key = df_expand_key_make((U64)eval_view, df_hash_from_expand_key(key), 1); + block->key = df_expand_key_make(df_hash_from_expand_key(key), 1); block->visual_idx_range = r1u64(0, 8); block->semantic_idx_range = r1u64(0, 1); block->depth = depth; @@ -864,7 +864,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(bitmap) block->eval = eval; block->cfg_table = *cfg_table; block->parent_key = key; - block->key = df_expand_key_make((U64)eval_view, df_hash_from_expand_key(key), 1); + block->key = df_expand_key_make(df_hash_from_expand_key(key), 1); block->visual_idx_range = r1u64(0, 8); block->semantic_idx_range = r1u64(0, 1); block->depth = depth; @@ -1111,7 +1111,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(geo) block->eval = eval; block->cfg_table = *cfg_table; block->parent_key = key; - block->key = df_expand_key_make((U64)eval_view, df_hash_from_expand_key(key), 1); + block->key = df_expand_key_make(df_hash_from_expand_key(key), 1); block->visual_idx_range = r1u64(0, 16); block->semantic_idx_range = r1u64(0, 1); block->depth = depth; diff --git a/src/df/gfx/df_views.c b/src/df/gfx/df_views.c index fadfc503..bec2dfe4 100644 --- a/src/df/gfx/df_views.c +++ b/src/df/gfx/df_views.c @@ -566,6 +566,15 @@ df_txti_token_array_from_dasm_arch_string(Arena *arena, Architecture arch, Strin //////////////////////////////// //~ rjf: Eval/Watch Views +//- rjf: eval watch view instance -> eval view key + +internal DF_EvalViewKey +df_eval_view_key_from_eval_watch_view(DF_EvalWatchViewState *ewv) +{ + DF_EvalViewKey key = df_eval_view_key_make((U64)ewv, df_hash_from_string(str8_struct(&ewv))); + return key; +} + //- rjf: root allocation/deallocation/mutation internal DF_EvalRoot * @@ -584,7 +593,6 @@ df_eval_root_alloc(DF_View *view, DF_EvalWatchViewState *ews) result->expr_buffer = push_array_no_zero(view->arena, U8, result->expr_buffer_cap); } DLLPushBack(ews->first_root, ews->last_root, result); - ews->root_count += 1; return result; } @@ -593,7 +601,6 @@ df_eval_root_release(DF_EvalWatchViewState *ews, DF_EvalRoot *root) { DLLRemove(ews->first_root, ews->last_root, root); SLLStackPush(ews->first_free_root, root); - ews->root_count -= 1; } internal void @@ -620,12 +627,14 @@ df_eval_root_from_string(DF_EvalWatchViewState *ews, String8 string) } internal DF_EvalRoot * -df_eval_root_from_expand_key(DF_EvalWatchViewState *ews, DF_ExpandKey expand_key) +df_eval_root_from_expand_key(DF_EvalWatchViewState *ews, DF_EvalView *eval_view, DF_ExpandKey expand_key) { DF_EvalRoot *root = 0; - for(DF_EvalRoot *r = ews->first_root; r != 0; r = r->next) + U64 num = 1; + for(DF_EvalRoot *r = ews->first_root; r != 0; r = r->next, num += 1) { - DF_ExpandKey r_key = df_expand_key_from_eval_root(r); + String8 r_expr = df_string_from_eval_root(r); + DF_ExpandKey r_key = df_expand_key_from_eval_view_root_expr_num(eval_view, r_expr, num); if(df_expand_key_match(r_key, expand_key)) { root = r; @@ -643,13 +652,9 @@ df_string_from_eval_root(DF_EvalRoot *root) } internal DF_ExpandKey -df_expand_key_from_eval_root(DF_EvalRoot *root) +df_expand_key_from_eval_view_root_expr_num(DF_EvalView *view, String8 root_expr, U64 num) { - String8 root_expr_string = df_string_from_eval_root(root); - U64 root_expr_hash = df_hash_from_string(root_expr_string); - DF_EvalViewKey root_view_key = df_eval_view_key_make((U64)root, root_expr_hash); - DF_EvalView *root_view = df_eval_view_from_key(root_view_key); - DF_ExpandKey key = df_expand_key_make((U64)root_view, 5381, 1); + DF_ExpandKey key = df_expand_key_make(df_hash_from_string(root_expr), num); return key; } @@ -660,15 +665,37 @@ df_eval_viz_block_list_from_watch_view_state(Arena *arena, DBGI_Scope *scope, DF { ProfBeginFunction(); DF_EvalVizBlockList blocks = {0}; - for(DF_EvalRoot *root = ews->first_root; root != 0; root = root->next) + DF_EvalViewKey eval_view_key = df_eval_view_key_from_eval_watch_view(ews); + DF_EvalView *eval_view = df_eval_view_from_key(eval_view_key); + switch(ews->fill_kind) { - String8 root_expr_string = df_string_from_eval_root(root); - U64 root_expr_hash = df_hash_from_string(root_expr_string); - DF_EvalViewKey root_view_key = df_eval_view_key_make((U64)root, root_expr_hash); - DF_EvalView *root_view = df_eval_view_from_key(root_view_key); - DF_EvalVizBlockList root_blocks = df_eval_viz_block_list_from_eval_view_expr(arena, scope, ctrl_ctx, parse_ctx, root_view, root_expr_string); - df_eval_viz_block_list_concat__in_place(&blocks, &root_blocks); + default: + case DF_EvalWatchViewFillKind_Mutable: + { + U64 num = 1; + for(DF_EvalRoot *root = ews->first_root; root != 0; root = root->next, num += 1) + { + String8 root_expr_string = df_string_from_eval_root(root); + U64 root_expr_hash = df_hash_from_string(root_expr_string); + DF_EvalVizBlockList root_blocks = df_eval_viz_block_list_from_eval_view_expr_num(arena, scope, ctrl_ctx, parse_ctx, eval_view, root_expr_string, num); + df_eval_viz_block_list_concat__in_place(&blocks, &root_blocks); + } + }break; + case DF_EvalWatchViewFillKind_Registers: + { + DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); + Architecture arch = df_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); + for(U64 reg_idx = 1; reg_idx < reg_count; reg_idx += 1) + { + String8 root_expr_string = reg_strings[reg_idx]; + DF_EvalVizBlockList root_blocks = df_eval_viz_block_list_from_eval_view_expr_num(arena, scope, ctrl_ctx, parse_ctx, eval_view, root_expr_string, reg_idx); + df_eval_viz_block_list_concat__in_place(&blocks, &root_blocks); + } + }break; } + return blocks; ProfEnd(); return blocks; } @@ -676,7 +703,7 @@ df_eval_viz_block_list_from_watch_view_state(Arena *arena, DBGI_Scope *scope, DF //- rjf: eval/watch views main hooks internal void -df_eval_watch_view_init(DF_EvalWatchViewState *ewv, DF_View *view) +df_eval_watch_view_init(DF_EvalWatchViewState *ewv, DF_View *view, DF_EvalWatchViewFillKind fill_kind) { if(ewv->initialized == 0) { @@ -685,6 +712,7 @@ df_eval_watch_view_init(DF_EvalWatchViewState *ewv, DF_View *view) ewv->value_column_pct = 0.3f; ewv->type_column_pct = 0.15f; ewv->view_rule_column_pct = 0.30f; + ewv->fill_kind = fill_kind; } } @@ -743,7 +771,7 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW EVAL_ParseCtx parse_ctx = df_eval_parse_ctx_from_process_vaddr(scope, process, thread_ip_vaddr); ////////////////////////////// - //- rjf: roots -> viz blocks + //- rjf: state -> viz blocks // DF_EvalVizBlockList blocks = df_eval_viz_block_list_from_watch_view_state(scratch.arena, scope, &ctrl_ctx, &parse_ctx, ewv); @@ -753,11 +781,11 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW Vec2S64 cursor = {0}; { cursor.x = ewv->selected_column; - if(df_expand_key_match(df_expand_key_make(0, 0, 0), ewv->selected_parent_key)) + if(df_expand_key_match(df_expand_key_make(0, 0), ewv->selected_parent_key)) { cursor.y = 0; } - else if(df_expand_key_match(df_expand_key_make(1, 1, 1), ewv->selected_parent_key)) + else if(df_expand_key_match(df_expand_key_make(1, 1), ewv->selected_parent_key)) { cursor.y = blocks.total_semantic_row_count+1; } @@ -768,7 +796,6 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW for(DF_EvalVizBlock *block = blocks.first; block != 0; block = block->next) { if(df_expand_key_match(block->parent_key, ewv->selected_parent_key) && - block->key.uniquifier == ewv->selected_key.uniquifier && block->key.parent_hash == ewv->selected_key.parent_hash && block->semantic_idx_range.min+1 <= ewv->selected_key.child_num && ewv->selected_key.child_num < block->semantic_idx_range.max+1) @@ -1126,9 +1153,9 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW } if(sig.hovering && DEV_eval_watch_key_tooltips) UI_Tooltip UI_Font(df_font_from_slot(DF_FontSlot_Code)) { - ui_labelf("Parent Key: %I64x, %I64x, %I64x", row->parent_key.uniquifier, row->parent_key.parent_hash, row->parent_key.child_num); - ui_labelf("Hover Key: %I64x, %I64x, %I64x", row->key.uniquifier, row->key.parent_hash, row->key.child_num); - ui_labelf("Cursor Key: %I64x, %I64x, %I64x", ewv->selected_key.uniquifier, ewv->selected_key.parent_hash, ewv->selected_key.child_num); + ui_labelf("Parent Key: %I64x, %I64x", row->parent_key.parent_hash, row->parent_key.child_num); + ui_labelf("Hover Key: %I64x, %I64x", row->key.parent_hash, row->key.child_num); + ui_labelf("Cursor Key: %I64x, %I64x", ewv->selected_key.parent_hash, ewv->selected_key.child_num); } if(sig.hovering && row->depth == 0 && DEV_eval_compiler_tooltips) UI_Tooltip { @@ -1526,8 +1553,8 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW U64 root_expr_hash = df_hash_from_string(commit_string); DF_EvalViewKey root_view_key = df_eval_view_key_make((U64)root, root_expr_hash); DF_EvalView *root_view = df_eval_view_from_key(root_view_key); - DF_ExpandKey parent_key = df_expand_key_make((U64)root_view, 0, 0); - DF_ExpandKey key = df_expand_key_make((U64)root_view, 5381, 1); + DF_ExpandKey parent_key = df_expand_key_make(5381, 0); + DF_ExpandKey key = df_expand_key_make(root_expr_hash, 1); df_expand_set_expansion(root_view->arena, &root_view->expand_tree_table, parent_key, key, 0); cursor.y += 1; } @@ -1535,6 +1562,8 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW //- rjf: committed on a valid row if(commit_row != 0) { + 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); switch(commit_column) { default:break; @@ -1544,7 +1573,7 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW { if(commit_string.size == 0) { - DF_EvalRoot *root = df_eval_root_from_expand_key(ewv, commit_row->key); + DF_EvalRoot *root = df_eval_root_from_expand_key(ewv, eval_view, commit_row->key); if(root != 0) { df_eval_root_release(ewv, root); @@ -1552,7 +1581,7 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW } else { - DF_EvalRoot *root = df_eval_root_from_expand_key(ewv, commit_row->key); + DF_EvalRoot *root = df_eval_root_from_expand_key(ewv, eval_view, commit_row->key); if(root != 0) { df_eval_root_equip_string(root, commit_string); @@ -1622,18 +1651,18 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW DF_ExpandKey last_selected_key = ewv->selected_key; DF_ExpandKey last_selected_parent_key = ewv->selected_parent_key; ewv->selected_column = (DF_EvalWatchViewColumnKind)cursor.x; - ewv->selected_parent_key = df_expand_key_make(0, 0, 0); - ewv->selected_key = df_expand_key_make(0, 0, 0); + ewv->selected_parent_key = df_expand_key_make(0, 0); + ewv->selected_key = df_expand_key_make(0, 0); S64 scan_y = 1; if(cursor.y == 0) { - ewv->selected_parent_key = df_expand_key_make(0, 0, 0); - ewv->selected_key = df_expand_key_make(0, 0, 0); + ewv->selected_parent_key = df_expand_key_make(0, 0); + ewv->selected_key = df_expand_key_make(0, 0); } else if(cursor.y >= blocks.total_semantic_row_count+1) { - ewv->selected_parent_key = df_expand_key_make(1, 1, 1); - ewv->selected_key = df_expand_key_make(1, 1, 1); + ewv->selected_parent_key = df_expand_key_make(1, 1); + ewv->selected_key = df_expand_key_make(1, 1); } else { @@ -1648,9 +1677,7 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW block_before_found = prev; found_block = block; ewv->selected_parent_key = block->parent_key; - ewv->selected_key = df_expand_key_make(block->key.uniquifier, - block->key.parent_hash, - (cursor.y - scan_y) + block->semantic_idx_range.min + 1); + ewv->selected_key = df_expand_key_make(block->key.parent_hash, (cursor.y - scan_y) + block->semantic_idx_range.min + 1); break; } scan_y += advance; @@ -1667,8 +1694,8 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW if(n->expanded == 0) { DF_ExpandNode *parent = n->parent; - ewv->selected_key = parent ? n->key : df_expand_key_make((U64)found_block->eval_view, 5381, 1); - ewv->selected_parent_key = parent ? parent->key : df_expand_key_make((U64)found_block->eval_view, 0, 0); + ewv->selected_key = parent ? n->key : df_expand_key_make(5381, 1); + ewv->selected_parent_key = parent ? parent->key : df_expand_key_make(5381, 0); } } } @@ -6552,23 +6579,25 @@ DF_VIEW_SETUP_FUNCTION_DEF(Watch) { ProfBeginFunction(); DF_EvalWatchViewState *ewv = df_view_user_state(view, DF_EvalWatchViewState); - df_eval_watch_view_init(ewv, view); + df_eval_watch_view_init(ewv, view, DF_EvalWatchViewFillKind_Mutable); // rjf: add roots for watches - for(DF_CfgNode *expr = cfg_root->first; expr != &df_g_nil_cfg_node; expr = expr->next) { - if(expr->flags & DF_CfgNodeFlag_StringLiteral) + 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); + U64 num = 1; + for(DF_CfgNode *expr = cfg_root->first; expr != &df_g_nil_cfg_node; expr = expr->next, num += 1) { - DF_EvalRoot *root = df_eval_root_alloc(view, ewv); - df_eval_root_equip_string(root, expr->string); - if(expr->first != &df_g_nil_cfg_node) + if(expr->flags & DF_CfgNodeFlag_StringLiteral) { - U64 root_expr_hash = df_hash_from_string(expr->string); - DF_EvalViewKey root_view_key = df_eval_view_key_make((U64)root, root_expr_hash); - DF_EvalView *root_view = df_eval_view_from_key(root_view_key); - DF_ExpandKey root_key = df_expand_key_make((U64)root_view, 5381, 1); - String8 view_rule = expr->first->string; - df_eval_view_set_key_rule(root_view, root_key, view_rule); + DF_EvalRoot *root = df_eval_root_alloc(view, ewv); + df_eval_root_equip_string(root, expr->string); + if(expr->first != &df_g_nil_cfg_node) + { + DF_ExpandKey root_key = df_expand_key_from_eval_view_root_expr_num(eval_view, expr->string, num); + String8 view_rule = expr->first->string; + df_eval_view_set_key_rule(eval_view, root_key, view_rule); + } } } } @@ -6580,22 +6609,24 @@ DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Watch) Temp scratch = scratch_begin(&arena, 1); String8List strs = {0}; DF_EvalWatchViewState *ewv = df_view_user_state(view, DF_EvalWatchViewState); - for(DF_EvalRoot *root = ewv->first_root; root != 0; root = root->next) + 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); { - String8 string = df_string_from_eval_root(root); - str8_list_pushf(arena, &strs, "\"%S\"", string); - U64 root_expr_hash = df_hash_from_string(string); - DF_EvalViewKey root_view_key = df_eval_view_key_make((U64)root, root_expr_hash); - DF_EvalView *root_view = df_eval_view_from_key(root_view_key); - DF_ExpandKey root_key = df_expand_key_make((U64)root_view, 5381, 1); - String8 view_rule = df_eval_view_rule_from_key(root_view, root_key); - if(view_rule.size != 0) + U64 num = 1; + for(DF_EvalRoot *root = ewv->first_root; root != 0; root = root->next, num += 1) { - str8_list_pushf(arena, &strs, ":{\"%S\"}", view_rule); - } - if(root->next != 0) - { - str8_list_pushf(arena, &strs, " "); + String8 string = df_string_from_eval_root(root); + str8_list_pushf(arena, &strs, "\"%S\"", string); + DF_ExpandKey root_key = df_expand_key_from_eval_view_root_expr_num(eval_view, string, num); + String8 view_rule = df_eval_view_rule_from_key(eval_view, root_key); + if(view_rule.size != 0) + { + str8_list_pushf(arena, &strs, ":{\"%S\"}", view_rule); + } + if(root->next != 0) + { + str8_list_pushf(arena, &strs, " "); + } } } String8 string = str8_list_join(arena, &strs, 0); @@ -6625,7 +6656,7 @@ DF_VIEW_UI_FUNCTION_DEF(Watch) DF_VIEW_SETUP_FUNCTION_DEF(Locals) { DF_EvalThreadDerivedReadOnlyWatchViewState *ls = df_view_user_state(view, DF_EvalThreadDerivedReadOnlyWatchViewState); - df_eval_watch_view_init(&ls->ewv, view); + df_eval_watch_view_init(&ls->ewv, view, DF_EvalWatchViewFillKind_Locals); } DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Locals) { return str8_lit(""); } DF_VIEW_CMD_FUNCTION_DEF(Locals) {} @@ -6703,6 +6734,11 @@ DF_VIEW_UI_FUNCTION_DEF(Registers) { ProfBeginFunction(); + DF_EvalWatchViewState *ewv = df_view_user_state(view, DF_EvalWatchViewState); + df_eval_watch_view_init(ewv, view, DF_EvalWatchViewFillKind_Registers); + df_eval_watch_view_build(ws, panel, view, ewv, 0, 16, rect); + +#if 0 // rjf: gather state DF_RegistersViewState *rv = df_view_user_state(view, DF_RegistersViewState); DF_CtrlCtx ctrl_ctx = df_ctrl_ctx_from_view(ws, view); @@ -6714,7 +6750,7 @@ DF_VIEW_UI_FUNCTION_DEF(Registers) if(rva->initialized == 0) { rva->initialized = 1; - df_eval_watch_view_init(&rva->ewv, view); + df_eval_watch_view_init(&rva->ewv, view, DF_EvalWatchViewFillKind_Locals); // rjf: get string tables U64 reg_names_count = regs_reg_code_count_from_architecture(arch); @@ -6741,10 +6777,47 @@ DF_VIEW_UI_FUNCTION_DEF(Registers) // rjf: build df_eval_watch_view_build(ws, panel, view, &rva->ewv, 0, 16, rect); +#endif ProfEnd(); } +//////////////////////////////// +//~ rjf: Globals @view_hook_impl + +DF_VIEW_SETUP_FUNCTION_DEF(Globals) {} +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Globals) { return str8_lit(""); } +DF_VIEW_CMD_FUNCTION_DEF(Globals) {} +DF_VIEW_UI_FUNCTION_DEF(Globals) +{ + ProfBeginFunction(); + ProfEnd(); +} + +//////////////////////////////// +//~ rjf: ThreadLocals @view_hook_impl + +DF_VIEW_SETUP_FUNCTION_DEF(ThreadLocals) {} +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(ThreadLocals) { return str8_lit(""); } +DF_VIEW_CMD_FUNCTION_DEF(ThreadLocals) {} +DF_VIEW_UI_FUNCTION_DEF(ThreadLocals) +{ + ProfBeginFunction(); + ProfEnd(); +} + +//////////////////////////////// +//~ rjf: Types @view_hook_impl + +DF_VIEW_SETUP_FUNCTION_DEF(Types) {} +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Types) { return str8_lit(""); } +DF_VIEW_CMD_FUNCTION_DEF(Types) {} +DF_VIEW_UI_FUNCTION_DEF(Types) +{ + ProfBeginFunction(); + ProfEnd(); +} + //////////////////////////////// //~ rjf: Output @view_hook_impl diff --git a/src/df/gfx/df_views.h b/src/df/gfx/df_views.h index c2a1aed6..3e3bd06b 100644 --- a/src/df/gfx/df_views.h +++ b/src/df/gfx/df_views.h @@ -274,11 +274,26 @@ typedef enum DF_EvalWatchViewColumnKind } DF_EvalWatchViewColumnKind; +typedef enum DF_EvalWatchViewFillKind +{ + DF_EvalWatchViewFillKind_Mutable, + DF_EvalWatchViewFillKind_Registers, + DF_EvalWatchViewFillKind_Locals, + DF_EvalWatchViewFillKind_Globals, + DF_EvalWatchViewFillKind_ThreadLocals, + DF_EvalWatchViewFillKind_Types, + DF_EvalWatchViewFillKind_COUNT +} +DF_EvalWatchViewFillKind; + typedef struct DF_EvalWatchViewState DF_EvalWatchViewState; struct DF_EvalWatchViewState { B32 initialized; + // rjf: fill kind (way that the contents of the watch view are computed) + DF_EvalWatchViewFillKind fill_kind; + // rjf; selection state DF_EvalWatchViewColumnKind selected_column; DF_ExpandKey selected_parent_key; @@ -297,11 +312,10 @@ struct DF_EvalWatchViewState F32 type_column_pct; F32 view_rule_column_pct; - // rjf: top-level expression state + // rjf: mutable fill-kind root expression state DF_EvalRoot *first_root; DF_EvalRoot *last_root; DF_EvalRoot *first_free_root; - U64 root_count; }; typedef struct DF_EvalThreadDerivedReadOnlyWatchViewState DF_EvalThreadDerivedReadOnlyWatchViewState; @@ -442,20 +456,23 @@ internal TXTI_TokenArray df_txti_token_array_from_dasm_arch_string(Arena *arena, //////////////////////////////// //~ rjf: Eval/Watch Views +//- rjf: eval watch view instance -> eval view key +internal DF_EvalViewKey df_eval_view_key_from_eval_watch_view(DF_EvalWatchViewState *ewv); + //- rjf: root allocation/deallocation/mutation internal DF_EvalRoot * df_eval_root_alloc(DF_View *view, DF_EvalWatchViewState *ews); internal void df_eval_root_release(DF_EvalWatchViewState *ews, DF_EvalRoot *root); internal void df_eval_root_equip_string(DF_EvalRoot *root, String8 string); internal DF_EvalRoot * df_eval_root_from_string(DF_EvalWatchViewState *ews, String8 string); -internal DF_EvalRoot * df_eval_root_from_expand_key(DF_EvalWatchViewState *ews, DF_ExpandKey expand_key); +internal DF_EvalRoot * df_eval_root_from_expand_key(DF_EvalWatchViewState *ews, DF_EvalView *eval_view, DF_ExpandKey expand_key); internal String8 df_string_from_eval_root(DF_EvalRoot *root); -internal DF_ExpandKey df_expand_key_from_eval_root(DF_EvalRoot *root); +internal DF_ExpandKey df_expand_key_from_eval_view_root_expr_num(DF_EvalView *view, String8 root_expr, U64 num); //- rjf: windowed watch tree visualization internal DF_EvalVizBlockList df_eval_viz_block_list_from_watch_view_state(Arena *arena, DBGI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_EvalWatchViewState *ews); //- rjf: eval/watch views main hooks -internal void df_eval_watch_view_init(DF_EvalWatchViewState *ewv, DF_View *view); +internal void df_eval_watch_view_init(DF_EvalWatchViewState *ewv, DF_View *view, DF_EvalWatchViewFillKind fill_kind); internal void df_eval_watch_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalWatchViewState *ewv, DF_CmdList *cmds); internal void df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalWatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect); diff --git a/src/df/gfx/generated/df_gfx.meta.h b/src/df/gfx/generated/df_gfx.meta.h index 9f3efdbf..fff65598 100644 --- a/src/df/gfx/generated/df_gfx.meta.h +++ b/src/df/gfx/generated/df_gfx.meta.h @@ -27,6 +27,9 @@ DF_GfxViewKind_Disassembly, DF_GfxViewKind_Watch, DF_GfxViewKind_Locals, DF_GfxViewKind_Registers, +DF_GfxViewKind_Globals, +DF_GfxViewKind_ThreadLocals, +DF_GfxViewKind_Types, DF_GfxViewKind_Output, DF_GfxViewKind_Memory, DF_GfxViewKind_Breakpoints, @@ -127,6 +130,9 @@ DF_VIEW_SETUP_FUNCTION_DEF(Disassembly); DF_VIEW_SETUP_FUNCTION_DEF(Watch); DF_VIEW_SETUP_FUNCTION_DEF(Locals); DF_VIEW_SETUP_FUNCTION_DEF(Registers); +DF_VIEW_SETUP_FUNCTION_DEF(Globals); +DF_VIEW_SETUP_FUNCTION_DEF(ThreadLocals); +DF_VIEW_SETUP_FUNCTION_DEF(Types); DF_VIEW_SETUP_FUNCTION_DEF(Output); DF_VIEW_SETUP_FUNCTION_DEF(Memory); DF_VIEW_SETUP_FUNCTION_DEF(Breakpoints); @@ -152,6 +158,9 @@ DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Disassembly); DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Watch); DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Locals); DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Registers); +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Globals); +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(ThreadLocals); +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Types); DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Output); DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Memory); DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Breakpoints); @@ -177,6 +186,9 @@ DF_VIEW_CMD_FUNCTION_DEF(Disassembly); DF_VIEW_CMD_FUNCTION_DEF(Watch); DF_VIEW_CMD_FUNCTION_DEF(Locals); DF_VIEW_CMD_FUNCTION_DEF(Registers); +DF_VIEW_CMD_FUNCTION_DEF(Globals); +DF_VIEW_CMD_FUNCTION_DEF(ThreadLocals); +DF_VIEW_CMD_FUNCTION_DEF(Types); DF_VIEW_CMD_FUNCTION_DEF(Output); DF_VIEW_CMD_FUNCTION_DEF(Memory); DF_VIEW_CMD_FUNCTION_DEF(Breakpoints); @@ -202,6 +214,9 @@ DF_VIEW_UI_FUNCTION_DEF(Disassembly); DF_VIEW_UI_FUNCTION_DEF(Watch); DF_VIEW_UI_FUNCTION_DEF(Locals); DF_VIEW_UI_FUNCTION_DEF(Registers); +DF_VIEW_UI_FUNCTION_DEF(Globals); +DF_VIEW_UI_FUNCTION_DEF(ThreadLocals); +DF_VIEW_UI_FUNCTION_DEF(Types); DF_VIEW_UI_FUNCTION_DEF(Output); DF_VIEW_UI_FUNCTION_DEF(Memory); DF_VIEW_UI_FUNCTION_DEF(Breakpoints); @@ -779,124 +794,6 @@ df_g_theme_preset_colors__four_coder, df_g_theme_preset_colors__far_manager, }; -String8 df_g_cmd2view_table_src[] = -{ -str8_lit_comp("launch_and_run"), -str8_lit_comp("launch_and_init"), -str8_lit_comp("kill"), -str8_lit_comp("detach"), -str8_lit_comp("select_thread"), -str8_lit_comp("select_thread_window"), -str8_lit_comp("select_thread_view"), -str8_lit_comp("freeze_thread"), -str8_lit_comp("thaw_thread"), -str8_lit_comp("freeze_process"), -str8_lit_comp("thaw_process"), -str8_lit_comp("freeze_machine"), -str8_lit_comp("thaw_machine"), -str8_lit_comp("set_current_path"), -str8_lit_comp("open"), -str8_lit_comp("reload"), -str8_lit_comp("switch"), -str8_lit_comp("load_user"), -str8_lit_comp("load_profile"), -str8_lit_comp("find_thread"), -str8_lit_comp("open_thread_disasm"), -str8_lit_comp("open_file_memory"), -str8_lit_comp("open_process_memory"), -str8_lit_comp("remove_breakpoint"), -str8_lit_comp("edit_breakpoint"), -str8_lit_comp("enable_breakpoint"), -str8_lit_comp("disable_breakpoint"), -str8_lit_comp("edit_breakpoint"), -str8_lit_comp("add_target"), -str8_lit_comp("remove_target"), -str8_lit_comp("edit_target"), -str8_lit_comp("retry_ended_process"), -str8_lit_comp("attach"), -str8_lit_comp("commands"), -str8_lit_comp("target_editor"), -str8_lit_comp("targets"), -str8_lit_comp("file_path_map"), -str8_lit_comp("scheduler"), -str8_lit_comp("call_stack"), -str8_lit_comp("modules"), -str8_lit_comp("pending_entity"), -str8_lit_comp("code"), -str8_lit_comp("watch"), -str8_lit_comp("locals"), -str8_lit_comp("registers"), -str8_lit_comp("output"), -str8_lit_comp("memory"), -str8_lit_comp("disassembly"), -str8_lit_comp("breakpoints"), -str8_lit_comp("watch_pins"), -str8_lit_comp("exception_filters"), -str8_lit_comp("theme"), -str8_lit_comp("pick_file"), -str8_lit_comp("clear_diag_log"), -str8_lit_comp("open_diag_log"), -}; - -String8 df_g_cmd2view_table_dst[] = -{ -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("file_system"), -str8_lit_comp("file_system"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("file_system"), -str8_lit_comp("file_system"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("file_system"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -str8_lit_comp("system_processes"), -str8_lit_comp("commands"), -str8_lit_comp("target"), -str8_lit_comp("targets"), -str8_lit_comp("file_path_map"), -str8_lit_comp("scheduler"), -str8_lit_comp("call_stack"), -str8_lit_comp("modules"), -str8_lit_comp("pending_entity"), -str8_lit_comp("code"), -str8_lit_comp("watch"), -str8_lit_comp("locals"), -str8_lit_comp("registers"), -str8_lit_comp("output"), -str8_lit_comp("memory"), -str8_lit_comp("disassembly"), -str8_lit_comp("breakpoints"), -str8_lit_comp("watch_pins"), -str8_lit_comp("exception_filters"), -str8_lit_comp("theme"), -str8_lit_comp("file_system"), -str8_lit_comp("entity_lister"), -str8_lit_comp("entity_lister"), -}; - DF_CmdParamSlot df_g_cmd_param_slot_2_view_spec_src_map[] = { DF_CmdParamSlot_Entity, @@ -1067,6 +964,9 @@ DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[] = {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath), str8_lit_comp("watch"), str8_lit_comp("Watch"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Watch), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Watch), DF_VIEW_CMD_FUNCTION_NAME(Watch), DF_VIEW_UI_FUNCTION_NAME(Watch)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath), str8_lit_comp("locals"), str8_lit_comp("Locals"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Locals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Locals), DF_VIEW_CMD_FUNCTION_NAME(Locals), DF_VIEW_UI_FUNCTION_NAME(Locals)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath), str8_lit_comp("registers"), str8_lit_comp("Registers"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Registers), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Registers), DF_VIEW_CMD_FUNCTION_NAME(Registers), DF_VIEW_UI_FUNCTION_NAME(Registers)}, +{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath), str8_lit_comp("globals"), str8_lit_comp("Globals"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Globals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Globals), DF_VIEW_CMD_FUNCTION_NAME(Globals), DF_VIEW_UI_FUNCTION_NAME(Globals)}, +{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath), str8_lit_comp("thread_locals"), str8_lit_comp("Thread Locals"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(ThreadLocals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(ThreadLocals), DF_VIEW_CMD_FUNCTION_NAME(ThreadLocals), DF_VIEW_UI_FUNCTION_NAME(ThreadLocals)}, +{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath), str8_lit_comp("types"), str8_lit_comp("Types"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Types), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Types), DF_VIEW_CMD_FUNCTION_NAME(Types), DF_VIEW_UI_FUNCTION_NAME(Types)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath), str8_lit_comp("output"), str8_lit_comp("Output"), DF_NameKind_Null, DF_IconKind_List, DF_VIEW_SETUP_FUNCTION_NAME(Output), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Output), DF_VIEW_CMD_FUNCTION_NAME(Output), DF_VIEW_UI_FUNCTION_NAME(Output)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanSerializeEntityPath), str8_lit_comp("memory"), str8_lit_comp("Memory"), DF_NameKind_Null, DF_IconKind_Grid, DF_VIEW_SETUP_FUNCTION_NAME(Memory), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Memory), DF_VIEW_CMD_FUNCTION_NAME(Memory), DF_VIEW_UI_FUNCTION_NAME(Memory)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath), str8_lit_comp("breakpoints"), str8_lit_comp("Breakpoints"), DF_NameKind_Null, DF_IconKind_CircleFilled, DF_VIEW_SETUP_FUNCTION_NAME(Breakpoints), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Breakpoints), DF_VIEW_CMD_FUNCTION_NAME(Breakpoints), DF_VIEW_UI_FUNCTION_NAME(Breakpoints)},