File indexing completed on 2026-05-10 08:42:43
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_BREAKPOINT_BREAKPOINTID_H
0010 #define LLDB_BREAKPOINT_BREAKPOINTID_H
0011
0012 #include "lldb/lldb-private.h"
0013
0014 #include "llvm/ADT/ArrayRef.h"
0015 #include "llvm/ADT/StringRef.h"
0016 #include <optional>
0017
0018 namespace lldb_private {
0019
0020
0021
0022 class BreakpointID {
0023 public:
0024 BreakpointID(lldb::break_id_t bp_id = LLDB_INVALID_BREAK_ID,
0025 lldb::break_id_t loc_id = LLDB_INVALID_BREAK_ID);
0026
0027 virtual ~BreakpointID();
0028
0029 bool operator==(BreakpointID rhs) const {
0030 return m_break_id == rhs.m_break_id && m_location_id == rhs.m_location_id;
0031 }
0032
0033 lldb::break_id_t GetBreakpointID() const { return m_break_id; }
0034
0035 lldb::break_id_t GetLocationID() const { return m_location_id; }
0036
0037 void SetID(lldb::break_id_t bp_id, lldb::break_id_t loc_id) {
0038 m_break_id = bp_id;
0039 m_location_id = loc_id;
0040 }
0041
0042 void SetBreakpointID(lldb::break_id_t bp_id) { m_break_id = bp_id; }
0043
0044 void SetBreakpointLocationID(lldb::break_id_t loc_id) {
0045 m_location_id = loc_id;
0046 }
0047
0048 void GetDescription(Stream *s, lldb::DescriptionLevel level);
0049
0050 static bool IsRangeIdentifier(llvm::StringRef str);
0051 static bool IsValidIDExpression(llvm::StringRef str);
0052 static llvm::ArrayRef<llvm::StringRef> GetRangeSpecifiers();
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064 static std::optional<BreakpointID>
0065 ParseCanonicalReference(llvm::StringRef input);
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079 static bool StringIsBreakpointName(llvm::StringRef str, Status &error);
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 static void GetCanonicalReference(Stream *s, lldb::break_id_t break_id,
0092 lldb::break_id_t break_loc_id);
0093
0094 protected:
0095 lldb::break_id_t m_break_id;
0096 lldb::break_id_t m_location_id;
0097 };
0098
0099 }
0100
0101 #endif