add support for CFA in the eval system

Canonical Frame Address is a DWARF-only concept encoded in the unwind info.
Debugger must store this data for each call frame and provide it to
the eval system based on selected stack frame.

To abstract over format details, we introduce a "Frame Unwind Context".
For DWARF, this context maintains the intermediate unwind state and exposes
the CFA, whereas for PE, it remains empty.
This commit is contained in:
Nikita Smith
2025-11-26 15:42:40 -08:00
parent 2a6d0d737c
commit f9561cb618
9 changed files with 225 additions and 100 deletions
+1
View File
@@ -11912,6 +11912,7 @@ rd_frame(void)
ctx->frame_base = push_array(scratch.arena, U64, 1);
ctx->tls_base = push_array(scratch.arena, U64, 1);
ctx->tls_base[0] = d_query_cached_tls_base_vaddr_from_process_root_rip(process, tls_root_vaddr, rip_vaddr);
ctx->cfa = d_query_cached_cfa_from_thread_unwind(thread, unwind_count);
}
e_select_interpret_ctx(interpret_ctx, eval_dbg_infos_primary->rdi, rip_voff);