std.debug: allow fp unwind from context
It's easy to do FP unwinding from a CPU context: you just report the captured ip/pc value first, and then unwind from the captured fp value. All this really needed was a couple of new functions on the std.debug.cpu_context implementations so that we don't need to rely on std.debug.Dwarf to access the captured registers.
Resolves: #25576
The CI failures are happening because of a mismatch between register size and pointer size for N32 and x32. You can just @truncate the values at the getFp/getPc call sites; after all, the whole point of these ABIs is that pointers are only 32 bits wide.
Alternatively, I guess there's an argument to be made for @intCast since it would be a debugging aid in weird situations where a pointer in a register has somehow gotten wider than 32 bits.
Since it looks like it'll land first, note that #25886 adds std.debug.cpu_context.Kvx which will need getFp/getPc functions:
pub fn getFp(ctx: *const Kvx) u64 {
return ctx.r[14];
}
pub fn getPc(ctx: *const Kvx) u64 {
return ctx.pc;
}