Change the ABI class to have a weak pointer to its Process;
some methods in the ABI need a Process to do their work.
Instead of passing it in as a one-off argument to those
methods, this patch puts it in the base class and the methods
can retrieve if it needed.

Note that ABI's are sometimes built without a Process 
(e.g. SBTarget::GetStackRedZoneSize) so it's entirely
possible that the process weak pointer will not be
able to reconsistitue into a strong pointer.

<rdar://problem/32526754> 

llvm-svn: 306633
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index aeb7c74..ac64b68 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -599,7 +599,7 @@
         // gets called in DidAttach, when the target architecture (and
         // consequently the ABI we'll get from
         // the process) may be wrong.
-        ABISP abi_to_use = ABI::FindPlugin(arch_to_use);
+        ABISP abi_to_use = ABI::FindPlugin(shared_from_this(), arch_to_use);
 
         AugmentRegisterInfoViaABI(reg_info, reg_name, abi_to_use);
 
@@ -4419,7 +4419,7 @@
       // that context we haven't
       // set the Target's architecture yet, so the ABI is also potentially
       // incorrect.
-      ABISP abi_to_use_sp = ABI::FindPlugin(arch_to_use);
+      ABISP abi_to_use_sp = ABI::FindPlugin(shared_from_this(), arch_to_use);
       if (feature_node) {
         ParseRegisters(feature_node, target_info, this->m_register_info,
                        abi_to_use_sp, cur_reg_num, reg_offset);