*: add ppc64le support (#2963)

* Add vendor/golang.org/x/arch/ppc64

* Add ppc64le support
This commit is contained in:
Álex Sáez
2023-07-07 18:30:38 +02:00
committed by GitHub
parent 9f3e146129
commit 71f1220717
38 changed files with 7593 additions and 17 deletions

View File

@ -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
}