提交 b0a6dacc 编写于 作者: K Konstantin Shaposhnikov

proc: handle rename of runtime.allg to runtime.allgs

Use runtime.allgs instead of runtime.allg that has been removed in
https://github.com/golang/go/commit/5a68eb9f25a2a6290800278df972e04a4085cee3
上级 49d8b18c
......@@ -470,9 +470,13 @@ func (dbp *Process) GoroutinesInfo() ([]*G, error) {
allglen := binary.LittleEndian.Uint64(allglenBytes)
rdr.Seek(0)
allgentryaddr, err := rdr.AddrFor("runtime.allg")
allgentryaddr, err := rdr.AddrFor("runtime.allgs")
if err != nil {
return nil, err
// try old name (pre Go 1.6)
allgentryaddr, err = rdr.AddrFor("runtime.allg")
if err != nil {
return nil, err
}
}
faddr, err := dbp.CurrentThread.readMemory(uintptr(allgentryaddr), dbp.arch.PtrSize())
allgptr := binary.LittleEndian.Uint64(faddr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册