summaryrefslogtreecommitdiff
path: root/include/lldb/API
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:52 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:52 +0000
commit5f29bb8a675e8f96452b632e7129113f7dec850e (patch)
tree3d3f2a0d3ad10872a4dcaba8ec8d1d20c87ab147 /include/lldb/API
parent88c643b6fec27eec436c8d138fee6346e92337d6 (diff)
Notes
Diffstat (limited to 'include/lldb/API')
-rw-r--r--include/lldb/API/LLDB.h8
-rw-r--r--include/lldb/API/SBAddress.h15
-rw-r--r--include/lldb/API/SBAttachInfo.h35
-rw-r--r--include/lldb/API/SBBlock.h13
-rw-r--r--include/lldb/API/SBBreakpoint.h9
-rw-r--r--include/lldb/API/SBBreakpointLocation.h9
-rw-r--r--include/lldb/API/SBBreakpointName.h9
-rw-r--r--include/lldb/API/SBBroadcaster.h9
-rw-r--r--include/lldb/API/SBCommandInterpreter.h29
-rw-r--r--include/lldb/API/SBCommandReturnObject.h11
-rw-r--r--include/lldb/API/SBCommunication.h9
-rw-r--r--include/lldb/API/SBCompileUnit.h15
-rw-r--r--include/lldb/API/SBData.h9
-rw-r--r--include/lldb/API/SBDebugger.h31
-rw-r--r--include/lldb/API/SBDeclaration.h11
-rw-r--r--include/lldb/API/SBDefines.h12
-rw-r--r--include/lldb/API/SBError.h22
-rw-r--r--include/lldb/API/SBEvent.h9
-rw-r--r--include/lldb/API/SBExecutionContext.h9
-rw-r--r--include/lldb/API/SBExpressionOptions.h18
-rw-r--r--include/lldb/API/SBFileSpec.h16
-rw-r--r--include/lldb/API/SBFileSpecList.h9
-rw-r--r--include/lldb/API/SBFrame.h9
-rw-r--r--include/lldb/API/SBFunction.h9
-rw-r--r--include/lldb/API/SBHostOS.h7
-rw-r--r--include/lldb/API/SBInitializerOptions.h43
-rw-r--r--include/lldb/API/SBInstruction.h9
-rw-r--r--include/lldb/API/SBInstructionList.h11
-rw-r--r--include/lldb/API/SBLanguageRuntime.h7
-rw-r--r--include/lldb/API/SBLaunchInfo.h17
-rw-r--r--include/lldb/API/SBLineEntry.h11
-rw-r--r--include/lldb/API/SBListener.h9
-rw-r--r--include/lldb/API/SBMemoryRegionInfo.h37
-rw-r--r--include/lldb/API/SBMemoryRegionInfoList.h9
-rw-r--r--include/lldb/API/SBModule.h81
-rw-r--r--include/lldb/API/SBModuleSpec.h21
-rw-r--r--include/lldb/API/SBPlatform.h11
-rw-r--r--include/lldb/API/SBProcess.h97
-rw-r--r--include/lldb/API/SBProcessInfo.h11
-rw-r--r--include/lldb/API/SBQueue.h13
-rw-r--r--include/lldb/API/SBQueueItem.h9
-rw-r--r--include/lldb/API/SBReproducer.h28
-rw-r--r--include/lldb/API/SBSection.h17
-rw-r--r--include/lldb/API/SBSourceManager.h11
-rw-r--r--include/lldb/API/SBStream.h11
-rw-r--r--include/lldb/API/SBStringList.h11
-rw-r--r--include/lldb/API/SBStructuredData.h45
-rw-r--r--include/lldb/API/SBSymbol.h13
-rw-r--r--include/lldb/API/SBSymbolContext.h11
-rw-r--r--include/lldb/API/SBSymbolContextList.h11
-rw-r--r--include/lldb/API/SBTarget.h271
-rw-r--r--include/lldb/API/SBThread.h30
-rw-r--r--include/lldb/API/SBThreadCollection.h9
-rw-r--r--include/lldb/API/SBThreadPlan.h23
-rw-r--r--include/lldb/API/SBTrace.h37
-rw-r--r--include/lldb/API/SBTraceOptions.h9
-rw-r--r--include/lldb/API/SBType.h19
-rw-r--r--include/lldb/API/SBTypeCategory.h27
-rw-r--r--include/lldb/API/SBTypeEnumMember.h13
-rw-r--r--include/lldb/API/SBTypeFilter.h9
-rw-r--r--include/lldb/API/SBTypeFormat.h9
-rw-r--r--include/lldb/API/SBTypeNameSpecifier.h9
-rw-r--r--include/lldb/API/SBTypeSummary.h13
-rw-r--r--include/lldb/API/SBTypeSynthetic.h13
-rw-r--r--include/lldb/API/SBUnixSignals.h9
-rw-r--r--include/lldb/API/SBValue.h78
-rw-r--r--include/lldb/API/SBValueList.h11
-rw-r--r--include/lldb/API/SBVariablesOptions.h11
-rw-r--r--include/lldb/API/SBWatchpoint.h13
69 files changed, 634 insertions, 875 deletions
diff --git a/include/lldb/API/LLDB.h b/include/lldb/API/LLDB.h
index 2b3dd96aef0e..0806ab700a94 100644
--- a/include/lldb/API/LLDB.h
+++ b/include/lldb/API/LLDB.h
@@ -1,9 +1,8 @@
//===-- LLDB.h --------------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -49,6 +48,7 @@
#include "lldb/API/SBProcessInfo.h"
#include "lldb/API/SBQueue.h"
#include "lldb/API/SBQueueItem.h"
+#include "lldb/API/SBReproducer.h"
#include "lldb/API/SBSection.h"
#include "lldb/API/SBSourceManager.h"
#include "lldb/API/SBStream.h"
diff --git a/include/lldb/API/SBAddress.h b/include/lldb/API/SBAddress.h
index 891324254cd6..2874a3602af2 100644
--- a/include/lldb/API/SBAddress.h
+++ b/include/lldb/API/SBAddress.h
@@ -1,9 +1,8 @@
//===-- SBAddress.h ---------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -30,6 +29,12 @@ public:
const lldb::SBAddress &operator=(const lldb::SBAddress &rhs);
+ explicit operator bool() const;
+
+ // operator== is a free function
+
+ bool operator!=(const SBAddress &rhs) const;
+
bool IsValid() const;
void Clear();
@@ -115,7 +120,7 @@ protected:
void SetAddress(const lldb_private::Address *lldb_object_ptr);
private:
- std::unique_ptr<lldb_private::Address> m_opaque_ap;
+ std::unique_ptr<lldb_private::Address> m_opaque_up;
};
bool LLDB_API operator==(const SBAddress &lhs, const SBAddress &rhs);
diff --git a/include/lldb/API/SBAttachInfo.h b/include/lldb/API/SBAttachInfo.h
index 7ae006908ccc..3c20a08cb4a9 100644
--- a/include/lldb/API/SBAttachInfo.h
+++ b/include/lldb/API/SBAttachInfo.h
@@ -1,9 +1,8 @@
//===-- SBAttachInfo.h ------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -22,35 +21,32 @@ 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
+ /// \param[in] path
/// A full or partial name for the process to attach to.
///
- /// @param[in] wait_for
+ /// \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
+ /// \param[in] path
/// A full or partial name for the process to attach to.
///
- /// @param[in] wait_for
+ /// \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
+ /// \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.
@@ -60,7 +56,6 @@ public:
/// 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);
@@ -79,31 +74,28 @@ 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] b
+ /// \param[in] b
/// 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] b
+ /// \param[in] b
/// 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
+ /// \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.
@@ -113,7 +105,6 @@ public:
/// 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();
@@ -158,23 +149,19 @@ public:
bool ParentProcessIDIsValid();
- //----------------------------------------------------------------------
/// Get the listener that will be used to receive process events.
///
/// If no listener has been set via a call to
/// SBAttachInfo::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:
diff --git a/include/lldb/API/SBBlock.h b/include/lldb/API/SBBlock.h
index 112de9673423..0ca92ff0c6ac 100644
--- a/include/lldb/API/SBBlock.h
+++ b/include/lldb/API/SBBlock.h
@@ -1,9 +1,8 @@
//===-- SBBlock.h -----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -29,6 +28,8 @@ public:
bool IsInlined() const;
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetInlinedName() const;
@@ -59,16 +60,14 @@ public:
lldb::SBValueList GetVariables(lldb::SBTarget &target, bool arguments,
bool locals, bool statics);
- //------------------------------------------------------------------
/// Get the inlined block that contains this block.
///
- /// @return
+ /// \return
/// If this block is inlined, it will return this block, else
/// parent blocks will be searched to see if any contain this
/// block and are themselves inlined. An invalid SBBlock will
/// be returned if this block nor any parent blocks are inlined
/// function blocks.
- //------------------------------------------------------------------
lldb::SBBlock GetContainingInlinedBlock();
bool GetDescription(lldb::SBStream &description);
diff --git a/include/lldb/API/SBBreakpoint.h b/include/lldb/API/SBBreakpoint.h
index 2c93bf103e3e..75c0e69a4821 100644
--- a/include/lldb/API/SBBreakpoint.h
+++ b/include/lldb/API/SBBreakpoint.h
@@ -1,9 +1,8 @@
//===-- SBBreakpoint.h ------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -37,6 +36,8 @@ public:
break_id_t GetID() const;
+ explicit operator bool() const;
+
bool IsValid() const;
void ClearAllBreakpointSites();
diff --git a/include/lldb/API/SBBreakpointLocation.h b/include/lldb/API/SBBreakpointLocation.h
index 4b34bcbf1f28..085bed9399b9 100644
--- a/include/lldb/API/SBBreakpointLocation.h
+++ b/include/lldb/API/SBBreakpointLocation.h
@@ -1,9 +1,8 @@
//===-- SBBreakpointLocation.h ----------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -28,6 +27,8 @@ public:
break_id_t GetID();
+ explicit operator bool() const;
+
bool IsValid() const;
lldb::SBAddress GetAddress();
diff --git a/include/lldb/API/SBBreakpointName.h b/include/lldb/API/SBBreakpointName.h
index 321f0d784d6f..018238bcd074 100644
--- a/include/lldb/API/SBBreakpointName.h
+++ b/include/lldb/API/SBBreakpointName.h
@@ -1,9 +1,8 @@
//===-- SBBreakpointName.h ------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -40,6 +39,8 @@ public:
bool operator!=(const lldb::SBBreakpointName &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetName() const;
diff --git a/include/lldb/API/SBBroadcaster.h b/include/lldb/API/SBBroadcaster.h
index dc6c50ec0a8a..fc5e8880e9f2 100644
--- a/include/lldb/API/SBBroadcaster.h
+++ b/include/lldb/API/SBBroadcaster.h
@@ -1,9 +1,8 @@
//===-- SBBroadcaster.h -----------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -26,6 +25,8 @@ public:
~SBBroadcaster();
+ explicit operator bool() const;
+
bool IsValid() const;
void Clear();
diff --git a/include/lldb/API/SBCommandInterpreter.h b/include/lldb/API/SBCommandInterpreter.h
index f98894478811..6c80e8eb26dc 100644
--- a/include/lldb/API/SBCommandInterpreter.h
+++ b/include/lldb/API/SBCommandInterpreter.h
@@ -1,9 +1,8 @@
//===-- SBCommandInterpreter.h ----------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -88,6 +87,8 @@ public:
static bool EventIsCommandInterpreterEvent(const lldb::SBEvent &event);
+ explicit operator bool() const;
+
bool IsValid() const;
bool CommandExists(const char *cmd);
@@ -189,16 +190,13 @@ public:
lldb_private::CommandInterpreter *interpreter_ptr =
nullptr); // Access using SBDebugger::GetCommandInterpreter();
- //----------------------------------------------------------------------
/// Return true if the command interpreter is the active IO handler.
///
/// This indicates that any input coming into the debugger handles will
/// go to the command interpreter and will result in LLDB command line
/// commands being executed.
- //----------------------------------------------------------------------
bool IsActive();
- //----------------------------------------------------------------------
/// Get the string that needs to be written to the debugger stdin file
/// handle when a control character is typed.
///
@@ -207,43 +205,34 @@ public:
/// terminal, so this function allows GUI programs to emulate this
/// functionality.
///
- /// @param[in] ch
+ /// \param[in] ch
/// The character that was typed along with the control key
///
- /// @return
+ /// \return
/// The string that should be written into the file handle that is
/// feeding the input stream for the debugger, or nullptr if there is
/// no string for this control key.
- //----------------------------------------------------------------------
const char *GetIOHandlerControlSequence(char ch);
bool GetPromptOnQuit();
void SetPromptOnQuit(bool b);
- //----------------------------------------------------------------------
/// Sets whether the command interpreter should allow custom exit codes
/// for the 'quit' command.
- //----------------------------------------------------------------------
void AllowExitCodeOnQuit(bool allow);
- //----------------------------------------------------------------------
/// Returns true if the user has called the 'quit' command with a custom exit
/// code.
- //----------------------------------------------------------------------
bool HasCustomQuitExitCode();
- //----------------------------------------------------------------------
/// Returns the exit code that the user has specified when running the
/// 'quit' command. Returns 0 if the user hasn't called 'quit' at all or
/// without a custom exit code.
- //----------------------------------------------------------------------
int GetQuitStatus();
- //----------------------------------------------------------------------
/// Resolve the command just as HandleCommand would, expanding abbreviations
/// and aliases. If successful, result->GetOutput has the full expansion.
- //----------------------------------------------------------------------
void ResolveCommand(const char *command_line, SBCommandReturnObject &result);
protected:
@@ -256,8 +245,6 @@ protected:
private:
friend class SBDebugger;
- static void InitializeSWIG();
-
lldb_private::CommandInterpreter *m_opaque_ptr;
};
@@ -275,6 +262,8 @@ class SBCommand {
public:
SBCommand();
+ explicit operator bool() const;
+
bool IsValid();
const char *GetName();
diff --git a/include/lldb/API/SBCommandReturnObject.h b/include/lldb/API/SBCommandReturnObject.h
index 798aa92a7ef2..2877afb9b8b0 100644
--- a/include/lldb/API/SBCommandReturnObject.h
+++ b/include/lldb/API/SBCommandReturnObject.h
@@ -1,9 +1,8 @@
//===-- SBCommandReturnObject.h ---------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -33,6 +32,8 @@ public:
lldb_private::CommandReturnObject *Release();
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetOutput();
@@ -100,7 +101,7 @@ protected:
void SetLLDBObjectPtr(lldb_private::CommandReturnObject *ptr);
private:
- std::unique_ptr<lldb_private::CommandReturnObject> m_opaque_ap;
+ std::unique_ptr<lldb_private::CommandReturnObject> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBCommunication.h b/include/lldb/API/SBCommunication.h
index f0016275b634..5b803fc6017c 100644
--- a/include/lldb/API/SBCommunication.h
+++ b/include/lldb/API/SBCommunication.h
@@ -1,9 +1,8 @@
//===-- SBCommunication.h ---------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -38,6 +37,8 @@ public:
SBCommunication(const char *broadcaster_name);
~SBCommunication();
+ explicit operator bool() const;
+
bool IsValid() const;
lldb::SBBroadcaster GetBroadcaster();
diff --git a/include/lldb/API/SBCompileUnit.h b/include/lldb/API/SBCompileUnit.h
index 4d5f9f36f246..b6b138207d60 100644
--- a/include/lldb/API/SBCompileUnit.h
+++ b/include/lldb/API/SBCompileUnit.h
@@ -1,9 +1,8 @@
//===-- SBCompileUnit.h -----------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -25,6 +24,8 @@ public:
const lldb::SBCompileUnit &operator=(const lldb::SBCompileUnit &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
lldb::SBFileSpec GetFileSpec() const;
@@ -47,11 +48,10 @@ public:
uint32_t FindSupportFileIndex(uint32_t start_idx, const SBFileSpec &sb_file,
bool full);
- //------------------------------------------------------------------
/// Get all types matching \a type_mask from debug info in this
/// compile unit.
///
- /// @param[in] type_mask
+ /// \param[in] type_mask
/// A bitfield that consists of one or more bits logically OR'ed
/// together from the lldb::TypeClass enumeration. This allows
/// you to request only structure types, or only class, struct
@@ -59,9 +59,8 @@ public:
/// all types found in the debug information for this compile
/// unit.
///
- /// @return
+ /// \return
/// A list of types in this compile unit that match \a type_mask
- //------------------------------------------------------------------
lldb::SBTypeList GetTypes(uint32_t type_mask = lldb::eTypeClassAny);
lldb::LanguageType GetLanguage();
diff --git a/include/lldb/API/SBData.h b/include/lldb/API/SBData.h
index 7ff619e68667..886fe829a469 100644
--- a/include/lldb/API/SBData.h
+++ b/include/lldb/API/SBData.h
@@ -1,9 +1,8 @@
//===-- SBData.h -----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -30,6 +29,8 @@ public:
void Clear();
+ explicit operator bool() const;
+
bool IsValid();
size_t GetByteSize();
diff --git a/include/lldb/API/SBDebugger.h b/include/lldb/API/SBDebugger.h
index 3f31bf16da8d..417cead24a8c 100644
--- a/include/lldb/API/SBDebugger.h
+++ b/include/lldb/API/SBDebugger.h
@@ -1,9 +1,8 @@
//===-- SBDebugger.h --------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -13,7 +12,6 @@
#include <stdio.h>
#include "lldb/API/SBDefines.h"
-#include "lldb/API/SBInitializerOptions.h"
#include "lldb/API/SBPlatform.h"
namespace lldb {
@@ -23,12 +21,12 @@ public:
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);
+ SBError Initialize(lldb::SBDebugger &sb_debugger,
+ unsigned long (*callback)(void *, lldb::SBInputReader *,
+ lldb::InputReaderAction,
+ char const *, unsigned long),
+ void *a, lldb::InputReaderGranularity b, char const *c,
+ char const *d, bool e);
void SetIsDone(bool);
bool IsActive() const;
};
@@ -46,7 +44,8 @@ public:
lldb::SBDebugger &operator=(const lldb::SBDebugger &rhs);
static void Initialize();
- static lldb::SBError Initialize(SBInitializerOptions &options);
+
+ static lldb::SBError InitializeWithErrorHandling();
static void Terminate();
@@ -63,6 +62,8 @@ public:
static void MemoryPressureDetected();
+ explicit operator bool() const;
+
bool IsValid() const;
void Clear();
@@ -150,7 +151,7 @@ public:
/// Get the name and description of one of the available platforms.
///
- /// @param[in] idx
+ /// \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);
@@ -254,15 +255,11 @@ public:
SBTypeFormat GetFormatForType(SBTypeNameSpecifier);
-#ifndef LLDB_DISABLE_PYTHON
SBTypeSummary GetSummaryForType(SBTypeNameSpecifier);
-#endif
SBTypeFilter GetFilterForType(SBTypeNameSpecifier);
-#ifndef LLDB_DISABLE_PYTHON
SBTypeSynthetic GetSyntheticForType(SBTypeNameSpecifier);
-#endif
void RunCommandInterpreter(bool auto_handle_events, bool spawn_thread);
diff --git a/include/lldb/API/SBDeclaration.h b/include/lldb/API/SBDeclaration.h
index 42cf76963847..d2b423e40fec 100644
--- a/include/lldb/API/SBDeclaration.h
+++ b/include/lldb/API/SBDeclaration.h
@@ -1,10 +1,9 @@
//===-- SBDeclaration.h -------------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -26,6 +25,8 @@ public:
const lldb::SBDeclaration &operator=(const lldb::SBDeclaration &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
lldb::SBFileSpec GetFileSpec() const;
@@ -62,7 +63,7 @@ private:
void SetDeclaration(const lldb_private::Declaration &lldb_object_ref);
- std::unique_ptr<lldb_private::Declaration> m_opaque_ap;
+ std::unique_ptr<lldb_private::Declaration> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBDefines.h b/include/lldb/API/SBDefines.h
index c5c9851272f2..838c84cece6d 100644
--- a/include/lldb/API/SBDefines.h
+++ b/include/lldb/API/SBDefines.h
@@ -1,9 +1,8 @@
//===-- SBDefines.h ---------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -17,10 +16,6 @@
#include "lldb/lldb-types.h"
#include "lldb/lldb-versioning.h"
-#ifdef SWIG
-#define LLDB_API
-#endif
-
// Forward Declarations
namespace lldb {
@@ -51,7 +46,6 @@ 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/SBError.h b/include/lldb/API/SBError.h
index a27d2d042690..b076f87b7669 100644
--- a/include/lldb/API/SBError.h
+++ b/include/lldb/API/SBError.h
@@ -1,9 +1,8 @@
//===-- SBError.h -----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -47,27 +46,30 @@ public:
int SetErrorStringWithFormat(const char *format, ...)
__attribute__((format(printf, 2, 3)));
+ explicit operator bool() const;
+
bool IsValid() const;
bool GetDescription(lldb::SBStream &description);
protected:
+ friend class SBBreakpoint;
+ friend class SBBreakpointLocation;
+ friend class SBBreakpointName;
friend class SBCommandReturnObject;
+ friend class SBCommunication;
friend class SBData;
friend class SBDebugger;
- friend class SBCommunication;
friend class SBHostOS;
friend class SBPlatform;
friend class SBProcess;
+ friend class SBReproducer;
friend class SBStructuredData;
+ friend class SBTarget;
friend class SBThread;
friend class SBTrace;
- friend class SBTarget;
friend class SBValue;
friend class SBWatchpoint;
- friend class SBBreakpoint;
- friend class SBBreakpointLocation;
- friend class SBBreakpointName;
lldb_private::Status *get();
@@ -80,7 +82,7 @@ protected:
void SetError(const lldb_private::Status &lldb_error);
private:
- std::unique_ptr<lldb_private::Status> m_opaque_ap;
+ std::unique_ptr<lldb_private::Status> m_opaque_up;
void CreateIfNeeded();
};
diff --git a/include/lldb/API/SBEvent.h b/include/lldb/API/SBEvent.h
index ff15716d853e..d297cbeff671 100644
--- a/include/lldb/API/SBEvent.h
+++ b/include/lldb/API/SBEvent.h
@@ -1,9 +1,8 @@
//===-- SBEvent.h -----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -36,6 +35,8 @@ public:
const SBEvent &operator=(const lldb::SBEvent &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetDataFlavor();
diff --git a/include/lldb/API/SBExecutionContext.h b/include/lldb/API/SBExecutionContext.h
index c19d539bc80a..45c0b1b7f97b 100644
--- a/include/lldb/API/SBExecutionContext.h
+++ b/include/lldb/API/SBExecutionContext.h
@@ -1,10 +1,9 @@
//===-- SBExecutionContext.h -----------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -51,8 +50,6 @@ public:
SBFrame GetFrame() const;
protected:
- ExecutionContextRefSP &GetSP() const;
-
void reset(lldb::ExecutionContextRefSP &event_sp);
lldb_private::ExecutionContextRef *get() const;
diff --git a/include/lldb/API/SBExpressionOptions.h b/include/lldb/API/SBExpressionOptions.h
index b861436caf98..04cd74f730f2 100644
--- a/include/lldb/API/SBExpressionOptions.h
+++ b/include/lldb/API/SBExpressionOptions.h
@@ -1,9 +1,8 @@
-//===-- SBEvent.h -----------------------------------------------*- C++ -*-===//
+//===-- SBExpressionOptions.h -----------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -90,17 +89,14 @@ 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(
- lldb_private::EvaluateExpressionOptions &expression_options);
-
lldb_private::EvaluateExpressionOptions *get() const;
lldb_private::EvaluateExpressionOptions &ref() const;
@@ -111,7 +107,7 @@ protected:
private:
// This auto_pointer is made in the constructor and is always valid.
- mutable std::unique_ptr<lldb_private::EvaluateExpressionOptions> m_opaque_ap;
+ mutable std::unique_ptr<lldb_private::EvaluateExpressionOptions> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBFileSpec.h b/include/lldb/API/SBFileSpec.h
index 9ad1a5df0cfa..27149775901e 100644
--- a/include/lldb/API/SBFileSpec.h
+++ b/include/lldb/API/SBFileSpec.h
@@ -1,9 +1,8 @@
//===-- SBFileSpec.h --------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -29,6 +28,12 @@ public:
const SBFileSpec &operator=(const lldb::SBFileSpec &rhs);
+ explicit operator bool() const;
+
+ bool operator==(const SBFileSpec &rhs) const;
+
+ bool operator!=(const SBFileSpec &rhs) const;
+
bool IsValid() const;
bool Exists() const;
@@ -59,7 +64,6 @@ private:
friend class SBDeclaration;
friend class SBFileSpecList;
friend class SBHostOS;
- friend class SBInitializerOptions;
friend class SBLaunchInfo;
friend class SBLineEntry;
friend class SBModule;
@@ -83,7 +87,7 @@ private:
const lldb_private::FileSpec &ref() const;
- std::unique_ptr<lldb_private::FileSpec> m_opaque_ap;
+ std::unique_ptr<lldb_private::FileSpec> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBFileSpecList.h b/include/lldb/API/SBFileSpecList.h
index 97f843adbb5f..5a131509d269 100644
--- a/include/lldb/API/SBFileSpecList.h
+++ b/include/lldb/API/SBFileSpecList.h
@@ -1,10 +1,9 @@
//===-- SBFileSpecList.h --------------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -50,7 +49,7 @@ private:
const lldb_private::FileSpecList &ref() const;
- std::unique_ptr<lldb_private::FileSpecList> m_opaque_ap;
+ std::unique_ptr<lldb_private::FileSpecList> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBFrame.h b/include/lldb/API/SBFrame.h
index 1123dade5de2..b213f8985510 100644
--- a/include/lldb/API/SBFrame.h
+++ b/include/lldb/API/SBFrame.h
@@ -1,9 +1,8 @@
//===-- SBFrame.h -----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -27,6 +26,8 @@ public:
bool IsEqual(const lldb::SBFrame &that) const;
+ explicit operator bool() const;
+
bool IsValid() const;
uint32_t GetFrameID() const;
diff --git a/include/lldb/API/SBFunction.h b/include/lldb/API/SBFunction.h
index 23da02102cfb..43f01d7e57de 100644
--- a/include/lldb/API/SBFunction.h
+++ b/include/lldb/API/SBFunction.h
@@ -1,9 +1,8 @@
//===-- SBFunction.h --------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -26,6 +25,8 @@ public:
~SBFunction();
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetName() const;
diff --git a/include/lldb/API/SBHostOS.h b/include/lldb/API/SBHostOS.h
index 1671917f865c..ecd7920f2c14 100644
--- a/include/lldb/API/SBHostOS.h
+++ b/include/lldb/API/SBHostOS.h
@@ -1,9 +1,8 @@
//===-- SBHostOS.h ----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/include/lldb/API/SBInitializerOptions.h b/include/lldb/API/SBInitializerOptions.h
deleted file mode 100644
index 184c82df4f86..000000000000
--- a/include/lldb/API/SBInitializerOptions.h
+++ /dev/null
@@ -1,43 +0,0 @@
-//===-- 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/SBInstruction.h b/include/lldb/API/SBInstruction.h
index 5ef02b8f696a..0bb587795607 100644
--- a/include/lldb/API/SBInstruction.h
+++ b/include/lldb/API/SBInstruction.h
@@ -1,9 +1,8 @@
//===-- SBInstruction.h -----------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -32,6 +31,8 @@ public:
~SBInstruction();
+ explicit operator bool() const;
+
bool IsValid();
SBAddress GetAddress();
diff --git a/include/lldb/API/SBInstructionList.h b/include/lldb/API/SBInstructionList.h
index c8fed5c83192..4434d50f471f 100644
--- a/include/lldb/API/SBInstructionList.h
+++ b/include/lldb/API/SBInstructionList.h
@@ -1,9 +1,8 @@
//===-- SBInstructionList.h -------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -26,17 +25,17 @@ public:
~SBInstructionList();
+ explicit operator bool() const;
+
bool IsValid() const;
size_t GetSize();
lldb::SBInstruction GetInstructionAtIndex(uint32_t idx);
- // ----------------------------------------------------------------------
// Returns the number of instructions between the start and end address. If
// canSetBreakpoint is true then the count will be the number of
// instructions on which a breakpoint can be set.
- // ----------------------------------------------------------------------
size_t GetInstructionsCount(const SBAddress &start,
const SBAddress &end,
bool canSetBreakpoint = false);
diff --git a/include/lldb/API/SBLanguageRuntime.h b/include/lldb/API/SBLanguageRuntime.h
index 3912f352491b..d28c441593ea 100644
--- a/include/lldb/API/SBLanguageRuntime.h
+++ b/include/lldb/API/SBLanguageRuntime.h
@@ -1,9 +1,8 @@
//===-- SBLanguageRuntime.h -------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/include/lldb/API/SBLaunchInfo.h b/include/lldb/API/SBLaunchInfo.h
index 80eea7e42921..c7b381ffdf97 100644
--- a/include/lldb/API/SBLaunchInfo.h
+++ b/include/lldb/API/SBLaunchInfo.h
@@ -1,9 +1,8 @@
//===-- SBLaunchInfo.h ------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -43,7 +42,6 @@ public:
SBFileSpec GetExecutableFile();
- //----------------------------------------------------------------------
/// Set the executable file that will be used to launch the process and
/// optionally set it as the first argument in the argument vector.
///
@@ -58,33 +56,28 @@ public:
/// SBTarget::Launch(...), the target will use the resolved executable
/// path that was used to create the target.
///
- /// @param[in] exe_file
+ /// \param[in] exe_file
/// The override path to use when launching the executable.
///
- /// @param[in] add_as_first_arg
+ /// \param[in] add_as_first_arg
/// If true, then the path will be inserted into the argument vector
/// prior to launching. Otherwise the argument vector will be left
/// alone.
- //----------------------------------------------------------------------
void SetExecutableFile(SBFileSpec exe_file, bool add_as_first_arg);
- //----------------------------------------------------------------------
/// 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);
uint32_t GetNumArguments();
diff --git a/include/lldb/API/SBLineEntry.h b/include/lldb/API/SBLineEntry.h
index 3d58ea8278ea..855c28d14b83 100644
--- a/include/lldb/API/SBLineEntry.h
+++ b/include/lldb/API/SBLineEntry.h
@@ -1,9 +1,8 @@
//===-- SBLineEntry.h -------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -30,6 +29,8 @@ public:
lldb::SBAddress GetEndAddress() const;
+ explicit operator bool() const;
+
bool IsValid() const;
lldb::SBFileSpec GetFileSpec() const;
@@ -69,7 +70,7 @@ private:
void SetLineEntry(const lldb_private::LineEntry &lldb_object_ref);
- std::unique_ptr<lldb_private::LineEntry> m_opaque_ap;
+ std::unique_ptr<lldb_private::LineEntry> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBListener.h b/include/lldb/API/SBListener.h
index a2f82a83c3ed..21aface97bd1 100644
--- a/include/lldb/API/SBListener.h
+++ b/include/lldb/API/SBListener.h
@@ -1,9 +1,8 @@
//===-- SBListener.h --------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -30,6 +29,8 @@ public:
void Clear();
+ explicit operator bool() const;
+
bool IsValid() const;
uint32_t StartListeningForEventClass(SBDebugger &debugger,
diff --git a/include/lldb/API/SBMemoryRegionInfo.h b/include/lldb/API/SBMemoryRegionInfo.h
index 5675d93b8eaf..2a9ae94218f2 100644
--- a/include/lldb/API/SBMemoryRegionInfo.h
+++ b/include/lldb/API/SBMemoryRegionInfo.h
@@ -1,9 +1,8 @@
//===-- SBMemoryRegionInfo.h ------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -28,64 +27,50 @@ public:
void Clear();
- //------------------------------------------------------------------
/// Get the base address of this memory range.
///
- /// @return
+ /// \return
/// The base address of this memory range.
- //------------------------------------------------------------------
lldb::addr_t GetRegionBase();
- //------------------------------------------------------------------
/// Get the end address of this memory range.
///
- /// @return
+ /// \return
/// The base address of this memory range.
- //------------------------------------------------------------------
lldb::addr_t GetRegionEnd();
- //------------------------------------------------------------------
/// Check if this memory address is marked readable to the process.
///
- /// @return
+ /// \return
/// true if this memory address is marked readable
- //------------------------------------------------------------------
bool IsReadable();
- //------------------------------------------------------------------
/// Check if this memory address is marked writable to the process.
///
- /// @return
+ /// \return
/// true if this memory address is marked writable
- //------------------------------------------------------------------
bool IsWritable();
- //------------------------------------------------------------------
/// Check if this memory address is marked executable to the process.
///
- /// @return
+ /// \return
/// true if this memory address is marked executable
- //------------------------------------------------------------------
bool IsExecutable();
- //------------------------------------------------------------------
/// Check if this memory address is mapped into the process address
/// space.
///
- /// @return
+ /// \return
/// true if this memory address is in the process address space.
- //------------------------------------------------------------------
bool IsMapped();
- //------------------------------------------------------------------
/// Returns the name of the memory region mapped at the given
/// address.
///
- /// @return
+ /// \return
/// In case of memory mapped files it is the absolute path of
/// the file otherwise it is a name associated with the memory
/// region. If no name can be determined the returns nullptr.
- //------------------------------------------------------------------
const char *GetName();
bool operator==(const lldb::SBMemoryRegionInfo &rhs) const;
@@ -105,7 +90,7 @@ private:
// Unused.
SBMemoryRegionInfo(const lldb_private::MemoryRegionInfo *lldb_object_ptr);
- lldb::MemoryRegionInfoUP m_opaque_ap;
+ lldb::MemoryRegionInfoUP m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBMemoryRegionInfoList.h b/include/lldb/API/SBMemoryRegionInfoList.h
index 1e67997cdaf1..5592efef4851 100644
--- a/include/lldb/API/SBMemoryRegionInfoList.h
+++ b/include/lldb/API/SBMemoryRegionInfoList.h
@@ -1,9 +1,8 @@
//===-- SBMemoryRegionInfoList.h --------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -48,7 +47,7 @@ private:
const lldb_private::MemoryRegionInfos &ref() const;
- std::unique_ptr<MemoryRegionInfoListImpl> m_opaque_ap;
+ std::unique_ptr<MemoryRegionInfoListImpl> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBModule.h b/include/lldb/API/SBModule.h
index 7a10e9fc96b3..d2b6a18db84d 100644
--- a/include/lldb/API/SBModule.h
+++ b/include/lldb/API/SBModule.h
@@ -1,9 +1,8 @@
//===-- SBModule.h ----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -32,23 +31,22 @@ public:
~SBModule();
+ explicit operator bool() const;
+
bool IsValid() const;
void Clear();
- //------------------------------------------------------------------
/// Get const accessor for the module file specification.
///
/// This function returns the file for the module on the host system
/// that is running LLDB. This can differ from the path on the
/// platform since we might be doing remote debugging.
///
- /// @return
+ /// \return
/// A const reference to the file specification object.
- //------------------------------------------------------------------
lldb::SBFileSpec GetFileSpec() const;
- //------------------------------------------------------------------
/// Get accessor for the module platform file specification.
///
/// Platform file refers to the path of the module as it is known on
@@ -60,14 +58,12 @@ public:
/// '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib'
/// The file could also be cached in a local developer kit directory.
///
- /// @return
+ /// \return
/// A const reference to the file specification object.
- //------------------------------------------------------------------
lldb::SBFileSpec GetPlatformFileSpec() const;
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
@@ -76,12 +72,10 @@ public:
/// the target will install this module on the remote platform prior
/// to launching.
///
- /// @return
+ /// \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
@@ -96,9 +90,8 @@ public:
/// or "./usr/lib", then the install path will be resolved using
/// the platform's current working directory as the base path.
///
- /// @param[in] file
+ /// \param[in] file
/// A file specification object.
- //------------------------------------------------------------------
bool SetRemoteInstallFileSpec(lldb::SBFileSpec &file);
lldb::ByteOrder GetByteOrder();
@@ -129,18 +122,16 @@ public:
lldb::SBCompileUnit GetCompileUnitAtIndex(uint32_t);
- //------------------------------------------------------------------
/// Find compile units related to *this module and passed source
/// file.
///
- /// @param[in] sb_file_spec
+ /// \param[in] sb_file_spec
/// A lldb::SBFileSpec object that contains source file
/// specification.
///
- /// @return
+ /// \return
/// A lldb::SBSymbolContextList that gets filled in with all of
/// the symbol contexts for all the matches.
- //------------------------------------------------------------------
lldb::SBSymbolContextList
FindCompileUnits(const lldb::SBFileSpec &sb_file_spec);
@@ -157,59 +148,53 @@ public:
size_t GetNumSections();
lldb::SBSection GetSectionAtIndex(size_t idx);
- //------------------------------------------------------------------
/// Find functions by name.
///
- /// @param[in] name
+ /// \param[in] name
/// The name of the function we are looking for.
///
- /// @param[in] name_type_mask
+ /// \param[in] name_type_mask
/// A logical OR of one or more FunctionNameType enum bits that
/// indicate what kind of names should be used when doing the
/// lookup. Bits include fully qualified names, base names,
/// C++ methods, or ObjC selectors.
/// See FunctionNameType for more details.
///
- /// @return
+ /// \return
/// A lldb::SBSymbolContextList that gets filled in with all of
/// the symbol contexts for all the matches.
- //------------------------------------------------------------------
lldb::SBSymbolContextList
FindFunctions(const char *name,
uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
- //------------------------------------------------------------------
/// Find global and static variables by name.
///
- /// @param[in] target
+ /// \param[in] target
/// A valid SBTarget instance representing the debuggee.
///
- /// @param[in] name
+ /// \param[in] name
/// The name of the global or static variable we are looking
/// for.
///
- /// @param[in] max_matches
+ /// \param[in] max_matches
/// Allow the number of matches to be limited to \a max_matches.
///
- /// @return
+ /// \return
/// A list of matched variables in an SBValueList.
- //------------------------------------------------------------------
lldb::SBValueList FindGlobalVariables(lldb::SBTarget &target,
const char *name, uint32_t max_matches);
- //------------------------------------------------------------------
/// Find the first global (or static) variable by name.
///
- /// @param[in] target
+ /// \param[in] target
/// A valid SBTarget instance representing the debuggee.
///
- /// @param[in] name
+ /// \param[in] name
/// The name of the global or static variable we are looking
/// for.
///
- /// @return
+ /// \return
/// An SBValue that gets filled in with the found variable (if any).
- //------------------------------------------------------------------
lldb::SBValue FindFirstGlobalVariable(lldb::SBTarget &target,
const char *name);
@@ -217,7 +202,6 @@ public:
lldb::SBTypeList FindTypes(const char *type);
- //------------------------------------------------------------------
/// Get a type using its type ID.
///
/// Each symbol file reader will assign different user IDs to their
@@ -226,34 +210,30 @@ public:
///
/// For DWARF debug info, the type ID is the DIE offset.
///
- /// @param[in] uid
+ /// \param[in] uid
/// The type user ID.
///
- /// @return
+ /// \return
/// An SBType for the given type ID, or an empty SBType if the
/// type was not found.
- //------------------------------------------------------------------
lldb::SBType GetTypeByID(lldb::user_id_t uid);
lldb::SBType GetBasicType(lldb::BasicType type);
- //------------------------------------------------------------------
/// Get all types matching \a type_mask from debug info in this
/// module.
///
- /// @param[in] type_mask
+ /// \param[in] type_mask
/// A bitfield that consists of one or more bits logically OR'ed
/// together from the lldb::TypeClass enumeration. This allows
/// you to request only structure types, or only class, struct
/// and union types. Passing in lldb::eTypeClassAny will return
/// all types found in the debug information for this module.
///
- /// @return
+ /// \return
/// A list of types in this module that match \a type_mask
- //------------------------------------------------------------------
lldb::SBTypeList GetTypes(uint32_t type_mask = lldb::eTypeClassAny);
- //------------------------------------------------------------------
/// Get the module version numbers.
///
/// Many object files have a set of version numbers that describe
@@ -267,7 +247,7 @@ public:
/// function with a value of \a versions and \a num_versions that
/// has enough storage to store some or all version numbers.
///
- /// @param[out] versions
+ /// \param[out] versions
/// A pointer to an array of uint32_t types that is \a num_versions
/// long. If this value is NULL, the return value will indicate
/// how many version numbers are required for a subsequent call
@@ -278,7 +258,7 @@ public:
/// will be filled with \a num_versions UINT32_MAX values
/// and zero will be returned.
///
- /// @param[in] num_versions
+ /// \param[in] num_versions
/// The maximum number of entries to fill into \a versions. If
/// this value is zero, then the return value will indicate
/// how many version numbers there are in total so another call
@@ -288,14 +268,12 @@ public:
/// numbers in this object file, only \a num_versions will be
/// filled into \a versions (if \a versions is non-NULL).
///
- /// @return
+ /// \return
/// This function always returns the number of version numbers
/// that this object file has regardless of the number of
/// version numbers that were copied into \a versions.
- //------------------------------------------------------------------
uint32_t GetVersion(uint32_t *versions, uint32_t num_versions);
- //------------------------------------------------------------------
/// Get accessor for the symbol file specification.
///
/// When debugging an object file an additional debug information can
@@ -303,9 +281,8 @@ public:
/// like '/usr/lib/liba.dylib' then debug information can be located
/// in folder like '/usr/lib/liba.dylib.dSYM/'.
///
- /// @return
+ /// \return
/// A const reference to the file specification object.
- //------------------------------------------------------------------
lldb::SBFileSpec GetSymbolFileSpec() const;
lldb::SBAddress GetObjectFileHeaderAddress() const;
diff --git a/include/lldb/API/SBModuleSpec.h b/include/lldb/API/SBModuleSpec.h
index 1a862703a702..29b3117a261d 100644
--- a/include/lldb/API/SBModuleSpec.h
+++ b/include/lldb/API/SBModuleSpec.h
@@ -1,9 +1,8 @@
//===-- SBModuleSpec.h ------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -25,25 +24,24 @@ public:
const SBModuleSpec &operator=(const SBModuleSpec &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
void Clear();
- //------------------------------------------------------------------
/// Get const accessor for the module file.
///
/// This function returns the file for the module on the host system
/// that is running LLDB. This can differ from the path on the
/// platform since we might be doing remote debugging.
///
- /// @return
+ /// \return
/// A const reference to the file specification object.
- //------------------------------------------------------------------
lldb::SBFileSpec GetFileSpec();
void SetFileSpec(const lldb::SBFileSpec &fspec);
- //------------------------------------------------------------------
/// Get accessor for the module platform file.
///
/// Platform file refers to the path of the module as it is known on
@@ -55,9 +53,8 @@ public:
/// '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib'
/// The file could also be cached in a local developer kit directory.
///
- /// @return
+ /// \return
/// A const reference to the file specification object.
- //------------------------------------------------------------------
lldb::SBFileSpec GetPlatformFileSpec();
void SetPlatformFileSpec(const lldb::SBFileSpec &fspec);
@@ -87,7 +84,7 @@ private:
friend class SBModule;
friend class SBTarget;
- std::unique_ptr<lldb_private::ModuleSpec> m_opaque_ap;
+ std::unique_ptr<lldb_private::ModuleSpec> m_opaque_up;
};
class SBModuleSpecList {
@@ -117,7 +114,7 @@ public:
bool GetDescription(lldb::SBStream &description);
private:
- std::unique_ptr<lldb_private::ModuleSpecList> m_opaque_ap;
+ std::unique_ptr<lldb_private::ModuleSpecList> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBPlatform.h b/include/lldb/API/SBPlatform.h
index 952e31066319..7207b2e2a78d 100644
--- a/include/lldb/API/SBPlatform.h
+++ b/include/lldb/API/SBPlatform.h
@@ -1,9 +1,8 @@
//===-- SBPlatform.h --------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -92,6 +91,8 @@ public:
~SBPlatform();
+ explicit operator bool() const;
+
bool IsValid() const;
void Clear();
@@ -108,9 +109,7 @@ public:
bool IsConnected();
- //----------------------------------------------------------------------
// The following functions will work if the platform is connected
- //----------------------------------------------------------------------
const char *GetTriple();
const char *GetHostname();
diff --git a/include/lldb/API/SBProcess.h b/include/lldb/API/SBProcess.h
index 69cf8b4ce854..863cb3ced674 100644
--- a/include/lldb/API/SBProcess.h
+++ b/include/lldb/API/SBProcess.h
@@ -1,9 +1,8 @@
//===-- SBProcess.h ---------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -23,9 +22,7 @@ class SBEvent;
class LLDB_API SBProcess {
public:
- //------------------------------------------------------------------
/// Broadcaster event bits definitions.
- //------------------------------------------------------------------
FLAGS_ANONYMOUS_ENUM(){eBroadcastBitStateChanged = (1 << 0),
eBroadcastBitInterrupt = (1 << 1),
eBroadcastBitSTDOUT = (1 << 2),
@@ -52,6 +49,8 @@ public:
void Clear();
+ explicit operator bool() const;
+
bool IsValid() const;
lldb::SBTarget GetTarget() const;
@@ -71,11 +70,9 @@ public:
void AppendEventStateReport(const lldb::SBEvent &event,
lldb::SBCommandReturnObject &result);
- //------------------------------------------------------------------
/// Remote connection related functions. These will fail if the
/// process is not in eStateConnected. They are intended for use
/// when connecting to an externally managed debugserver instance.
- //------------------------------------------------------------------
bool RemoteAttachToProcessWithID(lldb::pid_t pid, lldb::SBError &error);
bool RemoteLaunch(char const **argv, char const **envp,
@@ -84,9 +81,7 @@ public:
uint32_t launch_flags, bool stop_at_entry,
lldb::SBError &error);
- //------------------------------------------------------------------
// Thread related functions
- //------------------------------------------------------------------
uint32_t GetNumThreads();
lldb::SBThread GetThreadAtIndex(size_t index);
@@ -97,12 +92,10 @@ public:
lldb::SBThread GetSelectedThread() const;
- //------------------------------------------------------------------
// Function for lazily creating a thread using the current OS plug-in. This
// function will be removed in the future when there are APIs to create
// SBThread objects through the interface and add them to the process through
// the SBProcess API.
- //------------------------------------------------------------------
lldb::SBThread CreateOSPluginThread(lldb::tid_t tid, lldb::addr_t context);
bool SetSelectedThread(const lldb::SBThread &thread);
@@ -111,16 +104,12 @@ public:
bool SetSelectedThreadByIndexID(uint32_t index_id);
- //------------------------------------------------------------------
// Queue related functions
- //------------------------------------------------------------------
uint32_t GetNumQueues();
lldb::SBQueue GetQueueAtIndex(size_t index);
- //------------------------------------------------------------------
// Stepping related functions
- //------------------------------------------------------------------
lldb::StateType GetState();
@@ -128,7 +117,6 @@ public:
const char *GetExitDescription();
- //------------------------------------------------------------------
/// Gets the process ID
///
/// Returns the process identifier for the process as it is known
@@ -136,15 +124,13 @@ public:
/// this is typically the same as if you called "getpid()" in the
/// process.
///
- /// @return
+ /// \return
/// Returns LLDB_INVALID_PROCESS_ID if this object does not
/// contain a valid process object, or if the process has not
/// been launched. Returns a valid process ID if the process is
/// valid.
- //------------------------------------------------------------------
lldb::pid_t GetProcessID();
- //------------------------------------------------------------------
/// Gets the unique ID associated with this process object
///
/// Unique IDs start at 1 and increment up with each new process
@@ -152,11 +138,10 @@ public:
/// create a process with the same process ID, there needs to be a
/// way to tell two process instances apart.
///
- /// @return
+ /// \return
/// Returns a non-zero integer ID if this object contains a
/// valid process object, zero if this object does not contain
/// a valid process object.
- //------------------------------------------------------------------
uint32_t GetUniqueID();
uint32_t GetAddressByteSize() const;
@@ -181,18 +166,16 @@ public:
uint32_t GetStopID(bool include_expression_stops = false);
- //------------------------------------------------------------------
/// Gets the stop event corresponding to stop ID.
//
/// Note that it wasn't fully implemented and tracks only the stop
/// event for the last natural stop ID.
///
- /// @param [in] stop_id
+ /// \param [in] stop_id
/// The ID of the stop event to return.
///
- /// @return
+ /// \return
/// The stop event corresponding to stop ID.
- //------------------------------------------------------------------
lldb::SBEvent GetStopEventForStopID(uint32_t stop_id);
size_t ReadMemory(addr_t addr, void *buf, size_t size, lldb::SBError &error);
@@ -235,10 +218,9 @@ public:
bool GetDescription(lldb::SBStream &description);
- //------------------------------------------------------------------
/// Start Tracing with the given SBTraceOptions.
///
- /// @param[in] options
+ /// \param[in] options
/// Class containing trace options like trace buffer size, meta
/// data buffer size, TraceType and any custom parameters
/// {formatted as a JSON Dictionary}. In case of errors in
@@ -253,95 +235,88 @@ public:
/// parameters, only the parameters recognized by the target
/// would be used and others would be ignored.
///
- /// @param[out] error
+ /// \param[out] error
/// An error explaining what went wrong.
///
- /// @return
+ /// \return
/// A SBTrace instance, which should be used
/// to get the trace data or other trace related operations.
- //------------------------------------------------------------------
lldb::SBTrace StartTrace(SBTraceOptions &options, lldb::SBError &error);
uint32_t GetNumSupportedHardwareWatchpoints(lldb::SBError &error) const;
- //------------------------------------------------------------------
/// Load a shared library into this process.
///
- /// @param[in] remote_image_spec
+ /// \param[in] remote_image_spec
/// The path for the shared library on the target what you want
/// to load.
///
- /// @param[out] error
+ /// \param[out] error
/// An error object that gets filled in with any errors that
/// might occur when trying to load the shared library.
///
- /// @return
+ /// \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 &remote_image_spec, lldb::SBError &error);
- //------------------------------------------------------------------
/// Load a shared library into this process.
///
- /// @param[in] local_image_spec
+ /// \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
+ /// \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
+ /// \param[out] error
/// An error object that gets filled in with any errors that
/// might occur when trying to load the shared library.
///
- /// @return
+ /// \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);
- //------------------------------------------------------------------
/// Load a shared library into this process, starting with a
/// library name and a list of paths, searching along the list of
/// paths till you find a matching library.
///
- /// @param[in] image_spec
+ /// \param[in] image_spec
/// The name of the shared library that you want to load.
/// If image_spec is a relative path, the relative path will be
/// appended to the search paths.
/// If the image_spec is an absolute path, just the basename is used.
///
- /// @param[in] paths
+ /// \param[in] paths
/// A list of paths to search for the library whose basename is
/// local_spec.
///
- /// @param[out] loaded_path
+ /// \param[out] loaded_path
/// If the library was found along the paths, this will store the
/// full path to the found library.
///
- /// @param[out] error
+ /// \param[out] error
/// An error object that gets filled in with any errors that
/// might occur when trying to search for the shared library.
///
- /// @return
+ /// \return
/// A token that represents the shared library that can be
/// later passed to UnloadImage. A value of
/// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
/// library can't be opened.
- //------------------------------------------------------------------
uint32_t LoadImageUsingPaths(const lldb::SBFileSpec &image_spec,
SBStringList &paths,
lldb::SBFileSpec &loaded_path,
@@ -351,7 +326,6 @@ public:
lldb::SBError SendEventData(const char *data);
- //------------------------------------------------------------------
/// Return the number of different thread-origin extended backtraces
/// this process can support.
///
@@ -360,25 +334,22 @@ public:
/// or the work item was enqueued to it (in the case of a libdispatch
/// queue).
///
- /// @return
+ /// \return
/// The number of thread-origin extended backtrace types that may be
/// available.
- //------------------------------------------------------------------
uint32_t GetNumExtendedBacktraceTypes();
- //------------------------------------------------------------------
/// Return the name of one of the thread-origin extended backtrace
/// methods.
///
- /// @param [in] idx
+ /// \param [in] idx
/// The index of the name to return. They will be returned in
/// the order that the user will most likely want to see them.
/// e.g. if the type at index 0 is not available for a thread,
/// see if the type at index 1 provides an extended backtrace.
///
- /// @return
+ /// \return
/// The name at that index.
- //------------------------------------------------------------------
const char *GetExtendedBacktraceTypeAtIndex(uint32_t idx);
lldb::SBThreadCollection GetHistoryThreads(addr_t addr);
@@ -388,40 +359,34 @@ public:
/// Save the state of the process in a core file (or mini dump on Windows).
lldb::SBError SaveCore(const char *file_name);
- //------------------------------------------------------------------
/// Query the address load_addr and store the details of the memory
/// region that contains it in the supplied SBMemoryRegionInfo object.
/// To iterate over all memory regions use GetMemoryRegionList.
///
- /// @param[in] load_addr
+ /// \param[in] load_addr
/// The address to be queried.
///
- /// @param[out] region_info
+ /// \param[out] region_info
/// A reference to an SBMemoryRegionInfo object that will contain
/// the details of the memory region containing load_addr.
///
- /// @return
+ /// \return
/// An error object describes any errors that occurred while
/// querying load_addr.
- //------------------------------------------------------------------
lldb::SBError GetMemoryRegionInfo(lldb::addr_t load_addr,
lldb::SBMemoryRegionInfo &region_info);
- //------------------------------------------------------------------
/// Return the list of memory regions within the process.
///
- /// @return
+ /// \return
/// A list of all witin the process memory regions.
- //------------------------------------------------------------------
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:
diff --git a/include/lldb/API/SBProcessInfo.h b/include/lldb/API/SBProcessInfo.h
index 421227f82c2d..86dba9a8e116 100644
--- a/include/lldb/API/SBProcessInfo.h
+++ b/include/lldb/API/SBProcessInfo.h
@@ -1,9 +1,8 @@
//===-- SBProcessInfo.h -----------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -23,6 +22,8 @@ public:
SBProcessInfo &operator=(const SBProcessInfo &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetName();
@@ -56,7 +57,7 @@ private:
void SetProcessInfo(const lldb_private::ProcessInstanceInfo &proc_info_ref);
- std::unique_ptr<lldb_private::ProcessInstanceInfo> m_opaque_ap;
+ std::unique_ptr<lldb_private::ProcessInstanceInfo> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBQueue.h b/include/lldb/API/SBQueue.h
index 53612c0a125f..0124c1c90dd2 100644
--- a/include/lldb/API/SBQueue.h
+++ b/include/lldb/API/SBQueue.h
@@ -1,9 +1,8 @@
//===-- SBQueue.h -----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -29,6 +28,8 @@ public:
~SBQueue();
+ explicit operator bool() const;
+
bool IsValid() const;
void Clear();
@@ -59,10 +60,6 @@ protected:
void SetQueue(const lldb::QueueSP &queue_sp);
- void FetchThreads();
-
- void FetchItems();
-
private:
std::shared_ptr<lldb_private::QueueImpl> m_opaque_sp;
};
diff --git a/include/lldb/API/SBQueueItem.h b/include/lldb/API/SBQueueItem.h
index 78ca3ba02db1..455a1f98379a 100644
--- a/include/lldb/API/SBQueueItem.h
+++ b/include/lldb/API/SBQueueItem.h
@@ -1,9 +1,8 @@
//===-- SBQueueItem.h -------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -23,6 +22,8 @@ public:
~SBQueueItem();
+ explicit operator bool() const;
+
bool IsValid() const;
void Clear();
diff --git a/include/lldb/API/SBReproducer.h b/include/lldb/API/SBReproducer.h
new file mode 100644
index 000000000000..0f1739d0c5bd
--- /dev/null
+++ b/include/lldb/API/SBReproducer.h
@@ -0,0 +1,28 @@
+//===-- SBReproducer.h ------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_API_SBREPRODUCER_H
+#define LLDB_API_SBREPRODUCER_H
+
+#include "lldb/API/SBDefines.h"
+
+namespace lldb {
+
+/// The SBReproducer class is special because it bootstraps the capture and
+/// replay of SB API calls. As a result we cannot rely on any other SB objects
+/// in the interface or implementation of this class.
+class LLDB_API SBReproducer {
+public:
+ static const char *Capture();
+ static const char *Capture(const char *path);
+ static const char *Replay(const char *path);
+};
+
+} // namespace lldb
+
+#endif
diff --git a/include/lldb/API/SBSection.h b/include/lldb/API/SBSection.h
index ffd8bf7c979b..06a195ee78df 100644
--- a/include/lldb/API/SBSection.h
+++ b/include/lldb/API/SBSection.h
@@ -1,9 +1,8 @@
//===-- SBSection.h ---------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -25,6 +24,8 @@ public:
const lldb::SBSection &operator=(const lldb::SBSection &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetName();
@@ -53,7 +54,6 @@ public:
SectionType GetSectionType();
- //------------------------------------------------------------------
/// Gets the permissions (RWX) of the section of the object file
///
/// Returns a mask of bits of enum lldb::Permissions for this section.
@@ -62,21 +62,18 @@ public:
/// i.e. for a section having read and execute permissions, the value
/// returned is 6
///
- /// @return
+ /// \return
/// Returns an unsigned value for Permissions for the section.
- //------------------------------------------------------------------
uint32_t
GetPermissions() const;
- //------------------------------------------------------------------
/// Return the size of a target's byte represented by this section
/// in numbers of host bytes. Note that certain architectures have
/// varying minimum addressable unit (i.e. byte) size for their
/// CODE or DATA buses.
///
- /// @return
+ /// \return
/// The number of host (8-bit) bytes needed to hold a target byte
- //------------------------------------------------------------------
uint32_t GetTargetByteSize();
bool operator==(const lldb::SBSection &rhs);
diff --git a/include/lldb/API/SBSourceManager.h b/include/lldb/API/SBSourceManager.h
index 6f1c49504d52..3d69aa25a934 100644
--- a/include/lldb/API/SBSourceManager.h
+++ b/include/lldb/API/SBSourceManager.h
@@ -1,9 +1,8 @@
//===-- SBSourceManager.h ---------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -39,10 +38,8 @@ protected:
friend class SBCommandInterpreter;
friend class SBDebugger;
- SBSourceManager(lldb_private::SourceManager *source_manager);
-
private:
- std::unique_ptr<lldb_private::SourceManagerImpl> m_opaque_ap;
+ std::unique_ptr<lldb_private::SourceManagerImpl> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBStream.h b/include/lldb/API/SBStream.h
index 7364ca7797f8..8afbf4575621 100644
--- a/include/lldb/API/SBStream.h
+++ b/include/lldb/API/SBStream.h
@@ -1,9 +1,8 @@
//===-- SBStream.h ----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -24,6 +23,8 @@ public:
~SBStream();
+ explicit operator bool() const;
+
bool IsValid() const;
// If this stream is not redirected to a file, it will maintain a local cache
@@ -95,7 +96,7 @@ protected:
private:
DISALLOW_COPY_AND_ASSIGN(SBStream);
- std::unique_ptr<lldb_private::Stream> m_opaque_ap;
+ std::unique_ptr<lldb_private::Stream> m_opaque_up;
bool m_is_file;
};
diff --git a/include/lldb/API/SBStringList.h b/include/lldb/API/SBStringList.h
index 943384e544cd..1df1e45f96fe 100644
--- a/include/lldb/API/SBStringList.h
+++ b/include/lldb/API/SBStringList.h
@@ -1,9 +1,8 @@
//===-- SBStringList.h ------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -24,6 +23,8 @@ public:
~SBStringList();
+ explicit operator bool() const;
+
bool IsValid() const;
void AppendString(const char *str);
@@ -56,7 +57,7 @@ protected:
const lldb_private::StringList &operator*() const;
private:
- std::unique_ptr<lldb_private::StringList> m_opaque_ap;
+ std::unique_ptr<lldb_private::StringList> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBStructuredData.h b/include/lldb/API/SBStructuredData.h
index 629d4f3e35ee..5b10133500ef 100644
--- a/include/lldb/API/SBStructuredData.h
+++ b/include/lldb/API/SBStructuredData.h
@@ -1,9 +1,8 @@
//===-- SBStructuredData.h --------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -29,6 +28,8 @@ public:
lldb::SBStructuredData &operator=(const lldb::SBStructuredData &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
lldb::SBError SetFromJSON(lldb::SBStream &stream);
@@ -39,69 +40,51 @@ public:
lldb::SBError GetDescription(lldb::SBStream &stream) const;
- //------------------------------------------------------------------
/// 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
// returned.
- //------------------------------------------------------------------
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.
- //------------------------------------------------------------------
lldb::SBStructuredData GetValueForKey(const char *key) const;
- //------------------------------------------------------------------
/// Return the value corresponding to an index if this data structure
/// is array.
- //------------------------------------------------------------------
lldb::SBStructuredData GetItemAtIndex(size_t idx) const;
- //------------------------------------------------------------------
/// Return the integer value if this data structure is an integer type.
- //------------------------------------------------------------------
uint64_t GetIntegerValue(uint64_t fail_value = 0) const;
- //------------------------------------------------------------------
/// Return the floating point value if this data structure is a floating
/// type.
- //------------------------------------------------------------------
double GetFloatValue(double fail_value = 0.0) const;
- //------------------------------------------------------------------
/// Return the boolean value if this data structure is a boolean type.
- //------------------------------------------------------------------
bool GetBooleanValue(bool fail_value = false) const;
- //------------------------------------------------------------------
/// Provides the string value if this data structure is a string type.
///
- /// @param[out] dst
+ /// \param[out] dst
/// pointer where the string value will be written. In case it is null,
- /// nothing will be written at @dst.
+ /// nothing will be written at \a dst.
///
- /// @param[in] dst_len
- /// max number of characters that can be written at @dst. In case it is
- /// zero, nothing will be written at @dst. If this length is not enough
- /// to write the complete string value, (dst_len-1) bytes of the string
- /// value will be written at @dst followed by a null character.
+ /// \param[in] dst_len
+ /// max number of characters that can be written at \a dst. In case it is
+ /// zero, nothing will be written at \a dst. If this length is not enough
+ /// to write the complete string value, (\a dst_len - 1) bytes of the
+ /// string value will be written at \a dst followed by a null character.
///
- /// @return
+ /// \return
/// Returns the byte size needed to completely write the string value at
- /// @dst in all cases.
- //------------------------------------------------------------------
+ /// \a dst in all cases.
size_t GetStringValue(char *dst, size_t dst_len) const;
protected:
diff --git a/include/lldb/API/SBSymbol.h b/include/lldb/API/SBSymbol.h
index a29ac61d2912..52486b83d1a7 100644
--- a/include/lldb/API/SBSymbol.h
+++ b/include/lldb/API/SBSymbol.h
@@ -1,9 +1,8 @@
//===-- SBSymbol.h ----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -27,6 +26,8 @@ public:
const lldb::SBSymbol &operator=(const lldb::SBSymbol &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetName() const;
@@ -54,16 +55,12 @@ public:
bool GetDescription(lldb::SBStream &description);
- //----------------------------------------------------------------------
// Returns true if the symbol is externally visible in the module that it is
// defined in
- //----------------------------------------------------------------------
bool IsExternal();
- //----------------------------------------------------------------------
// Returns true if the symbol was synthetically generated from something
// other than the actual symbol table itself in the object file.
- //----------------------------------------------------------------------
bool IsSynthetic();
protected:
diff --git a/include/lldb/API/SBSymbolContext.h b/include/lldb/API/SBSymbolContext.h
index 9078b5b789e0..3d16d0989ca1 100644
--- a/include/lldb/API/SBSymbolContext.h
+++ b/include/lldb/API/SBSymbolContext.h
@@ -1,9 +1,8 @@
//===-- SBSymbolContext.h ---------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -30,6 +29,8 @@ public:
~SBSymbolContext();
+ explicit operator bool() const;
+
bool IsValid() const;
const lldb::SBSymbolContext &operator=(const lldb::SBSymbolContext &rhs);
@@ -74,7 +75,7 @@ protected:
void SetSymbolContext(const lldb_private::SymbolContext *sc_ptr);
private:
- std::unique_ptr<lldb_private::SymbolContext> m_opaque_ap;
+ std::unique_ptr<lldb_private::SymbolContext> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBSymbolContextList.h b/include/lldb/API/SBSymbolContextList.h
index e7299dd5330c..577993ce96dd 100644
--- a/include/lldb/API/SBSymbolContextList.h
+++ b/include/lldb/API/SBSymbolContextList.h
@@ -1,9 +1,8 @@
//===-- SBSymbolContextList.h -----------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -26,6 +25,8 @@ public:
const lldb::SBSymbolContextList &
operator=(const lldb::SBSymbolContextList &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
uint32_t GetSize() const;
@@ -49,7 +50,7 @@ protected:
lldb_private::SymbolContextList &operator*() const;
private:
- std::unique_ptr<lldb_private::SymbolContextList> m_opaque_ap;
+ std::unique_ptr<lldb_private::SymbolContextList> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBTarget.h b/include/lldb/API/SBTarget.h
index 18de267fee00..80a7fa00dbc5 100644
--- a/include/lldb/API/SBTarget.h
+++ b/include/lldb/API/SBTarget.h
@@ -1,9 +1,8 @@
//===-- SBTarget.h ----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -29,9 +28,7 @@ class SBPlatform;
class LLDB_API SBTarget {
public:
- //------------------------------------------------------------------
// Broadcaster bits.
- //------------------------------------------------------------------
enum {
eBroadcastBitBreakpointChanged = (1 << 0),
eBroadcastBitModulesLoaded = (1 << 1),
@@ -40,22 +37,20 @@ public:
eBroadcastBitSymbolsLoaded = (1 << 4)
};
- //------------------------------------------------------------------
// Constructors
- //------------------------------------------------------------------
SBTarget();
SBTarget(const lldb::SBTarget &rhs);
SBTarget(const lldb::TargetSP &target_sp);
- //------------------------------------------------------------------
// Destructor
- //------------------------------------------------------------------
~SBTarget();
const lldb::SBTarget &operator=(const lldb::SBTarget &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
static bool EventIsTargetEvent(const lldb::SBEvent &event);
@@ -71,45 +66,34 @@ public:
lldb::SBProcess GetProcess();
- //------------------------------------------------------------------
/// Sets whether we should collect statistics on lldb or not.
///
- /// @param[in] v
+ /// \param[in] v
/// A boolean to control the collection.
- /// @return
- /// void
- //------------------------------------------------------------------
void SetCollectingStats(bool v);
- //------------------------------------------------------------------
/// Returns whether statistics collection are enabled.
///
- /// @return
+ /// \return
/// true if statistics are currently being collected, false
/// otherwise.
- //------------------------------------------------------------------
bool GetCollectingStats();
- //------------------------------------------------------------------
/// Returns a dump of the collected statistics.
///
- /// @return
+ /// \return
/// A SBStructuredData with the statistics collected.
- //------------------------------------------------------------------
lldb::SBStructuredData GetStatistics();
- //------------------------------------------------------------------
/// Return the platform object associated with the target.
///
/// After return, the platform object should be checked for
/// validity.
///
- /// @return
+ /// \return
/// A platform object.
- //------------------------------------------------------------------
lldb::SBPlatform GetPlatform();
- //------------------------------------------------------------------
/// Install any binaries that need to be installed.
///
/// This function does nothing when debugging on the host system.
@@ -119,13 +103,11 @@ public:
/// have an install location set, it will be installed in the remote
/// platform's working directory.
///
- /// @return
+ /// \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
@@ -135,49 +117,48 @@ public:
/// optionally re-directed to \a stdin_path, \a stdout_path, and
/// \a stderr_path.
///
- /// @param[in] listener
+ /// \param[in] listener
/// An optional listener that will receive all process events.
/// If \a listener is valid then \a listener will listen to all
/// process events. If not valid, then this target's debugger
/// (SBTarget::GetDebugger()) will listen to all process events.
///
- /// @param[in] argv
+ /// \param[in] argv
/// The argument array.
///
- /// @param[in] envp
+ /// \param[in] envp
/// The environment array.
///
- /// @param[in] stdin_path
+ /// \param[in] stdin_path
/// The path to use when re-directing the STDIN of the new
/// process. If all stdXX_path arguments are nullptr, a pseudo
/// terminal will be used.
///
- /// @param[in] stdout_path
+ /// \param[in] stdout_path
/// The path to use when re-directing the STDOUT of the new
/// process. If all stdXX_path arguments are nullptr, a pseudo
/// terminal will be used.
///
- /// @param[in] stderr_path
+ /// \param[in] stderr_path
/// The path to use when re-directing the STDERR of the new
/// process. If all stdXX_path arguments are nullptr, a pseudo
/// terminal will be used.
///
- /// @param[in] working_directory
+ /// \param[in] working_directory
/// The working directory to have the child process run in
///
- /// @param[in] launch_flags
+ /// \param[in] launch_flags
/// Some launch options specified by logical OR'ing
/// lldb::LaunchFlags enumeration values together.
///
- /// @param[in] stop_at_entry
+ /// \param[in] stop_at_entry
/// If false do not stop the inferior at the entry point.
///
- /// @param[out] error
+ /// \param[out] error
/// An error object. Contains the reason if there is some failure.
///
- /// @return
+ /// \return
/// A process object for the newly created process.
- //------------------------------------------------------------------
lldb::SBProcess Launch(SBListener &listener, char const **argv,
char const **envp, const char *stdin_path,
const char *stdout_path, const char *stderr_path,
@@ -188,16 +169,15 @@ public:
SBProcess LoadCore(const char *core_file);
SBProcess LoadCore(const char *core_file, lldb::SBError &error);
- //------------------------------------------------------------------
/// Launch a new process with sensible defaults.
///
- /// @param[in] argv
+ /// \param[in] argv
/// The argument array.
///
- /// @param[in] envp
+ /// \param[in] envp
/// The environment array.
///
- /// @param[in] working_directory
+ /// \param[in] working_directory
/// The working directory to have the child process run in
///
/// Default: listener
@@ -211,9 +191,8 @@ public:
/// Default: stderr_path
/// A pseudo terminal will be used.
///
- /// @return
+ /// \return
/// A process object for the newly created process.
- //------------------------------------------------------------------
SBProcess LaunchSimple(const char **argv, const char **envp,
const char *working_directory);
@@ -221,73 +200,67 @@ public:
SBProcess Attach(SBAttachInfo &attach_info, SBError &error);
- //------------------------------------------------------------------
/// Attach to process with pid.
///
- /// @param[in] listener
+ /// \param[in] listener
/// An optional listener that will receive all process events.
/// If \a listener is valid then \a listener will listen to all
/// process events. If not valid, then this target's debugger
/// (SBTarget::GetDebugger()) will listen to all process events.
///
- /// @param[in] pid
+ /// \param[in] pid
/// The process ID to attach to.
///
- /// @param[out] error
+ /// \param[out] error
/// An error explaining what went wrong if attach fails.
///
- /// @return
+ /// \return
/// A process object for the attached process.
- //------------------------------------------------------------------
lldb::SBProcess AttachToProcessWithID(SBListener &listener, lldb::pid_t pid,
lldb::SBError &error);
- //------------------------------------------------------------------
/// Attach to process with name.
///
- /// @param[in] listener
+ /// \param[in] listener
/// An optional listener that will receive all process events.
/// If \a listener is valid then \a listener will listen to all
/// process events. If not valid, then this target's debugger
/// (SBTarget::GetDebugger()) will listen to all process events.
///
- /// @param[in] name
+ /// \param[in] name
/// Basename of process to attach to.
///
- /// @param[in] wait_for
+ /// \param[in] wait_for
/// If true wait for a new instance of 'name' to be launched.
///
- /// @param[out] error
+ /// \param[out] error
/// An error explaining what went wrong if attach fails.
///
- /// @return
+ /// \return
/// A process object for the attached process.
- //------------------------------------------------------------------
lldb::SBProcess AttachToProcessWithName(SBListener &listener,
const char *name, bool wait_for,
lldb::SBError &error);
- //------------------------------------------------------------------
/// Connect to a remote debug server with url.
///
- /// @param[in] listener
+ /// \param[in] listener
/// An optional listener that will receive all process events.
/// If \a listener is valid then \a listener will listen to all
/// process events. If not valid, then this target's debugger
/// (SBTarget::GetDebugger()) will listen to all process events.
///
- /// @param[in] url
+ /// \param[in] url
/// The url to connect to, e.g., 'connect://localhost:12345'.
///
- /// @param[in] plugin_name
+ /// \param[in] plugin_name
/// The plugin name to be used; can be nullptr.
///
- /// @param[out] error
+ /// \param[out] error
/// An error explaining what went wrong if the connect fails.
///
- /// @return
+ /// \return
/// A process object for the connected process.
- //------------------------------------------------------------------
lldb::SBProcess ConnectRemote(SBListener &listener, const char *url,
const char *plugin_name, SBError &error);
@@ -317,18 +290,16 @@ public:
lldb::SBModule FindModule(const lldb::SBFileSpec &file_spec);
- //------------------------------------------------------------------
/// Find compile units related to *this target and passed source
/// file.
///
- /// @param[in] sb_file_spec
+ /// \param[in] sb_file_spec
/// A lldb::SBFileSpec object that contains source file
/// specification.
///
- /// @return
+ /// \return
/// A lldb::SBSymbolContextList that gets filled in with all of
/// the symbol contexts for all the matches.
- //------------------------------------------------------------------
lldb::SBSymbolContextList
FindCompileUnits(const lldb::SBFileSpec &sb_file_spec);
@@ -338,55 +309,46 @@ public:
const char *GetTriple();
- //------------------------------------------------------------------
/// Architecture data byte width accessor
///
- /// @return
+ /// \return
/// The size in 8-bit (host) bytes of a minimum addressable
/// unit from the Architecture's data bus
- //------------------------------------------------------------------
uint32_t GetDataByteSize();
- //------------------------------------------------------------------
/// Architecture code byte width accessor
///
- /// @return
+ /// \return
/// The size in 8-bit (host) bytes of a minimum addressable
/// unit from the Architecture's code bus
- //------------------------------------------------------------------
uint32_t GetCodeByteSize();
- //------------------------------------------------------------------
/// Set the base load address for a module section.
///
- /// @param[in] section
+ /// \param[in] section
/// The section whose base load address will be set within this
/// target.
///
- /// @param[in] section_base_addr
+ /// \param[in] section_base_addr
/// The base address for the section.
///
- /// @return
+ /// \return
/// An error to indicate success, fail, and any reason for
/// failure.
- //------------------------------------------------------------------
lldb::SBError SetSectionLoadAddress(lldb::SBSection section,
lldb::addr_t section_base_addr);
- //------------------------------------------------------------------
/// Clear the base load address for a module section.
///
- /// @param[in] section
+ /// \param[in] section
/// The section whose base load address will be cleared within
/// this target.
///
- /// @return
+ /// \return
/// An error to indicate success, fail, and any reason for
/// failure.
- //------------------------------------------------------------------
lldb::SBError ClearSectionLoadAddress(lldb::SBSection section);
- //------------------------------------------------------------------
/// Slide all file addresses for all module sections so that \a module
/// appears to loaded at these slide addresses.
///
@@ -395,150 +357,132 @@ public:
/// this function will allow you to easily and quickly slide all
/// module sections.
///
- /// @param[in] module
+ /// \param[in] module
/// The module to load.
///
- /// @param[in] sections_offset
+ /// \param[in] sections_offset
/// An offset that will be applied to all section file addresses
/// (the virtual addresses found in the object file itself).
///
- /// @return
+ /// \return
/// An error to indicate success, fail, and any reason for
/// failure.
- //------------------------------------------------------------------
lldb::SBError SetModuleLoadAddress(lldb::SBModule module,
int64_t sections_offset);
- //------------------------------------------------------------------
/// Clear the section base load addresses for all sections in a module.
///
- /// @param[in] module
+ /// \param[in] module
/// The module to unload.
///
- /// @return
+ /// \return
/// An error to indicate success, fail, and any reason for
/// failure.
- //------------------------------------------------------------------
lldb::SBError ClearModuleLoadAddress(lldb::SBModule module);
- //------------------------------------------------------------------
/// Find functions by name.
///
- /// @param[in] name
+ /// \param[in] name
/// The name of the function we are looking for.
///
- /// @param[in] name_type_mask
+ /// \param[in] name_type_mask
/// A logical OR of one or more FunctionNameType enum bits that
/// indicate what kind of names should be used when doing the
/// lookup. Bits include fully qualified names, base names,
/// C++ methods, or ObjC selectors.
/// See FunctionNameType for more details.
///
- /// @return
+ /// \return
/// A lldb::SBSymbolContextList that gets filled in with all of
/// the symbol contexts for all the matches.
- //------------------------------------------------------------------
lldb::SBSymbolContextList
FindFunctions(const char *name,
uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
- //------------------------------------------------------------------
/// Find global and static variables by name.
///
- /// @param[in] name
+ /// \param[in] name
/// The name of the global or static variable we are looking
/// for.
///
- /// @param[in] max_matches
+ /// \param[in] max_matches
/// Allow the number of matches to be limited to \a max_matches.
///
- /// @return
+ /// \return
/// A list of matched variables in an SBValueList.
- //------------------------------------------------------------------
lldb::SBValueList FindGlobalVariables(const char *name, uint32_t max_matches);
- //------------------------------------------------------------------
/// Find the first global (or static) variable by name.
///
- /// @param[in] name
+ /// \param[in] name
/// The name of the global or static variable we are looking
/// for.
///
- /// @return
+ /// \return
/// An SBValue that gets filled in with the found variable (if any).
- //------------------------------------------------------------------
lldb::SBValue FindFirstGlobalVariable(const char *name);
- //------------------------------------------------------------------
/// Find global and static variables by pattern.
///
- /// @param[in] name
+ /// \param[in] name
/// The pattern to search for global or static variables
///
- /// @param[in] max_matches
+ /// \param[in] max_matches
/// Allow the number of matches to be limited to \a max_matches.
///
- /// @param[in] matchtype
+ /// \param[in] matchtype
/// The match type to use.
///
- /// @return
+ /// \return
/// A list of matched variables in an SBValueList.
- //------------------------------------------------------------------
lldb::SBValueList FindGlobalVariables(const char *name, uint32_t max_matches,
MatchType matchtype);
- //------------------------------------------------------------------
/// Find global functions by their name with pattern matching.
///
- /// @param[in] name
+ /// \param[in] name
/// The pattern to search for global or static variables
///
- /// @param[in] max_matches
+ /// \param[in] max_matches
/// Allow the number of matches to be limited to \a max_matches.
///
- /// @param[in] matchtype
+ /// \param[in] matchtype
/// The match type to use.
///
- /// @return
+ /// \return
/// A list of matched variables in an SBValueList.
- //------------------------------------------------------------------
lldb::SBSymbolContextList FindGlobalFunctions(const char *name,
uint32_t max_matches,
MatchType matchtype);
void Clear();
- //------------------------------------------------------------------
/// Resolve a current file address into a section offset address.
///
- /// @param[in] file_addr
+ /// \param[in] file_addr
/// The file address to resolve.
///
- /// @return
+ /// \return
/// An SBAddress which will be valid if...
- //------------------------------------------------------------------
lldb::SBAddress ResolveFileAddress(lldb::addr_t file_addr);
- //------------------------------------------------------------------
/// Resolve a current load address into a section offset address.
///
- /// @param[in] vm_addr
+ /// \param[in] vm_addr
/// A virtual address from the current process state that is to
/// be translated into a section offset address.
///
- /// @return
+ /// \return
/// An SBAddress which will be valid if \a vm_addr was
/// successfully resolved into a section offset address, or an
/// invalid SBAddress if \a vm_addr doesn't resolve to a section
/// in a module.
- //------------------------------------------------------------------
lldb::SBAddress ResolveLoadAddress(lldb::addr_t vm_addr);
- //------------------------------------------------------------------
/// Resolve a current load address into a section offset address
/// using the process stop ID to identify a time in the past.
///
- /// @param[in] stop_id
+ /// \param[in] stop_id
/// Each time a process stops, the process stop ID integer gets
/// incremented. These stop IDs are used to identify past times
/// and can be used in history objects as a cheap way to store
@@ -546,44 +490,41 @@ public:
/// UINT32_MAX will always resolve the address using the
/// currently loaded sections.
///
- /// @param[in] vm_addr
+ /// \param[in] vm_addr
/// A virtual address from the current process state that is to
/// be translated into a section offset address.
///
- /// @return
+ /// \return
/// An SBAddress which will be valid if \a vm_addr was
/// successfully resolved into a section offset address, or an
/// invalid SBAddress if \a vm_addr doesn't resolve to a section
/// in a module.
- //------------------------------------------------------------------
lldb::SBAddress ResolvePastLoadAddress(uint32_t stop_id,
lldb::addr_t vm_addr);
SBSymbolContext ResolveSymbolContextForAddress(const SBAddress &addr,
uint32_t resolve_scope);
- //------------------------------------------------------------------
/// Read target memory. If a target process is running then memory
/// is read from here. Otherwise the memory is read from the object
/// files. For a target whose bytes are sized as a multiple of host
/// bytes, the data read back will preserve the target's byte order.
///
- /// @param[in] addr
+ /// \param[in] addr
/// A target address to read from.
///
- /// @param[out] buf
+ /// \param[out] buf
/// The buffer to read memory into.
///
- /// @param[in] size
+ /// \param[in] size
/// The maximum number of host bytes to read in the buffer passed
/// into this call
///
- /// @param[out] error
+ /// \param[out] error
/// Status information is written here if the memory read fails.
///
- /// @return
+ /// \return
/// The amount of data read in host bytes.
- //------------------------------------------------------------------
size_t ReadMemory(const SBAddress addr, void *buf, size_t size,
lldb::SBError &error);
@@ -684,30 +625,28 @@ public:
lldb::SBBreakpoint BreakpointCreateBySBAddress(SBAddress &address);
- //------------------------------------------------------------------
/// Create a breakpoint using a scripted resolver.
///
- /// @param[in] class_name
+ /// \param[in] class_name
/// This is the name of the class that implements a scripted resolver.
///
- /// @param[in] extra_args
+ /// \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
+ /// \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
+ /// \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
+ /// \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,
@@ -715,71 +654,63 @@ public:
const SBFileSpecList &file_list,
bool request_hardware = false);
- //------------------------------------------------------------------
/// Read breakpoints from source_file and return the newly created
/// breakpoints in bkpt_list.
///
- /// @param[in] source_file
+ /// \param[in] source_file
/// The file from which to read the breakpoints.
///
- /// @param[out] new_bps
+ /// \param[out] new_bps
/// A list of the newly created breakpoints.
///
- /// @return
+ /// \return
/// An SBError detailing any errors in reading in the breakpoints.
- //------------------------------------------------------------------
lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file,
SBBreakpointList &new_bps);
- //------------------------------------------------------------------
/// Read breakpoints from source_file and return the newly created
/// breakpoints in bkpt_list.
///
- /// @param[in] source_file
+ /// \param[in] source_file
/// The file from which to read the breakpoints.
///
- /// @param[in] matching_names
+ /// \param[in] matching_names
/// Only read in breakpoints whose names match one of the names in this
/// list.
///
- /// @param[out] new_bps
+ /// \param[out] new_bps
/// A list of the newly created breakpoints.
///
- /// @return
+ /// \return
/// An SBError detailing any errors in reading in the breakpoints.
- //------------------------------------------------------------------
lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file,
SBStringList &matching_names,
SBBreakpointList &new_bps);
- //------------------------------------------------------------------
/// Write breakpoints to dest_file.
///
- /// @param[in] dest_file
+ /// \param[in] dest_file
/// The file to which to write the breakpoints.
///
- /// @return
+ /// \return
/// An SBError detailing any errors in writing in the breakpoints.
- //------------------------------------------------------------------
lldb::SBError BreakpointsWriteToFile(SBFileSpec &dest_file);
- //------------------------------------------------------------------
/// Write breakpoints listed in bkpt_list to dest_file.
///
- /// @param[in] dest_file
+ /// \param[in] dest_file
/// The file to which to write the breakpoints.
///
- /// @param[in] bkpt_list
+ /// \param[in] bkpt_list
/// Only write breakpoints from this list.
///
- /// @param[in] append
- /// If \btrue, append the breakpoints in bkpt_list to the others
+ /// \param[in] append
+ /// If \b true, append the breakpoints in bkpt_list to the others
/// serialized in dest_file. If dest_file doesn't exist, then a new
/// file will be created and the breakpoints in bkpt_list written to it.
///
- /// @return
+ /// \return
/// An SBError detailing any errors in writing in the breakpoints.
- //------------------------------------------------------------------
lldb::SBError BreakpointsWriteToFile(SBFileSpec &dest_file,
SBBreakpointList &bkpt_list,
bool append = false);
@@ -905,10 +836,8 @@ protected:
friend class SBValue;
friend class SBVariablesOptions;
- //------------------------------------------------------------------
// Constructors are private, use static Target::Create function to create an
// instance of this class.
- //------------------------------------------------------------------
lldb::TargetSP GetSP() const;
diff --git a/include/lldb/API/SBThread.h b/include/lldb/API/SBThread.h
index 63816eef51b7..da8726a2a9b2 100644
--- a/include/lldb/API/SBThread.h
+++ b/include/lldb/API/SBThread.h
@@ -1,9 +1,8 @@
//===-- SBThread.h ----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -40,6 +39,8 @@ public:
lldb::SBQueue GetQueue() const;
+ explicit operator bool() const;
+
bool IsValid() const;
void Clear();
@@ -50,7 +51,6 @@ public:
/// See also GetStopReasonDataAtIndex().
size_t GetStopReasonDataCount();
- //--------------------------------------------------------------------------
/// Get information associated with a stop reason.
///
/// Breakpoint stop reasons will have data that consists of pairs of
@@ -67,7 +67,6 @@ public:
/// eStopReasonException N exception data
/// eStopReasonExec 0
/// eStopReasonPlanComplete 0
- //--------------------------------------------------------------------------
uint64_t GetStopReasonDataAtIndex(uint32_t idx);
bool GetStopReasonExtendedInfoAsJSON(lldb::SBStream &stream);
@@ -133,7 +132,6 @@ public:
SBError UnwindInnermostExpression();
- //--------------------------------------------------------------------------
/// LLDB currently supports process centric debugging which means when any
/// thread in a process stops, all other threads are stopped. The Suspend()
/// call here tells our process to suspend a thread and not let it run when
@@ -153,7 +151,6 @@ public:
/// Suspend() and Resume() functions are not currently reference counted, if
/// anyone has the need for them to be reference counted, please let us
/// know.
- //--------------------------------------------------------------------------
bool Suspend();
bool Suspend(SBError &error);
@@ -204,14 +201,7 @@ public:
bool SafeToCallFunctions();
-#ifndef SWIG
- lldb_private::Thread *operator->();
-
- lldb_private::Thread *get();
-
-#endif
-
-protected:
+private:
friend class SBBreakpoint;
friend class SBBreakpointLocation;
friend class SBBreakpointCallbackBaton;
@@ -222,16 +212,18 @@ protected:
friend class SBValue;
friend class lldb_private::QueueImpl;
friend class SBQueueItem;
+ friend class SBThreadPlan;
void SetThread(const lldb::ThreadSP &lldb_object_sp);
-#ifndef SWIG
SBError ResumeNewPlan(lldb_private::ExecutionContext &exe_ctx,
lldb_private::ThreadPlan *new_plan);
-#endif
-private:
lldb::ExecutionContextRefSP m_opaque_sp;
+
+ lldb_private::Thread *operator->();
+
+ lldb_private::Thread *get();
};
} // namespace lldb
diff --git a/include/lldb/API/SBThreadCollection.h b/include/lldb/API/SBThreadCollection.h
index 715b0826b962..1c6b4639c6ef 100644
--- a/include/lldb/API/SBThreadCollection.h
+++ b/include/lldb/API/SBThreadCollection.h
@@ -1,9 +1,8 @@
//===-- SBThreadCollection.h ------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -24,6 +23,8 @@ public:
~SBThreadCollection();
+ explicit operator bool() const;
+
bool IsValid() const;
size_t GetSize();
diff --git a/include/lldb/API/SBThreadPlan.h b/include/lldb/API/SBThreadPlan.h
index 5084a427e1b8..007e9e2de21a 100644
--- a/include/lldb/API/SBThreadPlan.h
+++ b/include/lldb/API/SBThreadPlan.h
@@ -1,9 +1,8 @@
-//===-- SBThread.h ----------------------------------------------*- C++ -*-===//
+//===-- SBThreadPlan.h ------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -31,6 +30,8 @@ public:
~SBThreadPlan();
+ explicit operator bool() const;
+
bool IsValid() const;
void Clear();
@@ -41,7 +42,6 @@ public:
/// See also GetStopReasonDataAtIndex().
size_t GetStopReasonDataCount();
- //--------------------------------------------------------------------------
/// Get information associated with a stop reason.
///
/// Breakpoint stop reasons will have data that consists of pairs of
@@ -58,7 +58,6 @@ public:
/// eStopReasonException N exception data
/// eStopReasonExec 0
/// eStopReasonPlanComplete 0
- //--------------------------------------------------------------------------
uint64_t GetStopReasonDataAtIndex(uint32_t idx);
SBThread GetThread() const;
@@ -102,11 +101,7 @@ public:
SBThreadPlan QueueThreadPlanForStepScripted(const char *script_class_name,
SBError &error);
-#ifndef SWIG
- lldb_private::ThreadPlan *get();
-#endif
-
-protected:
+private:
friend class SBBreakpoint;
friend class SBBreakpointLocation;
friend class SBFrame;
@@ -116,11 +111,9 @@ protected:
friend class lldb_private::QueueImpl;
friend class SBQueueItem;
-#ifndef SWIG
+ lldb_private::ThreadPlan *get();
void SetThreadPlan(const lldb::ThreadPlanSP &lldb_object_sp);
-#endif
-private:
lldb::ThreadPlanSP m_opaque_sp;
};
diff --git a/include/lldb/API/SBTrace.h b/include/lldb/API/SBTrace.h
index 244a01e5ce11..87c67adac75b 100644
--- a/include/lldb/API/SBTrace.h
+++ b/include/lldb/API/SBTrace.h
@@ -1,9 +1,8 @@
//===-- SBTrace.h -----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -20,25 +19,24 @@ namespace lldb {
class LLDB_API SBTrace {
public:
SBTrace();
- //------------------------------------------------------------------
/// Obtain the trace data as raw bytes.
///
- /// @param[out] error
+ /// \param[out] error
/// An error explaining what went wrong.
///
- /// @param[in] buf
+ /// \param[in] buf
/// Buffer to write the trace data to.
///
- /// @param[in] size
+ /// \param[in] size
/// The size of the buffer used to read the data. This is
/// also the size of the data intended to read. It is also
/// possible to partially read the trace data for some trace
/// technologies by specifying a smaller buffer.
///
- /// @param[in] offset
+ /// \param[in] offset
/// The start offset to begin reading the trace data.
///
- /// @param[in] thread_id
+ /// \param[in] thread_id
/// Tracing could be started for the complete process or a
/// single thread, in the first case the traceid obtained would
/// map to all the threads existing within the process and the
@@ -46,28 +44,24 @@ public:
/// such a scenario to select the trace data for a specific
/// thread.
///
- /// @return
+ /// \return
/// The size of the trace data effectively read by the API call.
- //------------------------------------------------------------------
size_t GetTraceData(SBError &error, void *buf, size_t size, size_t offset = 0,
lldb::tid_t thread_id = LLDB_INVALID_THREAD_ID);
- //------------------------------------------------------------------
/// Obtain any meta data as raw bytes for the tracing instance.
/// The input parameter definition is similar to the previous
/// function.
- //------------------------------------------------------------------
size_t GetMetaData(SBError &error, void *buf, size_t size, size_t offset = 0,
lldb::tid_t thread_id = LLDB_INVALID_THREAD_ID);
- //------------------------------------------------------------------
/// Stop the tracing instance. Stopping the trace will also
/// lead to deletion of any gathered trace data.
///
- /// @param[out] error
+ /// \param[out] error
/// An error explaining what went wrong.
///
- /// @param[in] thread_id
+ /// \param[in] thread_id
/// The trace id could map to a tracing instance for a thread
/// or could also map to a group of threads being traced with
/// the same trace options. A thread_id is normally optional
@@ -81,26 +75,25 @@ public:
/// trace id of the process.
/// Now if the StopTrace API is called for the whole process,
/// thread A will not be stopped and must be stopped separately.
- //------------------------------------------------------------------
void StopTrace(SBError &error,
lldb::tid_t thread_id = LLDB_INVALID_THREAD_ID);
- //------------------------------------------------------------------
/// Get the trace configuration being used for the trace instance.
/// The threadid in the SBTraceOptions needs to be set when the
/// configuration used by a specific thread is being requested.
///
- /// @param[out] options
+ /// \param[out] options
/// The trace options actually used by the trace instance
/// would be filled by the API.
///
- /// @param[out] error
+ /// \param[out] error
/// An error explaining what went wrong.
- //------------------------------------------------------------------
void GetTraceConfig(SBTraceOptions &options, SBError &error);
lldb::user_id_t GetTraceUID();
+ explicit operator bool() const;
+
bool IsValid();
protected:
diff --git a/include/lldb/API/SBTraceOptions.h b/include/lldb/API/SBTraceOptions.h
index c9735e1ca246..4c586bfd55c4 100644
--- a/include/lldb/API/SBTraceOptions.h
+++ b/include/lldb/API/SBTraceOptions.h
@@ -1,9 +1,8 @@
//===-- SBTraceOptions ------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -45,6 +44,8 @@ public:
lldb::tid_t getThreadID();
+ explicit operator bool() const;
+
bool IsValid();
protected:
diff --git a/include/lldb/API/SBType.h b/include/lldb/API/SBType.h
index 0dde0257909f..b3f92b7bcd04 100644
--- a/include/lldb/API/SBType.h
+++ b/include/lldb/API/SBType.h
@@ -1,9 +1,8 @@
//===-- SBType.h ------------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -26,6 +25,8 @@ public:
lldb::SBTypeMember &operator=(const lldb::SBTypeMember &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetName();
@@ -52,7 +53,7 @@ protected:
const lldb_private::TypeMemberImpl &ref() const;
- std::unique_ptr<lldb_private::TypeMemberImpl> m_opaque_ap;
+ std::unique_ptr<lldb_private::TypeMemberImpl> m_opaque_up;
};
class SBTypeMemberFunction {
@@ -65,6 +66,8 @@ public:
lldb::SBTypeMemberFunction &operator=(const lldb::SBTypeMemberFunction &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetName();
@@ -106,6 +109,8 @@ public:
~SBType();
+ explicit operator bool() const;
+
bool IsValid() const;
uint64_t GetByteSize();
@@ -236,6 +241,8 @@ public:
lldb::SBTypeList &operator=(const lldb::SBTypeList &rhs);
+ explicit operator bool() const;
+
bool IsValid();
void Append(lldb::SBType type);
@@ -245,7 +252,7 @@ public:
uint32_t GetSize();
private:
- std::unique_ptr<lldb_private::TypeListImpl> m_opaque_ap;
+ std::unique_ptr<lldb_private::TypeListImpl> m_opaque_up;
friend class SBModule;
friend class SBCompileUnit;
};
diff --git a/include/lldb/API/SBTypeCategory.h b/include/lldb/API/SBTypeCategory.h
index f44dfc451e44..c0f4cee1d268 100644
--- a/include/lldb/API/SBTypeCategory.h
+++ b/include/lldb/API/SBTypeCategory.h
@@ -1,10 +1,9 @@
//===-- SBTypeCategory.h --------------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -23,6 +22,8 @@ public:
~SBTypeCategory();
+ explicit operator bool() const;
+
bool IsValid() const;
bool GetEnabled();
@@ -46,9 +47,7 @@ public:
uint32_t GetNumFilters();
-#ifndef LLDB_DISABLE_PYTHON
uint32_t GetNumSynthetics();
-#endif
SBTypeNameSpecifier GetTypeNameSpecifierForFilterAtIndex(uint32_t);
@@ -56,43 +55,29 @@ public:
SBTypeNameSpecifier GetTypeNameSpecifierForSummaryAtIndex(uint32_t);
-#ifndef LLDB_DISABLE_PYTHON
SBTypeNameSpecifier GetTypeNameSpecifierForSyntheticAtIndex(uint32_t);
-#endif
SBTypeFilter GetFilterForType(SBTypeNameSpecifier);
SBTypeFormat GetFormatForType(SBTypeNameSpecifier);
-#ifndef LLDB_DISABLE_PYTHON
SBTypeSummary GetSummaryForType(SBTypeNameSpecifier);
-#endif
-#ifndef LLDB_DISABLE_PYTHON
SBTypeSynthetic GetSyntheticForType(SBTypeNameSpecifier);
-#endif
-#ifndef LLDB_DISABLE_PYTHON
SBTypeFilter GetFilterAtIndex(uint32_t);
-#endif
SBTypeFormat GetFormatAtIndex(uint32_t);
-#ifndef LLDB_DISABLE_PYTHON
SBTypeSummary GetSummaryAtIndex(uint32_t);
-#endif
-#ifndef LLDB_DISABLE_PYTHON
SBTypeSynthetic GetSyntheticAtIndex(uint32_t);
-#endif
bool AddTypeFormat(SBTypeNameSpecifier, SBTypeFormat);
bool DeleteTypeFormat(SBTypeNameSpecifier);
-#ifndef LLDB_DISABLE_PYTHON
bool AddTypeSummary(SBTypeNameSpecifier, SBTypeSummary);
-#endif
bool DeleteTypeSummary(SBTypeNameSpecifier);
@@ -100,11 +85,9 @@ public:
bool DeleteTypeFilter(SBTypeNameSpecifier);
-#ifndef LLDB_DISABLE_PYTHON
bool AddTypeSynthetic(SBTypeNameSpecifier, SBTypeSynthetic);
bool DeleteTypeSynthetic(SBTypeNameSpecifier);
-#endif
lldb::SBTypeCategory &operator=(const lldb::SBTypeCategory &rhs);
diff --git a/include/lldb/API/SBTypeEnumMember.h b/include/lldb/API/SBTypeEnumMember.h
index f45c234d2c77..2410dbcc2125 100644
--- a/include/lldb/API/SBTypeEnumMember.h
+++ b/include/lldb/API/SBTypeEnumMember.h
@@ -1,10 +1,9 @@
//===-- SBTypeEnumMember.h --------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -25,6 +24,8 @@ public:
SBTypeEnumMember &operator=(const SBTypeEnumMember &rhs);
+ explicit operator bool() const;
+
bool IsValid() const;
int64_t GetValueAsSigned();
@@ -63,6 +64,8 @@ public:
SBTypeEnumMemberList &operator=(const SBTypeEnumMemberList &rhs);
+ explicit operator bool() const;
+
bool IsValid();
void Append(SBTypeEnumMember entry);
@@ -72,7 +75,7 @@ public:
uint32_t GetSize();
private:
- std::unique_ptr<lldb_private::TypeEnumMemberListImpl> m_opaque_ap;
+ std::unique_ptr<lldb_private::TypeEnumMemberListImpl> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBTypeFilter.h b/include/lldb/API/SBTypeFilter.h
index 19888ba7cfb6..4a0de11d19c4 100644
--- a/include/lldb/API/SBTypeFilter.h
+++ b/include/lldb/API/SBTypeFilter.h
@@ -1,10 +1,9 @@
//===-- SBTypeFilter.h --------------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -25,6 +24,8 @@ public:
~SBTypeFilter();
+ explicit operator bool() const;
+
bool IsValid() const;
uint32_t GetNumberOfExpressionPaths();
diff --git a/include/lldb/API/SBTypeFormat.h b/include/lldb/API/SBTypeFormat.h
index d0429e97ff9c..8a0ac77a1e9d 100644
--- a/include/lldb/API/SBTypeFormat.h
+++ b/include/lldb/API/SBTypeFormat.h
@@ -1,10 +1,9 @@
//===-- SBTypeFormat.h --------------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -29,6 +28,8 @@ public:
~SBTypeFormat();
+ explicit operator bool() const;
+
bool IsValid() const;
lldb::Format GetFormat();
diff --git a/include/lldb/API/SBTypeNameSpecifier.h b/include/lldb/API/SBTypeNameSpecifier.h
index 2a4f09c2068b..9fe449d029c6 100644
--- a/include/lldb/API/SBTypeNameSpecifier.h
+++ b/include/lldb/API/SBTypeNameSpecifier.h
@@ -1,10 +1,9 @@
//===-- SBTypeNameSpecifier.h --------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -27,6 +26,8 @@ public:
~SBTypeNameSpecifier();
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetName();
diff --git a/include/lldb/API/SBTypeSummary.h b/include/lldb/API/SBTypeSummary.h
index c9ccdff834ce..bb7121f8ae40 100644
--- a/include/lldb/API/SBTypeSummary.h
+++ b/include/lldb/API/SBTypeSummary.h
@@ -1,10 +1,9 @@
//===-- SBTypeSummary.h -------------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -24,6 +23,8 @@ public:
~SBTypeSummaryOptions();
+ explicit operator bool() const;
+
bool IsValid();
lldb::LanguageType GetLanguage();
@@ -50,7 +51,7 @@ protected:
void SetOptions(const lldb_private::TypeSummaryOptions *lldb_object_ptr);
private:
- std::unique_ptr<lldb_private::TypeSummaryOptions> m_opaque_ap;
+ std::unique_ptr<lldb_private::TypeSummaryOptions> m_opaque_up;
};
class SBTypeSummary {
@@ -80,6 +81,8 @@ public:
~SBTypeSummary();
+ explicit operator bool() const;
+
bool IsValid() const;
bool IsFunctionCode();
diff --git a/include/lldb/API/SBTypeSynthetic.h b/include/lldb/API/SBTypeSynthetic.h
index 2099df316194..c190643c1ebb 100644
--- a/include/lldb/API/SBTypeSynthetic.h
+++ b/include/lldb/API/SBTypeSynthetic.h
@@ -1,10 +1,9 @@
//===-- SBTypeSynthetic.h -----------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -13,8 +12,6 @@
#include "lldb/API/SBDefines.h"
-#ifndef LLDB_DISABLE_PYTHON
-
namespace lldb {
class LLDB_API SBTypeSynthetic {
@@ -33,6 +30,8 @@ public:
~SBTypeSynthetic();
+ explicit operator bool() const;
+
bool IsValid() const;
bool IsClassCode();
@@ -78,6 +77,4 @@ protected:
} // namespace lldb
-#endif // LLDB_DISABLE_PYTHON
-
#endif // LLDB_SBTypeSynthetic_h_
diff --git a/include/lldb/API/SBUnixSignals.h b/include/lldb/API/SBUnixSignals.h
index d44a508fbb42..c7e99d1f63d1 100644
--- a/include/lldb/API/SBUnixSignals.h
+++ b/include/lldb/API/SBUnixSignals.h
@@ -1,10 +1,9 @@
//===-- SBUnixSignals.h -----------------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -27,6 +26,8 @@ public:
void Clear();
+ explicit operator bool() const;
+
bool IsValid() const;
const char *GetSignalAsCString(int32_t signo) const;
diff --git a/include/lldb/API/SBValue.h b/include/lldb/API/SBValue.h
index ab5bdfea993d..c36ba20297f0 100644
--- a/include/lldb/API/SBValue.h
+++ b/include/lldb/API/SBValue.h
@@ -1,9 +1,8 @@
//===-- SBValue.h -----------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -29,6 +28,8 @@ public:
~SBValue();
+ explicit operator bool() const;
+
bool IsValid();
void Clear();
@@ -111,9 +112,7 @@ public:
lldb::SBTypeFilter GetTypeFilter();
-#ifndef LLDB_DISABLE_PYTHON
lldb::SBTypeSynthetic GetTypeSynthetic();
-#endif
lldb::SBValue GetChildAtIndex(uint32_t idx);
@@ -138,7 +137,6 @@ public:
lldb::SBValue CreateValueFromData(const char *name, lldb::SBData data,
lldb::SBType type);
- //------------------------------------------------------------------
/// Get a child value by index from a value.
///
/// Structs, unions, classes, arrays and pointers have child
@@ -176,22 +174,21 @@ public:
/// that aren't in the array bounds using positive or negative
/// indexes.
///
- /// @param[in] idx
+ /// \param[in] idx
/// The index of the child value to get
///
- /// @param[in] use_dynamic
+ /// \param[in] use_dynamic
/// An enumeration that specifies whether to get dynamic values,
/// and also if the target can be run to figure out the dynamic
/// type of the child value.
///
- /// @param[in] can_create_synthetic
+ /// \param[in] can_create_synthetic
/// If \b true, then allow child values to be created by index
/// for pointers and arrays for indexes that normally wouldn't
/// be allowed.
///
- /// @return
+ /// \return
/// A new SBValue object that represents the child member value.
- //------------------------------------------------------------------
lldb::SBValue GetChildAtIndex(uint32_t idx,
lldb::DynamicValueType use_dynamic,
bool can_create_synthetic);
@@ -218,46 +215,41 @@ public:
lldb::SBAddress GetAddress();
- //------------------------------------------------------------------
/// Get an SBData wrapping what this SBValue points to.
///
/// This method will dereference the current SBValue, if its
/// data type is a T* or T[], and extract item_count elements
/// of type T from it, copying their contents in an SBData.
///
- /// @param[in] item_idx
+ /// \param[in] item_idx
/// The index of the first item to retrieve. For an array
/// this is equivalent to array[item_idx], for a pointer
/// to *(pointer + item_idx). In either case, the measurement
/// unit for item_idx is the sizeof(T) rather than the byte
///
- /// @param[in] item_count
+ /// \param[in] item_count
/// How many items should be copied into the output. By default
/// only one item is copied, but more can be asked for.
///
- /// @return
+ /// \return
/// An SBData with the contents of the copied items, on success.
/// An empty SBData otherwise.
- //------------------------------------------------------------------
lldb::SBData GetPointeeData(uint32_t item_idx = 0, uint32_t item_count = 1);
- //------------------------------------------------------------------
/// Get an SBData wrapping the contents of this SBValue.
///
/// This method will read the contents of this object in memory
/// and copy them into an SBData for future use.
///
- /// @return
+ /// \return
/// An SBData with the contents of this SBValue, on success.
/// An empty SBData otherwise.
- //------------------------------------------------------------------
lldb::SBData GetData();
bool SetData(lldb::SBData &data, lldb::SBError &error);
lldb::SBDeclaration GetDeclaration();
- //------------------------------------------------------------------
/// Find out if a SBValue might have children.
///
/// This call is much more efficient than GetNumChildren() as it
@@ -269,10 +261,9 @@ public:
/// pointers, references, arrays and more. Again, it does so without
/// doing any expensive type completion.
///
- /// @return
+ /// \return
/// Returns \b true if the SBValue might have children, or \b
/// false otherwise.
- //------------------------------------------------------------------
bool MightHaveChildren();
bool IsRuntimeSupportValue();
@@ -307,70 +298,72 @@ public:
bool GetExpressionPath(lldb::SBStream &description,
bool qualify_cxx_base_classes);
+ lldb::SBValue EvaluateExpression(const char *expr) const;
+ lldb::SBValue EvaluateExpression(const char *expr,
+ const SBExpressionOptions &options) const;
+ lldb::SBValue EvaluateExpression(const char *expr,
+ const SBExpressionOptions &options,
+ const char *name) const;
+
SBValue(const lldb::ValueObjectSP &value_sp);
- //------------------------------------------------------------------
/// Watch this value if it resides in memory.
///
/// Sets a watchpoint on the value.
///
- /// @param[in] resolve_location
+ /// \param[in] resolve_location
/// Resolve the location of this value once and watch its address.
/// This value must currently be set to \b true as watching all
/// locations of a variable or a variable path is not yet supported,
/// though we plan to support it in the future.
///
- /// @param[in] read
+ /// \param[in] read
/// Stop when this value is accessed.
///
- /// @param[in] write
+ /// \param[in] write
/// Stop when this value is modified
///
- /// @param[out] error
+ /// \param[out] error
/// An error object. Contains the reason if there is some failure.
///
- /// @return
+ /// \return
/// An SBWatchpoint object. This object might not be valid upon
/// return due to a value not being contained in memory, too
/// large, or watchpoint resources are not available or all in
/// use.
- //------------------------------------------------------------------
lldb::SBWatchpoint Watch(bool resolve_location, bool read, bool write,
SBError &error);
// Backward compatibility fix in the interim.
lldb::SBWatchpoint Watch(bool resolve_location, bool read, bool write);
- //------------------------------------------------------------------
/// Watch this value that this value points to in memory
///
/// Sets a watchpoint on the value.
///
- /// @param[in] resolve_location
+ /// \param[in] resolve_location
/// Resolve the location of this value once and watch its address.
/// This value must currently be set to \b true as watching all
/// locations of a variable or a variable path is not yet supported,
/// though we plan to support it in the future.
///
- /// @param[in] read
+ /// \param[in] read
/// Stop when this value is accessed.
///
- /// @param[in] write
+ /// \param[in] write
/// Stop when this value is modified
///
- /// @param[out] error
+ /// \param[out] error
/// An error object. Contains the reason if there is some failure.
///
- /// @return
+ /// \return
/// An SBWatchpoint object. This object might not be valid upon
/// return due to a value not being contained in memory, too
/// large, or watchpoint resources are not available or all in
/// use.
- //------------------------------------------------------------------
lldb::SBWatchpoint WatchPointee(bool resolve_location, bool read, bool write,
SBError &error);
- //------------------------------------------------------------------
/// Same as the protected version of GetSP that takes a locker, except that we
/// make the
/// locker locally in the function. Since the Target API mutex is recursive,
@@ -379,10 +372,9 @@ public:
/// already
/// holding the two above-mentioned locks.
///
- /// @return
+ /// \return
/// A ValueObjectSP of the best kind (static, dynamic or synthetic) we
/// can cons up, in accordance with the SBValue's settings.
- //------------------------------------------------------------------
lldb::ValueObjectSP GetSP() const;
protected:
@@ -392,7 +384,6 @@ protected:
friend class SBThread;
friend class SBValueList;
- //------------------------------------------------------------------
/// Get the appropriate ValueObjectSP from this SBValue, consulting the
/// use_dynamic and use_synthetic options passed in to SetSP when the
/// SBValue's contents were set. Since this often requires examining memory,
@@ -407,16 +398,15 @@ protected:
/// ValueObject.h/cpp or somewhere else convenient. We haven't needed to so
/// far.
///
- /// @param[in] value_locker
+ /// \param[in] value_locker
/// An object that will hold the Target API, and Process RunLocks, and
/// auto-destroy them when it goes out of scope. Currently this is only
/// useful in
/// SBValue.cpp.
///
- /// @return
+ /// \return
/// A ValueObjectSP of the best kind (static, dynamic or synthetic) we
/// can cons up, in accordance with the SBValue's settings.
- //------------------------------------------------------------------
lldb::ValueObjectSP GetSP(ValueLocker &value_locker) const;
// these calls do the right thing WRT adjusting their settings according to
diff --git a/include/lldb/API/SBValueList.h b/include/lldb/API/SBValueList.h
index 0242dd7f71a2..d305b3564c2b 100644
--- a/include/lldb/API/SBValueList.h
+++ b/include/lldb/API/SBValueList.h
@@ -1,9 +1,8 @@
//===-- SBValueList.h -------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -24,6 +23,8 @@ public:
~SBValueList();
+ explicit operator bool() const;
+
bool IsValid() const;
void Clear();
@@ -66,7 +67,7 @@ private:
ValueListImpl &ref();
- std::unique_ptr<ValueListImpl> m_opaque_ap;
+ std::unique_ptr<ValueListImpl> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBVariablesOptions.h b/include/lldb/API/SBVariablesOptions.h
index 0059a41129c5..e226ce4ae13b 100644
--- a/include/lldb/API/SBVariablesOptions.h
+++ b/include/lldb/API/SBVariablesOptions.h
@@ -1,10 +1,9 @@
//===-- SBVariablesOptions.h ------------------------------------------*- C++
//-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -27,6 +26,8 @@ public:
~SBVariablesOptions();
+ explicit operator bool() const;
+
bool IsValid() const;
bool GetIncludeArguments() const;
@@ -73,7 +74,7 @@ protected:
void SetOptions(VariablesOptionsImpl *lldb_object_ptr);
private:
- std::unique_ptr<VariablesOptionsImpl> m_opaque_ap;
+ std::unique_ptr<VariablesOptionsImpl> m_opaque_up;
};
} // namespace lldb
diff --git a/include/lldb/API/SBWatchpoint.h b/include/lldb/API/SBWatchpoint.h
index 92d4851fc14d..05ff0ca7e443 100644
--- a/include/lldb/API/SBWatchpoint.h
+++ b/include/lldb/API/SBWatchpoint.h
@@ -1,9 +1,8 @@
//===-- SBWatchpoint.h ----------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -26,6 +25,12 @@ public:
const lldb::SBWatchpoint &operator=(const lldb::SBWatchpoint &rhs);
+ explicit operator bool() const;
+
+ bool operator==(const SBWatchpoint &rhs) const;
+
+ bool operator!=(const SBWatchpoint &rhs) const;
+
bool IsValid() const;
SBError GetError();