I handle two types of binary specification in qProcessInfo -- the main-binary-{uuid,address,slide} and binary-addresses -- so the remote stub can tell lldb to discover/load binaries when we connect.
I did this loading in ProcessGDBRemote::DoConnectRemote() which is very early in process setup, e.g. we don't have threads yet. This caused problems for one group that has a python script in the dSYM and need a more fully set up process.
This patch moves this binary loading from DoConnectRemote() to DidLaunchOrAttach() where we're nearly done setting up the Process. There's a method, MaybeLoadExecutableModule which reads the load address of the main binary from the remote stub (maybge on linux or something) and sets the load address in the Target; I added my new LoadStubBinaries() method next to that one in DidLaunchOrAttach(). I originally thought to simply add the code to MaybeLoadExecutableModule but then the method was doing two completely unrelated things and it would only serve to confuse people in the future I think.
I don't know of a particularly good reviewer on this one, but I'll add Jim without thinking of a better choice offhand.
I know you just moved this code, but I don't think I've ever seen anyone write llvm::StringRef() instead of "".