29
29
using namespace lldb ;
30
30
using namespace lldb_private ;
31
31
32
- static void AddWatchpointDescription (Stream * s, Watchpoint * wp,
32
+ static void AddWatchpointDescription (Stream & s, Watchpoint & wp,
33
33
lldb::DescriptionLevel level) {
34
- s-> IndentMore ();
35
- wp-> GetDescription (s, level);
36
- s-> IndentLess ();
37
- s-> EOL ();
34
+ s. IndentMore ();
35
+ wp. GetDescription (& s, level);
36
+ s. IndentLess ();
37
+ s. EOL ();
38
38
}
39
39
40
40
static bool CheckTargetForWatchpointOperations (Target *target,
@@ -237,8 +237,8 @@ class CommandObjectWatchpointList : public CommandObjectParsed {
237
237
// No watchpoint selected; show info about all currently set watchpoints.
238
238
result.AppendMessage (" Current watchpoints:" );
239
239
for (size_t i = 0 ; i < num_watchpoints; ++i) {
240
- Watchpoint *wp = watchpoints.GetByIndex (i). get ( );
241
- AddWatchpointDescription (& output_stream, wp , m_options.m_level );
240
+ WatchpointSP watch_sp = watchpoints.GetByIndex (i);
241
+ AddWatchpointDescription (output_stream, *watch_sp , m_options.m_level );
242
242
}
243
243
result.SetStatus (eReturnStatusSuccessFinishNoResult);
244
244
} else {
@@ -252,9 +252,9 @@ class CommandObjectWatchpointList : public CommandObjectParsed {
252
252
253
253
const size_t size = wp_ids.size ();
254
254
for (size_t i = 0 ; i < size; ++i) {
255
- Watchpoint *wp = watchpoints.FindByID (wp_ids[i]). get ( );
256
- if (wp )
257
- AddWatchpointDescription (& output_stream, wp , m_options.m_level );
255
+ WatchpointSP watch_sp = watchpoints.FindByID (wp_ids[i]);
256
+ if (watch_sp )
257
+ AddWatchpointDescription (output_stream, *watch_sp , m_options.m_level );
258
258
result.SetStatus (eReturnStatusSuccessFinishNoResult);
259
259
}
260
260
}
@@ -758,8 +758,8 @@ class CommandObjectWatchpointModify : public CommandObjectParsed {
758
758
}
759
759
760
760
if (command.GetArgumentCount () == 0 ) {
761
- WatchpointSP wp_sp = target->GetLastCreatedWatchpoint ();
762
- wp_sp ->SetCondition (m_options.m_condition .c_str ());
761
+ WatchpointSP watch_sp = target->GetLastCreatedWatchpoint ();
762
+ watch_sp ->SetCondition (m_options.m_condition .c_str ());
763
763
result.SetStatus (eReturnStatusSuccessFinishNoResult);
764
764
} else {
765
765
// Particular watchpoints selected; set condition on them.
@@ -773,9 +773,9 @@ class CommandObjectWatchpointModify : public CommandObjectParsed {
773
773
int count = 0 ;
774
774
const size_t size = wp_ids.size ();
775
775
for (size_t i = 0 ; i < size; ++i) {
776
- WatchpointSP wp_sp = watchpoints.FindByID (wp_ids[i]);
777
- if (wp_sp ) {
778
- wp_sp ->SetCondition (m_options.m_condition .c_str ());
776
+ WatchpointSP watch_sp = watchpoints.FindByID (wp_ids[i]);
777
+ if (watch_sp ) {
778
+ watch_sp ->SetCondition (m_options.m_condition .c_str ());
779
779
++count;
780
780
}
781
781
}
@@ -949,19 +949,19 @@ corresponding to the byte size of the data type.");
949
949
uint32_t watch_type = m_option_watchpoint.watch_type ;
950
950
951
951
error.Clear ();
952
- WatchpointSP wp =
952
+ WatchpointSP watch_sp =
953
953
target->CreateWatchpoint (addr, size, &compiler_type, watch_type, error);
954
- if (wp ) {
955
- wp ->SetWatchSpec (command.GetArgumentAtIndex (0 ));
956
- wp ->SetWatchVariable (true );
954
+ if (watch_sp ) {
955
+ watch_sp ->SetWatchSpec (command.GetArgumentAtIndex (0 ));
956
+ watch_sp ->SetWatchVariable (true );
957
957
if (var_sp && var_sp->GetDeclaration ().GetFile ()) {
958
958
StreamString ss;
959
959
// True to show fullpath for declaration file.
960
960
var_sp->GetDeclaration ().DumpStopContext (&ss, true );
961
- wp ->SetDeclInfo (std::string (ss.GetString ()));
961
+ watch_sp ->SetDeclInfo (std::string (ss.GetString ()));
962
962
}
963
963
output_stream.Printf (" Watchpoint created: " );
964
- wp ->GetDescription (&output_stream, lldb::eDescriptionLevelFull);
964
+ watch_sp ->GetDescription (&output_stream, lldb::eDescriptionLevelFull);
965
965
output_stream.EOL ();
966
966
result.SetStatus (eReturnStatusSuccessFinishResult);
967
967
} else {
@@ -1116,13 +1116,13 @@ class CommandObjectWatchpointSetExpression : public CommandObjectRaw {
1116
1116
CompilerType compiler_type (valobj_sp->GetCompilerType ());
1117
1117
1118
1118
Status error;
1119
- WatchpointSP wp =
1119
+ WatchpointSP watch_sp =
1120
1120
target->CreateWatchpoint (addr, size, &compiler_type, watch_type, error);
1121
- if (wp ) {
1122
- wp ->SetWatchSpec (std::string (expr));
1121
+ if (watch_sp ) {
1122
+ watch_sp ->SetWatchSpec (std::string (expr));
1123
1123
Stream &output_stream = result.GetOutputStream ();
1124
1124
output_stream.Printf (" Watchpoint created: " );
1125
- wp ->GetDescription (&output_stream, lldb::eDescriptionLevelFull);
1125
+ watch_sp ->GetDescription (&output_stream, lldb::eDescriptionLevelFull);
1126
1126
output_stream.EOL ();
1127
1127
result.SetStatus (eReturnStatusSuccessFinishResult);
1128
1128
} else {
0 commit comments