Skip to content
  • mhorne's avatar
    arm64: remove pcb_pc · 5f66d5a3
    mhorne authored
    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
    5f66d5a3