mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 17:56:45 +08:00
*: clean up staticcheck problems (#2723)
Fix problems that can be fixed, ignore the ones that don't make sense
This commit is contained in:
committed by
GitHub
parent
efc4483175
commit
29eae8f617
@ -397,7 +397,7 @@ func (it *stackIterator) advanceRegs() (callFrameRegs op.DwarfRegisters, ret uin
|
||||
|
||||
cfareg, err := it.executeFrameRegRule(0, framectx.CFA, 0)
|
||||
if cfareg == nil {
|
||||
it.err = fmt.Errorf("CFA becomes undefined at PC %#x", it.pc)
|
||||
it.err = fmt.Errorf("CFA becomes undefined at PC %#x: %v", it.pc, err)
|
||||
return op.DwarfRegisters{}, 0, 0
|
||||
}
|
||||
it.regs.CFA = int64(cfareg.Uint64Val)
|
||||
@ -421,6 +421,7 @@ func (it *stackIterator) advanceRegs() (callFrameRegs op.DwarfRegisters, ret uin
|
||||
if i == framectx.RetAddrReg {
|
||||
if reg == nil {
|
||||
if err == nil {
|
||||
//lint:ignore ST1005 backwards compatibility
|
||||
err = fmt.Errorf("Undefined return address at %#x", it.pc)
|
||||
}
|
||||
it.err = err
|
||||
|
||||
Reference in New Issue
Block a user