@@ -45,9 +45,6 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
45
45
// display any breakpoint opcodes.
46
46
};
47
47
48
- typedef lldb::break_id_t SiteID;
49
- typedef lldb::break_id_t ConstituentID;
50
-
51
48
~BreakpointSite () override ;
52
49
53
50
// This section manages the breakpoint traps
@@ -80,8 +77,8 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
80
77
// / Tells whether the current breakpoint site is enabled or not
81
78
// /
82
79
// / This is a low-level enable bit for the breakpoint sites. If a
83
- // / breakpoint site has no enabled constituents , it should just get removed.
84
- // / This enable/disable is for the low-level target code to enable and disable
80
+ // / breakpoint site has no enabled owners , it should just get removed. This
81
+ // / enable/disable is for the low-level target code to enable and disable
85
82
// / breakpoint sites when single stepping, etc.
86
83
bool IsEnabled () const ;
87
84
@@ -104,46 +101,44 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
104
101
// / Standard Dump method
105
102
void Dump (Stream *s) const override ;
106
103
107
- // / The "Constituents" are the breakpoint locations that share this breakpoint
108
- // / site. The method adds the \a constituent to this breakpoint site's
109
- // / constituent list.
104
+ // / The "Owners" are the breakpoint locations that share this breakpoint
105
+ // / site. The method adds the \a owner to this breakpoint site's owner list.
110
106
// /
111
- // / \param[in] constituent
112
- // / \a constituent is the Breakpoint Location to add.
113
- void AddConstituent (const lldb::BreakpointLocationSP &constituent );
107
+ // / \param[in] owner
108
+ // / \a owner is the Breakpoint Location to add.
109
+ void AddOwner (const lldb::BreakpointLocationSP &owner );
114
110
115
111
// / This method returns the number of breakpoint locations currently located
116
112
// / at this breakpoint site.
117
113
// /
118
114
// / \return
119
- // / The number of constituents .
120
- size_t GetNumberOfConstituents ();
115
+ // / The number of owners .
116
+ size_t GetNumberOfOwners ();
121
117
122
118
// / This method returns the breakpoint location at index \a index located at
123
- // / this breakpoint site. The constituents are listed ordinally from 0 to
124
- // / GetNumberOfConstituents () - 1 so you can use this method to iterate over
125
- // / the constituents
119
+ // / this breakpoint site. The owners are listed ordinally from 0 to
120
+ // / GetNumberOfOwners () - 1 so you can use this method to iterate over the
121
+ // / owners
126
122
// /
127
123
// / \param[in] idx
128
- // / The index in the list of constituents for which you wish the
129
- // / constituent location.
124
+ // / The index in the list of owners for which you wish the owner location.
130
125
// /
131
126
// / \return
132
127
// / A shared pointer to the breakpoint location at that index.
133
- lldb::BreakpointLocationSP GetConstituentAtIndex (size_t idx);
128
+ lldb::BreakpointLocationSP GetOwnerAtIndex (size_t idx);
134
129
135
- // / This method copies the breakpoint site's constituents into a new
136
- // / collection. It does this while the constituents mutex is locked.
130
+ // / This method copies the breakpoint site's owners into a new collection.
131
+ // / It does this while the owners mutex is locked.
137
132
// /
138
133
// / \param[out] out_collection
139
- // / The BreakpointLocationCollection into which to put the constituents
134
+ // / The BreakpointLocationCollection into which to put the owners
140
135
// / of this breakpoint site.
141
136
// /
142
137
// / \return
143
138
// / The number of elements copied into out_collection.
144
- size_t CopyConstituentsList (BreakpointLocationCollection &out_collection);
139
+ size_t CopyOwnersList (BreakpointLocationCollection &out_collection);
145
140
146
- // / Check whether the constituents of this breakpoint site have any thread
141
+ // / Check whether the owners of this breakpoint site have any thread
147
142
// / specifiers, and if yes, is \a thread contained in any of these
148
143
// / specifiers.
149
144
// /
@@ -156,7 +151,7 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
156
151
bool ValidForThisThread (Thread &thread);
157
152
158
153
// / Print a description of this breakpoint site to the stream \a s.
159
- // / GetDescription tells you about the breakpoint site's constituents . Use
154
+ // / GetDescription tells you about the breakpoint site's owners . Use
160
155
// / BreakpointSite::Dump(Stream *) to get information about the breakpoint
161
156
// / site itself.
162
157
// /
@@ -208,10 +203,9 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
208
203
209
204
void BumpHitCounts ();
210
205
211
- // / The method removes the constituent at \a break_loc_id from this breakpoint
206
+ // / The method removes the owner at \a break_loc_id from this breakpoint
212
207
// / list.
213
- size_t RemoveConstituent (lldb::break_id_t break_id,
214
- lldb::break_id_t break_loc_id);
208
+ size_t RemoveOwner (lldb::break_id_t break_id, lldb::break_id_t break_loc_id);
215
209
216
210
BreakpointSite::Type m_type; // /< The type of this breakpoint site.
217
211
uint8_t m_saved_opcode[8 ]; // /< The saved opcode bytes if this breakpoint site
@@ -221,20 +215,20 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
221
215
bool
222
216
m_enabled; // /< Boolean indicating if this breakpoint site enabled or not.
223
217
224
- // Consider adding an optimization where if there is only one constituent, we
225
- // don't store a list. The usual case will be only one constituent...
226
- BreakpointLocationCollection
227
- m_constituents; // /< This has the BreakpointLocations
228
- // / that share this breakpoint site.
229
- std::recursive_mutex m_constituents_mutex; // /< This mutex protects the
230
- // /< constituents collection.
218
+ // Consider adding an optimization where if there is only one owner, we don't
219
+ // store a list. The usual case will be only one owner...
220
+ BreakpointLocationCollection m_owners; // /< This has the BreakpointLocations
221
+ // /that share this breakpoint site.
222
+ std::recursive_mutex
223
+ m_owners_mutex; // /< This mutex protects the owners collection.
231
224
232
225
static lldb::break_id_t GetNextID ();
233
226
234
227
// Only the Process can create breakpoint sites in
235
228
// Process::CreateBreakpointSite (lldb::BreakpointLocationSP &, bool).
236
- BreakpointSite (const lldb::BreakpointLocationSP &constituent,
237
- lldb::addr_t m_addr, bool use_hardware);
229
+ BreakpointSite (BreakpointSiteList *list,
230
+ const lldb::BreakpointLocationSP &owner, lldb::addr_t m_addr,
231
+ bool use_hardware);
238
232
239
233
BreakpointSite (const BreakpointSite &) = delete ;
240
234
const BreakpointSite &operator =(const BreakpointSite &) = delete ;
0 commit comments