only decorate debug-info-table-generated expressions with `s when we can detect it is necessary (.s are now allowed); only generate simplified expression extension strings for expressions in watch windows if parent keys are present, otherwise just do the full expression

This commit is contained in:
Ryan Fleury committed 2025-05-08 14:14:30 -07:00
1 parent b30e928501
commit 2a3c5527e0
2 files changed
+19 -5

No files matched your search

+6 -3
View File
@@ -1716,8 +1716,11 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
expr_string = cell->eval.string;
// rjf: try to form a simpler expression string out of the expression tree itself, *if* this
// is not an editable expression, and if this evaluation was successful
if(!(block_type->flags & E_TypeFlag_EditableChildren) && cell->eval.msgs.max_kind == E_MsgKind_Null)
// is not an editable expression, and if this evaluation was successful, and if this evaluation
// has a parent
if(!e_key_match(cell->eval.parent_key, e_key_zero()) &&
!(block_type->flags & E_TypeFlag_EditableChildren) &&
cell->eval.msgs.max_kind == E_MsgKind_Null)
{
// rjf: first, locate a notable expression - we special-case things like member accesses
// or array indices, so we should grab those if possible
@@ -1740,7 +1743,7 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
}
}
// rjf: generate expression string based on our notable expression
// rjf: generate expression extension string based on our notable expression
switch(notable_expr->kind)
{
// rjf: default case -> just take whatever string was directly passed via the evaluation