Skip to content

Commit

Permalink
fix heuristic for querying stop info
Browse files Browse the repository at this point in the history
  • Loading branch information
derekparker committed May 15, 2024
1 parent 589c91e commit c5f7a55
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/proc/gdbserial/gdbserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1431,11 +1431,15 @@ func (p *gdbProcess) updateThreadList(tu *threadUpdater, jstopInfo map[int]stopP
}

for _, th := range p.threads {
shouldQueryStopInfo := p.threadStopInfo
th.clearBreakpointState()
}

for _, th := range p.threads {
queryThreadInfo := true
if jstopInfo != nil {
_, shouldQueryStopInfo = jstopInfo[th.ID]
_, queryThreadInfo = jstopInfo[th.ID]
}
if shouldQueryStopInfo {
if p.threadStopInfo && queryThreadInfo {
sp, err := p.conn.threadStopInfo(th.strID)
if err != nil {
if isProtocolErrorUnsupported(err) {
Expand All @@ -1448,10 +1452,6 @@ func (p *gdbProcess) updateThreadList(tu *threadUpdater, jstopInfo map[int]stopP
th.sig = sp.sig
th.watchAddr = sp.watchAddr
th.watchReg = sp.watchReg
} else {
th.sig = 0
th.watchAddr = 0
th.watchReg = -1
}
}

Expand Down

0 comments on commit c5f7a55

Please sign in to comment.