diff options
| author | Jason Molenda <jmolenda@apple.com> | 2011-08-25 01:59:13 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2011-08-25 01:59:13 +0000 |
| commit | b1ad65c54845cb802525a9848d88b10f368c3743 (patch) | |
| tree | 7cd4b44b6811d0b3c3100d599402aace58ac4f5d /lldb/source/Commands/CommandObjectRegister.cpp | |
| parent | 535c9fab8b71e7c96871de41b9200832419e33c0 (diff) | |
| download | bcm5719-llvm-b1ad65c54845cb802525a9848d88b10f368c3743.tar.gz bcm5719-llvm-b1ad65c54845cb802525a9848d88b10f368c3743.zip | |
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectRegister.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectRegister.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp index 860b4182597..730c74eed4d 100644 --- a/lldb/source/Commands/CommandObjectRegister.cpp +++ b/lldb/source/Commands/CommandObjectRegister.cpp @@ -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 { |

