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:
aarzilli
2016-01-31 13:03:53 +01:00
parent 51e87386da
commit b370e20cd5
5 changed files with 88 additions and 7 deletions

View File

@ -164,7 +164,7 @@ func (ge GoroutineExitingError) Error() string {
// Set breakpoints at every line, and the return address. Also look for
// a deferred function and set a breakpoint there too.
func (thread *Thread) next(curpc uint64, fde *frame.FrameDescriptionEntry, file string, line int) error {
pcs := thread.dbp.lineInfo.AllPCsBetween(fde.Begin(), fde.End(), file)
pcs := thread.dbp.lineInfo.AllPCsBetween(fde.Begin(), fde.End()-1, file)
g, err := thread.GetG()
if err != nil {