1 //===-- BreakpointID.h ------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_BreakpointID_h_
11 #define liblldb_BreakpointID_h_
15 // Other libraries and framework includes
18 #include "lldb/lldb-private.h"
20 namespace lldb_private {
22 //----------------------------------------------------------------------
24 //----------------------------------------------------------------------
30 BreakpointID (lldb::break_id_t bp_id = LLDB_INVALID_BREAK_ID,
31 lldb::break_id_t loc_id = LLDB_INVALID_BREAK_ID);
49 SetID (lldb::break_id_t bp_id, lldb::break_id_t loc_id)
52 m_location_id = loc_id;
56 SetBreakpointID (lldb::break_id_t bp_id)
62 SetBreakpointLocationID (lldb::break_id_t loc_id)
64 m_location_id = loc_id;
68 GetDescription (Stream *s, lldb::DescriptionLevel level);
71 IsRangeIdentifier (const char *str);
74 IsValidIDExpression (const char *str);
76 static const char *g_range_specifiers[];
78 //------------------------------------------------------------------
79 /// Takes an input string containing the description of a breakpoint or breakpoint and location
80 /// and returns the breakpoint ID and the breakpoint location id.
83 /// A string containing JUST the breakpoint description.
84 /// @param[out] break_id
85 /// This is the break id.
86 /// @param[out] break_loc_id
87 /// This is breakpoint location id, or LLDB_INVALID_BREAK_ID is no location was specified.
89 /// \b true if the call was able to extract a breakpoint location from the string. \b false otherwise.
90 //------------------------------------------------------------------
92 ParseCanonicalReference (const char *input, lldb::break_id_t *break_id, lldb::break_id_t *break_loc_id);
95 //------------------------------------------------------------------
96 /// Takes an input string and checks to see whether it is a breakpoint name.
97 /// If it is a mal-formed breakpoint name, error will be set to an appropriate
101 /// A string containing JUST the breakpoint description.
102 /// @param[out] error
103 /// If the name is a well-formed breakpoint name, set to success, otherwise set to an error.
105 /// \b true if the name is a breakpoint name (as opposed to an ID or range) false otherwise.
106 //------------------------------------------------------------------
108 StringIsBreakpointName (const char *name, Error &error);
110 //------------------------------------------------------------------
111 /// Takes a breakpoint ID and the breakpoint location id and returns
112 /// a string containing the canonical description for the breakpoint
113 /// or breakpoint location.
115 /// @param[out] break_id
116 /// This is the break id.
118 /// @param[out] break_loc_id
119 /// This is breakpoint location id, or LLDB_INVALID_BREAK_ID is no
120 /// location is to be specified.
121 //------------------------------------------------------------------
123 GetCanonicalReference (Stream *s, lldb::break_id_t break_id, lldb::break_id_t break_loc_id);
126 lldb::break_id_t m_break_id;
127 lldb::break_id_t m_location_id;
130 } // namespace lldb_private
132 #endif // liblldb_BreakpointID_h_