mirror of
https://github.com/go-delve/delve.git
synced 2025-11-02 04:36:29 +08:00
proc: bugfix: Truncate stacktrace when FDE of a frame can not be found
Instead of returning an error when FDE of a frame can not be found, just truncate the stack trace. Fixes #462
This commit is contained in:
@ -422,9 +422,11 @@ func (g *G) UserCurrent() Location {
|
||||
it := newStackIterator(g.dbp, pc, sp)
|
||||
for it.Next() {
|
||||
frame := it.Frame()
|
||||
name := frame.Call.Fn.Name
|
||||
if (strings.Index(name, ".") >= 0) && (!strings.HasPrefix(name, "runtime.") || isExportedRuntime(name)) {
|
||||
return frame.Call
|
||||
if frame.Call.Fn != nil {
|
||||
name := frame.Call.Fn.Name
|
||||
if (strings.Index(name, ".") >= 0) && (!strings.HasPrefix(name, "runtime.") || isExportedRuntime(name)) {
|
||||
return frame.Call
|
||||
}
|
||||
}
|
||||
}
|
||||
return g.CurrentLoc
|
||||
|
||||
Reference in New Issue
Block a user