Emit an error message if we're unable to write a value to a register.

(in addition to the previous error message if the value could not be 
parsed as a numbe).  These both generate reasonable errors now -
reg write rip 0x500000000000000000000a
reg write rip 0x5jjjj

llvm-svn: 138543
This commit is contained in:
Jason Molenda 2011-08-25 01:59:13 +00:00
parent 535c9fab8b
commit b1ad65c548
1 changed files with 8 additions and 2 deletions

View File

@ -420,14 +420,20 @@ public:
return true;
}
}
else
if (error.AsCString())
{
result.AppendErrorWithFormat ("Failed to write register '%s' with value '%s': %s\n",
reg_name,
value_str,
error.AsCString());
result.SetStatus (eReturnStatusFailed);
}
else
{
result.AppendErrorWithFormat ("Failed to write register '%s' with value '%s'",
reg_name,
value_str);
}
result.SetStatus (eReturnStatusFailed);
}
else
{