diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectWatchpoint.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectWatchpoint.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp index b8be19f..a426b38 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -42,7 +42,6 @@ static bool CheckTargetForWatchpointOperations(Target *target, target->GetProcessSP() && target->GetProcessSP()->IsAlive(); if (!process_is_valid) { result.AppendError("There's no process or it is not alive."); - result.SetStatus(eReturnStatusFailed); return false; } // Target passes our checks, return true. @@ -248,7 +247,6 @@ protected: if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs( target, command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -311,7 +309,6 @@ protected: if (num_watchpoints == 0) { result.AppendError("No watchpoints exist to be enabled."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -328,7 +325,6 @@ protected: if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs( target, command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -388,7 +384,6 @@ protected: if (num_watchpoints == 0) { result.AppendError("No watchpoints exist to be disabled."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -401,7 +396,6 @@ protected: result.SetStatus(eReturnStatusSuccessFinishNoResult); } else { result.AppendError("Disable all watchpoints failed\n"); - result.SetStatus(eReturnStatusFailed); } } else { // Particular watchpoints selected; disable them. @@ -409,7 +403,6 @@ protected: if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs( target, command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -509,7 +502,6 @@ protected: if (num_watchpoints == 0) { result.AppendError("No watchpoints exist to be deleted."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -534,7 +526,6 @@ protected: if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(target, command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -639,7 +630,6 @@ protected: if (num_watchpoints == 0) { result.AppendError("No watchpoints exist to be ignored."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -655,7 +645,6 @@ protected: if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs( target, command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -768,7 +757,6 @@ protected: if (num_watchpoints == 0) { result.AppendError("No watchpoints exist to be modified."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -782,7 +770,6 @@ protected: if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs( target, command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); - result.SetStatus(eReturnStatusFailed); return false; } @@ -889,10 +876,8 @@ protected: // If no argument is present, issue an error message. There's no way to // set a watchpoint. if (command.GetArgumentCount() <= 0) { - result.GetErrorStream().Printf("error: required argument missing; " - "specify your program variable to watch " - "for\n"); - result.SetStatus(eReturnStatusFailed); + result.AppendError("required argument missing; " + "specify your program variable to watch for"); return false; } @@ -912,9 +897,7 @@ protected: // A simple watch variable gesture allows only one argument. if (command.GetArgumentCount() != 1) { - result.GetErrorStream().Printf( - "error: specify exactly one variable to watch for\n"); - result.SetStatus(eReturnStatusFailed); + result.AppendError("specify exactly one variable to watch for"); return false; } @@ -993,7 +976,6 @@ protected: addr, (uint64_t)size, command.GetArgumentAtIndex(0)); if (error.AsCString(nullptr)) result.AppendError(error.AsCString()); - result.SetStatus(eReturnStatusFailed); } return result.Succeeded(); @@ -1161,7 +1143,6 @@ protected: addr, (uint64_t)size); if (error.AsCString(nullptr)) result.AppendError(error.AsCString()); - result.SetStatus(eReturnStatusFailed); } return result.Succeeded(); |