summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ABI.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2017-06-29 02:57:03 +0000
committerJason Molenda <jmolenda@apple.com>2017-06-29 02:57:03 +0000
commit43294c9f48760eae68aa8976bf0ac5e9eaa448d8 (patch)
tree4585cb01cd88fd39a900aa062686601930eb9e34 /lldb/source/Target/ABI.cpp
parent8e07cadde0ba53385afd4762af3a12412609483b (diff)
downloadbcm5719-llvm-43294c9f48760eae68aa8976bf0ac5e9eaa448d8.tar.gz
bcm5719-llvm-43294c9f48760eae68aa8976bf0ac5e9eaa448d8.zip
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
Diffstat (limited to 'lldb/source/Target/ABI.cpp')
-rw-r--r--lldb/source/Target/ABI.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lldb/source/Target/ABI.cpp b/lldb/source/Target/ABI.cpp
index 87363a3b8ae..72f58be5a3d 100644
--- a/lldb/source/Target/ABI.cpp
+++ b/lldb/source/Target/ABI.cpp
@@ -25,7 +25,7 @@ using namespace lldb;
using namespace lldb_private;
ABISP
-ABI::FindPlugin(const ArchSpec &arch) {
+ABI::FindPlugin(lldb::ProcessSP process_sp, const ArchSpec &arch) {
ABISP abi_sp;
ABICreateInstance create_callback;
@@ -33,7 +33,7 @@ ABI::FindPlugin(const ArchSpec &arch) {
(create_callback = PluginManager::GetABICreateCallbackAtIndex(idx)) !=
nullptr;
++idx) {
- abi_sp = create_callback(arch);
+ abi_sp = create_callback(process_sp, arch);
if (abi_sp)
return abi_sp;
@@ -42,8 +42,6 @@ ABI::FindPlugin(const ArchSpec &arch) {
return abi_sp;
}
-ABI::ABI() = default;
-
ABI::~ABI() = default;
bool ABI::GetRegisterInfoByName(const ConstString &name, RegisterInfo &info) {
OpenPOWER on IntegriCloud