From 1773a89ff43cc0b76867a2a630dccb45e1d75917 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Tue, 19 Jun 2012 22:12:58 +0000 Subject: [PATCH] Chnage VerifyWatchpointIDs() from a static function to a class function to be called from other source files. llvm-svn: 158751 --- lldb/source/Commands/CommandObjectWatchpoint.cpp | 16 ++++++++-------- lldb/source/Commands/CommandObjectWatchpoint.h | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp index 8b6ff80d1e3a..c41d6d92618c 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -101,8 +101,8 @@ WithRSAIndex(llvm::StringRef &Arg) // Return true if wp_ids is successfully populated with the watch ids. // False otherwise. -static bool -VerifyWatchpointIDs(Args &args, std::vector &wp_ids) +bool +CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(Args &args, std::vector &wp_ids) { // Pre-condition: args.GetArgumentCount() > 0. assert(args.GetArgumentCount() > 0); @@ -306,7 +306,7 @@ protected: { // Particular watchpoints selected; enable them. std::vector wp_ids; - if (!VerifyWatchpointIDs(command, wp_ids)) + if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); result.SetStatus(eReturnStatusFailed); @@ -406,7 +406,7 @@ protected: { // Particular watchpoints selected; enable them. std::vector wp_ids; - if (!VerifyWatchpointIDs(command, wp_ids)) + if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); result.SetStatus(eReturnStatusFailed); @@ -491,7 +491,7 @@ protected: { // Particular watchpoints selected; disable them. std::vector wp_ids; - if (!VerifyWatchpointIDs(command, wp_ids)) + if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); result.SetStatus(eReturnStatusFailed); @@ -574,7 +574,7 @@ protected: { // Particular watchpoints selected; delete them. std::vector wp_ids; - if (!VerifyWatchpointIDs(command, wp_ids)) + if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); result.SetStatus(eReturnStatusFailed); @@ -715,7 +715,7 @@ protected: { // Particular watchpoints selected; ignore them. std::vector wp_ids; - if (!VerifyWatchpointIDs(command, wp_ids)) + if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); result.SetStatus(eReturnStatusFailed); @@ -872,7 +872,7 @@ protected: { // Particular watchpoints selected; set condition on them. std::vector wp_ids; - if (!VerifyWatchpointIDs(command, wp_ids)) + if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(command, wp_ids)) { result.AppendError("Invalid watchpoints specification."); result.SetStatus(eReturnStatusFailed); diff --git a/lldb/source/Commands/CommandObjectWatchpoint.h b/lldb/source/Commands/CommandObjectWatchpoint.h index cfe6ce2af96e..65bed7c154c6 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.h +++ b/lldb/source/Commands/CommandObjectWatchpoint.h @@ -32,6 +32,10 @@ public: virtual ~CommandObjectMultiwordWatchpoint (); + + static bool + VerifyWatchpointIDs(Args &args, std::vector &wp_ids); + }; } // namespace lldb_private