HomeFreeBSD

devel/gdb: kgdb: fixup aarch64 pcb/trapframe layout

Description

devel/gdb: kgdb: fixup aarch64 pcb/trapframe layout

base 1c1f31a5e5 and 2ecbbcc7cab altered the pcb and trapframe layouts in
osreldate 1400084. This version of the patch is effectively extracted
from work done by @jhb in CheriBSD's gdb fork, then ported forward to
work with the gdb 13.x program_space_data equivalent. With
this + D39951, I can again get a solid backtrace in recent main.

While we're here, remove some special handling for kthreads not yet run,
as the stack pointer is in-fact stored in pcb_sp in cpu_copy_thread and
cpu_fork. This silences the following exception:

Python Exception <class 'gdb.error'>: Register 2 is not available

but there's not really any effect on the end result, since the thread
hasn't been scheduled yet.

Reviewed by: jhb
Approved by: jhb (maintainer)
MFH: 2023Q3
Differential Revision: https://reviews.freebsd.org/D41684

Details

Provenance
kevansAuthored on Sep 5 2023, 6:16 PM
Reviewer
jhb
Differential Revision
D41684: devel/gdb: kgdb: fixup aarch64 pcb/trapframe layout
Parents
R11:7e2852846872: devel/gdb: kgdb: Handle stoppcbs compat
Branches
Unknown
Tags
Unknown