take out view rules from pins, since that is just in the expr itself now

This commit is contained in:
Ryan Fleury
2025-04-11 13:21:25 -07:00
parent abd33f7160
commit 83a31a5229
3 changed files with 37 additions and 41 deletions
+5 -5
View File
@@ -73,11 +73,11 @@
// `raddbg_thread_color_hex(0xff0000ff)`: Sets the calling thread's color.
// - Also can be done with individual `[0, 1]` color components:
// `raddbg_thread_color_rgba(1.f, 0.f, 0.f, 1.f)`
// - `raddbg_pin(<expr>, <view_rule>)`, e.g.
// `raddbg_pin(dynamic_array, slice)`: Like watch pins, but defined in source
// code. This is used by the debugger UI, but does not show up anywhere
// other than the source code, so it can either be used as a macro (which
// expands to nothing), or in comments too.
// - `raddbg_pin(<expr>)`, e.g.
// `raddbg_pin(slice(dynamic_array))`: Like watch pins, but defined in
// source code. This is used by the debugger UI, but does not show up
// anywhere other than the source code, so it can either be used as a macro
// (which expands to nothing), or in comments too.
// - `raddbg_entry_point(name)`, e.g. `raddbg_entry_point(entry_point)`:
// declares the entry point for an executable, which the debugger will use
// when stepping into a program, rather than the defaults (e.g. `main`).
-7
View File
@@ -1933,15 +1933,10 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
// rjf: extract fixed arguments
String8 expr_string = {0};
String8 view_rule_string = {0};
if(args.first != 0)
{
expr_string = args.first->string;
}
if(args.first->next != 0)
{
view_rule_string = args.first->next->string;
}
// rjf: build immediate pin for this markup
if(expr_string.size != 0)
@@ -1949,9 +1944,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
RD_Cfg *immediate_root = rd_immediate_cfg_from_keyf("markup_pin_%I64x_%I64x", line_num, off);
RD_Cfg *pin = rd_cfg_child_from_string_or_alloc(immediate_root, str8_lit("watch_pin"));
RD_Cfg *expr = rd_cfg_child_from_string_or_alloc(pin, str8_lit("expression"));
RD_Cfg *view_rule = rd_cfg_child_from_string_or_alloc(pin, str8_lit("view_rule"));
rd_cfg_new_replace(expr, expr_string);
rd_cfg_new_replace(view_rule, view_rule_string);
rd_cfg_list_push(scratch.arena, &immediate_pins, pin);
}
}