mirror of
https://github.com/go-delve/delve.git
synced 2025-11-02 12:59:01 +08:00
proc: when stepping set condition on thread ID if there is no curg (#3475)
If there is no current goroutine when 'next', 'step' or 'stepout' are used set a condition that the thread ID should stay the same instead. This makes stepping work for multithreaded C programs or Go programs that have threads started by cgo code. Fixes #3262
This commit is contained in:
committed by
GitHub
parent
f0b534ddcc
commit
6a0423a1e9
@ -30,11 +30,17 @@ func Int(n int64) *ast.BasicLit {
|
||||
}
|
||||
|
||||
// And returns an expression evaluating 'x && y'.
|
||||
func And(x, y ast.Expr) *ast.BinaryExpr {
|
||||
func And(x, y ast.Expr) ast.Expr {
|
||||
if x == nil || y == nil {
|
||||
return nil
|
||||
}
|
||||
return &ast.BinaryExpr{Op: token.LAND, X: x, Y: y}
|
||||
}
|
||||
|
||||
// Or returns an expression evaluating 'x || y'.
|
||||
func Or(x, y ast.Expr) *ast.BinaryExpr {
|
||||
func Or(x, y ast.Expr) ast.Expr {
|
||||
if x == nil || y == nil {
|
||||
return nil
|
||||
}
|
||||
return &ast.BinaryExpr{Op: token.LOR, X: x, Y: y}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user