@@ -174,7 +174,7 @@ func arm64SwitchStack(it *stackIterator, callFrameRegs *op.DwarfRegisters) bool
174174 // Entering the system stack.
175175 it .regs .Reg (callFrameRegs .SPRegNum ).Uint64Val = it .g0_sched_sp
176176 // Reads the previous value of g0.sched.sp that runtime.cgocallback_gofunc saved on the stack.
177- it .g0_sched_sp , _ = readUintRaw (it .mem , uint64 ( it .regs .SP ()+ prevG0schedSPOffsetSaveSlot ) , int64 (it .bi .Arch .PtrSize ()))
177+ it .g0_sched_sp , _ = readUintRaw (it .mem , it .regs .SP ()+ prevG0schedSPOffsetSaveSlot , int64 (it .bi .Arch .PtrSize ()))
178178 it .top = false
179179 callFrameRegs , ret , retaddr := it .advanceRegs ()
180180 frameOnSystemStack := it .newStackframe (ret , retaddr )
@@ -195,7 +195,7 @@ func arm64SwitchStack(it *stackIterator, callFrameRegs *op.DwarfRegisters) bool
195195 // switches from the goroutine stack to the system stack.
196196 // Since we are unwinding the stack from callee to caller we have to switch
197197 // from the system stack to the goroutine stack.
198- off , _ := readIntRaw (it .mem , uint64 ( it .regs .SP ()+ arm64cgocallSPOffsetSaveSlot ) ,
198+ off , _ := readIntRaw (it .mem , it .regs .SP ()+ arm64cgocallSPOffsetSaveSlot ,
199199 int64 (it .bi .Arch .PtrSize ()))
200200 oldsp := it .regs .SP ()
201201 newsp := uint64 (int64 (it .stackhi ) - off )
@@ -239,20 +239,20 @@ func arm64SwitchStack(it *stackIterator, callFrameRegs *op.DwarfRegisters) bool
239239 bpoff = 22
240240 lroff = 23
241241 }
242- newsp , _ := readUintRaw (it .mem , uint64 ( it .regs .SP ()+ 8 * 24 ) , int64 (it .bi .Arch .PtrSize ()))
243- newbp , _ := readUintRaw (it .mem , uint64 ( it .regs .SP ()+ 8 * bpoff ) , int64 (it .bi .Arch .PtrSize ()))
244- newlr , _ := readUintRaw (it .mem , uint64 ( it .regs .SP ()+ 8 * lroff ) , int64 (it .bi .Arch .PtrSize ()))
242+ newsp , _ := readUintRaw (it .mem , it .regs .SP ()+ 8 * 24 , int64 (it .bi .Arch .PtrSize ()))
243+ newbp , _ := readUintRaw (it .mem , it .regs .SP ()+ 8 * bpoff , int64 (it .bi .Arch .PtrSize ()))
244+ newlr , _ := readUintRaw (it .mem , it .regs .SP ()+ 8 * lroff , int64 (it .bi .Arch .PtrSize ()))
245245 if it .regs .Reg (it .regs .BPRegNum ) != nil {
246- it .regs .Reg (it .regs .BPRegNum ).Uint64Val = uint64 ( newbp )
246+ it .regs .Reg (it .regs .BPRegNum ).Uint64Val = newbp
247247 } else {
248248 reg , _ := it .readRegisterAt (it .regs .BPRegNum , it .regs .SP ()+ 8 * bpoff )
249249 it .regs .AddReg (it .regs .BPRegNum , reg )
250250 }
251- it .regs .Reg (it .regs .LRRegNum ).Uint64Val = uint64 ( newlr )
251+ it .regs .Reg (it .regs .LRRegNum ).Uint64Val = newlr
252252 if linux {
253- it .regs .Reg (it .regs .SPRegNum ).Uint64Val = uint64 ( newbp )
253+ it .regs .Reg (it .regs .SPRegNum ).Uint64Val = newbp
254254 } else {
255- it .regs .Reg (it .regs .SPRegNum ).Uint64Val = uint64 ( newsp )
255+ it .regs .Reg (it .regs .SPRegNum ).Uint64Val = newsp
256256 }
257257 it .pc = newlr
258258 return true
@@ -299,7 +299,7 @@ func arm64SwitchStack(it *stackIterator, callFrameRegs *op.DwarfRegisters) bool
299299 // switches from the goroutine stack to the system stack.
300300 // Since we are unwinding the stack from callee to caller we have to switch
301301 // from the system stack to the goroutine stack.
302- off , _ := readIntRaw (it .mem , uint64 ( callFrameRegs .SP ()+ arm64cgocallSPOffsetSaveSlot ) , int64 (it .bi .Arch .PtrSize ()))
302+ off , _ := readIntRaw (it .mem , callFrameRegs .SP ()+ arm64cgocallSPOffsetSaveSlot , int64 (it .bi .Arch .PtrSize ()))
303303 oldsp := callFrameRegs .SP ()
304304 newsp := uint64 (int64 (it .stackhi ) - off )
305305
@@ -334,7 +334,7 @@ func arm64SwitchStack(it *stackIterator, callFrameRegs *op.DwarfRegisters) bool
334334 callFrameRegs .Reg (callFrameRegs .SPRegNum ).Uint64Val = it .g0_sched_sp
335335 // reads the previous value of g0.sched.sp that runtime.cgocallback_gofunc saved on the stack
336336
337- it .g0_sched_sp , _ = readUintRaw (it .mem , uint64 ( callFrameRegs .SP ()+ prevG0schedSPOffsetSaveSlot ) , int64 (it .bi .Arch .PtrSize ()))
337+ it .g0_sched_sp , _ = readUintRaw (it .mem , callFrameRegs .SP ()+ prevG0schedSPOffsetSaveSlot , int64 (it .bi .Arch .PtrSize ()))
338338 it .systemstack = true
339339 return false
340340 }
0 commit comments