diff options
Diffstat (limited to 'include/lldb/API')
-rw-r--r-- | include/lldb/API/LLDB.h | 20 | ||||
-rw-r--r-- | include/lldb/API/SBAttachInfo.h | 75 | ||||
-rw-r--r-- | include/lldb/API/SBCommandInterpreter.h | 30 | ||||
-rw-r--r-- | include/lldb/API/SBCommandReturnObject.h | 20 | ||||
-rw-r--r-- | include/lldb/API/SBDebugger.h | 36 | ||||
-rw-r--r-- | include/lldb/API/SBDefines.h | 2 | ||||
-rw-r--r-- | include/lldb/API/SBFunction.h | 6 | ||||
-rw-r--r-- | include/lldb/API/SBProcess.h | 54 | ||||
-rw-r--r-- | include/lldb/API/SBStream.h | 4 | ||||
-rw-r--r-- | include/lldb/API/SBTarget.h | 70 | ||||
-rw-r--r-- | include/lldb/API/SBType.h | 13 | ||||
-rw-r--r-- | include/lldb/API/SBTypeCategory.h | 9 | ||||
-rw-r--r-- | include/lldb/API/SBTypeSummary.h | 15 | ||||
-rw-r--r-- | include/lldb/API/SBValue.h | 12 | ||||
-rw-r--r-- | include/lldb/API/SystemInitializerFull.h | 8 |
15 files changed, 296 insertions, 78 deletions
diff --git a/include/lldb/API/LLDB.h b/include/lldb/API/LLDB.h index 66e095395f13..eed10d08c6cc 100644 --- a/include/lldb/API/LLDB.h +++ b/include/lldb/API/LLDB.h @@ -16,6 +16,7 @@ // Project includes #include "lldb/API/SBDefines.h" #include "lldb/API/SBAddress.h" +#include "lldb/API/SBAttachInfo.h" #include "lldb/API/SBBlock.h" #include "lldb/API/SBBreakpoint.h" #include "lldb/API/SBBreakpointLocation.h" @@ -30,28 +31,47 @@ #include "lldb/API/SBError.h" #include "lldb/API/SBEvent.h" #include "lldb/API/SBExecutionContext.h" +#include "lldb/API/SBExpressionOptions.h" #include "lldb/API/SBFileSpec.h" +#include "lldb/API/SBFileSpecList.h" #include "lldb/API/SBFrame.h" #include "lldb/API/SBFunction.h" #include "lldb/API/SBHostOS.h" #include "lldb/API/SBInstruction.h" #include "lldb/API/SBInstructionList.h" +#include "lldb/API/SBLanguageRuntime.h" +#include "lldb/API/SBLaunchInfo.h" #include "lldb/API/SBLineEntry.h" #include "lldb/API/SBListener.h" #include "lldb/API/SBModule.h" +#include "lldb/API/SBModuleSpec.h" +#include "lldb/API/SBPlatform.h" #include "lldb/API/SBProcess.h" #include "lldb/API/SBQueue.h" #include "lldb/API/SBQueueItem.h" +#include "lldb/API/SBSection.h" #include "lldb/API/SBSourceManager.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBStringList.h" #include "lldb/API/SBSymbol.h" #include "lldb/API/SBSymbolContext.h" +#include "lldb/API/SBSymbolContextList.h" #include "lldb/API/SBTarget.h" #include "lldb/API/SBThread.h" +#include "lldb/API/SBThreadCollection.h" +#include "lldb/API/SBThreadPlan.h" #include "lldb/API/SBType.h" +#include "lldb/API/SBTypeCategory.h" +#include "lldb/API/SBTypeEnumMember.h" +#include "lldb/API/SBTypeFilter.h" +#include "lldb/API/SBTypeFormat.h" +#include "lldb/API/SBTypeNameSpecifier.h" +#include "lldb/API/SBTypeSummary.h" +#include "lldb/API/SBTypeSynthetic.h" +#include "lldb/API/SBUnixSignals.h" #include "lldb/API/SBValue.h" #include "lldb/API/SBValueList.h" #include "lldb/API/SBVariablesOptions.h" +#include "lldb/API/SBWatchpoint.h" #endif // LLDB_LLDB_h_ diff --git a/include/lldb/API/SBAttachInfo.h b/include/lldb/API/SBAttachInfo.h index 712150e128be..a246d9919cfa 100644 --- a/include/lldb/API/SBAttachInfo.h +++ b/include/lldb/API/SBAttachInfo.h @@ -23,8 +23,47 @@ public: SBAttachInfo (lldb::pid_t pid); + //------------------------------------------------------------------ + /// Attach to a process by name. + /// + /// This function implies that a future call to SBTarget::Attach(...) + /// will be synchronous. + /// + /// @param[in] path + /// A full or partial name for the process to attach to. + /// + /// @param[in] wait_for + /// If \b false, attach to an existing process whose name matches. + /// If \b true, then wait for the next process whose name matches. + //------------------------------------------------------------------ SBAttachInfo (const char *path, bool wait_for); + //------------------------------------------------------------------ + /// Attach to a process by name. + /// + /// Future calls to SBTarget::Attach(...) will be synchronous or + /// asynchronous depending on the \a async argument. + /// + /// @param[in] path + /// A full or partial name for the process to attach to. + /// + /// @param[in] wait_for + /// If \b false, attach to an existing process whose name matches. + /// If \b true, then wait for the next process whose name matches. + /// + /// @param[in] async + /// If \b false, then the SBTarget::Attach(...) call will be a + /// synchronous call with no way to cancel the attach in + /// progress. + /// If \b true, then the SBTarget::Attach(...) function will + /// return immediately and clients are expected to wait for a + /// process eStateStopped event if a suitable process is + /// eventually found. If the client wants to cancel the event, + /// SBProcess::Stop() can be called and an eStateExited process + /// event will be delivered. + //------------------------------------------------------------------ + SBAttachInfo (const char *path, bool wait_for, bool async); + SBAttachInfo (const SBAttachInfo &rhs); ~SBAttachInfo(); @@ -47,9 +86,45 @@ public: bool GetWaitForLaunch (); + //------------------------------------------------------------------ + /// Set attach by process name settings. + /// + /// Designed to be used after a call to SBAttachInfo::SetExecutable(). + /// This function implies that a call to SBTarget::Attach(...) will + /// be synchronous. + /// + /// @param[in] wait_for + /// If \b false, attach to an existing process whose name matches. + /// If \b true, then wait for the next process whose name matches. + //------------------------------------------------------------------ void SetWaitForLaunch (bool b); + //------------------------------------------------------------------ + /// Set attach by process name settings. + /// + /// Designed to be used after a call to SBAttachInfo::SetExecutable(). + /// Future calls to SBTarget::Attach(...) will be synchronous or + /// asynchronous depending on the \a async argument. + /// + /// @param[in] wait_for + /// If \b false, attach to an existing process whose name matches. + /// If \b true, then wait for the next process whose name matches. + /// + /// @param[in] async + /// If \b false, then the SBTarget::Attach(...) call will be a + /// synchronous call with no way to cancel the attach in + /// progress. + /// If \b true, then the SBTarget::Attach(...) function will + /// return immediately and clients are expected to wait for a + /// process eStateStopped event if a suitable process is + /// eventually found. If the client wants to cancel the event, + /// SBProcess::Stop() can be called and an eStateExited process + /// event will be delivered. + //------------------------------------------------------------------ + void + SetWaitForLaunch (bool b, bool async); + bool GetIgnoreExisting (); diff --git a/include/lldb/API/SBCommandInterpreter.h b/include/lldb/API/SBCommandInterpreter.h index 235a2f3ea603..a8e9bf7ed769 100644 --- a/include/lldb/API/SBCommandInterpreter.h +++ b/include/lldb/API/SBCommandInterpreter.h @@ -10,6 +10,12 @@ #ifndef LLDB_SBCommandInterpreter_h_ #define LLDB_SBCommandInterpreter_h_ +// C Includes +// C++ Includes +#include <memory> + +// Other libraries and framework includes +// Project includes #include "lldb/API/SBDefines.h" #include "lldb/API/SBDebugger.h" @@ -59,6 +65,7 @@ public: void SetAddToHistory (bool); + private: lldb_private::CommandInterpreterRunOptions * get () const; @@ -84,11 +91,11 @@ public: SBCommandInterpreter (const lldb::SBCommandInterpreter &rhs); + ~SBCommandInterpreter (); + const lldb::SBCommandInterpreter & operator = (const lldb::SBCommandInterpreter &rhs); - ~SBCommandInterpreter (); - static const char * GetArgumentTypeAsCString (const lldb::CommandArgumentType arg_type); @@ -187,7 +194,7 @@ public: lldb::CommandOverrideCallback callback, void *baton); - SBCommandInterpreter (lldb_private::CommandInterpreter *interpreter_ptr = NULL); // Access using SBDebugger::GetCommandInterpreter(); + SBCommandInterpreter(lldb_private::CommandInterpreter *interpreter_ptr = nullptr); // Access using SBDebugger::GetCommandInterpreter(); //---------------------------------------------------------------------- /// Return true if the command interpreter is the active IO handler. @@ -213,7 +220,7 @@ public: /// /// @return /// The string that should be written into the file handle that is - /// feeding the input stream for the debugger, or NULL if there is + /// feeding the input stream for the debugger, or nullptr if there is /// no string for this control key. //---------------------------------------------------------------------- const char * @@ -233,7 +240,6 @@ public: ResolveCommand(const char *command_line, SBCommandReturnObject &result); protected: - lldb_private::CommandInterpreter & ref (); @@ -242,6 +248,7 @@ protected: void reset (lldb_private::CommandInterpreter *); + private: friend class SBDebugger; @@ -254,6 +261,9 @@ private: class SBCommandPluginInterface { public: + virtual + ~SBCommandPluginInterface() = default; + virtual bool DoExecute (lldb::SBDebugger /*debugger*/, char** /*command*/, @@ -261,16 +271,11 @@ public: { return false; } - - virtual - ~SBCommandPluginInterface () - {} }; class SBCommand { public: - SBCommand (); bool @@ -298,13 +303,12 @@ public: SetFlags (uint32_t flags); lldb::SBCommand - AddMultiwordCommand (const char* name, const char* help = NULL); + AddMultiwordCommand(const char* name, const char* help = nullptr); lldb::SBCommand - AddCommand (const char* name, lldb::SBCommandPluginInterface* impl, const char* help = NULL); + AddCommand(const char* name, lldb::SBCommandPluginInterface* impl, const char* help = nullptr); private: - friend class SBDebugger; friend class SBCommandInterpreter; diff --git a/include/lldb/API/SBCommandReturnObject.h b/include/lldb/API/SBCommandReturnObject.h index c51d6bc8d2d5..b45eb9c14c04 100644 --- a/include/lldb/API/SBCommandReturnObject.h +++ b/include/lldb/API/SBCommandReturnObject.h @@ -10,8 +10,14 @@ #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 { @@ -19,22 +25,20 @@ namespace lldb { class LLDB_API SBCommandReturnObject { public: - SBCommandReturnObject (); SBCommandReturnObject (const lldb::SBCommandReturnObject &rhs); + ~SBCommandReturnObject (); + const lldb::SBCommandReturnObject & operator = (const lldb::SBCommandReturnObject &rhs); - SBCommandReturnObject (lldb_private::CommandReturnObject *ptr); lldb_private::CommandReturnObject * Release (); - ~SBCommandReturnObject (); - bool IsValid() const; @@ -99,8 +103,8 @@ public: GetError (bool only_if_no_immediate); void - SetError (lldb::SBError &error, - const char *fallback_error_cstr = NULL); + SetError(lldb::SBError &error, + const char *fallback_error_cstr = nullptr); void SetError (const char* error_cstr); @@ -124,10 +128,10 @@ protected: void SetLLDBObjectPtr (lldb_private::CommandReturnObject *ptr); - private: +private: std::unique_ptr<lldb_private::CommandReturnObject> m_opaque_ap; }; } // namespace lldb -#endif // LLDB_SBCommandReturnObject_h_ +#endif // LLDB_SBCommandReturnObject_h_ diff --git a/include/lldb/API/SBDebugger.h b/include/lldb/API/SBDebugger.h index 4f2c1d7f8756..7588cfc9ec42 100644 --- a/include/lldb/API/SBDebugger.h +++ b/include/lldb/API/SBDebugger.h @@ -16,13 +16,13 @@ #include "lldb/API/SBPlatform.h" namespace lldb { - class LLDB_API SBInputReader { public: - SBInputReader(); - ~SBInputReader(); + SBInputReader() = default; + ~SBInputReader() = default; + SBError Initialize(lldb::SBDebugger&, unsigned long (*)(void*, lldb::SBInputReader*, lldb::InputReaderAction, char const*, unsigned long), void*, lldb::InputReaderGranularity, char const*, char const*, bool); void SetIsDone(bool); bool IsActive() const; @@ -31,6 +31,16 @@ public: class LLDB_API SBDebugger { public: + SBDebugger(); + + SBDebugger(const lldb::SBDebugger &rhs); + + SBDebugger(const lldb::DebuggerSP &debugger_sp); + + ~SBDebugger(); + + lldb::SBDebugger & + operator = (const lldb::SBDebugger &rhs); static void Initialize(); @@ -54,17 +64,6 @@ public: static void MemoryPressureDetected (); - SBDebugger(); - - SBDebugger(const lldb::SBDebugger &rhs); - - SBDebugger(const lldb::DebuggerSP &debugger_sp); - - lldb::SBDebugger & - operator = (const lldb::SBDebugger &rhs); - - ~SBDebugger(); - bool IsValid() const; @@ -288,6 +287,9 @@ public: GetCategory (const char* category_name); SBTypeCategory + GetCategory (lldb::LanguageType lang_type); + + SBTypeCategory CreateCategory (const char* category_name); bool @@ -329,8 +331,11 @@ public: int &num_errors, bool &quit_requested, bool &stopped_for_crash); -private: + + SBError + RunREPL (lldb::LanguageType language, const char *repl_options); +private: friend class SBCommandInterpreter; friend class SBInputReader; friend class SBListener; @@ -357,7 +362,6 @@ private: }; // class SBDebugger - } // namespace lldb #endif // LLDB_SBDebugger_h_ diff --git a/include/lldb/API/SBDefines.h b/include/lldb/API/SBDefines.h index 09bea502dd01..d81bba5a2e23 100644 --- a/include/lldb/API/SBDefines.h +++ b/include/lldb/API/SBDefines.h @@ -86,9 +86,7 @@ class LLDB_API SBTypeMemberFunction; class LLDB_API SBTypeNameSpecifier; class LLDB_API SBTypeSummary; class LLDB_API SBTypeSummaryOptions; -#ifndef LLDB_DISABLE_PYTHON class LLDB_API SBTypeSynthetic; -#endif class LLDB_API SBTypeList; class LLDB_API SBValue; class LLDB_API SBValueList; diff --git a/include/lldb/API/SBFunction.h b/include/lldb/API/SBFunction.h index 86cfeb49bb58..f76c77c44e3f 100644 --- a/include/lldb/API/SBFunction.h +++ b/include/lldb/API/SBFunction.h @@ -53,6 +53,9 @@ public: lldb::SBAddress GetEndAddress (); + const char * + GetArgumentName (uint32_t arg_idx); + uint32_t GetPrologueByteSize (); @@ -66,6 +69,9 @@ public: GetLanguage (); bool + GetIsOptimized (); + + bool operator == (const lldb::SBFunction &rhs) const; bool diff --git a/include/lldb/API/SBProcess.h b/include/lldb/API/SBProcess.h index 71bca4fc697a..1a9cc8022880 100644 --- a/include/lldb/API/SBProcess.h +++ b/include/lldb/API/SBProcess.h @@ -294,8 +294,56 @@ public: uint32_t GetNumSupportedHardwareWatchpoints (lldb::SBError &error) const; + //------------------------------------------------------------------ + /// Load a shared library into this process. + /// + /// @param[in] remote_image_spec + /// The path for the shared library on the target what you want + /// to load. + /// + /// @param[out] error + /// An error object that gets filled in with any errors that + /// might occur when trying to load the shared library. + /// + /// @return + /// A token that represents the shared library that can be + /// later used to unload the shared library. A value of + /// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared + /// library can't be opened. + //------------------------------------------------------------------ uint32_t - LoadImage (lldb::SBFileSpec &image_spec, lldb::SBError &error); + LoadImage (lldb::SBFileSpec &remote_image_spec, lldb::SBError &error); + + //------------------------------------------------------------------ + /// Load a shared library into this process. + /// + /// @param[in] local_image_spec + /// The file spec that points to the shared library that you + /// want to load if the library is located on the host. The + /// library will be copied over to the location specified by + /// remote_image_spec or into the current working directory with + /// the same filename if the remote_image_spec isn't specified. + /// + /// @param[in] remote_image_spec + /// If local_image_spec is specified then the location where the + /// library should be copied over from the host. If + /// local_image_spec isn't specified, then the path for the + /// shared library on the target what you want to load. + /// + /// @param[out] error + /// An error object that gets filled in with any errors that + /// might occur when trying to load the shared library. + /// + /// @return + /// A token that represents the shared library that can be + /// later used to unload the shared library. A value of + /// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared + /// library can't be opened. + //------------------------------------------------------------------ + uint32_t + LoadImage (const lldb::SBFileSpec &local_image_spec, + const lldb::SBFileSpec &remote_image_spec, + lldb::SBError &error); lldb::SBError UnloadImage (uint32_t image_token); @@ -341,6 +389,10 @@ public: bool IsInstrumentationRuntimePresent(InstrumentationRuntimeType type); + // Save the state of the process in a core file (or mini dump on Windows). + lldb::SBError + SaveCore(const char *file_name); + protected: friend class SBAddress; friend class SBBreakpoint; diff --git a/include/lldb/API/SBStream.h b/include/lldb/API/SBStream.h index 2b25cd2c68f2..e62723c2f37e 100644 --- a/include/lldb/API/SBStream.h +++ b/include/lldb/API/SBStream.h @@ -21,7 +21,9 @@ class LLDB_API SBStream public: SBStream (); - + + SBStream (SBStream &&rhs); + ~SBStream (); bool diff --git a/include/lldb/API/SBTarget.h b/include/lldb/API/SBTarget.h index 2ca0b124ce0a..723c433b521a 100644 --- a/include/lldb/API/SBTarget.h +++ b/include/lldb/API/SBTarget.h @@ -10,6 +10,10 @@ #ifndef LLDB_SBTarget_h_ #define LLDB_SBTarget_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/API/SBDefines.h" #include "lldb/API/SBAddress.h" #include "lldb/API/SBAttachInfo.h" @@ -50,14 +54,14 @@ public: SBTarget (const lldb::TargetSP& target_sp); - const lldb::SBTarget& - operator = (const lldb::SBTarget& rhs); - //------------------------------------------------------------------ // Destructor //------------------------------------------------------------------ ~SBTarget(); + const lldb::SBTarget& + operator = (const lldb::SBTarget& rhs); + bool IsValid() const; @@ -135,17 +139,17 @@ public: /// /// @param[in] stdin_path /// The path to use when re-directing the STDIN of the new - /// process. If all stdXX_path arguments are NULL, a pseudo + /// process. If all stdXX_path arguments are nullptr, a pseudo /// terminal will be used. /// /// @param[in] stdout_path /// The path to use when re-directing the STDOUT of the new - /// process. If all stdXX_path arguments are NULL, a pseudo + /// process. If all stdXX_path arguments are nullptr, a pseudo /// terminal will be used. /// /// @param[in] stderr_path /// The path to use when re-directing the STDERR of the new - /// process. If all stdXX_path arguments are NULL, a pseudo + /// process. If all stdXX_path arguments are nullptr, a pseudo /// terminal will be used. /// /// @param[in] working_directory @@ -175,8 +179,10 @@ public: uint32_t launch_flags, // See LaunchFlags bool stop_at_entry, lldb::SBError& error); - - + + SBProcess + LoadCore (const char *core_file); + //------------------------------------------------------------------ /// Launch a new process with sensible defaults. /// @@ -212,9 +218,6 @@ public: Launch (SBLaunchInfo &launch_info, SBError& error); SBProcess - LoadCore (const char *core_file); - - SBProcess Attach (SBAttachInfo &attach_info, SBError& error); //------------------------------------------------------------------ @@ -248,6 +251,7 @@ public: ::pid_t pid, // 32 bit int process ID lldb::SBError& error); // DEPRECATED #endif + //------------------------------------------------------------------ /// Attach to process with name. /// @@ -288,7 +292,7 @@ public: /// The url to connect to, e.g., 'connect://localhost:12345'. /// /// @param[in] plugin_name - /// The plugin name to be used; can be NULL. + /// The plugin name to be used; can be nullptr. /// /// @param[out] error /// An error explaining what went wrong if the connect fails. @@ -421,7 +425,6 @@ public: lldb::SBError SetModuleLoadAddress (lldb::SBModule module, int64_t sections_offset); - //------------------------------------------------------------------ /// Clear the section base load addresses for all sections in a module. @@ -618,7 +621,7 @@ public: BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line); lldb::SBBreakpoint - BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL); + BreakpointCreateByName(const char *symbol_name, const char *module_name = nullptr); // This version uses name_type_mask = eFunctionNameTypeAuto lldb::SBBreakpoint @@ -633,14 +636,29 @@ public: const SBFileSpecList &comp_unit_list); lldb::SBBreakpoint + BreakpointCreateByName (const char *symbol_name, + uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits + lldb::LanguageType symbol_language, + const SBFileSpecList &module_list, + const SBFileSpecList &comp_unit_list); + + lldb::SBBreakpoint + BreakpointCreateByNames (const char *symbol_name[], + uint32_t num_names, + uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits + const SBFileSpecList &module_list, + const SBFileSpecList &comp_unit_list); + + lldb::SBBreakpoint BreakpointCreateByNames (const char *symbol_name[], uint32_t num_names, uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits + lldb::LanguageType symbol_language, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list); lldb::SBBreakpoint - BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = NULL); + BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = nullptr); lldb::SBBreakpoint BreakpointCreateByRegex (const char *symbol_name_regex, @@ -648,9 +666,15 @@ public: const SBFileSpecList &comp_unit_list); lldb::SBBreakpoint - BreakpointCreateBySourceRegex (const char *source_regex, - const SBFileSpec &source_file, - const char *module_name = NULL); + BreakpointCreateByRegex (const char *symbol_name_regex, + lldb::LanguageType symbol_language, + const SBFileSpecList &module_list, + const SBFileSpecList &comp_unit_list); + + lldb::SBBreakpoint + BreakpointCreateBySourceRegex(const char *source_regex, + const SBFileSpec &source_file, + const char *module_name = nullptr); lldb::SBBreakpoint BreakpointCreateBySourceRegex (const char *source_regex, @@ -665,6 +689,9 @@ public: lldb::SBBreakpoint BreakpointCreateByAddress (addr_t address); + lldb::SBBreakpoint + BreakpointCreateBySBAddress (SBAddress &address); + uint32_t GetNumBreakpoints () const; @@ -808,15 +835,10 @@ protected: void SetSP (const lldb::TargetSP& target_sp); - private: - //------------------------------------------------------------------ - // For Target only - //------------------------------------------------------------------ - lldb::TargetSP m_opaque_sp; }; } // namespace lldb -#endif // LLDB_SBTarget_h_ +#endif // LLDB_SBTarget_h_ diff --git a/include/lldb/API/SBType.h b/include/lldb/API/SBType.h index 01f0c6afc795..ed3c2ff23863 100644 --- a/include/lldb/API/SBType.h +++ b/include/lldb/API/SBType.h @@ -85,7 +85,13 @@ public: const char * GetName (); - + + const char * + GetDemangledName (); + + const char * + GetMangledName (); + lldb::SBType GetType (); @@ -158,6 +164,9 @@ public: bool IsTypedefType (); + bool + IsAnonymousType (); + lldb::SBType GetPointerType(); @@ -290,7 +299,7 @@ protected: friend class SBTypeList; friend class SBValue; - SBType (const lldb_private::ClangASTType &); + SBType (const lldb_private::CompilerType &); SBType (const lldb::TypeSP &); SBType (const lldb::TypeImplSP &); diff --git a/include/lldb/API/SBTypeCategory.h b/include/lldb/API/SBTypeCategory.h index 30c338b28a46..997b3fc2f98d 100644 --- a/include/lldb/API/SBTypeCategory.h +++ b/include/lldb/API/SBTypeCategory.h @@ -36,6 +36,15 @@ namespace lldb { const char* GetName(); + lldb::LanguageType + GetLanguageAtIndex (uint32_t idx); + + uint32_t + GetNumLanguages (); + + void + AddLanguage (lldb::LanguageType language); + bool GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); diff --git a/include/lldb/API/SBTypeSummary.h b/include/lldb/API/SBTypeSummary.h index 9b367ba5f982..f4c666180085 100644 --- a/include/lldb/API/SBTypeSummary.h +++ b/include/lldb/API/SBTypeSummary.h @@ -12,8 +12,6 @@ #include "lldb/API/SBDefines.h" -#ifndef LLDB_DISABLE_PYTHON - namespace lldb { class LLDB_API SBTypeSummaryOptions { @@ -71,6 +69,9 @@ namespace lldb { public: SBTypeSummary(); + + // Native function summary formatter callback + typedef bool (*FormatCallback) (SBValue, SBTypeSummaryOptions, SBStream&); static SBTypeSummary CreateWithSummaryString (const char* data, @@ -83,6 +84,11 @@ namespace lldb { static SBTypeSummary CreateWithScriptCode (const char* data, uint32_t options = 0); // see lldb::eTypeOption values + + static SBTypeSummary + CreateWithCallback (FormatCallback cb, + uint32_t options = 0, + const char* description = nullptr); SBTypeSummary (const lldb::SBTypeSummary &rhs); @@ -126,6 +132,9 @@ namespace lldb { operator = (const lldb::SBTypeSummary &rhs); bool + DoesPrintValue (lldb::SBValue value); + + bool IsEqualTo (lldb::SBTypeSummary &rhs); bool @@ -160,6 +169,4 @@ namespace lldb { } // namespace lldb -#endif // LLDB_DISABLE_PYTHON - #endif // LLDB_SBTypeSummary_h_ diff --git a/include/lldb/API/SBValue.h b/include/lldb/API/SBValue.h index a070b149f34f..a7e015064f96 100644 --- a/include/lldb/API/SBValue.h +++ b/include/lldb/API/SBValue.h @@ -139,10 +139,8 @@ public: lldb::SBTypeFormat GetTypeFormat (); -#ifndef LLDB_DISABLE_PYTHON lldb::SBTypeSummary GetTypeSummary (); -#endif lldb::SBTypeFilter GetTypeFilter (); @@ -206,7 +204,11 @@ public: /// pointer to a 'Point' type, then the child at index zero will be /// the 'x' member, and the child at index 1 will be the 'y' member /// (the child at index zero won't be a 'Point' instance). - /// + /// + /// If you actually need an SBValue that represents the type pointed + /// to by a SBValue for which GetType().IsPointeeType() returns true, + /// regardless of the pointee type, you can do that with SBValue::Dereference. + /// /// Arrays have a preset number of children that can be accessed by /// index and will returns invalid child values for indexes that are /// out of bounds unless the \a synthetic_allowed is \b true. In this @@ -332,6 +334,9 @@ public: uint32_t GetNumChildren (); + uint32_t + GetNumChildren (uint32_t max); + void * GetOpaqueType(); @@ -350,6 +355,7 @@ public: lldb::SBValue Dereference (); + // Deprecated - please use GetType().IsPointerType() instead. bool TypeIsPointerType (); diff --git a/include/lldb/API/SystemInitializerFull.h b/include/lldb/API/SystemInitializerFull.h index 6280fe8aef04..9e37611a6598 100644 --- a/include/lldb/API/SystemInitializerFull.h +++ b/include/lldb/API/SystemInitializerFull.h @@ -26,15 +26,15 @@ class SystemInitializerFull : public SystemInitializerCommon { public: SystemInitializerFull(); - virtual ~SystemInitializerFull(); + ~SystemInitializerFull() override; void Initialize() override; void Terminate() override; private: void InitializeSWIG(); - void TerminateSWIG(); }; -} -#endif +} // namespace lldb_private + +#endif // LLDB_API_SYSTEM_INITIALIZER_FULL_H |