mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 12:47:22 +08:00
terminal,service: better printing of suspended breakpoints (#3415)
Show the location expression that will be used to set a suspended breakpoint in the breakpoints list. Also change 'target' called without arguments to print a better error message and 'target follow-exec' without the last argument to print the state of follow-exec.
This commit is contained in:
committed by
GitHub
parent
c1482ca911
commit
db0bc26949
@ -617,7 +617,7 @@ func (d *Debugger) state(retLoadCfg *proc.LoadConfig, withBreakpointInfo bool) (
|
||||
for t.Next() {
|
||||
for _, bp := range t.Breakpoints().WatchOutOfScope {
|
||||
abp := api.ConvertLogicalBreakpoint(bp.Logical)
|
||||
api.ConvertPhysicalBreakpoints(abp, []int{t.Pid()}, []*proc.Breakpoint{bp})
|
||||
api.ConvertPhysicalBreakpoints(abp, bp.Logical, []int{t.Pid()}, []*proc.Breakpoint{bp})
|
||||
state.WatchOutOfScope = append(state.WatchOutOfScope, abp)
|
||||
}
|
||||
}
|
||||
@ -744,6 +744,7 @@ func (d *Debugger) CreateBreakpoint(requestedBp *api.Breakpoint, locExpr string,
|
||||
}
|
||||
return locs[0].PCs
|
||||
}
|
||||
setbp.ExprString = locExpr
|
||||
}
|
||||
|
||||
id := requestedBp.ID
|
||||
@ -805,7 +806,7 @@ func (d *Debugger) convertBreakpoint(lbp *proc.LogicalBreakpoint) *api.Breakpoin
|
||||
}
|
||||
}
|
||||
}
|
||||
api.ConvertPhysicalBreakpoints(abp, pids, bps)
|
||||
api.ConvertPhysicalBreakpoints(abp, lbp, pids, bps)
|
||||
return abp
|
||||
}
|
||||
|
||||
@ -1039,7 +1040,7 @@ func (d *Debugger) Breakpoints(all bool) []*api.Breakpoint {
|
||||
} else {
|
||||
abp = &api.Breakpoint{}
|
||||
}
|
||||
api.ConvertPhysicalBreakpoints(abp, []int{t.Pid()}, []*proc.Breakpoint{bp})
|
||||
api.ConvertPhysicalBreakpoints(abp, bp.Logical, []int{t.Pid()}, []*proc.Breakpoint{bp})
|
||||
abp.VerboseDescr = bp.VerboseDescr()
|
||||
abps = append(abps, abp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user