mirror of
https://github.com/go-delve/delve.git
synced 2025-11-02 21:40:22 +08:00
Remove unused function
This commit is contained in:
@ -4,8 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"strconv"
|
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/derekparker/delve/dwarf/frame"
|
"github.com/derekparker/delve/dwarf/frame"
|
||||||
@ -314,30 +313,3 @@ func (thread *ThreadContext) clearTempBreakpoint(pc uint64) error {
|
|||||||
|
|
||||||
return nil
|
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
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user