This is the second patch to improve module loading in a series that started here (where I explain the motivation and solution): https://reviews.llvm.org/D62499
I need to read the aux vector to know where the r_debug map with the loaded libraries are.
The AuxVector class was made generic so it could be reused between the POSIX-DYLD plugin and NativeProcess*. The class itself ended up in the ProcessUtility plugin.
It looks like we're not guarding the call to LoadModules on line 101, so I think we can assume that m_process is not null here (and I don't see why it should be -- it does not make sense to call DidAttach if there is no process around).
BTW, your guarding attempt isn't even correct as we'd always call m_process->GetByteOrder() and crash if the process was null.