diff options
Diffstat (limited to 'include/lldb/API')
| -rw-r--r-- | include/lldb/API/LLDB.h | 4 | ||||
| -rw-r--r-- | include/lldb/API/SBAddress.h | 1 | ||||
| -rw-r--r-- | include/lldb/API/SBBreakpoint.h | 10 | ||||
| -rw-r--r-- | include/lldb/API/SBCommandInterpreter.h | 22 | ||||
| -rw-r--r-- | include/lldb/API/SBCommandReturnObject.h | 4 | ||||
| -rw-r--r-- | include/lldb/API/SBDebugger.h | 6 | ||||
| -rw-r--r-- | include/lldb/API/SBDefines.h | 5 | ||||
| -rw-r--r-- | include/lldb/API/SBExpressionOptions.h | 6 | ||||
| -rw-r--r-- | include/lldb/API/SBFileSpec.h | 3 | ||||
| -rw-r--r-- | include/lldb/API/SBFrame.h | 4 | ||||
| -rw-r--r-- | include/lldb/API/SBInitializerOptions.h | 43 | ||||
| -rw-r--r-- | include/lldb/API/SBMemoryRegionInfo.h | 1 | ||||
| -rw-r--r-- | include/lldb/API/SBMemoryRegionInfoList.h | 6 | ||||
| -rw-r--r-- | include/lldb/API/SBModule.h | 1 | ||||
| -rw-r--r-- | include/lldb/API/SBProcess.h | 6 | ||||
| -rw-r--r-- | include/lldb/API/SBStructuredData.h | 10 | ||||
| -rw-r--r-- | include/lldb/API/SBSymbolContext.h | 4 | ||||
| -rw-r--r-- | include/lldb/API/SBTarget.h | 70 | ||||
| -rw-r--r-- | include/lldb/API/SBThread.h | 4 | ||||
| -rw-r--r-- | include/lldb/API/SBThreadPlan.h | 14 | ||||
| -rw-r--r-- | include/lldb/API/SBVariablesOptions.h | 4 |
21 files changed, 198 insertions, 30 deletions
diff --git a/include/lldb/API/LLDB.h b/include/lldb/API/LLDB.h index c51ced893d7a..2b3dd96aef0e 100644 --- a/include/lldb/API/LLDB.h +++ b/include/lldb/API/LLDB.h @@ -10,10 +10,6 @@ #ifndef LLDB_LLDB_h_ #define LLDB_LLDB_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/API/SBAddress.h" #include "lldb/API/SBAttachInfo.h" #include "lldb/API/SBBlock.h" diff --git a/include/lldb/API/SBAddress.h b/include/lldb/API/SBAddress.h index 02e847b97aa1..891324254cd6 100644 --- a/include/lldb/API/SBAddress.h +++ b/include/lldb/API/SBAddress.h @@ -82,6 +82,7 @@ public: protected: friend class SBBlock; + friend class SBBreakpoint; friend class SBBreakpointLocation; friend class SBFrame; friend class SBFunction; diff --git a/include/lldb/API/SBBreakpoint.h b/include/lldb/API/SBBreakpoint.h index 216d675b9d22..2c93bf103e3e 100644 --- a/include/lldb/API/SBBreakpoint.h +++ b/include/lldb/API/SBBreakpoint.h @@ -23,6 +23,8 @@ public: SBBreakpoint(const lldb::SBBreakpoint &rhs); + SBBreakpoint(const lldb::BreakpointSP &bp_sp); + ~SBBreakpoint(); const lldb::SBBreakpoint &operator=(const lldb::SBBreakpoint &rhs); @@ -127,14 +129,18 @@ public: static uint32_t GetNumBreakpointLocationsFromEvent(const lldb::SBEvent &event_sp); + bool IsHardware() const; + + // Can only be called from a ScriptedBreakpointResolver... + SBError + AddLocation(SBAddress &address); + private: friend class SBBreakpointList; friend class SBBreakpointLocation; friend class SBBreakpointName; friend class SBTarget; - SBBreakpoint(const lldb::BreakpointSP &bp_sp); - lldb::BreakpointSP GetSP() const; lldb::BreakpointWP m_opaque_wp; diff --git a/include/lldb/API/SBCommandInterpreter.h b/include/lldb/API/SBCommandInterpreter.h index 8b9f06599366..f98894478811 100644 --- a/include/lldb/API/SBCommandInterpreter.h +++ b/include/lldb/API/SBCommandInterpreter.h @@ -10,12 +10,8 @@ #ifndef LLDB_SBCommandInterpreter_h_ #define LLDB_SBCommandInterpreter_h_ -// C Includes -// C++ Includes #include <memory> -// Other libraries and framework includes -// Project includes #include "lldb/API/SBDebugger.h" #include "lldb/API/SBDefines.h" @@ -45,6 +41,10 @@ public: void SetEchoCommands(bool); + bool GetEchoCommentCommands() const; + + void SetEchoCommentCommands(bool echo); + bool GetPrintResults() const; void SetPrintResults(bool); @@ -162,6 +162,20 @@ public: int match_start_point, int max_return_elements, lldb::SBStringList &matches); + // Same as HandleCompletion, but also fills out `descriptions` with + // descriptions for each match. + int HandleCompletionWithDescriptions( + const char *current_line, const char *cursor, const char *last_char, + int match_start_point, int max_return_elements, + lldb::SBStringList &matches, lldb::SBStringList &descriptions); + + int HandleCompletionWithDescriptions(const char *current_line, + uint32_t cursor_pos, + int match_start_point, + int max_return_elements, + lldb::SBStringList &matches, + lldb::SBStringList &descriptions); + bool WasInterrupted() const; // Catch commands before they execute by registering a callback that will get diff --git a/include/lldb/API/SBCommandReturnObject.h b/include/lldb/API/SBCommandReturnObject.h index a372ea2ad9ee..798aa92a7ef2 100644 --- a/include/lldb/API/SBCommandReturnObject.h +++ b/include/lldb/API/SBCommandReturnObject.h @@ -10,14 +10,10 @@ #ifndef LLDB_SBCommandReturnObject_h_ #define LLDB_SBCommandReturnObject_h_ -// C Includes #include <stdio.h> -// C++ Includes #include <memory> -// Other libraries and framework includes -// Project includes #include "lldb/API/SBDefines.h" namespace lldb { diff --git a/include/lldb/API/SBDebugger.h b/include/lldb/API/SBDebugger.h index a416b460f318..3f31bf16da8d 100644 --- a/include/lldb/API/SBDebugger.h +++ b/include/lldb/API/SBDebugger.h @@ -13,6 +13,7 @@ #include <stdio.h> #include "lldb/API/SBDefines.h" +#include "lldb/API/SBInitializerOptions.h" #include "lldb/API/SBPlatform.h" namespace lldb { @@ -45,6 +46,7 @@ public: lldb::SBDebugger &operator=(const lldb::SBDebugger &rhs); static void Initialize(); + static lldb::SBError Initialize(SBInitializerOptions &options); static void Terminate(); @@ -109,7 +111,7 @@ 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. @@ -226,6 +228,8 @@ public: void SetPrompt(const char *prompt); + const char *GetReproducerPath() const; + lldb::ScriptLanguage GetScriptLanguage() const; void SetScriptLanguage(lldb::ScriptLanguage script_lang); diff --git a/include/lldb/API/SBDefines.h b/include/lldb/API/SBDefines.h index ec92c9196737..c5c9851272f2 100644 --- a/include/lldb/API/SBDefines.h +++ b/include/lldb/API/SBDefines.h @@ -10,10 +10,6 @@ #ifndef LLDB_SBDefines_h_ #define LLDB_SBDefines_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/lldb-defines.h" #include "lldb/lldb-enumerations.h" @@ -55,6 +51,7 @@ class LLDB_API SBFileSpecList; class LLDB_API SBFrame; class LLDB_API SBFunction; class LLDB_API SBHostOS; +class LLDB_API SBInitializerOptions; class LLDB_API SBInstruction; class LLDB_API SBInstructionList; class LLDB_API SBLanguageRuntime; diff --git a/include/lldb/API/SBExpressionOptions.h b/include/lldb/API/SBExpressionOptions.h index 1459ba6fee2a..b861436caf98 100644 --- a/include/lldb/API/SBExpressionOptions.h +++ b/include/lldb/API/SBExpressionOptions.h @@ -90,6 +90,12 @@ public: bool GetTopLevel(); void SetTopLevel(bool b = true); + + // Gets whether we will JIT an expression if it cannot be interpreted + bool GetAllowJIT(); + + // Sets whether we will JIT an expression if it cannot be interpreted + void SetAllowJIT(bool allow); protected: SBExpressionOptions( diff --git a/include/lldb/API/SBFileSpec.h b/include/lldb/API/SBFileSpec.h index 33e48f5c7c41..9ad1a5df0cfa 100644 --- a/include/lldb/API/SBFileSpec.h +++ b/include/lldb/API/SBFileSpec.h @@ -59,6 +59,7 @@ private: friend class SBDeclaration; friend class SBFileSpecList; friend class SBHostOS; + friend class SBInitializerOptions; friend class SBLaunchInfo; friend class SBLineEntry; friend class SBModule; @@ -67,8 +68,8 @@ private: friend class SBProcess; friend class SBProcessInfo; friend class SBSourceManager; - friend class SBThread; friend class SBTarget; + friend class SBThread; SBFileSpec(const lldb_private::FileSpec &fspec); diff --git a/include/lldb/API/SBFrame.h b/include/lldb/API/SBFrame.h index b8953dd13236..1123dade5de2 100644 --- a/include/lldb/API/SBFrame.h +++ b/include/lldb/API/SBFrame.h @@ -90,6 +90,10 @@ public: bool IsInlined() const; + bool IsArtificial(); + + bool IsArtificial() const; + /// The version that doesn't supply a 'use_dynamic' value will use the /// target's default. lldb::SBValue EvaluateExpression(const char *expr); diff --git a/include/lldb/API/SBInitializerOptions.h b/include/lldb/API/SBInitializerOptions.h new file mode 100644 index 000000000000..184c82df4f86 --- /dev/null +++ b/include/lldb/API/SBInitializerOptions.h @@ -0,0 +1,43 @@ +//===-- SBInitializerOptions.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_SBInitializerOptuions_h_ +#define LLDB_SBInitializerOptuions_h_ + +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBFileSpec.h" + +namespace lldb_private { +struct InitializerOptions; +} + +namespace lldb { + +class LLDB_API SBInitializerOptions { +public: + SBInitializerOptions(); + SBInitializerOptions(const lldb::SBInitializerOptions &rhs); + ~SBInitializerOptions(); + const SBInitializerOptions &operator=(const lldb::SBInitializerOptions &rhs); + + void SetCaptureReproducer(bool b); + void SetReplayReproducer(bool b); + void SetReproducerPath(const char *path); + + lldb_private::InitializerOptions &ref() const; + +private: + friend class SBDebugger; + + std::unique_ptr<lldb_private::InitializerOptions> m_opaque_up; +}; + +} // namespace lldb + +#endif // LLDB_SBInitializerOptuions_h_ diff --git a/include/lldb/API/SBMemoryRegionInfo.h b/include/lldb/API/SBMemoryRegionInfo.h index 297f877a6341..5675d93b8eaf 100644 --- a/include/lldb/API/SBMemoryRegionInfo.h +++ b/include/lldb/API/SBMemoryRegionInfo.h @@ -102,6 +102,7 @@ private: const lldb_private::MemoryRegionInfo &ref() const; + // Unused. SBMemoryRegionInfo(const lldb_private::MemoryRegionInfo *lldb_object_ptr); lldb::MemoryRegionInfoUP m_opaque_ap; diff --git a/include/lldb/API/SBMemoryRegionInfoList.h b/include/lldb/API/SBMemoryRegionInfoList.h index 883a2224c92d..1e67997cdaf1 100644 --- a/include/lldb/API/SBMemoryRegionInfoList.h +++ b/include/lldb/API/SBMemoryRegionInfoList.h @@ -42,6 +42,12 @@ protected: const MemoryRegionInfoListImpl &operator*() const; private: + friend class SBProcess; + + lldb_private::MemoryRegionInfos &ref(); + + const lldb_private::MemoryRegionInfos &ref() const; + std::unique_ptr<MemoryRegionInfoListImpl> m_opaque_ap; }; diff --git a/include/lldb/API/SBModule.h b/include/lldb/API/SBModule.h index d73267f8af50..7a10e9fc96b3 100644 --- a/include/lldb/API/SBModule.h +++ b/include/lldb/API/SBModule.h @@ -309,6 +309,7 @@ public: lldb::SBFileSpec GetSymbolFileSpec() const; lldb::SBAddress GetObjectFileHeaderAddress() const; + lldb::SBAddress GetObjectFileEntryPointAddress() const; private: friend class SBAddress; diff --git a/include/lldb/API/SBProcess.h b/include/lldb/API/SBProcess.h index 4ad24f63f076..69cf8b4ce854 100644 --- a/include/lldb/API/SBProcess.h +++ b/include/lldb/API/SBProcess.h @@ -318,11 +318,11 @@ public: /// library name and a list of paths, searching along the list of /// paths till you find a matching library. /// - /// @param[in] local_spec + /// @param[in] image_spec /// The name of the shared library that you want to load. - /// If local_spec is a relative path, the relative path will be + /// If image_spec is a relative path, the relative path will be /// appended to the search paths. - /// If the local_spec is an absolute path, just the basename is used. + /// If the image_spec is an absolute path, just the basename is used. /// /// @param[in] paths /// A list of paths to search for the library whose basename is diff --git a/include/lldb/API/SBStructuredData.h b/include/lldb/API/SBStructuredData.h index ca8229a574df..629d4f3e35ee 100644 --- a/include/lldb/API/SBStructuredData.h +++ b/include/lldb/API/SBStructuredData.h @@ -22,6 +22,8 @@ public: SBStructuredData(const lldb::SBStructuredData &rhs); SBStructuredData(const lldb::EventSP &event_sp); + + SBStructuredData(lldb_private::StructuredDataImpl *impl); ~SBStructuredData(); @@ -41,7 +43,7 @@ public: /// Return the type of data in this data structure //------------------------------------------------------------------ lldb::StructuredDataType GetType() const; - + //------------------------------------------------------------------ /// Return the size (i.e. number of elements) in this data structure /// if it is an array or dictionary type. For other types, 0 will be @@ -50,6 +52,12 @@ public: size_t GetSize() const; //------------------------------------------------------------------ + /// Fill keys with the keys in this object and return true if this data + /// structure is a dictionary. Returns false otherwise. + //------------------------------------------------------------------ + bool GetKeys(lldb::SBStringList &keys) const; + + //------------------------------------------------------------------ /// Return the value corresponding to a key if this data structure /// is a dictionary type. //------------------------------------------------------------------ diff --git a/include/lldb/API/SBSymbolContext.h b/include/lldb/API/SBSymbolContext.h index 04ee15e8ecb1..9078b5b789e0 100644 --- a/include/lldb/API/SBSymbolContext.h +++ b/include/lldb/API/SBSymbolContext.h @@ -26,6 +26,8 @@ public: SBSymbolContext(const lldb::SBSymbolContext &rhs); + SBSymbolContext(const lldb_private::SymbolContext *sc_ptr); + ~SBSymbolContext(); bool IsValid() const; @@ -69,8 +71,6 @@ protected: lldb_private::SymbolContext *get() const; - SBSymbolContext(const lldb_private::SymbolContext *sc_ptr); - void SetSymbolContext(const lldb_private::SymbolContext *sc_ptr); private: diff --git a/include/lldb/API/SBTarget.h b/include/lldb/API/SBTarget.h index 8d99545902fe..18de267fee00 100644 --- a/include/lldb/API/SBTarget.h +++ b/include/lldb/API/SBTarget.h @@ -10,10 +10,6 @@ #ifndef LLDB_SBTarget_h_ #define LLDB_SBTarget_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/API/SBAddress.h" #include "lldb/API/SBAttachInfo.h" #include "lldb/API/SBBreakpoint.h" @@ -75,6 +71,31 @@ public: lldb::SBProcess GetProcess(); + //------------------------------------------------------------------ + /// Sets whether we should collect statistics on lldb or not. + /// + /// @param[in] v + /// A boolean to control the collection. + /// @return + /// void + //------------------------------------------------------------------ + void SetCollectingStats(bool v); + + //------------------------------------------------------------------ + /// Returns whether statistics collection are enabled. + /// + /// @return + /// true if statistics are currently being collected, false + /// otherwise. + //------------------------------------------------------------------ + bool GetCollectingStats(); + + //------------------------------------------------------------------ + /// Returns a dump of the collected statistics. + /// + /// @return + /// A SBStructuredData with the statistics collected. + //------------------------------------------------------------------ lldb::SBStructuredData GetStatistics(); //------------------------------------------------------------------ @@ -272,6 +293,10 @@ public: lldb::SBFileSpec GetExecutable(); + // Append the path mapping (from -> to) to the target's paths mapping list. + void AppendImageSearchPath(const char *from, const char *to, + lldb::SBError &error); + bool AddModule(lldb::SBModule &module); lldb::SBModule AddModule(const char *path, const char *triple, @@ -576,6 +601,11 @@ public: BreakpointCreateByLocation(const lldb::SBFileSpec &file_spec, uint32_t line, lldb::addr_t offset, SBFileSpecList &module_list); + lldb::SBBreakpoint + BreakpointCreateByLocation(const lldb::SBFileSpec &file_spec, uint32_t line, + uint32_t column, lldb::addr_t offset, + SBFileSpecList &module_list); + lldb::SBBreakpoint BreakpointCreateByName(const char *symbol_name, const char *module_name = nullptr); @@ -653,6 +683,37 @@ public: lldb::SBBreakpoint BreakpointCreateByAddress(addr_t address); lldb::SBBreakpoint BreakpointCreateBySBAddress(SBAddress &address); + + //------------------------------------------------------------------ + /// Create a breakpoint using a scripted resolver. + /// + /// @param[in] class_name + /// This is the name of the class that implements a scripted resolver. + /// + /// @param[in] extra_args + /// This is an SBStructuredData object that will get passed to the + /// constructor of the class in class_name. You can use this to + /// reuse the same class, parametrizing with entries from this + /// dictionary. + /// + /// @param module_list + /// If this is non-empty, this will be used as the module filter in the + /// SearchFilter created for this breakpoint. + /// + /// @param file_list + /// If this is non-empty, this will be used as the comp unit filter in the + /// SearchFilter created for this breakpoint. + /// + /// @return + /// An SBBreakpoint that will set locations based on the logic in the + /// resolver's search callback. + //------------------------------------------------------------------ + lldb::SBBreakpoint BreakpointCreateFromScript( + const char *class_name, + SBStructuredData &extra_args, + const SBFileSpecList &module_list, + const SBFileSpecList &file_list, + bool request_hardware = false); //------------------------------------------------------------------ /// Read breakpoints from source_file and return the newly created @@ -842,6 +903,7 @@ protected: friend class SBSourceManager; friend class SBSymbol; friend class SBValue; + friend class SBVariablesOptions; //------------------------------------------------------------------ // Constructors are private, use static Target::Create function to create an diff --git a/include/lldb/API/SBThread.h b/include/lldb/API/SBThread.h index afc05d2c61ad..63816eef51b7 100644 --- a/include/lldb/API/SBThread.h +++ b/include/lldb/API/SBThread.h @@ -198,6 +198,10 @@ public: uint32_t GetExtendedBacktraceOriginatingIndexID(); + SBValue GetCurrentException(); + + SBThread GetCurrentExceptionBacktrace(); + bool SafeToCallFunctions(); #ifndef SWIG diff --git a/include/lldb/API/SBThreadPlan.h b/include/lldb/API/SBThreadPlan.h index abc14bf8fe4a..5084a427e1b8 100644 --- a/include/lldb/API/SBThreadPlan.h +++ b/include/lldb/API/SBThreadPlan.h @@ -79,14 +79,28 @@ public: // plans... SBThreadPlan QueueThreadPlanForStepOverRange(SBAddress &start_address, lldb::addr_t range_size); + SBThreadPlan QueueThreadPlanForStepOverRange(SBAddress &start_address, + lldb::addr_t range_size, + SBError &error); SBThreadPlan QueueThreadPlanForStepInRange(SBAddress &start_address, lldb::addr_t range_size); + SBThreadPlan QueueThreadPlanForStepInRange(SBAddress &start_address, + lldb::addr_t range_size, + SBError &error); SBThreadPlan QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to, bool first_insn = false); + SBThreadPlan QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to, + bool first_insn, SBError &error); SBThreadPlan QueueThreadPlanForRunToAddress(SBAddress address); + SBThreadPlan QueueThreadPlanForRunToAddress(SBAddress address, + SBError &error); + + SBThreadPlan QueueThreadPlanForStepScripted(const char *script_class_name); + SBThreadPlan QueueThreadPlanForStepScripted(const char *script_class_name, + SBError &error); #ifndef SWIG lldb_private::ThreadPlan *get(); diff --git a/include/lldb/API/SBVariablesOptions.h b/include/lldb/API/SBVariablesOptions.h index 756da6439e3b..0059a41129c5 100644 --- a/include/lldb/API/SBVariablesOptions.h +++ b/include/lldb/API/SBVariablesOptions.h @@ -33,6 +33,10 @@ public: void SetIncludeArguments(bool); + bool GetIncludeRecognizedArguments(const lldb::SBTarget &) const; + + void SetIncludeRecognizedArguments(bool); + bool GetIncludeLocals() const; void SetIncludeLocals(bool); |
