summaryrefslogtreecommitdiffstats
path: root/include/lldb/API/SBTarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/API/SBTarget.h')
-rw-r--r--include/lldb/API/SBTarget.h165
1 files changed, 28 insertions, 137 deletions
diff --git a/include/lldb/API/SBTarget.h b/include/lldb/API/SBTarget.h
index 322cf04..dcca4e7 100644
--- a/include/lldb/API/SBTarget.h
+++ b/include/lldb/API/SBTarget.h
@@ -12,6 +12,7 @@
#include "lldb/API/SBDefines.h"
#include "lldb/API/SBAddress.h"
+#include "lldb/API/SBAttachInfo.h"
#include "lldb/API/SBBroadcaster.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBFileSpecList.h"
@@ -25,135 +26,7 @@ namespace lldb {
class SBPlatform;
-class SBAttachInfo
-{
-public:
- SBAttachInfo ();
-
- SBAttachInfo (lldb::pid_t pid);
-
- SBAttachInfo (const char *path, bool wait_for);
-
- SBAttachInfo (const SBAttachInfo &rhs);
-
- ~SBAttachInfo();
-
- SBAttachInfo &
- operator = (const SBAttachInfo &rhs);
-
- lldb::pid_t
- GetProcessID ();
-
- void
- SetProcessID (lldb::pid_t pid);
-
- void
- SetExecutable (const char *path);
-
- void
- SetExecutable (lldb::SBFileSpec exe_file);
-
- bool
- GetWaitForLaunch ();
-
- void
- SetWaitForLaunch (bool b);
-
- bool
- GetIgnoreExisting ();
-
- void
- SetIgnoreExisting (bool b);
-
- uint32_t
- GetResumeCount ();
-
- void
- SetResumeCount (uint32_t c);
-
- const char *
- GetProcessPluginName ();
-
- void
- SetProcessPluginName (const char *plugin_name);
-
- uint32_t
- GetUserID();
-
- uint32_t
- GetGroupID();
-
- bool
- UserIDIsValid ();
-
- bool
- GroupIDIsValid ();
-
- void
- SetUserID (uint32_t uid);
-
- void
- SetGroupID (uint32_t gid);
-
- uint32_t
- GetEffectiveUserID();
-
- uint32_t
- GetEffectiveGroupID();
-
- bool
- EffectiveUserIDIsValid ();
-
- bool
- EffectiveGroupIDIsValid ();
-
- void
- SetEffectiveUserID (uint32_t uid);
-
- void
- SetEffectiveGroupID (uint32_t gid);
-
- lldb::pid_t
- GetParentProcessID ();
-
- void
- SetParentProcessID (lldb::pid_t pid);
-
- bool
- ParentProcessIDIsValid();
-
- //----------------------------------------------------------------------
- /// Get the listener that will be used to receive process events.
- ///
- /// If no listener has been set via a call to
- /// SBLaunchInfo::SetListener(), then an invalid SBListener will be
- /// returned (SBListener::IsValid() will return false). If a listener
- /// has been set, then the valid listener object will be returned.
- //----------------------------------------------------------------------
- SBListener
- GetListener ();
-
- //----------------------------------------------------------------------
- /// Set the listener that will be used to receive process events.
- ///
- /// By default the SBDebugger, which has a listener, that the SBTarget
- /// belongs to will listen for the process events. Calling this function
- /// allows a different listener to be used to listen for process events.
- //----------------------------------------------------------------------
- void
- SetListener (SBListener &listener);
-
-
-protected:
- friend class SBTarget;
-
- lldb_private::ProcessAttachInfo &
- ref ();
-
- ProcessAttachInfoSP m_opaque_sp;
-};
-
-class SBTarget
+class LLDB_API SBTarget
{
public:
//------------------------------------------------------------------
@@ -187,7 +60,19 @@ public:
bool
IsValid() const;
+
+ static bool
+ EventIsTargetEvent (const lldb::SBEvent &event);
+
+ static lldb::SBTarget
+ GetTargetFromEvent (const lldb::SBEvent &event);
+ static uint32_t
+ GetNumModulesFromEvent (const lldb::SBEvent &event);
+
+ static lldb::SBModule
+ GetModuleAtIndexFromEvent (const uint32_t idx, const lldb::SBEvent &event);
+
static const char *
GetBroadcasterClassName ();
@@ -273,7 +158,7 @@ public:
/// @param[in] stop_at_entry
/// If false do not stop the inferior at the entry point.
///
- /// @param[out]
+ /// @param[out] error
/// An error object. Contains the reason if there is some failure.
///
/// @return
@@ -344,7 +229,7 @@ public:
/// @param[in] pid
/// The process ID to attach to.
///
- /// @param[out]
+ /// @param[out] error
/// An error explaining what went wrong if attach fails.
///
/// @return
@@ -378,7 +263,7 @@ public:
/// @param[in] wait_for
/// If true wait for a new instance of 'name' to be launched.
///
- /// @param[out]
+ /// @param[out] error
/// An error explaining what went wrong if attach fails.
///
/// @return
@@ -405,7 +290,7 @@ public:
/// @param[in] plugin_name
/// The plugin name to be used; can be NULL.
///
- /// @param[out]
+ /// @param[out] error
/// An error explaining what went wrong if the connect fails.
///
/// @return
@@ -764,13 +649,13 @@ public:
lldb::SBBreakpoint
BreakpointCreateBySourceRegex (const char *source_regex,
- const lldb::SBFileSpec &source_file,
+ const SBFileSpec &source_file,
const char *module_name = NULL);
lldb::SBBreakpoint
- BreakpointCreateBySourceRegex (const char *source_regex,
- const SBFileSpecList &module_list,
- const lldb::SBFileSpecList &source_file);
+ BreakpointCreateBySourceRegex (const char *source_regex,
+ const SBFileSpecList &module_list,
+ const SBFileSpecList &source_file);
lldb::SBBreakpoint
BreakpointCreateForException (lldb::LanguageType language,
@@ -888,6 +773,12 @@ public:
lldb::addr_t
GetStackRedZoneSize();
+
+ lldb::SBLaunchInfo
+ GetLaunchInfo () const;
+
+ void
+ SetLaunchInfo (const lldb::SBLaunchInfo &launch_info);
protected:
friend class SBAddress;
OpenPOWER on IntegriCloud