mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 20:53:42 +08:00
Finish support for Go1.5beta2
This commit is contained in:
@ -53,13 +53,13 @@ func (dbp *Process) stacktrace(pc, sp uint64, depth int) ([]Location, error) {
|
||||
)
|
||||
f, l, fn := dbp.PCToLine(pc)
|
||||
locations = append(locations, Location{PC: pc, File: f, Line: l, Fn: fn})
|
||||
for i := int64(0); i < int64(depth); i++ {
|
||||
for i := 0; i < depth; i++ {
|
||||
fde, err := dbp.frameEntries.FDEForPC(ret)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
btoffset += fde.ReturnAddressOffset(ret)
|
||||
retaddr = uintptr(int64(sp) + btoffset + (i * int64(dbp.arch.PtrSize())))
|
||||
retaddr = uintptr(int64(sp) + btoffset + int64(i*dbp.arch.PtrSize()))
|
||||
if retaddr == 0 {
|
||||
return nil, NullAddrError{}
|
||||
}
|
||||
@ -72,8 +72,11 @@ func (dbp *Process) stacktrace(pc, sp uint64, depth int) ([]Location, error) {
|
||||
break
|
||||
}
|
||||
f, l, fn = dbp.goSymTable.PCToLine(ret)
|
||||
if fn == nil {
|
||||
break
|
||||
}
|
||||
locations = append(locations, Location{PC: ret, File: f, Line: l, Fn: fn})
|
||||
if fn != nil && fn.Name == "runtime.goexit" {
|
||||
if fn.Name == "runtime.goexit" {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user