HomeFreeBSD

arm64: remove pcb_pc

Description

arm64: remove pcb_pc

The program counter field in the PCB is written in exactly one place,
makectx(), upon entry to the debugger. For threads other than curthread,
its value will be empty, or bogus. Rather than writing to this field in
more places, it can be removed in favor of using the value in the link
register.

To make this clearer, pcb->pcb_x[30] is renamed to pcb->pcb_lr, similar
to what already exists in struct trapframe. Also, prefer lr to x30 in
assembly, as it better conveys intention.

This improves PC_REGS() for kdb_thread != curthread. It is required for
a functional gdb(4) stub, fixing the output of info threads, in
particular.

The space occupied by pcb_pc is retained, for compatibility with kgdb.

Reviewed by: markj, jhb
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27720

Details

Provenance
mhorneAuthored on Dec 21 2020, 4:16 PM
Reviewer
markj
Differential Revision
D27720: arm64: remove pcb_pc
Parents
rGe9bb4ce3d0e7: arm64: don't pass user trapframe to kdb_trap()
Branches
Unknown
Tags
Unknown