It turns out that pretty much all relevant aarch64 OSes use the same
layout for transferring registers in their debug interfaces.  Except
for us.  That doesn't make sense and would mean I'd have to do
additional work in my lldb porting efforts.

Diff below revises "struct reg" for amd64 to be compatible with what
NetBSD provides.  That just matches our naming conventions for struct
reg better.  The actual names are largely irrelevant as debuggers
hardcode the layouts anyway to support cross-debugging.

This struct isn't actually used yet, so these changes don't really
have any ABI consequences.  But once this is in, I'm planning on
making core dumps and ptrace actually work on arm64.

ok?


Index: arch/arm64/include/reg.h
===================================================================
RCS file: /cvs/src/sys/arch/arm64/include/reg.h,v
retrieving revision 1.1
diff -u -p -r1.1 reg.h
--- arch/arm64/include/reg.h    17 Dec 2016 23:38:33 -0000      1.1
+++ arch/arm64/include/reg.h    20 Mar 2017 00:27:12 -0000
@@ -19,11 +19,11 @@
 #define _MACHINE_REG_H_
 
 struct reg {
-       unsigned long x[30];
-       unsigned long x_sp;
-       unsigned long x_lr;
-       unsigned long x_pc;
-       unsigned long x_cpsr;
+       unsigned long r_reg[31];
+       unsigned long r_sp;
+       unsigned long r_pc;
+       unsigned long r_spsr;
+       unsigned long r_tpidr;
 };
 
 struct fpreg {

Reply via email to