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
+6 -46
View File
@@ -60,8 +60,8 @@ struct D_PathMapArray
typedef enum D_EventKind
{
D_EventKind_Null,
D_EventKind_ProcessEnd,
D_EventKind_Null,
D_EventKind_ProcessEnd,
D_EventKind_Stop,
D_EventKind_COUNT
}
@@ -81,9 +81,9 @@ struct D_Event
{
D_EventKind kind;
D_EventCause cause;
CTRL_Handle thread;
U64 vaddr;
U64 code;
CTRL_Handle thread;
U64 vaddr;
U64 code;
};
typedef struct D_EventNode D_EventNode;
@@ -189,43 +189,6 @@ struct D_ViewRuleSpec
D_ViewRuleSpecInfo info;
};
////////////////////////////////
//~ rjf: Rich (Including Inline) Unwind Types
typedef struct D_UnwindInlineFrame D_UnwindInlineFrame;
struct D_UnwindInlineFrame
{
D_UnwindInlineFrame *next;
D_UnwindInlineFrame *prev;
RDI_InlineSite *inline_site;
};
typedef struct D_UnwindFrame D_UnwindFrame;
struct D_UnwindFrame
{
D_UnwindInlineFrame *first_inline_frame;
D_UnwindInlineFrame *last_inline_frame;
U64 inline_frame_count;
void *regs;
RDI_Parsed *rdi;
RDI_Procedure *procedure;
};
typedef struct D_UnwindFrameArray D_UnwindFrameArray;
struct D_UnwindFrameArray
{
D_UnwindFrame *v;
U64 concrete_frame_count;
U64 inline_frame_count;
U64 total_frame_count;
};
typedef struct D_Unwind D_Unwind;
struct D_Unwind
{
D_UnwindFrameArray frames;
};
////////////////////////////////
//~ rjf: Command Types
@@ -475,7 +438,7 @@ internal U64 d_type_num_from_dbgi_key_name(DI_Key *dbgi_key, String8 name);
//- rjf: voff -> line info
internal D_LineList d_lines_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff);
//- rjf: file:line -> line info
//- rjf: file:line -> line info
// TODO(rjf): this depends on file path maps, needs to move
internal D_LineListArray d_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64 line_num_range);
internal D_LineList d_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num);
@@ -484,9 +447,6 @@ internal D_LineList d_lines_from_file_path_line_num(Arena *arena, String8 file_p
//~ rjf: Process/Thread/Module Info Lookups
internal U64 d_tls_base_vaddr_from_process_root_rip(CTRL_Entity *process, U64 root_vaddr, U64 rip_vaddr);
internal E_String2NumMap *d_push_locals_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbgi_key, U64 voff);
internal E_String2NumMap *d_push_member_map_from_dbgi_key_voff(Arena *arena, DI_Scope *scope, DI_Key *dbgi_key, U64 voff);
internal D_Unwind d_unwind_from_ctrl_unwind(Arena *arena, DI_Scope *di_scope, CTRL_Entity *process, CTRL_Unwind *base_unwind);
////////////////////////////////
//~ rjf: Target Controls