mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 12:01:35 +08:00
proc/stack: use BP when FDE is not available
On Windows we can sometimes encounter threads stopped in locations for which we do not have entries in debug_frame. These cases seem to be due to calls to Windows API in the go runtime, we can still produce a (partial) stack trace in this circumstance by following frame pointers (starting with BP). We still prefer debug_frame entries when available since go functions do not have frame pointers before go1.8.
This commit is contained in:
@ -13,8 +13,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/derekparker/delve/pkg/target"
|
||||
"github.com/derekparker/delve/pkg/proc"
|
||||
"github.com/derekparker/delve/pkg/target"
|
||||
"github.com/derekparker/delve/service/api"
|
||||
)
|
||||
|
||||
@ -750,7 +750,7 @@ func (d *Debugger) convertStacktrace(rawlocs []proc.Stackframe, cfg *proc.LoadCo
|
||||
locations := make([]api.Stackframe, 0, len(rawlocs))
|
||||
for i := range rawlocs {
|
||||
frame := api.Stackframe{Location: api.ConvertLocation(rawlocs[i].Call)}
|
||||
if cfg != nil {
|
||||
if cfg != nil && rawlocs[i].Current.Fn != nil {
|
||||
var err error
|
||||
scope := rawlocs[i].Scope(d.target.CurrentThread())
|
||||
locals, err := scope.LocalVariables(*cfg)
|
||||
|
||||
Reference in New Issue
Block a user