diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-09-09 23:25:26 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-09-09 23:25:26 +0000 |
commit | b1d7529e570545a8faceae1c7bf82ed4384e902e (patch) | |
tree | 76dd35da3323404ef5cd7067c145965fd8d7edaf /lldb/source/Commands/CommandObjectFrame.cpp | |
parent | 56247076847790933b5e91639f466c8c7f11ea4a (diff) | |
download | llvm-b1d7529e570545a8faceae1c7bf82ed4384e902e.zip llvm-b1d7529e570545a8faceae1c7bf82ed4384e902e.tar.gz llvm-b1d7529e570545a8faceae1c7bf82ed4384e902e.tar.bz2 |
Add OptionGroupWatchpoint.cpp/.h (preparatory work) for hooking up watchpoint to the 'frame variable' comand.
To watch a variable for read/write, issue:
frame variable -w read_write
Note that '-w' option is not working yet. :-)
llvm-svn: 139434
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectFrame.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index ed27b38..1247209 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -28,6 +28,7 @@ #include "lldb/Interpreter/Options.h" #include "lldb/Interpreter/OptionGroupValueObjectDisplay.h" #include "lldb/Interpreter/OptionGroupVariable.h" +#include "lldb/Interpreter/OptionGroupWatchpoint.h" #include "lldb/Symbol/ClangASTType.h" #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/ObjectFile.h" @@ -315,11 +316,15 @@ public: "If any arguments are specified, they can be names of " "argument, local, file static and file global variables. " "Children of aggregate variables can be specified such as " - "'var->child.x'.", + "'var->child.x'. " + "NOTE that '-w' option is not working yet!!! " + "You can choose to watch a variable with the '-w' option. " + "Note that hardware resources for watching are often limited.", NULL, eFlagProcessMustBeLaunched | eFlagProcessMustBePaused), m_option_group (interpreter), m_option_variable(true), // Include the frame specific options by passing "true" + m_option_watchpoint(), m_varobj_options() { CommandArgumentEntry arg; @@ -336,6 +341,7 @@ public: m_arguments.push_back (arg); m_option_group.Append (&m_option_variable, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1); + m_option_group.Append (&m_option_watchpoint, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1); m_option_group.Append (&m_varobj_options, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1); m_option_group.Finalize(); } @@ -601,6 +607,7 @@ protected: OptionGroupOptions m_option_group; OptionGroupVariable m_option_variable; + OptionGroupWatchpoint m_option_watchpoint; OptionGroupValueObjectDisplay m_varobj_options; }; |