提交 dd2a59a9 编写于 作者: A aarzilli 提交者: Derek Parker

proc/native: call ElfUpdateSharedObjects after Attach

When attaching to a process in linux ElfUpdateSharedObjects will be
called for the first time during the call to updateThreadList,
unfortunately it won't do anything because the dynamic section of the
base elf executable needs to have been read first and that's done when
we initialize the BinaryInfo object (which happens later during the
call to initialize).
上级 348432c3
......@@ -118,6 +118,13 @@ func Attach(pid int, debugInfoDirs []string) (*Process, error) {
dbp.Detach(false)
return nil, err
}
// ElfUpdateSharedObjects can only be done after we initialize because it
// needs an initialized BinaryInfo object to work.
err = linutil.ElfUpdateSharedObjects(dbp)
if err != nil {
return nil, err
}
return dbp, nil
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册