summaryrefslogtreecommitdiff
path: root/include/lldb/API
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/API')
-rw-r--r--include/lldb/API/LLDB.h2
-rw-r--r--include/lldb/API/SBCommandReturnObject.h10
-rw-r--r--include/lldb/API/SBDefines.h2
-rw-r--r--include/lldb/API/SBExpressionOptions.h13
-rw-r--r--include/lldb/API/SBFileSpec.h3
-rw-r--r--include/lldb/API/SBHostOS.h3
-rw-r--r--include/lldb/API/SBInstruction.h11
-rw-r--r--include/lldb/API/SBLaunchInfo.h2
-rw-r--r--include/lldb/API/SBListener.h15
-rw-r--r--include/lldb/API/SBMemoryRegionInfo.h117
-rw-r--r--include/lldb/API/SBMemoryRegionInfoList.h63
-rw-r--r--include/lldb/API/SBProcess.h28
-rw-r--r--include/lldb/API/SBStream.h1
-rw-r--r--include/lldb/API/SBStringList.h3
-rw-r--r--include/lldb/API/SBTarget.h18
-rw-r--r--include/lldb/API/SBThread.h12
-rw-r--r--include/lldb/API/SBThreadCollection.h1
-rw-r--r--include/lldb/API/SBValue.h6
18 files changed, 292 insertions, 18 deletions
diff --git a/include/lldb/API/LLDB.h b/include/lldb/API/LLDB.h
index eed10d08c6cc4..b6278160dbc04 100644
--- a/include/lldb/API/LLDB.h
+++ b/include/lldb/API/LLDB.h
@@ -43,6 +43,8 @@
#include "lldb/API/SBLaunchInfo.h"
#include "lldb/API/SBLineEntry.h"
#include "lldb/API/SBListener.h"
+#include "lldb/API/SBMemoryRegionInfo.h"
+#include "lldb/API/SBMemoryRegionInfoList.h"
#include "lldb/API/SBModule.h"
#include "lldb/API/SBModuleSpec.h"
#include "lldb/API/SBPlatform.h"
diff --git a/include/lldb/API/SBCommandReturnObject.h b/include/lldb/API/SBCommandReturnObject.h
index b45eb9c14c048..2b7cce5ded59e 100644
--- a/include/lldb/API/SBCommandReturnObject.h
+++ b/include/lldb/API/SBCommandReturnObject.h
@@ -83,7 +83,9 @@ public:
bool
GetDescription (lldb::SBStream &description);
-
+
+ // deprecated, these two functions do not take
+ // ownership of file handle
void
SetImmediateOutputFile (FILE *fh);
@@ -91,6 +93,12 @@ public:
SetImmediateErrorFile (FILE *fh);
void
+ SetImmediateOutputFile (FILE *fh, bool transfer_ownership);
+
+ void
+ SetImmediateErrorFile (FILE *fh, bool transfer_ownership);
+
+ void
PutCString(const char* string, int len = -1);
size_t
diff --git a/include/lldb/API/SBDefines.h b/include/lldb/API/SBDefines.h
index d81bba5a2e230..4a95903ec92c2 100644
--- a/include/lldb/API/SBDefines.h
+++ b/include/lldb/API/SBDefines.h
@@ -59,6 +59,8 @@ class LLDB_API SBLanguageRuntime;
class LLDB_API SBLaunchInfo;
class LLDB_API SBLineEntry;
class LLDB_API SBListener;
+class LLDB_API SBMemoryRegionInfo;
+class LLDB_API SBMemoryRegionInfoList;
class LLDB_API SBModule;
class LLDB_API SBModuleSpec;
class LLDB_API SBModuleSpecList;
diff --git a/include/lldb/API/SBExpressionOptions.h b/include/lldb/API/SBExpressionOptions.h
index ed2f9187b3e05..051ed7220ac87 100644
--- a/include/lldb/API/SBExpressionOptions.h
+++ b/include/lldb/API/SBExpressionOptions.h
@@ -110,6 +110,19 @@ public:
void
SetPrefix (const char *prefix);
+
+ void
+ SetAutoApplyFixIts(bool b = true);
+
+ bool
+ GetAutoApplyFixIts();
+
+ bool
+ GetTopLevel ();
+
+ void
+ SetTopLevel (bool b = true);
+
protected:
diff --git a/include/lldb/API/SBFileSpec.h b/include/lldb/API/SBFileSpec.h
index d6f38f5b2d749..2f9d6bab89f34 100644
--- a/include/lldb/API/SBFileSpec.h
+++ b/include/lldb/API/SBFileSpec.h
@@ -60,6 +60,9 @@ public:
bool
GetDescription (lldb::SBStream &description) const;
+ void
+ AppendPathComponent (const char *file_or_directory);
+
private:
friend class SBAttachInfo;
friend class SBBlock;
diff --git a/include/lldb/API/SBHostOS.h b/include/lldb/API/SBHostOS.h
index d9bc973656324..a3675856a1367 100644
--- a/include/lldb/API/SBHostOS.h
+++ b/include/lldb/API/SBHostOS.h
@@ -28,6 +28,9 @@ public:
static lldb::SBFileSpec
GetLLDBPath (lldb::PathType path_type);
+ static lldb::SBFileSpec
+ GetUserHomeDirectory ();
+
static void
ThreadCreated (const char *name);
diff --git a/include/lldb/API/SBInstruction.h b/include/lldb/API/SBInstruction.h
index 2bacc2b97746e..cb0b2a32a829d 100644
--- a/include/lldb/API/SBInstruction.h
+++ b/include/lldb/API/SBInstruction.h
@@ -18,6 +18,8 @@
// There's a lot to be fixed here, but need to wait for underlying insn implementation
// to be revised & settle down first.
+class InstructionImpl;
+
namespace lldb {
class LLDB_API SBInstruction
@@ -81,14 +83,17 @@ public:
protected:
friend class SBInstructionList;
- SBInstruction (const lldb::InstructionSP &inst_sp);
+ SBInstruction(const lldb::DisassemblerSP &disasm_sp, const lldb::InstructionSP &inst_sp);
void
- SetOpaque (const lldb::InstructionSP &inst_sp);
+ SetOpaque(const lldb::DisassemblerSP &disasm_sp, const lldb::InstructionSP& inst_sp);
+
+ lldb::InstructionSP
+ GetOpaque();
private:
- lldb::InstructionSP m_opaque_sp;
+ std::shared_ptr<InstructionImpl> m_opaque_sp;
};
diff --git a/include/lldb/API/SBLaunchInfo.h b/include/lldb/API/SBLaunchInfo.h
index 68c0f386acde5..38d598aec456f 100644
--- a/include/lldb/API/SBLaunchInfo.h
+++ b/include/lldb/API/SBLaunchInfo.h
@@ -145,7 +145,7 @@ public:
GetShellExpandArguments ();
void
- SetShellExpandArguments (bool glob);
+ SetShellExpandArguments (bool expand);
uint32_t
GetResumeCount ();
diff --git a/include/lldb/API/SBListener.h b/include/lldb/API/SBListener.h
index 924f8109f6381..e74d318ea1187 100644
--- a/include/lldb/API/SBListener.h
+++ b/include/lldb/API/SBListener.h
@@ -106,8 +106,6 @@ protected:
friend class SBLaunchInfo;
friend class SBTarget;
- SBListener (lldb_private::Listener &listener);
-
SBListener (const lldb::ListenerSP &listener_sp);
lldb::ListenerSP
@@ -124,20 +122,11 @@ private:
lldb_private::Listener *
get() const;
- lldb_private::Listener &
- ref() const;
-
- lldb_private::Listener &
- operator *();
-
- const lldb_private::Listener &
- operator *() const;
-
void
- reset(lldb_private::Listener *listener, bool transfer_ownership);
+ reset(lldb::ListenerSP listener_sp);
lldb::ListenerSP m_opaque_sp;
- lldb_private::Listener *m_opaque_ptr;
+ lldb_private::Listener *m_unused_ptr;
};
} // namespace lldb
diff --git a/include/lldb/API/SBMemoryRegionInfo.h b/include/lldb/API/SBMemoryRegionInfo.h
new file mode 100644
index 0000000000000..fadd0760891bd
--- /dev/null
+++ b/include/lldb/API/SBMemoryRegionInfo.h
@@ -0,0 +1,117 @@
+//===-- SBMemoryRegionInfo.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_SBMemoryRegionInfo_h_
+#define LLDB_SBMemoryRegionInfo_h_
+
+#include "lldb/API/SBDefines.h"
+#include "lldb/API/SBData.h"
+
+namespace lldb {
+
+class LLDB_API SBMemoryRegionInfo
+{
+public:
+
+ SBMemoryRegionInfo ();
+
+ SBMemoryRegionInfo (const lldb::SBMemoryRegionInfo &rhs);
+
+ ~SBMemoryRegionInfo ();
+
+ const lldb::SBMemoryRegionInfo &
+ operator = (const lldb::SBMemoryRegionInfo &rhs);
+
+ void
+ Clear();
+
+ //------------------------------------------------------------------
+ /// Get the base address of this memory range.
+ ///
+ /// @return
+ /// The base address of this memory range.
+ //------------------------------------------------------------------
+ lldb::addr_t
+ GetRegionBase ();
+
+ //------------------------------------------------------------------
+ /// Get the end address of this memory range.
+ ///
+ /// @return
+ /// The base address of this memory range.
+ //------------------------------------------------------------------
+ lldb::addr_t
+ GetRegionEnd ();
+
+ //------------------------------------------------------------------
+ /// Check if this memory address is marked readable to the process.
+ ///
+ /// @return
+ /// true if this memory address is marked readable
+ //------------------------------------------------------------------
+ bool
+ IsReadable ();
+
+ //------------------------------------------------------------------
+ /// Check if this memory address is marked writable to the process.
+ ///
+ /// @return
+ /// true if this memory address is marked writable
+ //------------------------------------------------------------------
+ bool
+ IsWritable ();
+
+ //------------------------------------------------------------------
+ /// Check if this memory address is marked executable to the process.
+ ///
+ /// @return
+ /// true if this memory address is marked executable
+ //------------------------------------------------------------------
+ bool
+ IsExecutable ();
+
+ //------------------------------------------------------------------
+ /// Check if this memory address is mapped into the process address
+ /// space.
+ ///
+ /// @return
+ /// true if this memory address is in the process address space.
+ //------------------------------------------------------------------
+ bool
+ IsMapped ();
+
+ bool
+ operator == (const lldb::SBMemoryRegionInfo &rhs) const;
+
+ bool
+ operator != (const lldb::SBMemoryRegionInfo &rhs) const;
+
+ bool
+ GetDescription (lldb::SBStream &description);
+
+private:
+
+ friend class SBProcess;
+ friend class SBMemoryRegionInfoList;
+
+ lldb_private::MemoryRegionInfo &
+ ref();
+
+ const lldb_private::MemoryRegionInfo &
+ ref() const;
+
+ SBMemoryRegionInfo (const lldb_private::MemoryRegionInfo *lldb_object_ptr);
+
+ lldb::MemoryRegionInfoUP m_opaque_ap;
+};
+
+
+} // namespace lldb
+
+#endif // LLDB_SBMemoryRegionInfo_h_
diff --git a/include/lldb/API/SBMemoryRegionInfoList.h b/include/lldb/API/SBMemoryRegionInfoList.h
new file mode 100644
index 0000000000000..7723820897d83
--- /dev/null
+++ b/include/lldb/API/SBMemoryRegionInfoList.h
@@ -0,0 +1,63 @@
+//===-- SBMemoryRegionInfoList.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_SBMemoryRegionInfoList_h_
+#define LLDB_SBMemoryRegionInfoList_h_
+
+#include "lldb/API/SBDefines.h"
+
+class MemoryRegionInfoListImpl;
+
+namespace lldb {
+
+class LLDB_API SBMemoryRegionInfoList
+{
+public:
+
+ SBMemoryRegionInfoList ();
+
+ SBMemoryRegionInfoList (const lldb::SBMemoryRegionInfoList &rhs);
+
+ const SBMemoryRegionInfoList &
+ operator = (const SBMemoryRegionInfoList &rhs);
+
+ ~SBMemoryRegionInfoList ();
+
+ uint32_t
+ GetSize () const;
+
+ bool
+ GetMemoryRegionAtIndex (uint32_t idx, SBMemoryRegionInfo &region_info);
+
+ void
+ Append (lldb::SBMemoryRegionInfo &region);
+
+ void
+ Append (lldb::SBMemoryRegionInfoList &region_list);
+
+ void
+ Clear ();
+
+protected:
+
+ const MemoryRegionInfoListImpl *
+ operator->() const;
+
+ const MemoryRegionInfoListImpl &
+ operator*() const;
+
+private:
+
+ std::unique_ptr<MemoryRegionInfoListImpl> m_opaque_ap;
+
+};
+
+} // namespace lldb
+
+#endif // LLDB_SBMemoryRegionInfoList_h_
diff --git a/include/lldb/API/SBProcess.h b/include/lldb/API/SBProcess.h
index 1a9cc8022880b..a8881ad898c00 100644
--- a/include/lldb/API/SBProcess.h
+++ b/include/lldb/API/SBProcess.h
@@ -393,6 +393,34 @@ public:
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
+ /// The address to be queried.
+ ///
+ /// @param[out] region_info
+ /// A reference to an SBMemoryRegionInfo object that will contain
+ /// the details of the memory region containing load_addr.
+ ///
+ /// @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
+ /// A list of all witin the process memory regions.
+ //------------------------------------------------------------------
+ lldb::SBMemoryRegionInfoList
+ GetMemoryRegions();
+
protected:
friend class SBAddress;
friend class SBBreakpoint;
diff --git a/include/lldb/API/SBStream.h b/include/lldb/API/SBStream.h
index e62723c2f37e1..717979977d167 100644
--- a/include/lldb/API/SBStream.h
+++ b/include/lldb/API/SBStream.h
@@ -76,6 +76,7 @@ protected:
friend class SBInstruction;
friend class SBInstructionList;
friend class SBLineEntry;
+ friend class SBMemoryRegionInfo;
friend class SBModule;
friend class SBModuleSpec;
friend class SBModuleSpecList;
diff --git a/include/lldb/API/SBStringList.h b/include/lldb/API/SBStringList.h
index e0e58f765c6db..bc8ff935eda3e 100644
--- a/include/lldb/API/SBStringList.h
+++ b/include/lldb/API/SBStringList.h
@@ -45,6 +45,9 @@ public:
const char *
GetStringAtIndex (size_t idx);
+ const char *
+ GetStringAtIndex (size_t idx) const;
+
void
Clear ();
diff --git a/include/lldb/API/SBTarget.h b/include/lldb/API/SBTarget.h
index 723c433b521ae..0bcabd043c9cc 100644
--- a/include/lldb/API/SBTarget.h
+++ b/include/lldb/API/SBTarget.h
@@ -621,6 +621,9 @@ public:
BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line);
lldb::SBBreakpoint
+ BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line, lldb::addr_t offset);
+
+ lldb::SBBreakpoint
BreakpointCreateByName(const char *symbol_name, const char *module_name = nullptr);
// This version uses name_type_mask = eFunctionNameTypeAuto
@@ -658,6 +661,15 @@ public:
const SBFileSpecList &comp_unit_list);
lldb::SBBreakpoint
+ BreakpointCreateByNames (const char *symbol_name[],
+ uint32_t num_names,
+ uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits
+ lldb::LanguageType symbol_language,
+ lldb::addr_t offset,
+ const SBFileSpecList &module_list,
+ const SBFileSpecList &comp_unit_list);
+
+ lldb::SBBreakpoint
BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = nullptr);
lldb::SBBreakpoint
@@ -682,6 +694,12 @@ public:
const SBFileSpecList &source_file);
lldb::SBBreakpoint
+ BreakpointCreateBySourceRegex (const char *source_regex,
+ const SBFileSpecList &module_list,
+ const SBFileSpecList &source_file,
+ const SBStringList &func_names);
+
+ lldb::SBBreakpoint
BreakpointCreateForException (lldb::LanguageType language,
bool catch_bp,
bool throw_bp);
diff --git a/include/lldb/API/SBThread.h b/include/lldb/API/SBThread.h
index 2c45fa8d51201..c1ce216f9be6e 100644
--- a/include/lldb/API/SBThread.h
+++ b/include/lldb/API/SBThread.h
@@ -82,6 +82,9 @@ public:
bool
GetStopReasonExtendedInfoAsJSON (lldb::SBStream &stream);
+ SBThreadCollection
+ GetStopReasonExtendedBacktraces (InstrumentationRuntimeType type);
+
size_t
GetStopDescription (char *dst, size_t dst_len);
@@ -116,6 +119,12 @@ public:
StepInto (const char *target_name, lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
void
+ StepInto (const char *target_name,
+ uint32_t end_line,
+ SBError &error,
+ lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
+
+ void
StepOut ();
void
@@ -141,6 +150,9 @@ public:
SBError
ReturnFromFrame (SBFrame &frame, SBValue &return_value);
+ SBError
+ UnwindInnermostExpression();
+
//--------------------------------------------------------------------------
/// LLDB currently supports process centric debugging which means when any
/// thread in a process stops, all other threads are stopped. The Suspend()
diff --git a/include/lldb/API/SBThreadCollection.h b/include/lldb/API/SBThreadCollection.h
index 996ee3cd22aa7..79f9774544972 100644
--- a/include/lldb/API/SBThreadCollection.h
+++ b/include/lldb/API/SBThreadCollection.h
@@ -58,6 +58,7 @@ protected:
private:
friend class SBProcess;
+ friend class SBThread;
lldb::ThreadCollectionSP m_opaque_sp;
};
diff --git a/include/lldb/API/SBValue.h b/include/lldb/API/SBValue.h
index a7e015064f96a..b9f1e6f5c93fa 100644
--- a/include/lldb/API/SBValue.h
+++ b/include/lldb/API/SBValue.h
@@ -125,6 +125,12 @@ public:
bool
IsSynthetic ();
+
+ bool
+ IsSyntheticChildrenGenerated ();
+
+ void
+ SetSyntheticChildrenGenerated (bool);
const char *
GetLocation ();