diff --git a/proctl/threads_linux_amd64.go b/proctl/threads_linux_amd64.go index d94e9c67958dbef575955deb67e1b8969e31eee8..9c05427af5e80ea16566770efe4a513de24b09ca 100644 --- a/proctl/threads_linux_amd64.go +++ b/proctl/threads_linux_amd64.go @@ -4,8 +4,7 @@ import ( "bytes" "encoding/binary" "fmt" - "os" - "strconv" + "syscall" "github.com/derekparker/delve/dwarf/frame" @@ -314,30 +313,3 @@ func (thread *ThreadContext) clearTempBreakpoint(pc uint64) error { return nil } - -func threadIds(pid int) []int { - var threads []int - dir, err := os.Open(fmt.Sprintf("/proc/%d/task", pid)) - if err != nil { - panic(err) - } - defer dir.Close() - - names, err := dir.Readdirnames(0) - if err != nil { - panic(err) - } - - for _, strid := range names { - tid, err := strconv.Atoi(strid) - if err != nil { - panic(err) - } - - if tid != pid { - threads = append(threads, tid) - } - } - - return threads -}