@@ -112,13 +112,50 @@ pub struct PtRegs {
112
112
#[ cfg( target_arch = "aarch64" ) ]
113
113
impl fmt:: LowerHex for PtRegs {
114
114
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
115
- write ! ( f, "SP :[{:#x}]
115
+ write ! ( f, "\n SP :[{:#x}]
116
116
PC:[{:#x}]
117
117
State:[{:#x}]
118
118
X0:[{:#x}]
119
- GenRegs:[{:#?}]" ,
120
- self . sp, self . pc, self . pstate,
121
- self . orig_x0, self . regs)
119
+ GenRegs:[
120
+ x0:{:#x}
121
+ x1:{:#x}
122
+ x2:{:#x}
123
+ x3:{:#x}
124
+ x4:{:#x}
125
+ x5:{:#x}
126
+ x6:{:#x}
127
+ x7:{:#x}
128
+ x8:{:#x}
129
+ x9:{:#x}
130
+ x10:{:#x}
131
+ x11:{:#x}
132
+ x12:{:#x}
133
+ x13:{:#x}
134
+ x14:{:#x}
135
+ x15:{:#x}
136
+ x16:{:#x}
137
+ x17:{:#x}
138
+ x18:{:#x}
139
+ x19:{:#x}
140
+ x20:{:#x}
141
+ x21:{:#x}
142
+ x22:{:#x}
143
+ x23:{:#x}
144
+ x24:{:#x}
145
+ x25:{:#x}
146
+ x26:{:#x}
147
+ x27:{:#x}
148
+ x28:{:#x}
149
+ x29:{:#x}
150
+ x30:{:#x}
151
+ ]\n " ,
152
+ self . sp, self . pc, self . pstate, self . orig_x0, self . regs[ 0 ] ,
153
+ self . regs[ 1 ] , self . regs[ 2 ] , self . regs[ 3 ] , self . regs[ 4 ] , self . regs[ 5 ] ,
154
+ self . regs[ 6 ] , self . regs[ 7 ] , self . regs[ 8 ] , self . regs[ 9 ] , self . regs[ 10 ] ,
155
+ self . regs[ 11 ] , self . regs[ 12 ] , self . regs[ 13 ] , self . regs[ 14 ] , self . regs[ 15 ] ,
156
+ self . regs[ 16 ] , self . regs[ 17 ] , self . regs[ 18 ] , self . regs[ 19 ] , self . regs[ 20 ] ,
157
+ self . regs[ 21 ] , self . regs[ 22 ] , self . regs[ 23 ] , self . regs[ 24 ] , self . regs[ 25 ] ,
158
+ self . regs[ 26 ] , self . regs[ 27 ] , self . regs[ 28 ] , self . regs[ 29 ] , self . regs[ 30 ] )
122
159
}
123
160
}
124
161
#[ cfg( target_arch = "aarch64" ) ]
@@ -856,7 +893,8 @@ pub struct SignalStruct {
856
893
trapStopPending : bool ,
857
894
}
858
895
859
- // https://elixir.bootlin.com/linux/latest/source/arch/x86/include/uapi/asm/signal.h#L132
896
+ // Based on linux's 'struct signalstack' in signal.h
897
+ // Same for both x86_64 and Arm
860
898
#[ derive( Debug , Clone , Copy ) ]
861
899
#[ repr( C ) ]
862
900
pub struct SignalStack {
0 commit comments