diff options
author | Jim Ingham <jingham@apple.com> | 2013-06-18 21:52:48 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2013-06-18 21:52:48 +0000 |
commit | c64623179b7911e3ce932d91b6a89508a1379b75 (patch) | |
tree | 9720bd8a9cf70685eb8cacb95d94f147a5bedfb6 /lldb/source/Interpreter/OptionGroupWatchpoint.cpp | |
parent | a6ed57d8dd8dbcfc2720e25771366c640fc0d1bf (diff) | |
download | bcm5719-llvm-c64623179b7911e3ce932d91b6a89508a1379b75.tar.gz bcm5719-llvm-c64623179b7911e3ce932d91b6a89508a1379b75.zip |
We were getting an assert because somebody was making a watchpoint that was
neither read nor write. Tighten up the checking so this isn't possible.
<rdar://problem/14111167>
llvm-svn: 184245
Diffstat (limited to 'lldb/source/Interpreter/OptionGroupWatchpoint.cpp')
-rw-r--r-- | lldb/source/Interpreter/OptionGroupWatchpoint.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/OptionGroupWatchpoint.cpp b/lldb/source/Interpreter/OptionGroupWatchpoint.cpp index e352a0e705e..7018f147142 100644 --- a/lldb/source/Interpreter/OptionGroupWatchpoint.cpp +++ b/lldb/source/Interpreter/OptionGroupWatchpoint.cpp @@ -77,11 +77,16 @@ OptionGroupWatchpoint::SetOptionValue (CommandInterpreter &interpreter, switch (short_option) { case 'w': - watch_type = (WatchType) Args::StringToOptionEnum(option_arg, g_option_table[option_idx].enum_values, 0, error); + { + WatchType tmp_watch_type; + tmp_watch_type = (WatchType) Args::StringToOptionEnum(option_arg, g_option_table[option_idx].enum_values, 0, error); if (error.Success()) + { + watch_type = tmp_watch_type; watch_type_specified = true; + } break; - + } case 'x': watch_size = (WatchType) Args::StringToOptionEnum(option_arg, g_option_table[option_idx].enum_values, 0, error); break; |