rich unwind -> callstack, defined by ctrl layer, so we can begin floating meta evaluation cache to ctrl layer

This commit is contained in:
Ryan Fleury
2024-10-11 11:46:25 -07:00
parent 4757c4dafd
commit 4091f5e0c0
7 changed files with 169 additions and 159 deletions
+36
View File
@@ -370,6 +370,37 @@ struct CTRL_Unwind
CTRL_UnwindFlags flags;
};
////////////////////////////////
//~ rjf: Call Stack Types
typedef struct CTRL_CallStackInlineFrame CTRL_CallStackInlineFrame;
struct CTRL_CallStackInlineFrame
{
CTRL_CallStackInlineFrame *next;
CTRL_CallStackInlineFrame *prev;
RDI_InlineSite *inline_site;
};
typedef struct CTRL_CallStackFrame CTRL_CallStackFrame;
struct CTRL_CallStackFrame
{
CTRL_CallStackInlineFrame *first_inline_frame;
CTRL_CallStackInlineFrame *last_inline_frame;
U64 inline_frame_count;
void *regs;
RDI_Parsed *rdi;
RDI_Procedure *procedure;
};
typedef struct CTRL_CallStack CTRL_CallStack;
struct CTRL_CallStack
{
CTRL_CallStackFrame *frames;
U64 concrete_frame_count;
U64 inline_frame_count;
U64 total_frame_count;
};
////////////////////////////////
//~ rjf: Trap Types
@@ -1034,6 +1065,11 @@ internal CTRL_UnwindStepResult ctrl_unwind_step(CTRL_EntityStore *store, CTRL_Ha
//- rjf: abstracted full unwind
internal CTRL_Unwind ctrl_unwind_from_thread(Arena *arena, CTRL_EntityStore *store, CTRL_Handle thread, U64 endt_us);
////////////////////////////////
//~ rjf: Call Stack Building Functions
internal CTRL_CallStack ctrl_call_stack_from_unwind(Arena *arena, DI_Scope *di_scope, CTRL_Entity *process, CTRL_Unwind *base_unwind);
////////////////////////////////
//~ rjf: Halting All Attached Processes