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).
This commit is contained in:
parent
348432c3b9
commit
dd2a59a9a4
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user