This is an archive of the discontinued LLVM Phabricator instance.

Move GetAuxvData from Host to relevant process plugins
ClosedPublic

Authored by labath on Mar 16 2017, 7:29 AM.

Details

Summary

GetAuxvData was causing dependencies from host to target and linux
process modules. It also does not fit netbsd use case, as there we can
only read the auxiliary vector with ptrace, which is better done in the
process plugin, with the other ptrace calls.

I resolve these issues by moving the freebsd and linux versions into the
relevant process plugins. In case of linux, this required adding an
interface in NativeProcessProtocol. The empty definitions on other
platforms can simply be removed.

To get the code compiling I had to add ProcessGdbRemote -> ProcessLinux
dependency, which was not caught before because we depended on it
transitively.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Mar 16 2017, 7:29 AM
zturner edited edge metadata.Mar 16 2017, 7:41 AM

You mention that this was the cause of dependencies from Host to Target, but I don't see any #include "lldb/Target/*.h" statements removed. Is this an oversight or not possible yet?

You mention that this was the cause of dependencies from Host to Target, but I don't see any #include "lldb/Target/*.h" statements removed. Is this an oversight or not possible yet?

I guess I wasn't clear about that. One of the GetAuxvData overloads was taking a Process* argument, but this is by no means the last dependency on stuff from the Target module.

Thank you for this.

This revision was automatically updated to reflect the committed changes.