diff options
Diffstat (limited to 'include/lldb/API')
-rw-r--r-- | include/lldb/API/LLDB.h | 2 | ||||
-rw-r--r-- | include/lldb/API/SBBreakpoint.h | 14 | ||||
-rw-r--r-- | include/lldb/API/SBBreakpointLocation.h | 11 | ||||
-rw-r--r-- | include/lldb/API/SBBreakpointName.h | 118 | ||||
-rw-r--r-- | include/lldb/API/SBCommandInterpreter.h | 2 | ||||
-rw-r--r-- | include/lldb/API/SBDebugger.h | 21 | ||||
-rw-r--r-- | include/lldb/API/SBDefines.h | 7 | ||||
-rw-r--r-- | include/lldb/API/SBError.h | 1 | ||||
-rw-r--r-- | include/lldb/API/SBFileSpec.h | 1 | ||||
-rw-r--r-- | include/lldb/API/SBProcess.h | 10 | ||||
-rw-r--r-- | include/lldb/API/SBProcessInfo.h | 64 | ||||
-rw-r--r-- | include/lldb/API/SBStream.h | 1 | ||||
-rw-r--r-- | include/lldb/API/SBStringList.h | 2 | ||||
-rw-r--r-- | include/lldb/API/SBStructuredData.h | 1 | ||||
-rw-r--r-- | include/lldb/API/SBTarget.h | 13 | ||||
-rw-r--r-- | include/lldb/API/SBThread.h | 1 |
16 files changed, 253 insertions, 16 deletions
diff --git a/include/lldb/API/LLDB.h b/include/lldb/API/LLDB.h index cf61b10184d6c..c51ced893d7a7 100644 --- a/include/lldb/API/LLDB.h +++ b/include/lldb/API/LLDB.h @@ -18,6 +18,7 @@ #include "lldb/API/SBAttachInfo.h" #include "lldb/API/SBBlock.h" #include "lldb/API/SBBreakpoint.h" +#include "lldb/API/SBBreakpointName.h" #include "lldb/API/SBBreakpointLocation.h" #include "lldb/API/SBBroadcaster.h" #include "lldb/API/SBCommandInterpreter.h" @@ -49,6 +50,7 @@ #include "lldb/API/SBModuleSpec.h" #include "lldb/API/SBPlatform.h" #include "lldb/API/SBProcess.h" +#include "lldb/API/SBProcessInfo.h" #include "lldb/API/SBQueue.h" #include "lldb/API/SBQueueItem.h" #include "lldb/API/SBSection.h" diff --git a/include/lldb/API/SBBreakpoint.h b/include/lldb/API/SBBreakpoint.h index 9abc9cd39dcb5..216d675b9d22e 100644 --- a/include/lldb/API/SBBreakpoint.h +++ b/include/lldb/API/SBBreakpoint.h @@ -18,9 +18,6 @@ namespace lldb { class LLDB_API SBBreakpoint { public: - typedef bool (*BreakpointHitCallback)(void *baton, SBProcess &process, - SBThread &thread, - lldb::SBBreakpointLocation &location); SBBreakpoint(); @@ -70,6 +67,10 @@ public: const char *GetCondition(); + void SetAutoContinue(bool auto_continue); + + bool GetAutoContinue(); + void SetThreadID(lldb::tid_t sb_thread_id); lldb::tid_t GetThreadID(); @@ -86,7 +87,7 @@ public: const char *GetQueueName() const; - void SetCallback(BreakpointHitCallback callback, void *baton); + void SetCallback(SBBreakpointHitCallback callback, void *baton); void SetScriptCallbackFunction(const char *callback_function_name); @@ -129,14 +130,11 @@ public: private: friend class SBBreakpointList; friend class SBBreakpointLocation; + friend class SBBreakpointName; friend class SBTarget; SBBreakpoint(const lldb::BreakpointSP &bp_sp); - static bool PrivateBreakpointHitCallback( - void *baton, lldb_private::StoppointCallbackContext *context, - lldb::user_id_t break_id, lldb::user_id_t break_loc_id); - lldb::BreakpointSP GetSP() const; lldb::BreakpointWP m_opaque_wp; diff --git a/include/lldb/API/SBBreakpointLocation.h b/include/lldb/API/SBBreakpointLocation.h index 0b5ba79d784fa..4b34bcbf1f28b 100644 --- a/include/lldb/API/SBBreakpointLocation.h +++ b/include/lldb/API/SBBreakpointLocation.h @@ -38,6 +38,8 @@ public: bool IsEnabled(); + uint32_t GetHitCount(); + uint32_t GetIgnoreCount(); void SetIgnoreCount(uint32_t n); @@ -45,11 +47,19 @@ public: void SetCondition(const char *condition); const char *GetCondition(); + + void SetAutoContinue(bool auto_continue); + + bool GetAutoContinue(); void SetScriptCallbackFunction(const char *callback_function_name); SBError SetScriptCallbackBody(const char *script_body_text); + + void SetCommandLineCommands(SBStringList &commands); + bool GetCommandLineCommands(SBStringList &commands); + void SetThreadID(lldb::tid_t sb_thread_id); lldb::tid_t GetThreadID(); @@ -76,6 +86,7 @@ public: private: friend class SBBreakpoint; + friend class SBBreakpointCallbackBaton; void SetLocation(const lldb::BreakpointLocationSP &break_loc_sp); BreakpointLocationSP GetSP() const; diff --git a/include/lldb/API/SBBreakpointName.h b/include/lldb/API/SBBreakpointName.h new file mode 100644 index 0000000000000..321f0d784d6f7 --- /dev/null +++ b/include/lldb/API/SBBreakpointName.h @@ -0,0 +1,118 @@ +//===-- SBBreakpointName.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_SBBreakpointName_h_ +#define LLDB_SBBreakpointName_h_ + +#include "lldb/API/SBDefines.h" + +class SBBreakpointNameImpl; + +namespace lldb { + +class LLDB_API SBBreakpointName { +public: +// typedef bool (*BreakpointHitCallback)(void *baton, SBProcess &process, +// SBThread &thread, +// lldb::SBBreakpointLocation &location); + + SBBreakpointName(); + + SBBreakpointName(SBTarget &target, const char *name); + + SBBreakpointName(SBBreakpoint &bkpt, const char *name); + + SBBreakpointName(const lldb::SBBreakpointName &rhs); + + ~SBBreakpointName(); + + const lldb::SBBreakpointName &operator=(const lldb::SBBreakpointName &rhs); + + // Tests to see if the opaque breakpoint object in this object matches the + // opaque breakpoint object in "rhs". + bool operator==(const lldb::SBBreakpointName &rhs); + + bool operator!=(const lldb::SBBreakpointName &rhs); + + bool IsValid() const; + + const char *GetName() const; + + void SetEnabled(bool enable); + + bool IsEnabled(); + + void SetOneShot(bool one_shot); + + bool IsOneShot() const; + + void SetIgnoreCount(uint32_t count); + + uint32_t GetIgnoreCount() const; + + void SetCondition(const char *condition); + + const char *GetCondition(); + + void SetAutoContinue(bool auto_continue); + + bool GetAutoContinue(); + + void SetThreadID(lldb::tid_t sb_thread_id); + + lldb::tid_t GetThreadID(); + + void SetThreadIndex(uint32_t index); + + uint32_t GetThreadIndex() const; + + void SetThreadName(const char *thread_name); + + const char *GetThreadName() const; + + void SetQueueName(const char *queue_name); + + const char *GetQueueName() const; + + void SetCallback(SBBreakpointHitCallback callback, void *baton); + + void SetScriptCallbackFunction(const char *callback_function_name); + + void SetCommandLineCommands(SBStringList &commands); + + bool GetCommandLineCommands(SBStringList &commands); + + SBError SetScriptCallbackBody(const char *script_body_text); + + const char *GetHelpString() const; + void SetHelpString(const char *help_string); + + bool GetAllowList() const; + void SetAllowList(bool value); + + bool GetAllowDelete(); + void SetAllowDelete(bool value); + + bool GetAllowDisable(); + void SetAllowDisable(bool value); + + bool GetDescription(lldb::SBStream &description); + +private: + friend class SBTarget; + + lldb_private::BreakpointName *GetBreakpointName() const; + void UpdateName(lldb_private::BreakpointName &bp_name); + + std::unique_ptr<SBBreakpointNameImpl> m_impl_up; +}; + +} // namespace lldb + +#endif // LLDB_SBBreakpointName_h_ diff --git a/include/lldb/API/SBCommandInterpreter.h b/include/lldb/API/SBCommandInterpreter.h index f684071740e39..80f24ceca7b41 100644 --- a/include/lldb/API/SBCommandInterpreter.h +++ b/include/lldb/API/SBCommandInterpreter.h @@ -165,6 +165,8 @@ public: int match_start_point, int max_return_elements, lldb::SBStringList &matches); + bool WasInterrupted() const; + // Catch commands before they execute by registering a callback that will // get called when the command gets executed. This allows GUI or command // line interfaces to intercept a command and stop it from happening diff --git a/include/lldb/API/SBDebugger.h b/include/lldb/API/SBDebugger.h index 9084943b91313..8379a6911afc9 100644 --- a/include/lldb/API/SBDebugger.h +++ b/include/lldb/API/SBDebugger.h @@ -109,6 +109,8 @@ public: const char *archname); lldb::SBTarget CreateTarget(const char *filename); + + lldb::SBTarget GetDummyTarget(); // Return true if target is deleted from the target list of the debugger. bool DeleteTarget(lldb::SBTarget &target); @@ -132,6 +134,25 @@ public: void SetSelectedPlatform(lldb::SBPlatform &platform); + /// Get the number of currently active platforms. + uint32_t GetNumPlatforms(); + + /// Get one of the currently active platforms. + lldb::SBPlatform GetPlatformAtIndex(uint32_t idx); + + /// Get the number of available platforms. + /// + /// The return value should match the number of entries output by the + /// "platform list" command. + uint32_t GetNumAvailablePlatforms(); + + /// Get the name and description of one of the available platforms. + /// + /// @param[in] idx + /// Zero-based index of the platform for which info should be retrieved, + /// must be less than the value returned by GetNumAvailablePlatforms(). + lldb::SBStructuredData GetAvailablePlatformInfoAtIndex(uint32_t idx); + lldb::SBSourceManager GetSourceManager(); // REMOVE: just for a quick fix, need to expose platforms through diff --git a/include/lldb/API/SBDefines.h b/include/lldb/API/SBDefines.h index d70e912d9200f..ec92c91967379 100644 --- a/include/lldb/API/SBDefines.h +++ b/include/lldb/API/SBDefines.h @@ -32,6 +32,8 @@ class LLDB_API SBAddress; class LLDB_API SBBlock; class LLDB_API SBBreakpoint; class LLDB_API SBBreakpointLocation; +class LLDB_API SBBreakpointName; +class LLDB_API SBBreakpointNameImpl; class LLDB_API SBBroadcaster; class LLDB_API SBCommand; class LLDB_API SBCommandInterpreter; @@ -65,6 +67,7 @@ class LLDB_API SBModule; class LLDB_API SBModuleSpec; class LLDB_API SBModuleSpecList; class LLDB_API SBProcess; +class LLDB_API SBProcessInfo; class LLDB_API SBQueue; class LLDB_API SBQueueItem; class LLDB_API SBSection; @@ -98,6 +101,10 @@ class LLDB_API SBValueList; class LLDB_API SBVariablesOptions; class LLDB_API SBWatchpoint; class LLDB_API SBUnixSignals; + +typedef bool (*SBBreakpointHitCallback)(void *baton, SBProcess &process, + SBThread &thread, + lldb::SBBreakpointLocation &location); } #endif // LLDB_SBDefines_h_ diff --git a/include/lldb/API/SBError.h b/include/lldb/API/SBError.h index a099a9be271a0..a27d2d0426907 100644 --- a/include/lldb/API/SBError.h +++ b/include/lldb/API/SBError.h @@ -67,6 +67,7 @@ protected: friend class SBWatchpoint; friend class SBBreakpoint; friend class SBBreakpointLocation; + friend class SBBreakpointName; lldb_private::Status *get(); diff --git a/include/lldb/API/SBFileSpec.h b/include/lldb/API/SBFileSpec.h index a31d95abb493b..33e48f5c7c41b 100644 --- a/include/lldb/API/SBFileSpec.h +++ b/include/lldb/API/SBFileSpec.h @@ -65,6 +65,7 @@ private: friend class SBModuleSpec; friend class SBPlatform; friend class SBProcess; + friend class SBProcessInfo; friend class SBSourceManager; friend class SBThread; friend class SBTarget; diff --git a/include/lldb/API/SBProcess.h b/include/lldb/API/SBProcess.h index d57d5ce04f59f..2e8925941fb74 100644 --- a/include/lldb/API/SBProcess.h +++ b/include/lldb/API/SBProcess.h @@ -12,6 +12,7 @@ #include "lldb/API/SBDefines.h" #include "lldb/API/SBError.h" +#include "lldb/API/SBProcessInfo.h" #include "lldb/API/SBQueue.h" #include "lldb/API/SBTarget.h" #include <stdio.h> @@ -380,6 +381,15 @@ public: //------------------------------------------------------------------ lldb::SBMemoryRegionInfoList GetMemoryRegions(); + //------------------------------------------------------------------ + /// Return information about the process. + /// + /// Valid process info will only be returned when the process is + /// alive, use SBProcessInfo::IsValid() to check returned info is + /// valid. + //------------------------------------------------------------------ + lldb::SBProcessInfo GetProcessInfo(); + protected: friend class SBAddress; friend class SBBreakpoint; diff --git a/include/lldb/API/SBProcessInfo.h b/include/lldb/API/SBProcessInfo.h new file mode 100644 index 0000000000000..421227f82c2d9 --- /dev/null +++ b/include/lldb/API/SBProcessInfo.h @@ -0,0 +1,64 @@ +//===-- SBProcessInfo.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_SBProcessInfo_h_ +#define LLDB_SBProcessInfo_h_ + +#include "lldb/API/SBDefines.h" + +namespace lldb { + +class LLDB_API SBProcessInfo { +public: + SBProcessInfo(); + SBProcessInfo(const SBProcessInfo &rhs); + + ~SBProcessInfo(); + + SBProcessInfo &operator=(const SBProcessInfo &rhs); + + bool IsValid() const; + + const char *GetName(); + + SBFileSpec GetExecutableFile(); + + lldb::pid_t GetProcessID(); + + uint32_t GetUserID(); + + uint32_t GetGroupID(); + + bool UserIDIsValid(); + + bool GroupIDIsValid(); + + uint32_t GetEffectiveUserID(); + + uint32_t GetEffectiveGroupID(); + + bool EffectiveUserIDIsValid(); + + bool EffectiveGroupIDIsValid(); + + lldb::pid_t GetParentProcessID(); + +private: + friend class SBProcess; + + lldb_private::ProcessInstanceInfo &ref(); + + void SetProcessInfo(const lldb_private::ProcessInstanceInfo &proc_info_ref); + + std::unique_ptr<lldb_private::ProcessInstanceInfo> m_opaque_ap; +}; + +} // namespace lldb + +#endif // LLDB_SBProcessInfo_h_ diff --git a/include/lldb/API/SBStream.h b/include/lldb/API/SBStream.h index 68fcae21c08e7..a75afc7ee375a 100644 --- a/include/lldb/API/SBStream.h +++ b/include/lldb/API/SBStream.h @@ -53,6 +53,7 @@ protected: friend class SBBlock; friend class SBBreakpoint; friend class SBBreakpointLocation; + friend class SBBreakpointName; friend class SBCommandReturnObject; friend class SBCompileUnit; friend class SBData; diff --git a/include/lldb/API/SBStringList.h b/include/lldb/API/SBStringList.h index 66b5172a0b3e6..943384e544cd1 100644 --- a/include/lldb/API/SBStringList.h +++ b/include/lldb/API/SBStringList.h @@ -44,6 +44,8 @@ protected: friend class SBCommandInterpreter; friend class SBDebugger; friend class SBBreakpoint; + friend class SBBreakpointLocation; + friend class SBBreakpointName; SBStringList(const lldb_private::StringList *lldb_strings); diff --git a/include/lldb/API/SBStructuredData.h b/include/lldb/API/SBStructuredData.h index f7a6469bb8de3..f3baaf7c48013 100644 --- a/include/lldb/API/SBStructuredData.h +++ b/include/lldb/API/SBStructuredData.h @@ -98,6 +98,7 @@ public: protected: friend class SBTraceOptions; + friend class SBDebugger; StructuredDataImplUP m_impl_up; }; diff --git a/include/lldb/API/SBTarget.h b/include/lldb/API/SBTarget.h index 62398fcd4b94f..4085a16b43fbc 100644 --- a/include/lldb/API/SBTarget.h +++ b/include/lldb/API/SBTarget.h @@ -218,14 +218,6 @@ public: lldb::SBProcess AttachToProcessWithID(SBListener &listener, lldb::pid_t pid, lldb::SBError &error); -#if defined(__APPLE__) - // We need to keep this around for a build or two since Xcode links - // to the 32 bit version of this function. We will take it out soon. - lldb::SBProcess AttachToProcessWithID(SBListener &listener, - ::pid_t pid, // 32 bit int process ID - lldb::SBError &error); // DEPRECATED -#endif - //------------------------------------------------------------------ /// Attach to process with name. /// @@ -724,6 +716,10 @@ public: // Finds all breakpoints by name, returning the list in bkpt_list. Returns // false if the name is not a valid breakpoint name, true otherwise. bool FindBreakpointsByName(const char *name, SBBreakpointList &bkpt_list); + + void GetBreakpointNames(SBStringList &names); + + void DeleteBreakpointName(const char *name); bool EnableAllBreakpoints(); @@ -818,6 +814,7 @@ protected: friend class SBAddress; friend class SBBlock; friend class SBBreakpointList; + friend class SBBreakpointNameImpl; friend class SBDebugger; friend class SBExecutionContext; friend class SBFunction; diff --git a/include/lldb/API/SBThread.h b/include/lldb/API/SBThread.h index 502e5c973ef55..7f1cf10cc456b 100644 --- a/include/lldb/API/SBThread.h +++ b/include/lldb/API/SBThread.h @@ -196,6 +196,7 @@ public: protected: friend class SBBreakpoint; friend class SBBreakpointLocation; + friend class SBBreakpointCallbackBaton; friend class SBExecutionContext; friend class SBFrame; friend class SBProcess; |