提交 e2287821 编写于 作者: D Derek Parker

Ensure debugging process stays on one thread

上级 f8ab6234
......@@ -4,6 +4,7 @@ import (
"bufio"
"fmt"
"os"
"runtime"
"strconv"
"strings"
......@@ -16,6 +17,11 @@ type term struct {
}
func main() {
// We must ensure here that we are running on the same thread during
// the execution of dbg. This is due to the fact that ptrace(2) expects
// all commands after PT_ATTACH to come from the same thread.
runtime.LockOSThread()
t := newTerm()
if len(os.Args) == 1 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册