mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-21 11:14:59 -07:00
eliminate rule to associate set names with expand rules / visualizers; this is really only a rule we want for the core eval lookup hooks
This commit is contained in:
@@ -1593,22 +1593,6 @@ ev_expand_rule_tag_pair_from_expr_irtree(E_Expr *expr, E_IRTreeAndType *irtree)
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: next try implicit set name -> rule mapping
|
||||
if(result.rule == &ev_nil_expand_rule)
|
||||
{
|
||||
E_TypeKind type_kind = e_type_kind_from_key(irtree->type_key);
|
||||
if(type_kind == E_TypeKind_Set)
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(irtree->type_key);
|
||||
String8 name = type->name;
|
||||
EV_ExpandRule *candidate = ev_expand_rule_from_string(name);
|
||||
if(candidate != &ev_nil_expand_rule)
|
||||
{
|
||||
result.rule = candidate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: next try auto hook map
|
||||
if(result.rule == &ev_nil_expand_rule)
|
||||
{
|
||||
|
||||
@@ -336,7 +336,7 @@ RD_NameSchemaInfo rd_name_schema_info_table[16] =
|
||||
{str8_lit_comp("thread"), str8_lit_comp("x:{'label':code_string, 'id':u64, @no_expand 'frozen':bool, 'call_stack':query}")},
|
||||
};
|
||||
|
||||
Rng1U64 rd_reg_slot_range_table[41] =
|
||||
Rng1U64 rd_reg_slot_range_table[42] =
|
||||
{
|
||||
{0},
|
||||
{OffsetOf(RD_Regs, machine), OffsetOf(RD_Regs, machine) + sizeof(CTRL_Handle)},
|
||||
@@ -374,6 +374,7 @@ Rng1U64 rd_reg_slot_range_table[41] =
|
||||
{OffsetOf(RD_Regs, force_confirm), OffsetOf(RD_Regs, force_confirm) + sizeof(B32)},
|
||||
{OffsetOf(RD_Regs, prefer_disasm), OffsetOf(RD_Regs, prefer_disasm) + sizeof(B32)},
|
||||
{OffsetOf(RD_Regs, no_rich_tooltip), OffsetOf(RD_Regs, no_rich_tooltip) + sizeof(B32)},
|
||||
{OffsetOf(RD_Regs, do_implicit_root), OffsetOf(RD_Regs, do_implicit_root) + sizeof(B32)},
|
||||
{OffsetOf(RD_Regs, dir2), OffsetOf(RD_Regs, dir2) + sizeof(Dir2)},
|
||||
{OffsetOf(RD_Regs, string), OffsetOf(RD_Regs, string) + sizeof(String8)},
|
||||
{OffsetOf(RD_Regs, cmd_name), OffsetOf(RD_Regs, cmd_name) + sizeof(String8)},
|
||||
|
||||
@@ -44,6 +44,7 @@ RD_RegSlot_PID,
|
||||
RD_RegSlot_ForceConfirm,
|
||||
RD_RegSlot_PreferDisasm,
|
||||
RD_RegSlot_NoRichTooltip,
|
||||
RD_RegSlot_DoImplicitRoot,
|
||||
RD_RegSlot_Dir2,
|
||||
RD_RegSlot_String,
|
||||
RD_RegSlot_CmdName,
|
||||
@@ -571,6 +572,7 @@ U32 pid;
|
||||
B32 force_confirm;
|
||||
B32 prefer_disasm;
|
||||
B32 no_rich_tooltip;
|
||||
B32 do_implicit_root;
|
||||
Dir2 dir2;
|
||||
String8 string;
|
||||
String8 cmd_name;
|
||||
@@ -635,6 +637,7 @@ RD_Query query;
|
||||
.force_confirm = rd_regs()->force_confirm,\
|
||||
.prefer_disasm = rd_regs()->prefer_disasm,\
|
||||
.no_rich_tooltip = rd_regs()->no_rich_tooltip,\
|
||||
.do_implicit_root = rd_regs()->do_implicit_root,\
|
||||
.dir2 = rd_regs()->dir2,\
|
||||
.string = rd_regs()->string,\
|
||||
.cmd_name = rd_regs()->cmd_name,\
|
||||
@@ -644,7 +647,7 @@ RD_Query query;
|
||||
C_LINKAGE_BEGIN
|
||||
extern RD_VocabInfo rd_vocab_info_table[308];
|
||||
extern RD_NameSchemaInfo rd_name_schema_info_table[16];
|
||||
extern Rng1U64 rd_reg_slot_range_table[41];
|
||||
extern Rng1U64 rd_reg_slot_range_table[42];
|
||||
extern String8 rd_binding_version_remap_old_name_table[8];
|
||||
extern String8 rd_binding_version_remap_new_name_table[8];
|
||||
extern String8 rd_icon_kind_text_table[74];
|
||||
|
||||
@@ -378,6 +378,7 @@ RD_RegTable:
|
||||
{B32 force_confirm ForceConfirm }
|
||||
{B32 prefer_disasm PreferDisasm }
|
||||
{B32 no_rich_tooltip NoRichTooltip }
|
||||
{B32 do_implicit_root DoImplicitRoot}
|
||||
{Dir2 dir2 Dir2 }
|
||||
{String8 string String }
|
||||
{String8 cmd_name CmdName }
|
||||
|
||||
@@ -323,10 +323,14 @@ E_LOOKUP_INFO_FUNCTION_DEF(schema)
|
||||
{
|
||||
if(!md_node_has_tag(child, str8_lit("no_expand"), 0))
|
||||
{
|
||||
ExpandChildNode *n = push_array(scratch.arena, ExpandChildNode, 1);
|
||||
n->n = child;
|
||||
SLLQueuePush(first_child_node, last_child_node, n);
|
||||
child_count += 1;
|
||||
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, child->string);
|
||||
if(matches.count == matches.needle_part_count)
|
||||
{
|
||||
ExpandChildNode *n = push_array(scratch.arena, ExpandChildNode, 1);
|
||||
n->n = child;
|
||||
SLLQueuePush(first_child_node, last_child_node, n);
|
||||
child_count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,7 +391,7 @@ E_LOOKUP_ACCESS_FUNCTION_DEF(schema)
|
||||
else if(str8_match(child_schema->first->string, str8_lit("path_pt"), 0))
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
String8 string = push_str8f(scratch.arena, "%S:%S%s%S", child->first->string, child->first->first->string, child->first->first->first->string.size ? ":" : "", child->first->first->first->string);
|
||||
String8 string = push_str8f(scratch.arena, "%S%s%S%s%S", child->first->string, child->first->string.size ? ":" : "", child->first->first->string, child->first->first->first->string.size ? ":" : "", child->first->first->first->string);
|
||||
child_type_key = e_type_key_cons_array(e_type_key_basic(E_TypeKind_U8), string.size, E_TypeFlag_IsPathText);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
@@ -2953,7 +2957,7 @@ rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range)
|
||||
String8 child_type_name = child_schema->first->string;
|
||||
if(str8_match(child_type_name, str8_lit("path_pt"), 0))
|
||||
{
|
||||
read_data = push_str8f(scratch.arena, "%S:%S%s%S", cfg->first->string, cfg->first->first->string, cfg->first->first->first->string.size ? ":" : "", cfg->first->first->first->string);
|
||||
read_data = push_str8f(scratch.arena, "%S%s%S%s%S", cfg->first->string, cfg->first->string.size ? ":" : "", cfg->first->first->string, cfg->first->first->first->string.size ? ":" : "", cfg->first->first->first->string);
|
||||
}
|
||||
else if(str8_match(child_type_name, str8_lit("path"), 0) ||
|
||||
str8_match(child_type_name, str8_lit("code_string"), 0) ||
|
||||
@@ -7724,8 +7728,9 @@ rd_window_frame(void)
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: based on query expression, determine if we have an explicit root
|
||||
if(query_expr.size == 0 || !query_is_lister)
|
||||
// rjf: determine if we want an explicit root
|
||||
B32 do_explicit_root = (!ws->query_regs->do_implicit_root && (query_expr.size == 0 || !query_is_lister));
|
||||
if(do_explicit_root)
|
||||
{
|
||||
RD_Cfg *explicit_root = rd_cfg_child_from_string_or_alloc(view, str8_lit("explicit_root"));
|
||||
rd_cfg_new(explicit_root, str8_lit("1"));
|
||||
@@ -7751,7 +7756,7 @@ rd_window_frame(void)
|
||||
F32 query_height_px = max_query_height_px;
|
||||
if(size_query_by_expr_eval)
|
||||
{
|
||||
query_height_px = row_height_px * predicted_block_tree.total_row_count;
|
||||
query_height_px = row_height_px * (predicted_block_tree.total_row_count - !do_explicit_root);
|
||||
query_height_px = Min(query_height_px, max_query_height_px);
|
||||
}
|
||||
rect = r2f32p(content_rect_center.x - query_width_px/2,
|
||||
@@ -9762,6 +9767,7 @@ rd_window_frame(void)
|
||||
else if(ui_right_clicked(sig))
|
||||
{
|
||||
rd_cmd(RD_CmdKind_PushQuery,
|
||||
.do_implicit_root = 1,
|
||||
.ui_key = sig.box->key,
|
||||
.off_px = v2f32(0, sig.box->rect.y1 - sig.box->rect.y0),
|
||||
.expr = push_str8f(scratch.arena, "$%I64x", tab->id));
|
||||
|
||||
@@ -75,6 +75,9 @@
|
||||
// single step over the first instruction of that line, even if the thread
|
||||
// would've stopped at the first instruction due to the step, were that bp not
|
||||
// there.
|
||||
//
|
||||
// [ ] if a breakpoint matches the entry point's starting address, its hit count
|
||||
// is not correctly incremented.
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: post-0.9.12 TODO notes
|
||||
|
||||
Reference in New Issue
Block a user