mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
*: add ppc64le support (#2963)
* Add vendor/golang.org/x/arch/ppc64 * Add ppc64le support
This commit is contained in:
@ -280,7 +280,7 @@ func (it *stackIterator) switchToGoroutineStack() {
|
||||
it.pc = it.g.PC
|
||||
it.regs.Reg(it.regs.SPRegNum).Uint64Val = it.g.SP
|
||||
it.regs.AddReg(it.regs.BPRegNum, op.DwarfRegisterFromUint64(it.g.BP))
|
||||
if it.bi.Arch.Name == "arm64" {
|
||||
if it.bi.Arch.Name == "arm64" || it.bi.Arch.Name == "ppc64le" {
|
||||
it.regs.Reg(it.regs.LRRegNum).Uint64Val = it.g.LR
|
||||
}
|
||||
}
|
||||
@ -475,7 +475,7 @@ func (it *stackIterator) advanceRegs() (callFrameRegs op.DwarfRegisters, ret uin
|
||||
// In the following line we copy GDB's behaviour by assuming this is
|
||||
// implicit.
|
||||
// See also the comment in dwarf2_frame_default_init in
|
||||
// $GDB_SOURCE/dwarf2-frame.c
|
||||
// $GDB_SOURCE/dwarf2/frame.c
|
||||
callFrameRegs.AddReg(callFrameRegs.SPRegNum, cfareg)
|
||||
|
||||
for i, regRule := range framectx.Regs {
|
||||
@ -504,7 +504,7 @@ func (it *stackIterator) advanceRegs() (callFrameRegs op.DwarfRegisters, ret uin
|
||||
}
|
||||
}
|
||||
|
||||
if it.bi.Arch.Name == "arm64" {
|
||||
if it.bi.Arch.Name == "arm64" || it.bi.Arch.Name == "ppc64le" {
|
||||
if ret == 0 && it.regs.Reg(it.regs.LRRegNum) != nil {
|
||||
ret = it.regs.Reg(it.regs.LRRegNum).Uint64Val
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user