46 changes: 0 additions & 46 deletions lldb/examples/interposing/darwin/fd_interposing/FDInterposing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@
#include <unistd.h>
#include <vector>

//----------------------------------------------------------------------
/// \def DISALLOW_COPY_AND_ASSIGN(TypeName)
/// Macro definition for easily disallowing copy constructor and
/// assignment operators in C++ classes.
//----------------------------------------------------------------------
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName &); \
const TypeName &operator=(const TypeName &)
Expand All @@ -87,10 +85,8 @@ int __open_extended(const char *, int, uid_t, gid_t, int,

namespace fd_interposing {

//----------------------------------------------------------------------
// String class so we can get formatted strings without having to worry
// about the memory storage since it will allocate the memory it needs.
//----------------------------------------------------------------------
class String {
public:
String() : m_str(NULL) {}
Expand Down Expand Up @@ -142,23 +138,19 @@ class String {
DISALLOW_COPY_AND_ASSIGN(String);
};

//----------------------------------------------------------------------
// Type definitions
//----------------------------------------------------------------------
typedef std::vector<void *> Frames;
class FDEvent;
typedef std::vector<void *> Frames;
typedef std::tr1::shared_ptr<FDEvent> FDEventSP;
typedef std::tr1::shared_ptr<String> StringSP;

//----------------------------------------------------------------------
// FDEvent
//
// A class that describes a file desciptor event.
//
// File descriptor events fall into one of two categories: create events
// and delete events.
//----------------------------------------------------------------------
class FDEvent {
public:
FDEvent(int fd, int err, const StringSP &string_sp, bool is_create,
Expand Down Expand Up @@ -204,11 +196,9 @@ class FDEvent {
bool m_is_create;
};

//----------------------------------------------------------------------
// Templatized class that will save errno only if the "value" it is
// constructed with is equal to INVALID. When the class goes out of
// scope, it will restore errno if it was saved.
//----------------------------------------------------------------------
template <int INVALID> class Errno {
public:
// Save errno only if we are supposed to
Expand All @@ -235,9 +225,7 @@ typedef Errno<-1> NegativeErrorErrno;
typedef std::vector<FDEventSP> FDEventArray;
typedef std::map<int, FDEventArray> FDEventMap;

//----------------------------------------------------------------------
// Globals
//----------------------------------------------------------------------
// Global event map that contains all file descriptor events. As file
// descriptor create and close events come in, they will get filled
// into this map (protected by g_mutex). When a file descriptor close
Expand All @@ -264,10 +252,8 @@ static int g_compact = 1;
// The current process ID
static int g_pid = -1;
static bool g_enabled = true;
//----------------------------------------------------------------------
// Mutex class that will lock a mutex when it is constructed, and unlock
// it when is goes out of scope
//----------------------------------------------------------------------
class Locker {
public:
Locker(pthread_mutex_t *mutex_ptr) : m_mutex_ptr(mutex_ptr) {
Expand Down Expand Up @@ -543,9 +529,7 @@ void save_backtrace(int fd, int err, const StringSP &string_sp,
}
}

//----------------------------------------------------------------------
// socket() interpose function
//----------------------------------------------------------------------
extern "C" int socket$__interposed__(int domain, int type, int protocol) {
const int pid = get_interposed_pid();
if (pid >= 0) {
Expand All @@ -572,9 +556,7 @@ extern "C" int socket$__interposed__(int domain, int type, int protocol) {
}
}

//----------------------------------------------------------------------
// socketpair() interpose function
//----------------------------------------------------------------------
extern "C" int socketpair$__interposed__(int domain, int type, int protocol,
int fds[2]) {
const int pid = get_interposed_pid();
Expand All @@ -600,9 +582,7 @@ extern "C" int socketpair$__interposed__(int domain, int type, int protocol,
}
}

//----------------------------------------------------------------------
// open() interpose function
//----------------------------------------------------------------------
extern "C" int open$__interposed__(const char *path, int oflag, int mode) {
const int pid = get_interposed_pid();
if (pid >= 0) {
Expand Down Expand Up @@ -631,9 +611,7 @@ extern "C" int open$__interposed__(const char *path, int oflag, int mode) {
}
}

//----------------------------------------------------------------------
// open$NOCANCEL() interpose function
//----------------------------------------------------------------------
extern "C" int open$NOCANCEL$__interposed__(const char *path, int oflag,
int mode) {
const int pid = get_interposed_pid();
Expand All @@ -654,9 +632,7 @@ extern "C" int open$NOCANCEL$__interposed__(const char *path, int oflag,
}
}

//----------------------------------------------------------------------
// __open_extended() interpose function
//----------------------------------------------------------------------
extern "C" int __open_extended$__interposed__(const char *path, int oflag,
uid_t uid, gid_t gid, int mode,
struct kauth_filesec *fsacl) {
Expand All @@ -679,9 +655,7 @@ extern "C" int __open_extended$__interposed__(const char *path, int oflag,
}
}

//----------------------------------------------------------------------
// kqueue() interpose function
//----------------------------------------------------------------------
extern "C" int kqueue$__interposed__(void) {
const int pid = get_interposed_pid();
if (pid >= 0) {
Expand All @@ -699,9 +673,7 @@ extern "C" int kqueue$__interposed__(void) {
}
}

//----------------------------------------------------------------------
// shm_open() interpose function
//----------------------------------------------------------------------
extern "C" int shm_open$__interposed__(const char *path, int oflag, int mode) {
const int pid = get_interposed_pid();
if (pid >= 0) {
Expand All @@ -721,9 +693,7 @@ extern "C" int shm_open$__interposed__(const char *path, int oflag, int mode) {
}
}

//----------------------------------------------------------------------
// accept() interpose function
//----------------------------------------------------------------------
extern "C" int accept$__interposed__(int socket, struct sockaddr *address,
socklen_t *address_len) {
const int pid = get_interposed_pid();
Expand All @@ -743,9 +713,7 @@ extern "C" int accept$__interposed__(int socket, struct sockaddr *address,
}
}

//----------------------------------------------------------------------
// accept$NOCANCEL() interpose function
//----------------------------------------------------------------------
extern "C" int accept$NOCANCEL$__interposed__(int socket,
struct sockaddr *address,
socklen_t *address_len) {
Expand All @@ -766,9 +734,7 @@ extern "C" int accept$NOCANCEL$__interposed__(int socket,
}
}

//----------------------------------------------------------------------
// dup() interpose function
//----------------------------------------------------------------------
extern "C" int dup$__interposed__(int fd2) {
const int pid = get_interposed_pid();
if (pid >= 0) {
Expand All @@ -787,9 +753,7 @@ extern "C" int dup$__interposed__(int fd2) {
}
}

//----------------------------------------------------------------------
// dup2() interpose function
//----------------------------------------------------------------------
extern "C" int dup2$__interposed__(int fd1, int fd2) {
const int pid = get_interposed_pid();
if (pid >= 0) {
Expand Down Expand Up @@ -819,9 +783,7 @@ extern "C" int dup2$__interposed__(int fd1, int fd2) {
}
}

//----------------------------------------------------------------------
// close() interpose function
//----------------------------------------------------------------------
extern "C" int close$__interposed__(int fd) {
const int pid = get_interposed_pid();
if (pid >= 0) {
Expand Down Expand Up @@ -859,9 +821,7 @@ extern "C" int close$__interposed__(int fd) {
}
}

//----------------------------------------------------------------------
// close$NOCANCEL() interpose function
//----------------------------------------------------------------------
extern "C" int close$NOCANCEL$__interposed__(int fd) {
const int pid = get_interposed_pid();
if (pid >= 0) {
Expand Down Expand Up @@ -900,9 +860,7 @@ extern "C" int close$NOCANCEL$__interposed__(int fd) {
}
}

//----------------------------------------------------------------------
// pipe() interpose function
//----------------------------------------------------------------------
extern "C" int pipe$__interposed__(int fds[2]) {
const int pid = get_interposed_pid();
if (pid >= 0) {
Expand All @@ -926,7 +884,6 @@ extern "C" int pipe$__interposed__(int fds[2]) {
}
}

//----------------------------------------------------------------------
// get_fd_history()
//
// This function allows runtime access to the file descriptor history.
Expand All @@ -936,7 +893,6 @@ extern "C" int pipe$__interposed__(int fds[2]) {
//
// @param[in] fd
// The file descriptor whose history should be dumped
//----------------------------------------------------------------------
extern "C" void get_fd_history(int log_fd, int fd) {
// "create" below needs to be outside of the mutex locker scope
if (log_fd >= 0) {
Expand All @@ -960,9 +916,7 @@ extern "C" void get_fd_history(int log_fd, int fd) {
}
}

//----------------------------------------------------------------------
// Interposing
//----------------------------------------------------------------------
// FD creation routines
DYLD_INTERPOSE(accept$__interposed__, accept);
DYLD_INTERPOSE(accept$NOCANCEL$__interposed__, accept$NOCANCEL);
Expand Down
2 changes: 0 additions & 2 deletions lldb/examples/lookup/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

using namespace lldb;

//----------------------------------------------------------------------
// This quick sample code shows how to create a debugger instance and
// create an "i386" executable target. Then we can lookup the executable
// module and resolve a file address into a section offset address,
Expand All @@ -45,7 +44,6 @@ using namespace lldb;
//
// $ DYLD_FRAMEWORK_PATH=/Volumes/data/lldb/svn/ToT/build/Debug ./a.out
// executable_path file_address
//----------------------------------------------------------------------
class LLDBSentry {
public:
LLDBSentry() {
Expand Down
12 changes: 0 additions & 12 deletions lldb/include/lldb/API/SBAttachInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class LLDB_API SBAttachInfo {

SBAttachInfo(lldb::pid_t pid);

//------------------------------------------------------------------
/// Attach to a process by name.
///
/// This function implies that a future call to SBTarget::Attach(...)
Expand All @@ -33,10 +32,8 @@ class LLDB_API SBAttachInfo {
/// \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
Expand All @@ -59,7 +56,6 @@ class LLDB_API SBAttachInfo {
/// 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);
Expand All @@ -78,7 +74,6 @@ class LLDB_API SBAttachInfo {

bool GetWaitForLaunch();

//------------------------------------------------------------------
/// Set attach by process name settings.
///
/// Designed to be used after a call to SBAttachInfo::SetExecutable().
Expand All @@ -88,10 +83,8 @@ class LLDB_API SBAttachInfo {
/// \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().
Expand All @@ -112,7 +105,6 @@ class LLDB_API SBAttachInfo {
/// 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();
Expand Down Expand Up @@ -157,23 +149,19 @@ class LLDB_API SBAttachInfo {

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:
Expand Down
2 changes: 0 additions & 2 deletions lldb/include/lldb/API/SBBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class LLDB_API SBBlock {

lldb::SBValueList GetVariables(lldb::SBTarget &target, bool arguments,
bool locals, bool statics);
//------------------------------------------------------------------
/// Get the inlined block that contains this block.
///
/// \return
Expand All @@ -69,7 +68,6 @@ class LLDB_API SBBlock {
/// 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);
Expand Down
12 changes: 0 additions & 12 deletions lldb/include/lldb/API/SBCommandInterpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,13 @@ class SBCommandInterpreter {
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.
///
Expand All @@ -215,36 +212,27 @@ class SBCommandInterpreter {
/// 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:
Expand Down
2 changes: 0 additions & 2 deletions lldb/include/lldb/API/SBCompileUnit.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class LLDB_API SBCompileUnit {
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.
///
Expand All @@ -62,7 +61,6 @@ class LLDB_API SBCompileUnit {
///
/// \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();
Expand Down
2 changes: 0 additions & 2 deletions lldb/include/lldb/API/SBInstructionList.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ class LLDB_API SBInstructionList {

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);
Expand Down
6 changes: 0 additions & 6 deletions lldb/include/lldb/API/SBLaunchInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class LLDB_API SBLaunchInfo {

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.
///
Expand All @@ -64,26 +63,21 @@ class LLDB_API SBLaunchInfo {
/// 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();
Expand Down
14 changes: 0 additions & 14 deletions lldb/include/lldb/API/SBMemoryRegionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,64 +27,50 @@ class LLDB_API SBMemoryRegionInfo {

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();

//------------------------------------------------------------------
/// Returns the name of the memory region mapped at the given
/// address.
///
/// \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;
Expand Down
24 changes: 0 additions & 24 deletions lldb/include/lldb/API/SBModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class LLDB_API SBModule {

void Clear();

//------------------------------------------------------------------
/// Get const accessor for the module file specification.
///
/// This function returns the file for the module on the host system
Expand All @@ -46,10 +45,8 @@ class LLDB_API SBModule {
///
/// \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
Expand All @@ -63,12 +60,10 @@ class LLDB_API SBModule {
///
/// \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
Expand All @@ -79,10 +74,8 @@ class LLDB_API SBModule {
///
/// \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
Expand All @@ -99,7 +92,6 @@ class LLDB_API SBModule {
///
/// \param[in] file
/// A file specification object.
//------------------------------------------------------------------
bool SetRemoteInstallFileSpec(lldb::SBFileSpec &file);

lldb::ByteOrder GetByteOrder();
Expand Down Expand Up @@ -130,7 +122,6 @@ class LLDB_API SBModule {

lldb::SBCompileUnit GetCompileUnitAtIndex(uint32_t);

//------------------------------------------------------------------
/// Find compile units related to *this module and passed source
/// file.
///
Expand All @@ -141,7 +132,6 @@ class LLDB_API SBModule {
/// \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);

Expand All @@ -158,7 +148,6 @@ class LLDB_API SBModule {
size_t GetNumSections();

lldb::SBSection GetSectionAtIndex(size_t idx);
//------------------------------------------------------------------
/// Find functions by name.
///
/// \param[in] name
Expand All @@ -174,12 +163,10 @@ class LLDB_API SBModule {
/// \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
Expand All @@ -194,11 +181,9 @@ class LLDB_API SBModule {
///
/// \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
Expand All @@ -210,15 +195,13 @@ class LLDB_API SBModule {
///
/// \return
/// An SBValue that gets filled in with the found variable (if any).
//------------------------------------------------------------------
lldb::SBValue FindFirstGlobalVariable(lldb::SBTarget &target,
const char *name);

lldb::SBType FindFirstType(const char *name);

lldb::SBTypeList FindTypes(const char *type);

//------------------------------------------------------------------
/// Get a type using its type ID.
///
/// Each symbol file reader will assign different user IDs to their
Expand All @@ -233,12 +216,10 @@ class LLDB_API SBModule {
/// \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.
///
Expand All @@ -251,10 +232,8 @@ class LLDB_API SBModule {
///
/// \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
Expand Down Expand Up @@ -293,10 +272,8 @@ class LLDB_API SBModule {
/// 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
Expand All @@ -306,7 +283,6 @@ class LLDB_API SBModule {
///
/// \return
/// A const reference to the file specification object.
//------------------------------------------------------------------
lldb::SBFileSpec GetSymbolFileSpec() const;

lldb::SBAddress GetObjectFileHeaderAddress() const;
Expand Down
4 changes: 0 additions & 4 deletions lldb/include/lldb/API/SBModuleSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class LLDB_API SBModuleSpec {

void Clear();

//------------------------------------------------------------------
/// Get const accessor for the module file.
///
/// This function returns the file for the module on the host system
Expand All @@ -39,12 +38,10 @@ class LLDB_API SBModuleSpec {
///
/// \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
Expand All @@ -58,7 +55,6 @@ class LLDB_API SBModuleSpec {
///
/// \return
/// A const reference to the file specification object.
//------------------------------------------------------------------
lldb::SBFileSpec GetPlatformFileSpec();

void SetPlatformFileSpec(const lldb::SBFileSpec &fspec);
Expand Down
2 changes: 0 additions & 2 deletions lldb/include/lldb/API/SBPlatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ class LLDB_API SBPlatform {

bool IsConnected();

//----------------------------------------------------------------------
// The following functions will work if the platform is connected
//----------------------------------------------------------------------
const char *GetTriple();

const char *GetHostname();
Expand Down
36 changes: 0 additions & 36 deletions lldb/include/lldb/API/SBProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,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),
Expand Down Expand Up @@ -72,11 +70,9 @@ class LLDB_API SBProcess {
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,
Expand All @@ -85,9 +81,7 @@ class LLDB_API SBProcess {
uint32_t launch_flags, bool stop_at_entry,
lldb::SBError &error);

//------------------------------------------------------------------
// Thread related functions
//------------------------------------------------------------------
uint32_t GetNumThreads();

lldb::SBThread GetThreadAtIndex(size_t index);
Expand All @@ -98,12 +92,10 @@ class LLDB_API SBProcess {

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);
Expand All @@ -112,24 +104,19 @@ class LLDB_API SBProcess {

bool SetSelectedThreadByIndexID(uint32_t index_id);

//------------------------------------------------------------------
// Queue related functions
//------------------------------------------------------------------
uint32_t GetNumQueues();

lldb::SBQueue GetQueueAtIndex(size_t index);

//------------------------------------------------------------------
// Stepping related functions
//------------------------------------------------------------------

lldb::StateType GetState();

int GetExitStatus();

const char *GetExitDescription();

//------------------------------------------------------------------
/// Gets the process ID
///
/// Returns the process identifier for the process as it is known
Expand All @@ -142,10 +129,8 @@ class LLDB_API SBProcess {
/// 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
Expand All @@ -157,7 +142,6 @@ class LLDB_API SBProcess {
/// 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;
Expand All @@ -182,7 +166,6 @@ class LLDB_API SBProcess {

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
Expand All @@ -193,7 +176,6 @@ class LLDB_API SBProcess {
///
/// \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);
Expand Down Expand Up @@ -236,7 +218,6 @@ class LLDB_API SBProcess {

bool GetDescription(lldb::SBStream &description);

//------------------------------------------------------------------
/// Start Tracing with the given SBTraceOptions.
///
/// \param[in] options
Expand All @@ -260,12 +241,10 @@ class LLDB_API SBProcess {
/// \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
Expand All @@ -281,10 +260,8 @@ class LLDB_API SBProcess {
/// 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
Expand All @@ -309,12 +286,10 @@ class LLDB_API SBProcess {
/// 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.
Expand Down Expand Up @@ -342,7 +317,6 @@ class LLDB_API SBProcess {
/// 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,
Expand All @@ -352,7 +326,6 @@ class LLDB_API SBProcess {

lldb::SBError SendEventData(const char *data);

//------------------------------------------------------------------
/// Return the number of different thread-origin extended backtraces
/// this process can support.
///
Expand All @@ -364,10 +337,8 @@ class LLDB_API SBProcess {
/// \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.
///
Expand All @@ -379,7 +350,6 @@ class LLDB_API SBProcess {
///
/// \return
/// The name at that index.
//------------------------------------------------------------------
const char *GetExtendedBacktraceTypeAtIndex(uint32_t idx);

lldb::SBThreadCollection GetHistoryThreads(addr_t addr);
Expand All @@ -389,7 +359,6 @@ class LLDB_API SBProcess {
/// 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.
Expand All @@ -404,25 +373,20 @@ class LLDB_API SBProcess {
/// \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();

//------------------------------------------------------------------
/// 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:
Expand Down
4 changes: 0 additions & 4 deletions lldb/include/lldb/API/SBSection.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class LLDB_API SBSection {

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.
Expand All @@ -65,19 +64,16 @@ class LLDB_API SBSection {
///
/// \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
/// The number of host (8-bit) bytes needed to hold a target byte
//------------------------------------------------------------------
uint32_t GetTargetByteSize();

bool operator==(const lldb::SBSection &rhs);
Expand Down
18 changes: 0 additions & 18 deletions lldb/include/lldb/API/SBStructuredData.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,53 +40,36 @@ class SBStructuredData {

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
Expand All @@ -102,7 +85,6 @@ class SBStructuredData {
/// \return
/// Returns the byte size needed to completely write the string value at
/// \a dst in all cases.
//------------------------------------------------------------------
size_t GetStringValue(char *dst, size_t dst_len) const;

protected:
Expand Down
4 changes: 0 additions & 4 deletions lldb/include/lldb/API/SBSymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,12 @@ class LLDB_API SBSymbol {

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:
Expand Down
70 changes: 0 additions & 70 deletions lldb/include/lldb/API/SBTarget.h

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions lldb/include/lldb/API/SBThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class LLDB_API SBThread {
/// See also GetStopReasonDataAtIndex().
size_t GetStopReasonDataCount();

//--------------------------------------------------------------------------
/// Get information associated with a stop reason.
///
/// Breakpoint stop reasons will have data that consists of pairs of
Expand All @@ -68,7 +67,6 @@ class LLDB_API SBThread {
/// eStopReasonException N exception data
/// eStopReasonExec 0
/// eStopReasonPlanComplete 0
//--------------------------------------------------------------------------
uint64_t GetStopReasonDataAtIndex(uint32_t idx);

bool GetStopReasonExtendedInfoAsJSON(lldb::SBStream &stream);
Expand Down Expand Up @@ -134,7 +132,6 @@ class LLDB_API SBThread {

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
Expand All @@ -154,7 +151,6 @@ class LLDB_API SBThread {
/// 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);
Expand Down
2 changes: 0 additions & 2 deletions lldb/include/lldb/API/SBThreadPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class LLDB_API SBThreadPlan {
/// See also GetStopReasonDataAtIndex().
size_t GetStopReasonDataCount();

//--------------------------------------------------------------------------
/// Get information associated with a stop reason.
///
/// Breakpoint stop reasons will have data that consists of pairs of
Expand All @@ -59,7 +58,6 @@ class LLDB_API SBThreadPlan {
/// eStopReasonException N exception data
/// eStopReasonExec 0
/// eStopReasonPlanComplete 0
//--------------------------------------------------------------------------
uint64_t GetStopReasonDataAtIndex(uint32_t idx);

SBThread GetThread() const;
Expand Down
8 changes: 0 additions & 8 deletions lldb/include/lldb/API/SBTrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace lldb {
class LLDB_API SBTrace {
public:
SBTrace();
//------------------------------------------------------------------
/// Obtain the trace data as raw bytes.
///
/// \param[out] error
Expand Down Expand Up @@ -47,19 +46,15 @@ class LLDB_API SBTrace {
///
/// \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.
///
Expand All @@ -80,11 +75,9 @@ class LLDB_API SBTrace {
/// 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.
Expand All @@ -95,7 +88,6 @@ class LLDB_API SBTrace {
///
/// \param[out] error
/// An error explaining what went wrong.
//------------------------------------------------------------------
void GetTraceConfig(SBTraceOptions &options, SBError &error);

lldb::user_id_t GetTraceUID();
Expand Down
16 changes: 0 additions & 16 deletions lldb/include/lldb/API/SBValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ class LLDB_API SBValue {
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
Expand Down Expand Up @@ -190,7 +189,6 @@ class LLDB_API SBValue {
///
/// \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);
Expand All @@ -217,7 +215,6 @@ class LLDB_API SBValue {

lldb::SBAddress GetAddress();

//------------------------------------------------------------------
/// Get an SBData wrapping what this SBValue points to.
///
/// This method will dereference the current SBValue, if its
Expand All @@ -237,10 +234,8 @@ class LLDB_API SBValue {
/// \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
Expand All @@ -249,14 +244,12 @@ class LLDB_API SBValue {
/// \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
Expand All @@ -271,7 +264,6 @@ class LLDB_API SBValue {
/// \return
/// Returns \b true if the SBValue might have children, or \b
/// false otherwise.
//------------------------------------------------------------------
bool MightHaveChildren();

bool IsRuntimeSupportValue();
Expand Down Expand Up @@ -315,7 +307,6 @@ class LLDB_API SBValue {

SBValue(const lldb::ValueObjectSP &value_sp);

//------------------------------------------------------------------
/// Watch this value if it resides in memory.
///
/// Sets a watchpoint on the value.
Expand All @@ -340,14 +331,12 @@ class LLDB_API SBValue {
/// 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.
Expand All @@ -372,11 +361,9 @@ class LLDB_API SBValue {
/// 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,
Expand All @@ -388,7 +375,6 @@ class LLDB_API SBValue {
/// \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:
Expand All @@ -398,7 +384,6 @@ class LLDB_API SBValue {
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,
Expand All @@ -422,7 +407,6 @@ class LLDB_API SBValue {
/// \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
Expand Down
104 changes: 0 additions & 104 deletions lldb/include/lldb/Breakpoint/Breakpoint.h

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions lldb/include/lldb/Breakpoint/BreakpointID.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

namespace lldb_private {

//----------------------------------------------------------------------
// class BreakpointID
//----------------------------------------------------------------------

class BreakpointID {
public:
Expand Down Expand Up @@ -50,7 +48,6 @@ class BreakpointID {
static bool IsValidIDExpression(llvm::StringRef str);
static llvm::ArrayRef<llvm::StringRef> GetRangeSpecifiers();

//------------------------------------------------------------------
/// Takes an input string containing the description of a breakpoint or
/// breakpoint and location and returns a BreakpointID filled out with
/// the proper id and location.
Expand All @@ -61,11 +58,9 @@ class BreakpointID {
/// If \p input was not a valid breakpoint ID string, returns
/// \b llvm::None. Otherwise returns a BreakpointID with members filled
/// out accordingly.
//------------------------------------------------------------------
static llvm::Optional<BreakpointID>
ParseCanonicalReference(llvm::StringRef input);

//------------------------------------------------------------------
/// Takes an input string and checks to see whether it is a breakpoint name.
/// If it is a mal-formed breakpoint name, error will be set to an appropriate
/// error string.
Expand All @@ -78,10 +73,8 @@ class BreakpointID {
/// \return
/// \b true if the name is a breakpoint name (as opposed to an ID or
/// range) false otherwise.
//------------------------------------------------------------------
static bool StringIsBreakpointName(llvm::StringRef str, Status &error);

//------------------------------------------------------------------
/// Takes a breakpoint ID and the breakpoint location id and returns
/// a string containing the canonical description for the breakpoint
/// or breakpoint location.
Expand All @@ -92,7 +85,6 @@ class BreakpointID {
/// \param[out] break_loc_id
/// This is breakpoint location id, or LLDB_INVALID_BREAK_ID is no
/// location is to be specified.
//------------------------------------------------------------------
static void GetCanonicalReference(Stream *s, lldb::break_id_t break_id,
lldb::break_id_t break_loc_id);

Expand Down
2 changes: 0 additions & 2 deletions lldb/include/lldb/Breakpoint/BreakpointIDList.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@

namespace lldb_private {

//----------------------------------------------------------------------
// class BreakpointIDList
//----------------------------------------------------------------------

class BreakpointIDList {
public:
Expand Down
28 changes: 0 additions & 28 deletions lldb/include/lldb/Breakpoint/BreakpointList.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,30 @@

namespace lldb_private {

//----------------------------------------------------------------------
/// \class BreakpointList BreakpointList.h "lldb/Breakpoint/BreakpointList.h"
/// This class manages a list of breakpoints.
//----------------------------------------------------------------------

//----------------------------------------------------------------------
/// General Outline:
/// Allows adding and removing breakpoints and find by ID and index.
//----------------------------------------------------------------------

class BreakpointList {
public:
BreakpointList(bool is_internal);

~BreakpointList();

//------------------------------------------------------------------
/// Add the breakpoint \a bp_sp to the list.
///
/// \param[in] bp_sp
/// Shared pointer to the breakpoint that will get added to the list.
///
/// \result
/// Returns breakpoint id.
//------------------------------------------------------------------
lldb::break_id_t Add(lldb::BreakpointSP &bp_sp, bool notify);

//------------------------------------------------------------------
/// Standard "Dump" method. At present it does nothing.
//------------------------------------------------------------------
void Dump(Stream *s) const;

//------------------------------------------------------------------
/// Returns a shared pointer to the breakpoint with id \a breakID. Const
/// version.
///
Expand All @@ -58,10 +49,8 @@ class BreakpointList {
/// \result
/// A shared pointer to the breakpoint. May contain a NULL pointer if the
/// breakpoint doesn't exist.
//------------------------------------------------------------------
lldb::BreakpointSP FindBreakpointByID(lldb::break_id_t breakID) const;

//------------------------------------------------------------------
/// Returns a shared pointer to the breakpoint with index \a i.
///
/// \param[in] i
Expand All @@ -70,43 +59,35 @@ class BreakpointList {
/// \result
/// A shared pointer to the breakpoint. May contain a NULL pointer if the
/// breakpoint doesn't exist.
//------------------------------------------------------------------
lldb::BreakpointSP GetBreakpointAtIndex(size_t i) const;

//------------------------------------------------------------------
/// Find all the breakpoints with a given name
///
/// \param[in] name
/// The breakpoint name for which to search.
///
/// \result
/// \bfalse if the input name was not a legal breakpoint name.
//------------------------------------------------------------------
bool FindBreakpointsByName(const char *name, BreakpointList &matching_bps);

//------------------------------------------------------------------
/// Returns the number of elements in this breakpoint list.
///
/// \result
/// The number of elements.
//------------------------------------------------------------------
size_t GetSize() const {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
return m_breakpoints.size();
}

//------------------------------------------------------------------
/// Removes the breakpoint given by \b breakID from this list.
///
/// \param[in] breakID
/// The breakpoint index to remove.
///
/// \result
/// \b true if the breakpoint \a breakID was in the list.
//------------------------------------------------------------------
bool Remove(lldb::break_id_t breakID, bool notify);

//------------------------------------------------------------------
/// Removes all invalid breakpoint locations.
///
/// Removes all breakpoint locations in the list with architectures that
Expand All @@ -120,26 +101,20 @@ class BreakpointList {
/// \param[in] arch
/// If valid, check the module in each breakpoint to make sure
/// they are compatible, otherwise, ignore architecture.
//------------------------------------------------------------------
void RemoveInvalidLocations(const ArchSpec &arch);

void SetEnabledAll(bool enabled);

void SetEnabledAllowed(bool enabled);

//------------------------------------------------------------------
/// Removes all the breakpoints from this list.
//------------------------------------------------------------------
void RemoveAll(bool notify);

//------------------------------------------------------------------
/// Removes all the breakpoints from this list - first checking the
/// ePermDelete on the breakpoints. This call should be used unless you are
/// shutting down and need to actually clear them all.
//------------------------------------------------------------------
void RemoveAllowed(bool notify);

//------------------------------------------------------------------
/// Tell all the breakpoints to update themselves due to a change in the
/// modules in \a module_list. \a added says whether the module was loaded
/// or unloaded.
Expand All @@ -153,7 +128,6 @@ class BreakpointList {
/// \param[in] delete_locations
/// If \a load is \b false, then delete breakpoint locations when
/// when updating breakpoints.
//------------------------------------------------------------------
void UpdateBreakpoints(ModuleList &module_list, bool load,
bool delete_locations);

Expand All @@ -162,12 +136,10 @@ class BreakpointList {

void ClearAllBreakpointSites();

//------------------------------------------------------------------
/// Sets the passed in Locker to hold the Breakpoint List mutex.
///
/// \param[in] locker
/// The locker object that is set.
//------------------------------------------------------------------
void GetListMutex(std::unique_lock<std::recursive_mutex> &lock);

protected:
Expand Down
70 changes: 0 additions & 70 deletions lldb/include/lldb/Breakpoint/BreakpointLocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@

namespace lldb_private {

//----------------------------------------------------------------------
/// \class BreakpointLocation BreakpointLocation.h
/// "lldb/Breakpoint/BreakpointLocation.h" Class that manages one unique (by
/// address) instance of a logical breakpoint.
//----------------------------------------------------------------------

//----------------------------------------------------------------------
/// General Outline:
/// A breakpoint location is defined by the breakpoint that produces it,
/// and the address that resulted in this particular instantiation. Each
Expand All @@ -36,35 +33,27 @@ namespace lldb_private {
/// FIXME: Should we also store some fingerprint for the location, so
/// we can map one location to the "equivalent location" on rerun? This would
/// be useful if you've set options on the locations.
//----------------------------------------------------------------------

class BreakpointLocation
: public std::enable_shared_from_this<BreakpointLocation>,
public StoppointLocation {
public:
~BreakpointLocation() override;

//------------------------------------------------------------------
/// Gets the load address for this breakpoint location \return
/// Returns breakpoint location load address, \b
/// LLDB_INVALID_ADDRESS if not yet set.
//------------------------------------------------------------------
lldb::addr_t GetLoadAddress() const override;

//------------------------------------------------------------------
/// Gets the Address for this breakpoint location \return
/// Returns breakpoint location Address.
//------------------------------------------------------------------
Address &GetAddress();
//------------------------------------------------------------------
/// Gets the Breakpoint that created this breakpoint location \return
/// Returns the owning breakpoint.
//------------------------------------------------------------------
Breakpoint &GetBreakpoint();

Target &GetTarget();

//------------------------------------------------------------------
/// Determines whether we should stop due to a hit at this breakpoint
/// location.
///
Expand All @@ -74,56 +63,40 @@ class BreakpointLocation
/// \return
/// \b true if this breakpoint location thinks we should stop,
/// \b false otherwise.
//------------------------------------------------------------------
bool ShouldStop(StoppointCallbackContext *context) override;

//------------------------------------------------------------------
// The next section deals with various breakpoint options.
//------------------------------------------------------------------

//------------------------------------------------------------------
/// If \a enable is \b true, enable the breakpoint, if \b false disable it.
//------------------------------------------------------------------
void SetEnabled(bool enabled);

//------------------------------------------------------------------
/// Check the Enable/Disable state.
///
/// \return
/// \b true if the breakpoint is enabled, \b false if disabled.
//------------------------------------------------------------------
bool IsEnabled() const;

//------------------------------------------------------------------
/// If \a auto_continue is \b true, set the breakpoint to continue when hit.
//------------------------------------------------------------------
void SetAutoContinue(bool auto_continue);

//------------------------------------------------------------------
/// Check the AutoContinue state.
///
/// \return
/// \b true if the breakpoint is set to auto-continue, \b false if not.
//------------------------------------------------------------------
bool IsAutoContinue() const;

//------------------------------------------------------------------
/// Return the current Ignore Count.
///
/// \return
/// The number of breakpoint hits to be ignored.
//------------------------------------------------------------------
uint32_t GetIgnoreCount();

//------------------------------------------------------------------
/// Set the breakpoint to ignore the next \a count breakpoint hits.
///
/// \param[in] count
/// The number of breakpoint hits to ignore.
//------------------------------------------------------------------
void SetIgnoreCount(uint32_t n);

//------------------------------------------------------------------
/// Set the callback action invoked when the breakpoint is hit.
///
/// The callback will return a bool indicating whether the target should
Expand All @@ -137,7 +110,6 @@ class BreakpointLocation
/// for the callback.
///
/// \see lldb_private::Baton
//------------------------------------------------------------------
void SetCallback(BreakpointHitCallback callback,
const lldb::BatonSP &callback_baton_sp, bool is_synchronous);

Expand All @@ -146,31 +118,25 @@ class BreakpointLocation

void ClearCallback();

//------------------------------------------------------------------
/// Set the breakpoint location's condition.
///
/// \param[in] condition
/// The condition expression to evaluate when the breakpoint is hit.
//------------------------------------------------------------------
void SetCondition(const char *condition);

//------------------------------------------------------------------
/// Return a pointer to the text of the condition expression.
///
/// \return
/// A pointer to the condition expression text, or nullptr if no
// condition has been set.
//------------------------------------------------------------------
const char *GetConditionText(size_t *hash = nullptr) const;

bool ConditionSaysStop(ExecutionContext &exe_ctx, Status &error);

//------------------------------------------------------------------
/// Set the valid thread to be checked when the breakpoint is hit.
///
/// \param[in] thread_id
/// If this thread hits the breakpoint, we stop, otherwise not.
//------------------------------------------------------------------
void SetThreadID(lldb::tid_t thread_id);

lldb::tid_t GetThreadID();
Expand All @@ -187,43 +153,32 @@ class BreakpointLocation

const char *GetQueueName() const;

//------------------------------------------------------------------
// The next section deals with this location's breakpoint sites.
//------------------------------------------------------------------

//------------------------------------------------------------------
/// Try to resolve the breakpoint site for this location.
///
/// \return
/// \b true if we were successful at setting a breakpoint site,
/// \b false otherwise.
//------------------------------------------------------------------
bool ResolveBreakpointSite();

//------------------------------------------------------------------
/// Clear this breakpoint location's breakpoint site - for instance when
/// disabling the breakpoint.
///
/// \return
/// \b true if there was a breakpoint site to be cleared, \b false
/// otherwise.
//------------------------------------------------------------------
bool ClearBreakpointSite();

//------------------------------------------------------------------
/// Return whether this breakpoint location has a breakpoint site. \return
/// \b true if there was a breakpoint site for this breakpoint
/// location, \b false otherwise.
//------------------------------------------------------------------
bool IsResolved() const;

lldb::BreakpointSiteSP GetBreakpointSite() const;

//------------------------------------------------------------------
// The next section are generic report functions.
//------------------------------------------------------------------

//------------------------------------------------------------------
/// Print a description of this breakpoint location to the stream \a s.
///
/// \param[in] s
Expand All @@ -234,26 +189,20 @@ class BreakpointLocation
/// provide.
///
/// \see lldb::DescriptionLevel
//------------------------------------------------------------------
void GetDescription(Stream *s, lldb::DescriptionLevel level);

//------------------------------------------------------------------
/// Standard "Dump" method. At present it does nothing.
//------------------------------------------------------------------
void Dump(Stream *s) const override;

//------------------------------------------------------------------
/// Use this to set location specific breakpoint options.
///
/// It will create a copy of the containing breakpoint's options if that
/// hasn't been done already
///
/// \return
/// A pointer to the breakpoint options.
//------------------------------------------------------------------
BreakpointOptions *GetLocationOptions();

//------------------------------------------------------------------
/// Use this to access breakpoint options from this breakpoint location.
/// This will return the options that have a setting for the specified
/// BreakpointOptions kind.
Expand All @@ -263,13 +212,11 @@ class BreakpointLocation
/// \return
/// A pointer to the containing breakpoint's options if this
/// location doesn't have its own copy.
//------------------------------------------------------------------
const BreakpointOptions *GetOptionsSpecifyingKind(
BreakpointOptions::OptionKind kind) const;

bool ValidForThisThread(Thread *thread);

//------------------------------------------------------------------
/// Invoke the callback action when the breakpoint is hit.
///
/// Meant to be used by the BreakpointLocation class.
Expand All @@ -283,44 +230,36 @@ class BreakpointLocation
/// \return
/// \b true if the target should stop at this breakpoint and \b
/// false not.
//------------------------------------------------------------------
bool InvokeCallback(StoppointCallbackContext *context);

//------------------------------------------------------------------
/// Returns whether we should resolve Indirect functions in setting the
/// breakpoint site for this location.
///
/// \return
/// \b true if the breakpoint SITE for this location should be set on the
/// resolved location for Indirect functions.
//------------------------------------------------------------------
bool ShouldResolveIndirectFunctions() {
return m_should_resolve_indirect_functions;
}

//------------------------------------------------------------------
/// Returns whether the address set in the breakpoint site for this location
/// was found by resolving an indirect symbol.
///
/// \return
/// \b true or \b false as given in the description above.
//------------------------------------------------------------------
bool IsIndirect() { return m_is_indirect; }

void SetIsIndirect(bool is_indirect) { m_is_indirect = is_indirect; }

//------------------------------------------------------------------
/// Returns whether the address set in the breakpoint location was re-routed
/// to the target of a re-exported symbol.
///
/// \return
/// \b true or \b false as given in the description above.
//------------------------------------------------------------------
bool IsReExported() { return m_is_reexported; }

void SetIsReExported(bool is_reexported) { m_is_reexported = is_reexported; }

//------------------------------------------------------------------
/// Returns whether the two breakpoint locations might represent "equivalent
/// locations". This is used when modules changed to determine if a Location
/// in the old module might be the "same as" the input location.
Expand All @@ -330,7 +269,6 @@ class BreakpointLocation
///
/// \return
/// \b true or \b false as given in the description above.
//------------------------------------------------------------------
bool EquivalentToLocation(BreakpointLocation &location);

protected:
Expand All @@ -339,7 +277,6 @@ class BreakpointLocation
friend class Process;
friend class StopInfoBreakpoint;

//------------------------------------------------------------------
/// Set the breakpoint site for this location to \a bp_site_sp.
///
/// \param[in] bp_site_sp
Expand All @@ -348,7 +285,6 @@ class BreakpointLocation
/// \return
/// \b true if we were successful at setting the breakpoint site,
/// \b false otherwise.
//------------------------------------------------------------------
bool SetBreakpointSite(lldb::BreakpointSiteSP &bp_site_sp);

void DecrementIgnoreCount();
Expand All @@ -362,13 +298,10 @@ class BreakpointLocation

void UndoBumpHitCount();

//------------------------------------------------------------------
// Constructors and Destructors
//
// Only the Breakpoint can make breakpoint locations, and it owns them.
//------------------------------------------------------------------

//------------------------------------------------------------------
/// Constructor.
///
/// \param[in] owner
Expand All @@ -383,15 +316,12 @@ class BreakpointLocation
///
/// \param[in] hardware
/// \b true if a hardware breakpoint is requested.
//------------------------------------------------------------------

BreakpointLocation(lldb::break_id_t bid, Breakpoint &owner,
const Address &addr, lldb::tid_t tid, bool hardware,
bool check_for_resolver = true);

//------------------------------------------------------------------
// Data members:
//------------------------------------------------------------------
bool m_being_created;
bool m_should_resolve_indirect_functions;
bool m_is_reexported;
Expand Down
26 changes: 0 additions & 26 deletions lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class BreakpointLocationCollection {

BreakpointLocationCollection &operator=(const BreakpointLocationCollection &rhs);

//------------------------------------------------------------------
/// Add the breakpoint \a bp_loc_sp to the list.
///
/// \param[in] bp_sp
Expand All @@ -34,10 +33,8 @@ class BreakpointLocationCollection {
///
/// \result
/// Returns breakpoint location id.
//------------------------------------------------------------------
void Add(const lldb::BreakpointLocationSP &bp_loc_sp);

//------------------------------------------------------------------
/// Removes the breakpoint location given by \b breakID from this
/// list.
///
Expand All @@ -49,10 +46,8 @@ class BreakpointLocationCollection {
///
/// \result
/// \b true if the breakpoint was in the list.
//------------------------------------------------------------------
bool Remove(lldb::break_id_t break_id, lldb::break_id_t break_loc_id);

//------------------------------------------------------------------
/// Returns a shared pointer to the breakpoint location with id \a
/// breakID.
///
Expand All @@ -65,11 +60,9 @@ class BreakpointLocationCollection {
/// \result
/// A shared pointer to the breakpoint. May contain a NULL
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
lldb::BreakpointLocationSP FindByIDPair(lldb::break_id_t break_id,
lldb::break_id_t break_loc_id);

//------------------------------------------------------------------
/// Returns a shared pointer to the breakpoint location with id \a
/// breakID, const version.
///
Expand All @@ -82,11 +75,9 @@ class BreakpointLocationCollection {
/// \result
/// A shared pointer to the breakpoint. May contain a NULL
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
const lldb::BreakpointLocationSP
FindByIDPair(lldb::break_id_t break_id, lldb::break_id_t break_loc_id) const;

//------------------------------------------------------------------
/// Returns a shared pointer to the breakpoint location with index
/// \a i.
///
Expand All @@ -96,10 +87,8 @@ class BreakpointLocationCollection {
/// \result
/// A shared pointer to the breakpoint. May contain a NULL
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
lldb::BreakpointLocationSP GetByIndex(size_t i);

//------------------------------------------------------------------
/// Returns a shared pointer to the breakpoint location with index
/// \a i, const version.
///
Expand All @@ -109,18 +98,14 @@ class BreakpointLocationCollection {
/// \result
/// A shared pointer to the breakpoint. May contain a NULL
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
const lldb::BreakpointLocationSP GetByIndex(size_t i) const;

//------------------------------------------------------------------
/// Returns the number of elements in this breakpoint location list.
///
/// \result
/// The number of elements.
//------------------------------------------------------------------
size_t GetSize() const { return m_break_loc_collection.size(); }

//------------------------------------------------------------------
/// Enquires of all the breakpoint locations in this list whether
/// we should stop at a hit at \a breakID.
///
Expand All @@ -132,10 +117,8 @@ class BreakpointLocationCollection {
///
/// \return
/// \b true if we should stop, \b false otherwise.
//------------------------------------------------------------------
bool ShouldStop(StoppointCallbackContext *context);

//------------------------------------------------------------------
/// Print a description of the breakpoint locations in this list
/// to the stream \a s.
///
Expand All @@ -147,10 +130,8 @@ class BreakpointLocationCollection {
/// provide.
///
/// \see lldb::DescriptionLevel
//------------------------------------------------------------------
void GetDescription(Stream *s, lldb::DescriptionLevel level);

//------------------------------------------------------------------
/// Check whether this collection of breakpoint locations have any
/// thread specifiers, and if yes, is \a thread_id contained in any
/// of these specifiers.
Expand All @@ -161,28 +142,21 @@ class BreakpointLocationCollection {
/// return
/// \b true if the collection contains at least one location that
/// would be valid for this thread, false otherwise.
//------------------------------------------------------------------
bool ValidForThisThread(Thread *thread);

//------------------------------------------------------------------
/// Tell whether ALL the breakpoints in the location collection are internal.
///
/// \result
/// \b true if all breakpoint locations are owned by internal breakpoints,
/// \b false otherwise.
//------------------------------------------------------------------
bool IsInternal() const;

protected:
//------------------------------------------------------------------
// Classes that inherit from BreakpointLocationCollection can see and modify
// these
//------------------------------------------------------------------

private:
//------------------------------------------------------------------
// For BreakpointLocationCollection only
//------------------------------------------------------------------

typedef std::vector<lldb::BreakpointLocationSP> collection;

Expand Down
34 changes: 0 additions & 34 deletions lldb/include/lldb/Breakpoint/BreakpointLocationList.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@

namespace lldb_private {

//----------------------------------------------------------------------
/// \class BreakpointLocationList BreakpointLocationList.h
/// "lldb/Breakpoint/BreakpointLocationList.h" This class is used by
/// Breakpoint to manage a list of breakpoint locations, each breakpoint
/// location in the list has a unique ID, and is unique by Address as well.
//----------------------------------------------------------------------
class BreakpointLocationList {
// Only Breakpoints can make the location list, or add elements to it. This
// is not just some random collection of locations. Rather, the act of
Expand All @@ -36,12 +34,9 @@ class BreakpointLocationList {
public:
virtual ~BreakpointLocationList();

//------------------------------------------------------------------
/// Standard "Dump" method. At present it does nothing.
//------------------------------------------------------------------
void Dump(Stream *s) const;

//------------------------------------------------------------------
/// Returns a shared pointer to the breakpoint location at address \a addr -
/// const version.
///
Expand All @@ -51,10 +46,8 @@ class BreakpointLocationList {
/// \result
/// A shared pointer to the breakpoint. May contain a nullptr
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
const lldb::BreakpointLocationSP FindByAddress(const Address &addr) const;

//------------------------------------------------------------------
/// Returns a shared pointer to the breakpoint location with id \a breakID,
/// const version.
///
Expand All @@ -64,10 +57,8 @@ class BreakpointLocationList {
/// \result
/// A shared pointer to the breakpoint. May contain a nullptr
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
lldb::BreakpointLocationSP FindByID(lldb::break_id_t breakID) const;

//------------------------------------------------------------------
/// Returns the breakpoint location id to the breakpoint location at address
/// \a addr.
///
Expand All @@ -76,10 +67,8 @@ class BreakpointLocationList {
///
/// \result
/// The ID of the breakpoint location, or LLDB_INVALID_BREAK_ID.
//------------------------------------------------------------------
lldb::break_id_t FindIDByAddress(const Address &addr);

//------------------------------------------------------------------
/// Returns a breakpoint location list of the breakpoint locations in the
/// module \a module. This list is allocated, and owned by the caller.
///
Expand All @@ -92,11 +81,9 @@ class BreakpointLocationList {
///
/// \result
/// The number of matches
//------------------------------------------------------------------
size_t FindInModule(Module *module,
BreakpointLocationCollection &bp_loc_list);

//------------------------------------------------------------------
/// Returns a shared pointer to the breakpoint location with index \a i.
///
/// \param[in] i
Expand All @@ -105,10 +92,8 @@ class BreakpointLocationList {
/// \result
/// A shared pointer to the breakpoint. May contain a nullptr
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
lldb::BreakpointLocationSP GetByIndex(size_t i);

//------------------------------------------------------------------
/// Returns a shared pointer to the breakpoint location with index \a i,
/// const version.
///
Expand All @@ -118,39 +103,29 @@ class BreakpointLocationList {
/// \result
/// A shared pointer to the breakpoint. May contain a nullptr
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
const lldb::BreakpointLocationSP GetByIndex(size_t i) const;

//------------------------------------------------------------------
/// Removes all the locations in this list from their breakpoint site owners
/// list.
//------------------------------------------------------------------
void ClearAllBreakpointSites();

//------------------------------------------------------------------
/// Tells all the breakpoint locations in this list to attempt to resolve
/// any possible breakpoint sites.
//------------------------------------------------------------------
void ResolveAllBreakpointSites();

//------------------------------------------------------------------
/// Returns the number of breakpoint locations in this list with resolved
/// breakpoints.
///
/// \result
/// Number of qualifying breakpoint locations.
//------------------------------------------------------------------
size_t GetNumResolvedLocations() const;

//------------------------------------------------------------------
/// Returns the number hit count of all locations in this list.
///
/// \result
/// Hit count of all locations in this list.
//------------------------------------------------------------------
uint32_t GetHitCount() const;

//------------------------------------------------------------------
/// Enquires of the breakpoint location in this list with ID \a breakID
/// whether we should stop.
///
Expand All @@ -162,18 +137,14 @@ class BreakpointLocationList {
///
/// \return
/// \b true if we should stop, \b false otherwise.
//------------------------------------------------------------------
bool ShouldStop(StoppointCallbackContext *context, lldb::break_id_t breakID);

//------------------------------------------------------------------
/// Returns the number of elements in this breakpoint location list.
///
/// \result
/// The number of elements.
//------------------------------------------------------------------
size_t GetSize() const { return m_locations.size(); }

//------------------------------------------------------------------
/// Print a description of the breakpoint locations in this list to the
/// stream \a s.
///
Expand All @@ -185,20 +156,16 @@ class BreakpointLocationList {
/// provide.
///
/// \see lldb::DescriptionLevel
//------------------------------------------------------------------
void GetDescription(Stream *s, lldb::DescriptionLevel level);

protected:
//------------------------------------------------------------------
/// This is the standard constructor.
///
/// It creates an empty breakpoint location list. It is protected here
/// because only Breakpoints are allowed to create the breakpoint location
/// list.
//------------------------------------------------------------------
BreakpointLocationList(Breakpoint &owner);

//------------------------------------------------------------------
/// Add the breakpoint \a bp_loc_sp to the list.
///
/// \param[in] bp_sp
Expand All @@ -207,7 +174,6 @@ class BreakpointLocationList {
///
/// \result
/// Returns breakpoint location id.
//------------------------------------------------------------------
lldb::BreakpointLocationSP Create(const Address &addr,
bool resolve_indirect_symbols);

Expand Down
Loading