mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-14 16:12:24 -07:00
bp hit counts reset; cell-granularity deletions path for watch windows
This commit is contained in:
@@ -1678,19 +1678,12 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P
|
||||
|
||||
case CTRL_EventKind_NewProc:
|
||||
{
|
||||
// rjf: the first process? -> clear session output & reset all bp hit counts
|
||||
// rjf: the first process? -> clear session output
|
||||
CTRL_EntityList existing_processes = ctrl_entity_list_from_kind(d_state->ctrl_entity_store, CTRL_EntityKind_Process);
|
||||
if(existing_processes.count == 1)
|
||||
{
|
||||
MTX_Op op = {r1u64(0, 0xffffffffffffffffull), str8_lit("[new session]\n")};
|
||||
mtx_push_op(d_state->output_log_key, op);
|
||||
#if 0 // TODO(rjf): @msgs
|
||||
RD_EntityList bps = rd_query_cached_entity_list_with_kind(RD_EntityKind_Breakpoint);
|
||||
for(RD_EntityNode *n = bps.first; n != 0; n = n->next)
|
||||
{
|
||||
n->entity->u64 = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// rjf: create entity
|
||||
@@ -1700,6 +1693,13 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P
|
||||
rd_entity_equip_ctrl_handle(entity, event->entity);
|
||||
rd_entity_equip_ctrl_id(entity, event->entity_id);
|
||||
rd_entity_equip_arch(entity, event->arch);
|
||||
|
||||
// rjf: report
|
||||
D_EventNode *n = push_array(arena, D_EventNode, 1);
|
||||
SLLQueuePush(result.first, result.last, n);
|
||||
result.count += 1;
|
||||
D_Event *evt = &n->v;
|
||||
evt->kind = D_EventKind_ProcessBegin;
|
||||
}break;
|
||||
|
||||
case CTRL_EventKind_NewThread:
|
||||
|
||||
@@ -61,6 +61,7 @@ struct D_PathMapArray
|
||||
typedef enum D_EventKind
|
||||
{
|
||||
D_EventKind_Null,
|
||||
D_EventKind_ProcessBegin,
|
||||
D_EventKind_Stop,
|
||||
D_EventKind_COUNT
|
||||
}
|
||||
|
||||
@@ -15318,6 +15318,19 @@ rd_frame(void)
|
||||
switch(evt->kind)
|
||||
{
|
||||
default:{}break;
|
||||
case D_EventKind_ProcessBegin:
|
||||
{
|
||||
// rjf: reset breakpoint hit counts
|
||||
CTRL_EntityList processes = ctrl_entity_list_from_kind(d_state->ctrl_entity_store, CTRL_EntityKind_Process);
|
||||
if(processes.count == 1)
|
||||
{
|
||||
RD_EntityList bps = rd_query_cached_entity_list_with_kind(RD_EntityKind_Breakpoint);
|
||||
for(RD_EntityNode *n = bps.first; n != 0; n = n->next)
|
||||
{
|
||||
n->entity->u64 = 0;
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case D_EventKind_Stop:
|
||||
{
|
||||
CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, evt->thread);
|
||||
|
||||
@@ -1833,6 +1833,16 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
}
|
||||
ev_key_set_view_rule(eval_view, row->key, str8_zero());
|
||||
}
|
||||
else if(tbl.y != 0 && (col->kind == RD_WatchViewColumnKind_Value || col->kind == RD_WatchViewColumnKind_Member) && row_kind == RD_WatchViewRowKind_Normal)
|
||||
{
|
||||
E_Expr *expr = row->expr;
|
||||
if(col->kind == RD_WatchViewColumnKind_Member)
|
||||
{
|
||||
expr = e_expr_ref_member_access(scratch.arena, expr, str8(col->string_buffer, col->string_size));
|
||||
}
|
||||
E_Eval dst_eval = e_eval_from_expr(scratch.arena, expr);
|
||||
rd_commit_eval_value_string(dst_eval, str8_zero());
|
||||
}
|
||||
}
|
||||
}
|
||||
for(RD_EntityNode *n = entities_to_remove.first; n != 0; n = n->next)
|
||||
|
||||
Reference in New Issue
Block a user