LLDB mainline
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
lldb_private::BreakpointID Class Reference

#include <BreakpointID.h>

Public Member Functions

 BreakpointID (lldb::break_id_t bp_id=LLDB_INVALID_BREAK_ID, lldb::break_id_t loc_id=LLDB_INVALID_BREAK_ID)
 
virtual ~BreakpointID ()
 
bool operator== (BreakpointID rhs) const
 
lldb::break_id_t GetBreakpointID () const
 
lldb::break_id_t GetLocationID () const
 
void SetID (lldb::break_id_t bp_id, lldb::break_id_t loc_id)
 
void SetBreakpointID (lldb::break_id_t bp_id)
 
void SetBreakpointLocationID (lldb::break_id_t loc_id)
 
void GetDescription (Stream *s, lldb::DescriptionLevel level)
 

Static Public Member Functions

static bool IsRangeIdentifier (llvm::StringRef str)
 
static bool IsValidIDExpression (llvm::StringRef str)
 
static llvm::ArrayRef< llvm::StringRef > GetRangeSpecifiers ()
 
static std::optional< BreakpointIDParseCanonicalReference (llvm::StringRef input)
 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.
 
static bool StringIsBreakpointName (llvm::StringRef str, Status &error)
 Takes an input string and checks to see whether it is a breakpoint name.
 
static void GetCanonicalReference (Stream *s, lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
 Takes a breakpoint ID and the breakpoint location id and returns a string containing the canonical description for the breakpoint or breakpoint location.
 

Protected Attributes

lldb::break_id_t m_break_id
 
lldb::break_id_t m_location_id
 

Detailed Description

Definition at line 22 of file BreakpointID.h.

Constructor & Destructor Documentation

◆ BreakpointID()

BreakpointID::BreakpointID ( lldb::break_id_t  bp_id = LLDB_INVALID_BREAK_ID,
lldb::break_id_t  loc_id = LLDB_INVALID_BREAK_ID 
)

Definition at line 20 of file BreakpointID.cpp.

◆ ~BreakpointID()

BreakpointID::~BreakpointID ( )
virtualdefault

Member Function Documentation

◆ GetBreakpointID()

lldb::break_id_t lldb_private::BreakpointID::GetBreakpointID ( ) const
inline

◆ GetCanonicalReference()

void BreakpointID::GetCanonicalReference ( Stream s,
lldb::break_id_t  break_id,
lldb::break_id_t  break_loc_id 
)
static

Takes a breakpoint ID and the breakpoint location id and returns a string containing the canonical description for the breakpoint or breakpoint location.

Parameters
[out]break_idThis is the break id.
[out]break_loc_idThis is breakpoint location id, or LLDB_INVALID_BREAK_ID is no location is to be specified.

Definition at line 56 of file BreakpointID.cpp.

References LLDB_INVALID_BREAK_ID, lldb_private::Stream::Printf(), and lldb_private::Stream::PutCString().

Referenced by CommandObjectBreakpointCommandList::DoExecute(), lldb_private::BreakpointIDList::FindAndReplaceIDRanges(), lldb_private::BreakpointLocation::GetDescription(), and lldb_private::CommandObjectMultiwordBreakpoint::VerifyIDs().

◆ GetDescription()

void BreakpointID::GetDescription ( Stream s,
lldb::DescriptionLevel  level 
)

◆ GetLocationID()

lldb::break_id_t lldb_private::BreakpointID::GetLocationID ( ) const
inline

◆ GetRangeSpecifiers()

llvm::ArrayRef< llvm::StringRef > BreakpointID::GetRangeSpecifiers ( )
static

◆ IsRangeIdentifier()

bool BreakpointID::IsRangeIdentifier ( llvm::StringRef  str)
static

◆ IsValidIDExpression()

bool BreakpointID::IsValidIDExpression ( llvm::StringRef  str)
static

◆ operator==()

bool lldb_private::BreakpointID::operator== ( BreakpointID  rhs) const
inline

Definition at line 29 of file BreakpointID.h.

References m_break_id, and m_location_id.

◆ ParseCanonicalReference()

std::optional< BreakpointID > BreakpointID::ParseCanonicalReference ( llvm::StringRef  input)
static

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.

Parameters
[in]inputA string containing JUST the breakpoint description.
Returns
If input was not a valid breakpoint ID string, returns std::nullopt. Otherwise returns a BreakpointID with members filled out accordingly.

Definition at line 67 of file BreakpointID.cpp.

References LLDB_INVALID_BREAK_ID.

Referenced by lldb_private::BreakpointIDList::FindAndReplaceIDRanges(), IsValidIDExpression(), and lldb_private::CommandObjectMultiwordBreakpoint::VerifyIDs().

◆ SetBreakpointID()

void lldb_private::BreakpointID::SetBreakpointID ( lldb::break_id_t  bp_id)
inline

Definition at line 42 of file BreakpointID.h.

References m_break_id.

◆ SetBreakpointLocationID()

void lldb_private::BreakpointID::SetBreakpointLocationID ( lldb::break_id_t  loc_id)
inline

Definition at line 44 of file BreakpointID.h.

References m_location_id.

Referenced by CommandObjectProcessContinue::DoExecute().

◆ SetID()

void lldb_private::BreakpointID::SetID ( lldb::break_id_t  bp_id,
lldb::break_id_t  loc_id 
)
inline

Definition at line 37 of file BreakpointID.h.

References m_break_id, and m_location_id.

◆ StringIsBreakpointName()

bool BreakpointID::StringIsBreakpointName ( llvm::StringRef  str,
Status error 
)
static

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.

Parameters
[in]strA string containing JUST the breakpoint description.
[out]errorIf the name is a well-formed breakpoint name, set to success, otherwise set to an error.
Returns
true if the name is a breakpoint name (as opposed to an ID or range) false otherwise.

Definition at line 91 of file BreakpointID.cpp.

References error().

Referenced by CommandObjectBreakpointNameConfigure::DoExecute(), lldb_private::BreakpointIDList::FindAndReplaceIDRanges(), lldb_private::Target::FindBreakpointName(), lldb_private::BreakpointList::FindBreakpointsByName(), CommandObjectBreakpointSet::CommandOptions::SetOptionValue(), BreakpointNameOptionGroup::SetOptionValue(), and CommandObjectBreakpointRead::CommandOptions::SetOptionValue().

Member Data Documentation

◆ m_break_id

lldb::break_id_t lldb_private::BreakpointID::m_break_id
protected

Definition at line 95 of file BreakpointID.h.

Referenced by GetBreakpointID(), GetDescription(), operator==(), SetBreakpointID(), and SetID().

◆ m_location_id

lldb::break_id_t lldb_private::BreakpointID::m_location_id
protected

The documentation for this class was generated from the following files: