From 77afc94cee4bbb7ab6acc0be4cb5853eba715c69 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Tue, 7 Apr 2026 17:37:06 -0600 Subject: [PATCH] correctly apply lens type flags in shorthand chained exprs (fixes foo,x hex inheriatnce) --- src/eval/eval_ir.c | 6 +++++- src/raddbg/raddbg_main.c | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/eval/eval_ir.c b/src/eval/eval_ir.c index 5ed0b8c5..43b74c8d 100644 --- a/src/eval/eval_ir.c +++ b/src/eval/eval_ir.c @@ -2404,9 +2404,13 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I if(str8_match(chained_expr->string, shorthand_lens_pair_table[shorthand_idx].shorthand, 0)) { String8 full_name = shorthand_lens_pair_table[shorthand_idx].full_name; + E_Expr *lens_spec_expr = e_string2expr_map_lookup(e_ir_ctx->macro_map, full_name); + E_TypeKey lens_spec_type_key = lens_spec_expr->type_key; + E_Type *lens_spec_type = e_type_from_key(lens_spec_type_key); result.type_key = e_type_key_cons(.kind = E_TypeKind_Lens, .direct_key = result.type_key, - .name = full_name); + .name = full_name, + .flags = lens_spec_type->flags); matches_shorthand = 1; break; } diff --git a/src/raddbg/raddbg_main.c b/src/raddbg/raddbg_main.c index b418308f..2373b425 100644 --- a/src/raddbg/raddbg_main.c +++ b/src/raddbg/raddbg_main.c @@ -5,18 +5,18 @@ //~ rjf: post-0.9.20 TODO notes // //- fabian complaints / reports -// [ ] eval: pointer casts of register space should promote to process space +// [x] `foo, x` needs to correctly match `hex(foo)`, e.g. in application to expansions +// [ ] broadly, need to complete memory view & fix issues +// [ ] dumb panel click-through thing +// [ ] correct type interpretations; togglable interpretations +// [ ] make address editable; specialized version of the cursor address editor in tab right-click menu +// [x] eval: pointer casts of register space should promote to process space // [ ] simplified default layout // [ ] signify empty watch window "expression" slot more as a text field? // [ ] ambiguous parsing cases - need to re-introduce identifier resolution into eval parse. (foo *)&bar // [ ] more control over string visualization; specifically, when *not* to do it, even when using e.g. char *s // [ ] broadly, view discoverability / docs // [ ] memory view deserves larger spot, in default layout -// [ ] broadly, need to complete memory view & fix issues -// [ ] dumb panel click-through thing -// [ ] correct type interpretations; togglable interpretations -// [ ] make address editable; specialized version of the cursor address editor in tab right-click menu -// [ ] `foo, x` needs to correctly match `hex(foo)`, e.g. in application to expansions // [ ] sign bits should not display on unsigned integers? // [ ] fix for-loop stepping oddities, likely single-line for-loop stepping // [ ] source/disasm ctx menu should include options for e.g. "go to selected thread"