diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2013-12-03 18:51:59 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2013-12-03 18:51:59 +0000 |
| commit | 86758c718870f701bc69c1ca05495305ed1c5b85 (patch) | |
| tree | b2051e4e4856cc58ac7e2d20242b870b4f355ca1 /include/lldb/API | |
| parent | f21a844f60ae6c74fcf1fddca32461acce3c1ee0 (diff) | |
Notes
Diffstat (limited to 'include/lldb/API')
| -rw-r--r-- | include/lldb/API/SBDebugger.h | 10 | ||||
| -rw-r--r-- | include/lldb/API/SBError.h | 1 | ||||
| -rw-r--r-- | include/lldb/API/SBExpressionOptions.h | 6 | ||||
| -rw-r--r-- | include/lldb/API/SBFileSpec.h | 7 | ||||
| -rw-r--r-- | include/lldb/API/SBModule.h | 36 | ||||
| -rw-r--r-- | include/lldb/API/SBPlatform.h | 198 | ||||
| -rw-r--r-- | include/lldb/API/SBTarget.h | 17 | ||||
| -rw-r--r-- | include/lldb/API/SBThread.h | 5 |
8 files changed, 278 insertions, 2 deletions
diff --git a/include/lldb/API/SBDebugger.h b/include/lldb/API/SBDebugger.h index 518cbf67c932..80e6969cbd3a 100644 --- a/include/lldb/API/SBDebugger.h +++ b/include/lldb/API/SBDebugger.h @@ -10,9 +10,11 @@ #ifndef LLDB_SBDebugger_h_ #define LLDB_SBDebugger_h_ -#include "lldb/API/SBDefines.h" #include <stdio.h> +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBPlatform.h" + namespace lldb { class SBDebugger @@ -153,6 +155,12 @@ public: void SetSelectedTarget (SBTarget& target); + lldb::SBPlatform + GetSelectedPlatform(); + + void + SetSelectedPlatform(lldb::SBPlatform &platform); + lldb::SBSourceManager GetSourceManager (); diff --git a/include/lldb/API/SBError.h b/include/lldb/API/SBError.h index a6d3dacb4549..12b34ec6dbc3 100644 --- a/include/lldb/API/SBError.h +++ b/include/lldb/API/SBError.h @@ -72,6 +72,7 @@ protected: friend class SBCommunication; friend class SBHostOS; friend class SBInputReader; + friend class SBPlatform; friend class SBProcess; friend class SBThread; friend class SBTarget; diff --git a/include/lldb/API/SBExpressionOptions.h b/include/lldb/API/SBExpressionOptions.h index eed9ed528bef..6a3a640432f6 100644 --- a/include/lldb/API/SBExpressionOptions.h +++ b/include/lldb/API/SBExpressionOptions.h @@ -65,6 +65,12 @@ public: void SetTryAllThreads (bool run_others = true); + bool + GetTrapExceptions () const; + + void + SetTrapExceptions (bool trap_exceptions = true); + protected: SBExpressionOptions (lldb_private::EvaluateExpressionOptions &expression_options); diff --git a/include/lldb/API/SBFileSpec.h b/include/lldb/API/SBFileSpec.h index e44abe4759c6..5d4447f74e64 100644 --- a/include/lldb/API/SBFileSpec.h +++ b/include/lldb/API/SBFileSpec.h @@ -45,6 +45,12 @@ public: const char * GetDirectory() const; + void + SetFilename(const char *filename); + + void + SetDirectory(const char *directory); + uint32_t GetPath (char *dst_path, size_t dst_len) const; @@ -65,6 +71,7 @@ private: friend class SBLineEntry; friend class SBModule; friend class SBModuleSpec; + friend class SBPlatform; friend class SBProcess; friend class SBSourceManager; friend class SBThread; diff --git a/include/lldb/API/SBModule.h b/include/lldb/API/SBModule.h index a3c4879aa2f9..f5955b39734d 100644 --- a/include/lldb/API/SBModule.h +++ b/include/lldb/API/SBModule.h @@ -76,6 +76,42 @@ public: bool SetPlatformFileSpec (const lldb::SBFileSpec &platform_file); + //------------------------------------------------------------------ + /// Get accessor for the remote install path for a module. + /// + /// When debugging to a remote platform by connecting to a remote + /// platform, the install path of the module can be set. If the + /// install path is set, every time the process is about to launch + /// the target will install this module on the remote platform prior + /// to launching. + /// + /// @return + /// A file specification object. + //------------------------------------------------------------------ + lldb::SBFileSpec + GetRemoteInstallFileSpec (); + + //------------------------------------------------------------------ + /// Set accessor for the remote install path for a module. + /// + /// When debugging to a remote platform by connecting to a remote + /// platform, the install path of the module can be set. If the + /// install path is set, every time the process is about to launch + /// the target will install this module on the remote platform prior + /// to launching. + /// + /// If \a file specifies a full path to an install location, the + /// module will be installed to this path. If the path is relative + /// (no directory specified, or the path is partial like "usr/lib" + /// or "./usr/lib", then the install path will be resolved using + /// the platform's current working directory as the base path. + /// + /// @param[in] + /// A file specification object. + //------------------------------------------------------------------ + bool + SetRemoteInstallFileSpec (lldb::SBFileSpec &file); + lldb::ByteOrder GetByteOrder (); diff --git a/include/lldb/API/SBPlatform.h b/include/lldb/API/SBPlatform.h new file mode 100644 index 000000000000..16a546d81f9b --- /dev/null +++ b/include/lldb/API/SBPlatform.h @@ -0,0 +1,198 @@ +//===-- SBPlatform.h --------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBPlatform_h_ +#define LLDB_SBPlatform_h_ + +#include "lldb/API/SBDefines.h" + +struct PlatformConnectOptions; +struct PlatformShellCommand; + +namespace lldb { + + class SBPlatformConnectOptions + { + public: + SBPlatformConnectOptions (const char *url); + + SBPlatformConnectOptions (const SBPlatformConnectOptions &rhs); + + ~SBPlatformConnectOptions (); + + void + operator=(const SBPlatformConnectOptions &rhs); + + const char * + GetURL(); + + void + SetURL(const char *url); + + bool + GetRsyncEnabled(); + + void + EnableRsync (const char *options, + const char *remote_path_prefix, + bool omit_remote_hostname); + + void + DisableRsync (); + + const char * + GetLocalCacheDirectory(); + + void + SetLocalCacheDirectory(const char *path); + protected: + PlatformConnectOptions *m_opaque_ptr; + }; + + class SBPlatformShellCommand + { + public: + SBPlatformShellCommand (const char *shell_command); + + SBPlatformShellCommand (const SBPlatformShellCommand &rhs); + + ~SBPlatformShellCommand(); + + void + Clear(); + + const char * + GetCommand(); + + void + SetCommand(const char *shell_command); + + const char * + GetWorkingDirectory (); + + void + SetWorkingDirectory (const char *path); + + uint32_t + GetTimeoutSeconds (); + + void + SetTimeoutSeconds (uint32_t sec); + + int + GetSignal (); + + int + GetStatus (); + + const char * + GetOutput (); + + protected: + friend class SBPlatform; + + PlatformShellCommand *m_opaque_ptr; + }; + + class SBPlatform + { + public: + + SBPlatform (); + + SBPlatform (const char *platform_name); + + ~SBPlatform(); + + bool + IsValid () const; + + void + Clear (); + + const char * + GetWorkingDirectory(); + + bool + SetWorkingDirectory(const char *path); + + const char * + GetName (); + + SBError + ConnectRemote (SBPlatformConnectOptions &connect_options); + + void + DisconnectRemote (); + + bool + IsConnected(); + + //---------------------------------------------------------------------- + // The following functions will work if the platform is connected + //---------------------------------------------------------------------- + const char * + GetTriple(); + + const char * + GetHostname (); + + const char * + GetOSBuild (); + + const char * + GetOSDescription (); + + uint32_t + GetOSMajorVersion (); + + uint32_t + GetOSMinorVersion (); + + uint32_t + GetOSUpdateVersion (); + + SBError + Put (SBFileSpec &src, SBFileSpec &dst); + + SBError + Get (SBFileSpec &src, SBFileSpec &dst); + + SBError + Install (SBFileSpec& src, SBFileSpec& dst); + + SBError + Run (SBPlatformShellCommand &shell_command); + + SBError + MakeDirectory (const char *path, uint32_t file_permissions = eFilePermissionsDirectoryDefault); + + uint32_t + GetFilePermissions (const char *path); + + SBError + SetFilePermissions (const char *path, uint32_t file_permissions); + + protected: + + friend class SBDebugger; + friend class SBTarget; + + lldb::PlatformSP + GetSP () const; + + void + SetSP (const lldb::PlatformSP& platform_sp); + + lldb::PlatformSP m_opaque_sp; + }; + +} // namespace lldb + +#endif // LLDB_SBPlatform_h_ diff --git a/include/lldb/API/SBTarget.h b/include/lldb/API/SBTarget.h index 7bcf91c16d77..b41c11811549 100644 --- a/include/lldb/API/SBTarget.h +++ b/include/lldb/API/SBTarget.h @@ -268,6 +268,23 @@ public: GetProcess (); //------------------------------------------------------------------ + /// Install any binaries that need to be installed. + /// + /// This function does nothing when debugging on the host system. + /// When connected to remote platforms, the target's main executable + /// and any modules that have their remote install path set will be + /// installed on the remote platform. If the main executable doesn't + /// have an install location set, it will be installed in the remote + /// platform's working directory. + /// + /// @return + /// An error describing anything that went wrong during + /// installation. + //------------------------------------------------------------------ + SBError + Install(); + + //------------------------------------------------------------------ /// Launch a new process. /// /// Launch a new process by spawning a new process using the diff --git a/include/lldb/API/SBThread.h b/include/lldb/API/SBThread.h index d062d7121303..6542dca1f95a 100644 --- a/include/lldb/API/SBThread.h +++ b/include/lldb/API/SBThread.h @@ -202,7 +202,10 @@ public: GetStatus (lldb::SBStream &status) const; SBThread - GetExtendedBacktrace (const char *type); + GetExtendedBacktraceThread (const char *type); + + uint32_t + GetExtendedBacktraceOriginatingIndexID (); protected: friend class SBBreakpoint; |
