mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-19 18:42:23 -07:00
checkpoint in getting off of d_entities and onto ctrl_entities for frontend paths, including thread selection & df_regs
This commit is contained in:
@@ -544,6 +544,18 @@ ctrl_entity_list_push(Arena *arena, CTRL_EntityList *list, CTRL_Entity *entity)
|
||||
list->count += 1;
|
||||
}
|
||||
|
||||
internal CTRL_EntityList
|
||||
ctrl_entity_list_from_handle_list(Arena *arena, CTRL_EntityStore *store, CTRL_HandleList *list)
|
||||
{
|
||||
CTRL_EntityList result = {0};
|
||||
for(CTRL_HandleNode *n = list->first; n != 0; n = n->next)
|
||||
{
|
||||
CTRL_Entity *entity = ctrl_entity_from_handle(store, n->v);
|
||||
ctrl_entity_list_push(arena, &result, entity);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//- rjf: cache creation/destruction
|
||||
|
||||
internal CTRL_EntityStore *
|
||||
@@ -1057,6 +1069,7 @@ ctrl_entity_store_apply_events(CTRL_EntityStore *store, CTRL_EventList *list)
|
||||
{
|
||||
CTRL_Entity *process = ctrl_entity_from_handle(store, event->parent);
|
||||
CTRL_Entity *thread = ctrl_entity_alloc(store, process, CTRL_EntityKind_Thread, event->arch, event->entity, (U64)event->entity_id);
|
||||
thread->stack_base = event->stack_base;
|
||||
ctrl_query_cached_rip_from_thread(store, event->entity);
|
||||
}break;
|
||||
case CTRL_EventKind_EndThread:
|
||||
|
||||
@@ -44,6 +44,7 @@ typedef enum CTRL_EntityKind
|
||||
{
|
||||
CTRL_EntityKind_Null,
|
||||
CTRL_EntityKind_Root,
|
||||
|
||||
CTRL_EntityKind_Machine,
|
||||
CTRL_EntityKind_Process,
|
||||
CTRL_EntityKind_Thread,
|
||||
@@ -65,9 +66,11 @@ struct CTRL_Entity
|
||||
CTRL_EntityKind kind;
|
||||
Arch arch;
|
||||
B32 is_frozen;
|
||||
U32 rgba;
|
||||
CTRL_Handle handle;
|
||||
U64 id;
|
||||
Rng1U64 vaddr_range;
|
||||
U64 stack_base;
|
||||
U64 timestamp;
|
||||
String8 string;
|
||||
};
|
||||
@@ -265,7 +268,7 @@ struct CTRL_UserBreakpointList
|
||||
typedef U64 CTRL_EvalSpaceKind;
|
||||
enum
|
||||
{
|
||||
CTRL_EvalSpaceKind_Entity,
|
||||
CTRL_EvalSpaceKind_Entity = E_SpaceKind_FirstUserDefined,
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
@@ -728,6 +731,8 @@ internal CTRL_Event ctrl_event_from_serialized_string(Arena *arena, String8 stri
|
||||
|
||||
//- rjf: entity list data structures
|
||||
internal void ctrl_entity_list_push(Arena *arena, CTRL_EntityList *list, CTRL_Entity *entity);
|
||||
internal CTRL_EntityList ctrl_entity_list_from_handle_list(Arena *arena, CTRL_EntityStore *store, CTRL_HandleList *list);
|
||||
#define ctrl_entity_list_first(list) ((list)->first ? (list)->first->v : &ctrl_entity_nil)
|
||||
|
||||
//- rjf: cache creation/destruction
|
||||
internal CTRL_EntityStore *ctrl_entity_store_alloc(void);
|
||||
|
||||
Reference in New Issue
Block a user