Fixed several problems with watchpoint expressions.

- First, the watchpoint size was being cast to the
  wrong type.  This is primarily cosmetic, but
  annoying.

- Second, the options for the watchpoint command
  were not being initialized correctly, which led
  to the watchpoint size sometimes having absurdly
  large values.  This caused watchpoints to fail to
  be set in some cases.

<rdar://problem/12658775>

llvm-svn: 187169
This commit is contained in:
Sean Callanan 2013-07-25 23:12:53 +00:00
parent 83859acd91
commit 4d682d25fb
2 changed files with 3 additions and 1 deletions

View File

@ -1185,6 +1185,8 @@ protected:
virtual bool
DoExecute (const char *raw_command, CommandReturnObject &result)
{
m_option_group.NotifyOptionParsingStarting(); // This is a raw command, so notify the option group
Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
StackFrame *frame = m_exe_ctx.GetFramePtr();

View File

@ -88,7 +88,7 @@ OptionGroupWatchpoint::SetOptionValue (CommandInterpreter &interpreter,
break;
}
case 'x':
watch_size = (WatchType) Args::StringToOptionEnum(option_arg, g_option_table[option_idx].enum_values, 0, error);
watch_size = (uint32_t) Args::StringToOptionEnum(option_arg, g_option_table[option_idx].enum_values, 0, error);
break;
default: