diff options
| author | Zachary Turner <zturner@google.com> | 2016-11-17 23:32:26 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2016-11-17 23:32:26 +0000 |
| commit | 8df8046bd9ef12e908adf7c2522142b62232e4b5 (patch) | |
| tree | 13a59340fa0e8e37f92128af310c3bba7eda8718 /lldb/source/Commands/CommandObjectRegister.cpp | |
| parent | 933fcab2ad476809967695b9b11087c6b96d6b64 (diff) | |
Revert "Change RegisterValue getters / setters to use StringRef."
This reverts commit r287279, which breaks some register
tests on Linux.
llvm-svn: 287281
Diffstat (limited to 'lldb/source/Commands/CommandObjectRegister.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectRegister.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp index 8d7afbdb186c..e5e80898a24a 100644 --- a/lldb/source/Commands/CommandObjectRegister.cpp +++ b/lldb/source/Commands/CommandObjectRegister.cpp @@ -356,7 +356,7 @@ protected: result.SetStatus(eReturnStatusFailed); } else { const char *reg_name = command.GetArgumentAtIndex(0); - llvm::StringRef value_str = command.GetArgumentAtIndex(1); + const char *value_str = command.GetArgumentAtIndex(1); // in most LLDB commands we accept $rbx as the name for register RBX - and // here we would @@ -373,7 +373,7 @@ protected: if (reg_info) { RegisterValue reg_value; - Error error(reg_value.SetValueFromString(reg_info, value_str)); + Error error(reg_value.SetValueFromCString(reg_info, value_str)); if (error.Success()) { if (reg_ctx->WriteRegister(reg_info, reg_value)) { // Toss all frames and anything else in the thread @@ -386,11 +386,11 @@ protected: if (error.AsCString()) { result.AppendErrorWithFormat( "Failed to write register '%s' with value '%s': %s\n", reg_name, - value_str.str().c_str(), error.AsCString()); + value_str, error.AsCString()); } else { result.AppendErrorWithFormat( "Failed to write register '%s' with value '%s'", reg_name, - value_str.str().c_str()); + value_str); } result.SetStatus(eReturnStatusFailed); } else { |
