mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 10:17:03 +08:00
Refactor: Use thread-locked goroutine for ptrace ops
Previously either the terminal client or the debugger service would either lock main goroutine to a thread or provide a locked goroutine to run _all_ DebuggedProcess functions in. This is unnecessary because only ptrace functions need to be run from the same thread that originated the PT_ATTACH request. Here we use a specific thread-locked goroutine to service any ptrace request. That goroutine is also responsible for the initial spawning / attaching of the process, since it must be responsible for the PT_ATTACH request.
This commit is contained in:
@ -28,7 +28,7 @@ func BuildFixture(name string) Fixture {
|
||||
return f
|
||||
}
|
||||
parent := ".."
|
||||
fixturesDir := filepath.Join(parent, "_fixtures")
|
||||
fixturesDir := "_fixtures"
|
||||
for depth := 0; depth < 10; depth++ {
|
||||
if _, err := os.Stat(fixturesDir); err == nil {
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user