mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 04:35:19 +08:00
proc: bugs setting next breakpoints
1. A running goroutine is by definition not parked waiting for a chan recv 2. The FDE end address is intended to be exclusive, the code interpreted as inclusive and sometimes ended up setting a breakpoint on a function other than the current one.
This commit is contained in:
@ -882,7 +882,7 @@ func printcontextThread(t *Term, th *api.Thread) {
|
||||
fn := th.Function
|
||||
|
||||
if th.Breakpoint == nil {
|
||||
fmt.Printf("> %s() %s:%d\n", fn.Name, ShortenFilePath(th.File), th.Line)
|
||||
fmt.Printf("> %s() %s:%d (PC: %#v)\n", fn.Name, ShortenFilePath(th.File), th.Line, th.PC)
|
||||
return
|
||||
}
|
||||
|
||||
@ -896,21 +896,23 @@ func printcontextThread(t *Term, th *api.Thread) {
|
||||
}
|
||||
|
||||
if hitCount, ok := th.Breakpoint.HitCount[strconv.Itoa(th.GoroutineID)]; ok {
|
||||
fmt.Printf("> %s(%s) %s:%d (hits goroutine(%d):%d total:%d)\n",
|
||||
fmt.Printf("> %s(%s) %s:%d (hits goroutine(%d):%d total:%d) (PC: %#v)\n",
|
||||
fn.Name,
|
||||
args,
|
||||
ShortenFilePath(th.File),
|
||||
th.Line,
|
||||
th.GoroutineID,
|
||||
hitCount,
|
||||
th.Breakpoint.TotalHitCount)
|
||||
th.Breakpoint.TotalHitCount,
|
||||
th.PC)
|
||||
} else {
|
||||
fmt.Printf("> %s(%s) %s:%d (hits total:%d)\n",
|
||||
fmt.Printf("> %s(%s) %s:%d (hits total:%d) (PC: %#v)\n",
|
||||
fn.Name,
|
||||
args,
|
||||
ShortenFilePath(th.File),
|
||||
th.Line,
|
||||
th.Breakpoint.TotalHitCount)
|
||||
th.Breakpoint.TotalHitCount,
|
||||
th.PC)
|
||||
}
|
||||
|
||||
if th.BreakpointInfo != nil {
|
||||
|
||||
Reference in New Issue
Block a user