summaryrefslogtreecommitdiff
path: root/include/lldb/Target
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Target')
-rw-r--r--include/lldb/Target/ABI.h19
-rw-r--r--include/lldb/Target/InstrumentationRuntime.h2
-rw-r--r--include/lldb/Target/InstrumentationRuntimeStopInfo.h2
-rw-r--r--include/lldb/Target/Process.h4
-rw-r--r--include/lldb/Target/StopInfo.h2
-rw-r--r--include/lldb/Target/StructuredDataPlugin.h2
-rw-r--r--include/lldb/Target/SystemRuntime.h2
-rw-r--r--include/lldb/Target/Thread.h2
-rw-r--r--include/lldb/Target/ThreadPlanPython.h2
-rw-r--r--include/lldb/Target/ThreadSpec.h8
10 files changed, 28 insertions, 17 deletions
diff --git a/include/lldb/Target/ABI.h b/include/lldb/Target/ABI.h
index a8e08e1a800aa..0418d683af63b 100644
--- a/include/lldb/Target/ABI.h
+++ b/include/lldb/Target/ABI.h
@@ -92,6 +92,16 @@ protected:
virtual lldb::ValueObjectSP
GetReturnValueObjectImpl(Thread &thread, llvm::Type &ir_type) const;
+ //------------------------------------------------------------------
+ /// Request to get a Process shared pointer.
+ ///
+ /// This ABI object may not have been created with a Process object,
+ /// or the Process object may no longer be alive. Be sure to handle
+ /// the case where the shared pointer returned does not have an
+ /// object inside it.
+ //------------------------------------------------------------------
+ lldb::ProcessSP GetProcessSP() const { return m_process_wp.lock(); }
+
public:
virtual bool CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) = 0;
@@ -131,13 +141,18 @@ public:
virtual bool GetPointerReturnRegister(const char *&name) { return false; }
- static lldb::ABISP FindPlugin(const ArchSpec &arch);
+ static lldb::ABISP FindPlugin(lldb::ProcessSP process_sp, const ArchSpec &arch);
protected:
//------------------------------------------------------------------
// Classes that inherit from ABI can see and modify these
//------------------------------------------------------------------
- ABI();
+ ABI(lldb::ProcessSP process_sp) {
+ if (process_sp.get())
+ m_process_wp = process_sp;
+ }
+
+ lldb::ProcessWP m_process_wp;
private:
DISALLOW_COPY_AND_ASSIGN(ABI);
diff --git a/include/lldb/Target/InstrumentationRuntime.h b/include/lldb/Target/InstrumentationRuntime.h
index a40914d04ea90..21d66d5766a90 100644
--- a/include/lldb/Target/InstrumentationRuntime.h
+++ b/include/lldb/Target/InstrumentationRuntime.h
@@ -18,7 +18,7 @@
// Other libraries and framework includes
// Project includes
#include "lldb/Core/PluginInterface.h"
-#include "lldb/Core/StructuredData.h"
+#include "lldb/Utility/StructuredData.h"
#include "lldb/lldb-forward.h"
#include "lldb/lldb-private.h"
#include "lldb/lldb-types.h"
diff --git a/include/lldb/Target/InstrumentationRuntimeStopInfo.h b/include/lldb/Target/InstrumentationRuntimeStopInfo.h
index 0a4a17003d930..b11231960ac1b 100644
--- a/include/lldb/Target/InstrumentationRuntimeStopInfo.h
+++ b/include/lldb/Target/InstrumentationRuntimeStopInfo.h
@@ -16,8 +16,8 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/Core/StructuredData.h"
#include "lldb/Target/StopInfo.h"
+#include "lldb/Utility/StructuredData.h"
namespace lldb_private {
diff --git a/include/lldb/Target/Process.h b/include/lldb/Target/Process.h
index dbf6cba09f439..df09570057a13 100644
--- a/include/lldb/Target/Process.h
+++ b/include/lldb/Target/Process.h
@@ -34,9 +34,7 @@
#include "lldb/Core/Listener.h"
#include "lldb/Core/LoadedModuleInfoList.h"
#include "lldb/Core/PluginInterface.h"
-#include "lldb/Core/StructuredData.h"
#include "lldb/Core/ThreadSafeValue.h"
-#include "lldb/Core/TraceOptions.h"
#include "lldb/Core/UserSettingsController.h"
#include "lldb/Host/HostThread.h"
#include "lldb/Host/ProcessRunLock.h"
@@ -50,6 +48,8 @@
#include "lldb/Target/ThreadList.h"
#include "lldb/Utility/NameMatches.h"
#include "lldb/Utility/Status.h"
+#include "lldb/Utility/StructuredData.h"
+#include "lldb/Utility/TraceOptions.h"
#include "lldb/lldb-private.h"
#include "llvm/ADT/ArrayRef.h"
diff --git a/include/lldb/Target/StopInfo.h b/include/lldb/Target/StopInfo.h
index 46f34567350d8..c99877cbd8abc 100644
--- a/include/lldb/Target/StopInfo.h
+++ b/include/lldb/Target/StopInfo.h
@@ -16,8 +16,8 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/Core/StructuredData.h"
#include "lldb/Target/Process.h"
+#include "lldb/Utility/StructuredData.h"
#include "lldb/lldb-public.h"
namespace lldb_private {
diff --git a/include/lldb/Target/StructuredDataPlugin.h b/include/lldb/Target/StructuredDataPlugin.h
index a4d2c03826285..5ea265b054205 100644
--- a/include/lldb/Target/StructuredDataPlugin.h
+++ b/include/lldb/Target/StructuredDataPlugin.h
@@ -11,7 +11,7 @@
#define StructuredDataPlugin_h
#include "lldb/Core/PluginInterface.h"
-#include "lldb/Core/StructuredData.h"
+#include "lldb/Utility/StructuredData.h"
namespace lldb_private {
diff --git a/include/lldb/Target/SystemRuntime.h b/include/lldb/Target/SystemRuntime.h
index f50c9c1b4a569..8c6c2ece967fc 100644
--- a/include/lldb/Target/SystemRuntime.h
+++ b/include/lldb/Target/SystemRuntime.h
@@ -18,10 +18,10 @@
#include "lldb/Core/ModuleList.h"
#include "lldb/Core/PluginInterface.h"
-#include "lldb/Core/StructuredData.h"
#include "lldb/Target/QueueItem.h"
#include "lldb/Target/QueueList.h"
#include "lldb/Utility/ConstString.h"
+#include "lldb/Utility/StructuredData.h"
#include "lldb/lldb-private.h"
#include "lldb/lldb-public.h"
diff --git a/include/lldb/Target/Thread.h b/include/lldb/Target/Thread.h
index 954347b5814c8..1b0b6ef557e8c 100644
--- a/include/lldb/Target/Thread.h
+++ b/include/lldb/Target/Thread.h
@@ -21,11 +21,11 @@
// Project includes
#include "lldb/Core/Broadcaster.h"
#include "lldb/Core/Event.h"
-#include "lldb/Core/StructuredData.h"
#include "lldb/Core/UserSettingsController.h"
#include "lldb/Target/ExecutionContextScope.h"
#include "lldb/Target/RegisterCheckpoint.h"
#include "lldb/Target/StackFrameList.h"
+#include "lldb/Utility/StructuredData.h"
#include "lldb/Utility/UserID.h"
#include "lldb/lldb-private.h"
diff --git a/include/lldb/Target/ThreadPlanPython.h b/include/lldb/Target/ThreadPlanPython.h
index 9b7e5d0299129..973c935b7c797 100644
--- a/include/lldb/Target/ThreadPlanPython.h
+++ b/include/lldb/Target/ThreadPlanPython.h
@@ -17,13 +17,13 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/Core/StructuredData.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/StopInfo.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadPlan.h"
#include "lldb/Target/ThreadPlanTracer.h"
+#include "lldb/Utility/StructuredData.h"
#include "lldb/Utility/UserID.h"
#include "lldb/lldb-private.h"
diff --git a/include/lldb/Target/ThreadSpec.h b/include/lldb/Target/ThreadSpec.h
index d00172d1763bd..34baf80462618 100644
--- a/include/lldb/Target/ThreadSpec.h
+++ b/include/lldb/Target/ThreadSpec.h
@@ -10,13 +10,9 @@
#ifndef liblldb_ThreadSpec_h_
#define liblldb_ThreadSpec_h_
-// C Includes
-// C++ Includes
-#include <string>
-
-// Other libraries and framework includes
-// Project includes
+#include "lldb/Utility/StructuredData.h"
#include "lldb/lldb-private.h"
+#include <string>
namespace lldb_private {