mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 20:23:41 +08:00
proc: tolerate memory read errors during stacktrace
When there's a error reading the stack trace the call stack itself could be corrupted and we should return the partial stacktrace that we have. Fixes #868
This commit is contained in:
@ -857,6 +857,9 @@ func (d *Debugger) convertStacktrace(rawlocs []proc.Stackframe, cfg *proc.LoadCo
|
||||
Location: api.ConvertLocation(rawlocs[i].Call),
|
||||
FrameOffset: rawlocs[i].CFA - int64(rawlocs[i].StackHi),
|
||||
}
|
||||
if rawlocs[i].Err != nil {
|
||||
frame.Err = rawlocs[i].Err.Error()
|
||||
}
|
||||
if cfg != nil && rawlocs[i].Current.Fn != nil {
|
||||
var err error
|
||||
scope := proc.FrameToScope(d.target, rawlocs[i])
|
||||
|
||||
Reference in New Issue
Block a user