mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-27 22:11:47 -07:00
replace watch view fill kind with top-level expression & view rule; collection macro for watches; reintroduce only/omit, with new expr-macro-based eval visualization system; remove root-expression-generation from expansion block generation, since it makes things a bit more complicated
This commit is contained in:
@@ -1486,7 +1486,7 @@ e_type_data_members_from_key(Arena *arena, E_TypeKey key)
|
||||
PaddingNode *first_padding = 0;
|
||||
PaddingNode *last_padding = 0;
|
||||
U64 padding_count = 0;
|
||||
if(root_type_kind == E_TypeKind_Struct || root_type_kind == E_TypeKind_Class)
|
||||
if((root_type_kind == E_TypeKind_Struct || root_type_kind == E_TypeKind_Class) && key.kind != E_TypeKeyKind_Cons)
|
||||
{
|
||||
for(U64 idx = 0; idx < members.count; idx += 1)
|
||||
{
|
||||
|
||||
@@ -96,6 +96,8 @@ EV_ViewRuleTable:
|
||||
{x Slice slice "slice" - - x - "Slice" x "" "Specifies that a pointer within a struct, also containing an integer, points to the number of elements encoded by the integer." }
|
||||
{x ByteSwap bswap "bswap" x - x - "Byte Swap" x "" "Specifies that all integral evaluations should be byte-swapped, such that their endianness is reversed." }
|
||||
{x Cast cast "cast" - - x - "Cast" x "x:{type}" "Specifies that the expression to which the view rule is applied should be casted to the provided type." }
|
||||
{x Only only "only" - - x - "Only" x "" "Specifies that only the provided member names should be shown in user-defined-type expansions." }
|
||||
{x Omit omit "omit" - - x - "Omit" x "" "Specifies that the provided member names should not be shown in user-defined-type expansions." }
|
||||
}
|
||||
|
||||
@enum EV_ViewRuleKind:
|
||||
|
||||
@@ -106,6 +106,7 @@ EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(default)
|
||||
////////////////////////////
|
||||
//- rjf: unpack expression type info
|
||||
//
|
||||
expr = ev_expr_from_expr_view_rules(arena, expr, view_rules);
|
||||
E_IRTreeAndType irtree = e_irtree_and_type_from_expr(scratch.arena, expr);
|
||||
E_TypeKey type_key = e_type_unwrap(irtree.type_key);
|
||||
E_TypeKind type_kind = e_type_kind_from_key(type_key);
|
||||
@@ -393,3 +394,81 @@ EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(cast)
|
||||
expr = e_expr_ref_cast(arena, type_key, expr);
|
||||
return expr;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: "only"
|
||||
|
||||
EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(only)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
E_IRTreeAndType irtree = e_irtree_and_type_from_expr(scratch.arena, expr);
|
||||
E_TypeKind type_kind = e_type_kind_from_key(irtree.type_key);
|
||||
if(type_kind == E_TypeKind_Struct || type_kind == E_TypeKind_Union || type_kind == E_TypeKind_Class)
|
||||
{
|
||||
E_MemberArray current_members = e_type_data_members_from_key(scratch.arena, irtree.type_key);
|
||||
E_MemberList new_members = {0};
|
||||
for EachIndex(idx, current_members.count)
|
||||
{
|
||||
B32 include = 0;
|
||||
for MD_EachNode(node, params->first)
|
||||
{
|
||||
if(str8_match(node->string, current_members.v[idx].name, 0))
|
||||
{
|
||||
include = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(include)
|
||||
{
|
||||
e_member_list_push(scratch.arena, &new_members, ¤t_members.v[idx]);
|
||||
}
|
||||
}
|
||||
E_MemberArray new_members_array = e_member_array_from_list(scratch.arena, &new_members);
|
||||
String8 struct_name = e_type_string_from_key(scratch.arena, irtree.type_key);
|
||||
E_TypeKey new_type = e_type_key_cons(.kind = E_TypeKind_Struct, .name = struct_name, .members = new_members_array.v, .count = new_members_array.count);
|
||||
expr = e_expr_ref_addr(arena, expr);
|
||||
expr = e_expr_ref_cast(arena, e_type_key_cons_ptr(e_type_state->ctx->primary_module->arch, new_type), expr);
|
||||
expr = e_expr_ref_deref(arena, expr);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return expr;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: "omit"
|
||||
|
||||
EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(omit)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
E_IRTreeAndType irtree = e_irtree_and_type_from_expr(scratch.arena, expr);
|
||||
E_TypeKind type_kind = e_type_kind_from_key(irtree.type_key);
|
||||
if(type_kind == E_TypeKind_Struct || type_kind == E_TypeKind_Union || type_kind == E_TypeKind_Class)
|
||||
{
|
||||
E_MemberArray current_members = e_type_data_members_from_key(scratch.arena, irtree.type_key);
|
||||
E_MemberList new_members = {0};
|
||||
for EachIndex(idx, current_members.count)
|
||||
{
|
||||
B32 include = 1;
|
||||
for MD_EachNode(node, params->first)
|
||||
{
|
||||
if(str8_match(node->string, current_members.v[idx].name, 0))
|
||||
{
|
||||
include = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(include)
|
||||
{
|
||||
e_member_list_push(scratch.arena, &new_members, ¤t_members.v[idx]);
|
||||
}
|
||||
}
|
||||
E_MemberArray new_members_array = e_member_array_from_list(scratch.arena, &new_members);
|
||||
String8 struct_name = e_type_string_from_key(scratch.arena, irtree.type_key);
|
||||
E_TypeKey new_type = e_type_key_cons(.kind = E_TypeKind_Struct, .name = struct_name, .members = new_members_array.v, .count = new_members_array.count);
|
||||
expr = e_expr_ref_addr(arena, expr);
|
||||
expr = e_expr_ref_cast(arena, e_type_key_cons_ptr(e_type_state->ctx->primary_module->arch, new_type), expr);
|
||||
expr = e_expr_ref_deref(arena, expr);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return expr;
|
||||
}
|
||||
|
||||
@@ -509,7 +509,7 @@ internal EV_Block *
|
||||
ev_block_split_and_continue(Arena *arena, EV_BlockList *list, EV_Block *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;
|
||||
split_block->visual_idx_range.max = split_block->semantic_idx_range.max = split_idx+1;
|
||||
ev_block_end(list, split_block);
|
||||
EV_Block *continue_block = ev_block_begin(arena, split_block->kind, split_block->parent_key, split_block->key, split_block->depth);
|
||||
continue_block->string = split_block->string;
|
||||
@@ -539,25 +539,10 @@ ev_append_expr_blocks__rec(Arena *arena, EV_View *view, String8 filter, EV_Key p
|
||||
ProfBeginFunction();
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
|
||||
//- rjf: apply expr resolution view rules
|
||||
E_Expr *expr_raw = expr;
|
||||
expr = ev_expr_from_expr_view_rules(arena, expr, view_rules);
|
||||
|
||||
//- rjf: determine if this key is expanded
|
||||
EV_ExpandNode *node = ev_expand_node_from_key(view, key);
|
||||
B32 parent_is_expanded = (node != 0 && node->expanded);
|
||||
|
||||
//- rjf: push block for expression root
|
||||
{
|
||||
EV_Block *block = ev_block_begin(arena, EV_BlockKind_Root, parent_key, key, depth);
|
||||
block->string = string;
|
||||
block->expr = expr;
|
||||
block->view_rules = view_rules;
|
||||
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);
|
||||
ev_block_end(list_out, block);
|
||||
}
|
||||
|
||||
//- rjf: determine view rule to generate children blocks
|
||||
EV_ViewRuleInfo *block_prod_view_rule_info = ev_view_rule_info_from_string(str8_lit("default"));
|
||||
MD_Node *block_prod_view_rule_params = &md_nil_node;
|
||||
@@ -638,7 +623,23 @@ ev_block_list_from_view_expr_keys(Arena *arena, EV_View *view, String8 filter, E
|
||||
ev_view_rule_list_push_string(arena, view_rule_list, n->string);
|
||||
}
|
||||
ev_view_rule_list_push_string(arena, view_rule_list, view_rule_string);
|
||||
ev_append_expr_blocks__rec(arena, view, filter, parent_key, key, expr, parse.expr, view_rule_list, depth, &blocks);
|
||||
|
||||
//- rjf: apply expr resolution view rules
|
||||
E_Expr *expr_resolved = ev_expr_from_expr_view_rules(arena, parse.expr, view_rule_list);
|
||||
|
||||
//- rjf: push block for expression root
|
||||
{
|
||||
EV_Block *block = ev_block_begin(arena, EV_BlockKind_Root, parent_key, key, depth);
|
||||
block->string = expr;
|
||||
block->expr = expr_resolved;
|
||||
block->view_rules = view_rule_list;
|
||||
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);
|
||||
ev_block_end(&blocks, block);
|
||||
}
|
||||
|
||||
//- rjf: push expansions for root
|
||||
ev_append_expr_blocks__rec(arena, view, filter, parent_key, key, expr, expr_resolved, view_rule_list, depth, &blocks);
|
||||
}
|
||||
ProfEnd();
|
||||
return blocks;
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
//- GENERATED CODE
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
EV_ViewRuleInfo ev_builtin_view_rule_info_table[5] =
|
||||
EV_ViewRuleInfo ev_builtin_view_rule_info_table[7] =
|
||||
{
|
||||
{str8_lit_comp("default"), (EV_ViewRuleInfoFlag_Inherited*0)|(EV_ViewRuleInfoFlag_Expandable*0), 0, EV_VIEW_RULE_BLOCK_PROD_FUNCTION_NAME(default) , },
|
||||
{str8_lit_comp("array"), (EV_ViewRuleInfoFlag_Inherited*0)|(EV_ViewRuleInfoFlag_Expandable*0), EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(array) , 0, },
|
||||
{str8_lit_comp("slice"), (EV_ViewRuleInfoFlag_Inherited*0)|(EV_ViewRuleInfoFlag_Expandable*0), EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(slice) , 0, },
|
||||
{str8_lit_comp("bswap"), (EV_ViewRuleInfoFlag_Inherited*1)|(EV_ViewRuleInfoFlag_Expandable*0), EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(bswap) , 0, },
|
||||
{str8_lit_comp("cast"), (EV_ViewRuleInfoFlag_Inherited*0)|(EV_ViewRuleInfoFlag_Expandable*0), EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(cast) , 0, },
|
||||
{str8_lit_comp("only"), (EV_ViewRuleInfoFlag_Inherited*0)|(EV_ViewRuleInfoFlag_Expandable*0), EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(only) , 0, },
|
||||
{str8_lit_comp("omit"), (EV_ViewRuleInfoFlag_Inherited*0)|(EV_ViewRuleInfoFlag_Expandable*0), EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_NAME(omit) , 0, },
|
||||
};
|
||||
|
||||
C_LINKAGE_END
|
||||
|
||||
@@ -13,6 +13,8 @@ EV_ViewRuleKind_Array,
|
||||
EV_ViewRuleKind_Slice,
|
||||
EV_ViewRuleKind_ByteSwap,
|
||||
EV_ViewRuleKind_Cast,
|
||||
EV_ViewRuleKind_Only,
|
||||
EV_ViewRuleKind_Omit,
|
||||
EV_ViewRuleKind_COUNT,
|
||||
} EV_ViewRuleKind;
|
||||
|
||||
@@ -20,5 +22,7 @@ EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(array);
|
||||
EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(slice);
|
||||
EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(bswap);
|
||||
EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(cast);
|
||||
EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(only);
|
||||
EV_VIEW_RULE_EXPR_RESOLUTION_FUNCTION_DEF(omit);
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(default);
|
||||
#endif // EVAL_VISUALIZATION_META_H
|
||||
|
||||
@@ -1294,6 +1294,7 @@ rd_entity_mark_for_deletion(RD_Entity *entity)
|
||||
if(!rd_entity_is_nil(entity))
|
||||
{
|
||||
entity->flags |= RD_EntityFlag_MarkedForDeletion;
|
||||
rd_state->kind_alloc_gens[entity->kind] += 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1596,7 +1597,7 @@ rd_push_entity_list_with_kind(Arena *arena, RD_EntityKind kind)
|
||||
!rd_entity_is_nil(entity);
|
||||
entity = rd_entity_rec_depth_first_pre(entity, &d_nil_entity).next)
|
||||
{
|
||||
if(entity->kind == kind)
|
||||
if(entity->kind == kind && !(entity->flags & RD_EntityFlag_MarkedForDeletion))
|
||||
{
|
||||
rd_entity_list_push(arena, &result, entity);
|
||||
}
|
||||
@@ -7861,10 +7862,34 @@ rd_window_frame(RD_Window *ws)
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(rd_collection_block_prod)
|
||||
{
|
||||
//////////////////////////////
|
||||
//- rjf: watches
|
||||
//
|
||||
if(str8_match(string, str8_lit("watches"), 0))
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
RD_EntityList watches = rd_query_cached_entity_list_with_kind(RD_EntityKind_Watch);
|
||||
EV_ViewRuleList top_level_view_rules = {0};
|
||||
for(RD_EntityNode *n = watches.first; n != 0; n = n->next)
|
||||
{
|
||||
RD_Entity *entity = n->entity;
|
||||
String8 entity_expr_string = entity->string;
|
||||
EV_Key entity_parent_key = rd_parent_ev_key_from_entity(entity);
|
||||
EV_Key entity_key = rd_ev_key_from_entity(entity);
|
||||
EV_BlockList blocks = ev_block_list_from_view_expr_keys(arena, view, str8_zero(), &top_level_view_rules, entity_expr_string, entity_parent_key, entity_key, depth);
|
||||
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, entity_expr_string);
|
||||
if(blocks.total_semantic_row_count > 1 || matches.count == matches.needle_part_count)
|
||||
{
|
||||
ev_block_list_concat__in_place(out, &blocks);
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: targets
|
||||
//
|
||||
if(str8_match(string, str8_lit("targets"), 0))
|
||||
else if(str8_match(string, str8_lit("targets"), 0))
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
RD_EntityList targets = rd_query_cached_entity_list_with_kind(RD_EntityKind_Target);
|
||||
@@ -8536,6 +8561,14 @@ rd_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 defaul
|
||||
space_taken += fnt_dim_from_tag_size_string(font, font_size, 0, 0, brace).x;
|
||||
}
|
||||
}break;
|
||||
|
||||
//- rjf: collections
|
||||
case E_TypeKind_Collection:
|
||||
{
|
||||
String8 placeholder = str8_lit("{...}");
|
||||
str8_list_push(arena, out, placeholder);
|
||||
space_taken += fnt_dim_from_tag_size_string(font, font_size, 0, 0, placeholder).x;
|
||||
}break;
|
||||
}
|
||||
|
||||
scratch_end(scratch);
|
||||
@@ -10605,6 +10638,7 @@ rd_frame(void)
|
||||
{
|
||||
String8 collection_names[] =
|
||||
{
|
||||
str8_lit_comp("watches"),
|
||||
str8_lit_comp("targets"),
|
||||
str8_lit_comp("breakpoints"),
|
||||
str8_lit_comp("watch_pins"),
|
||||
|
||||
+16
-15
@@ -1,9 +1,9 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: 0.9.12 TODO notes
|
||||
//
|
||||
//~ rjf: 0.9.12 TODO notes
|
||||
//
|
||||
// [ ] remainder of @msgs pass:
|
||||
// [ ] new universal ctx menu, hover, tooltips systems
|
||||
// [ ] meta eval system
|
||||
@@ -24,30 +24,31 @@
|
||||
// [ ] post-@msgs TODOs:
|
||||
// [ ] output: add option for scroll-to-bottom - ensure this shows up in universal ctx menu
|
||||
// [ ] universal ctx menu address/watch options; e.g. watch -> memory; watch -> add watch
|
||||
// [ ] rich hover coverage; bitmap <-> geo <-> memory <-> disassembly <-> text; etc.
|
||||
// [ ] rich hover coverage; bitmap <-> geo <-> memory <-> disassembly <-> text; etc.
|
||||
// [ ] ensure "prefer_disasm" is calculated correctly - disassembly-focused
|
||||
// stepping
|
||||
//
|
||||
// stepping
|
||||
//
|
||||
// [ ] ensure the following issues are resolved with this new pass:
|
||||
// [ ] mohit-reported callstack-frame-selection bug (with inlines)
|
||||
// [ ] empty user file causing failure to launch
|
||||
// [ ] save view column pcts; generalize to being a first-class thing in
|
||||
// RD_View, e.g. by just having a string -> f32 store
|
||||
// [ ] decay arrays to pointers in pointer/value comparison
|
||||
// RD_View, e.g. by just having a string -> f32 store
|
||||
// [ ] decay arrays to pointers in pointer/value comparison
|
||||
// [ ] EVAL LOOKUP RULES -> currently going 0 -> rdis_count, but we need
|
||||
// to prioritize the primary rdi
|
||||
// to prioritize the primary rdi
|
||||
// [ ] file overrides -> always pick most specific one! found with conflicting
|
||||
// overrides, e.g. C:/devel/ -> D:/devel/, but also C:/devel/foo ->
|
||||
// C:/devel/bar, etc.
|
||||
// [ ] auto-scroll output window
|
||||
// C:/devel/bar, etc.
|
||||
// [ ] auto-scroll output window
|
||||
// [ ] visualize all breakpoints everywhere - source view should show up in
|
||||
// disasm, disasm should show up in source view, function should show up in
|
||||
// both, etc.
|
||||
// both, etc.
|
||||
// [ ] ** Function breakpoints should show up in the source listing. Without
|
||||
// them being visible, it is confusing when you run and you stop there,
|
||||
// because you're like "wait why did it stop" and then you later remember
|
||||
// that's because there was a function breakpoint there.
|
||||
// [ ] codebase readme pass
|
||||
// [ ] debugger readme pass
|
||||
// that's because there was a function breakpoint there.
|
||||
// [ ] codebase readme pass
|
||||
// [ ] debugger readme pass
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Frontend/UI Pass Tasks
|
||||
|
||||
+26
-14
@@ -944,7 +944,7 @@ rd_watch_view_init(RD_WatchViewState *ewv, RD_WatchViewFillKind fill_kind)
|
||||
}
|
||||
|
||||
internal void
|
||||
rd_watch_view_build(RD_WatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect)
|
||||
rd_watch_view_build(RD_WatchViewState *ewv, String8 root_expr, String8 root_view_rule, B32 modifiable, U32 default_radix, Rng2F32 rect)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
DI_Scope *di_scope = di_scope_open();
|
||||
@@ -994,7 +994,7 @@ rd_watch_view_build(RD_WatchViewState *ewv, B32 modifiable, U32 default_radix, R
|
||||
};
|
||||
U64 frame_rows_count = 0;
|
||||
FrameRow *frame_rows = 0;
|
||||
EV_ViewRuleList top_level_view_rules = {0};
|
||||
EV_ViewRuleList *top_level_view_rules = ev_view_rule_list_from_string(scratch.arena, root_view_rule);
|
||||
EV_BlockList blocks = {0};
|
||||
UI_ScrollListRowBlockArray row_blocks = {0};
|
||||
Vec2S64 cursor_tbl = {0};
|
||||
@@ -1014,6 +1014,17 @@ rd_watch_view_build(RD_WatchViewState *ewv, B32 modifiable, U32 default_radix, R
|
||||
if(state_dirty)
|
||||
{
|
||||
MemoryZeroStruct(&blocks);
|
||||
mutable_entity_kind = RD_EntityKind_Watch;
|
||||
EV_Key root_parent_key = ev_key_make(5381, 0);
|
||||
EV_Key root_key = ev_key_make(ev_hash_from_key(root_parent_key), 1);
|
||||
ev_key_set_expansion(eval_view, root_parent_key, root_key, 1);
|
||||
blocks = ev_block_list_from_view_expr_keys(scratch.arena, eval_view, filter, top_level_view_rules, root_expr, root_parent_key, root_key, -1);
|
||||
blocks.first = blocks.first->next;
|
||||
blocks.count -= 1;
|
||||
blocks.total_visual_row_count -= 1;
|
||||
blocks.total_semantic_row_count -= 1;
|
||||
|
||||
#if 0
|
||||
RDI_SectionKind fzy_target = RDI_SectionKind_UDTs;
|
||||
switch(ewv->fill_kind)
|
||||
{
|
||||
@@ -1037,10 +1048,10 @@ rd_watch_view_build(RD_WatchViewState *ewv, B32 modifiable, U32 default_radix, R
|
||||
RD_Entity *view_rule = rd_entity_child_from_kind(watch, RD_EntityKind_ViewRule);
|
||||
ev_key_set_view_rule(eval_view, key, view_rule->string);
|
||||
String8 expr_string = watch->string;
|
||||
EV_BlockList watch_blocks = ev_block_list_from_view_expr_keys(scratch.arena, eval_view, filter, &top_level_view_rules, expr_string, parent_key, key, 0);
|
||||
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, expr_string);
|
||||
if(matches.count == matches.needle_part_count)
|
||||
if(watch_blocks.total_semantic_row_count > 1 || matches.count == matches.needle_part_count)
|
||||
{
|
||||
EV_BlockList watch_blocks = ev_block_list_from_view_expr_keys(scratch.arena, eval_view, str8_zero(), &top_level_view_rules, expr_string, parent_key, key, 0);
|
||||
ev_block_list_concat__in_place(&blocks, &watch_blocks);
|
||||
}
|
||||
}
|
||||
@@ -1367,6 +1378,7 @@ rd_watch_view_build(RD_WatchViewState *ewv, B32 modifiable, U32 default_radix, R
|
||||
ev_block_end(&blocks, last_vb);
|
||||
}break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
@@ -5475,7 +5487,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(breakpoints)
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.10f, .string = str8_lit("enabled"), .display_string = str8_lit("Enabled"), .view_rule = str8_lit("checkbox"));
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.10f, .string = str8_lit("hit_count"), .display_string = str8_lit("Hit Count"));
|
||||
}
|
||||
rd_watch_view_build(wv, 0, 10, rect);
|
||||
rd_watch_view_build(wv, str8_lit("breakpoints"), str8_lit(""), 0, 10, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
@@ -5492,7 +5504,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(watch_pins)
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.5f, .string = str8_lit("Label"), .dequote_string = 1);
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.5f, .string = str8_lit("Location"), .dequote_string = 1, .is_non_code = 1);
|
||||
}
|
||||
rd_watch_view_build(wv, 0, 10, rect);
|
||||
rd_watch_view_build(wv, str8_lit("watch_pins"), str8_lit(""), 0, 10, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
@@ -5734,7 +5746,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(call_stack)
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.7f);
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Module, 0.25f, .is_non_code = 1);
|
||||
}
|
||||
rd_watch_view_build(wv, 0, 10, rect);
|
||||
rd_watch_view_build(wv, str8_lit("current_thread.callstack.v"), str8_lit("cast:void**, array:current_thread.callstack.count"), 0, 10, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
@@ -6089,7 +6101,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(watch)
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f);
|
||||
}
|
||||
String8 filter = rd_view_filter();
|
||||
rd_watch_view_build(wv, 1 * (filter.size == 0), 10, rect);
|
||||
rd_watch_view_build(wv, str8_lit("watches"), str8_lit(""), 1 * (filter.size == 0), 10, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
@@ -6108,7 +6120,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(locals)
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f);
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f);
|
||||
}
|
||||
rd_watch_view_build(wv, 0, 10, rect);
|
||||
rd_watch_view_build(wv, str8_lit("locals"), str8_lit(""), 0, 10, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
@@ -6127,7 +6139,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(registers)
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f);
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f);
|
||||
}
|
||||
rd_watch_view_build(wv, 0, 16, rect);
|
||||
rd_watch_view_build(wv, str8_lit("registers"), str8_lit("hex"), 0, 16, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
@@ -6146,7 +6158,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(globals)
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f);
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f);
|
||||
}
|
||||
rd_watch_view_build(wv, 0, 10, rect);
|
||||
rd_watch_view_build(wv, str8_lit("globals"), str8_lit(""), 0, 10, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
@@ -6165,7 +6177,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(thread_locals)
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f);
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f);
|
||||
}
|
||||
rd_watch_view_build(wv, 0, 10, rect);
|
||||
rd_watch_view_build(wv, str8_lit("thread_locals"), str8_lit(""), 0, 10, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
@@ -6184,7 +6196,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(types)
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f);
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f);
|
||||
}
|
||||
rd_watch_view_build(wv, 0, 10, rect);
|
||||
rd_watch_view_build(wv, str8_lit("types"), str8_lit(""), 0, 10, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
@@ -6202,7 +6214,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(procedures)
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.6f);
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.2f);
|
||||
}
|
||||
rd_watch_view_build(wv, 0, 10, rect);
|
||||
rd_watch_view_build(wv, str8_lit("procedures"), str8_lit(""), 0, 10, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
|
||||
@@ -177,6 +177,6 @@ internal void rd_watch_view_column_release(RD_WatchViewState *wv, RD_WatchViewCo
|
||||
|
||||
//- rjf: watch view main hooks
|
||||
internal void rd_watch_view_init(RD_WatchViewState *ewv, RD_WatchViewFillKind fill_kind);
|
||||
internal void rd_watch_view_build(RD_WatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect);
|
||||
internal void rd_watch_view_build(RD_WatchViewState *ewv, String8 root_expr, String8 root_view_rule, B32 modifiable, U32 default_radix, Rng2F32 rect);
|
||||
|
||||
#endif // RADDBG_VIEWS_H
|
||||
|
||||
Reference in New Issue
Block a user