diff options
| author | Zachary Turner <zturner@google.com> | 2016-11-17 23:05:28 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2016-11-17 23:05:28 +0000 |
| commit | b379d7df12b50199303f56df60b21663c2c2144e (patch) | |
| tree | 3d2bb9c3f59aa2eb01370cb9dba944acefd066be /lldb/source/Commands/CommandObjectRegister.cpp | |
| parent | 2174b6fe728b7056ab41003cdd5a99fd3b1f6395 (diff) | |
| download | bcm5719-llvm-b379d7df12b50199303f56df60b21663c2c2144e.tar.gz bcm5719-llvm-b379d7df12b50199303f56df60b21663c2c2144e.zip | |
Change RegisterValue getters / setters to use StringRef.
In the process, found some functions that were duplicates of
existing StringRef member functions. So deleted those functions
and used the StringRef functions instead.
llvm-svn: 287279
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 e5e80898a24..8d7afbdb186 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); - const char *value_str = command.GetArgumentAtIndex(1); + llvm::StringRef 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.SetValueFromCString(reg_info, value_str)); + Error error(reg_value.SetValueFromString(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, error.AsCString()); + value_str.str().c_str(), error.AsCString()); } else { result.AppendErrorWithFormat( "Failed to write register '%s' with value '%s'", reg_name, - value_str); + value_str.str().c_str()); } result.SetStatus(eReturnStatusFailed); } else { |

