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:
Alessandro Arzilli
2023-07-07 19:33:40 +02:00
committed by GitHub
parent c1482ca911
commit db0bc26949
6 changed files with 28 additions and 7 deletions

View File

@ -54,8 +54,11 @@ func ConvertLogicalBreakpoint(lbp *proc.LogicalBreakpoint) *Breakpoint {
}
// ConvertPhysicalBreakpoints adds informations from physical breakpoints to an API breakpoint.
func ConvertPhysicalBreakpoints(b *Breakpoint, pids []int, bps []*proc.Breakpoint) {
func ConvertPhysicalBreakpoints(b *Breakpoint, lbp *proc.LogicalBreakpoint, pids []int, bps []*proc.Breakpoint) {
if len(bps) == 0 {
if lbp != nil {
b.ExprString = lbp.Set.ExprString
}
return
}