[Lldb-commits] [lldb] r286303 - Fix some cases where we were printf'ing StringRefs.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 8 14:23:50 PST 2016
Author: zturner
Date: Tue Nov 8 16:23:50 2016
New Revision: 286303
URL: http://llvm.org/viewvc/llvm-project?rev=286303&view=rev
Log:
Fix some cases where we were printf'ing StringRefs.
Modified:
lldb/trunk/source/Interpreter/Args.cpp
Modified: lldb/trunk/source/Interpreter/Args.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Args.cpp?rev=286303&r1=286302&r2=286303&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Args.cpp (original)
+++ lldb/trunk/source/Interpreter/Args.cpp Tue Nov 8 16:23:50 2016
@@ -612,7 +612,7 @@ lldb::addr_t Args::StringToAddress(const
error_ptr->SetErrorStringWithFormat(
"address expression \"%s\" resulted in a value whose type "
"can't be converted to an address: %s",
- s, valobj_sp->GetTypeName().GetCString());
+ s.str().c_str(), valobj_sp->GetTypeName().GetCString());
}
}
@@ -654,14 +654,14 @@ lldb::addr_t Args::StringToAddress(const
if (error_ptr) {
error_set = true;
error_ptr->SetErrorStringWithFormat(
- "address expression \"%s\" evaluation failed", s);
+ "address expression \"%s\" evaluation failed", s.str().c_str());
}
}
if (error_ptr) {
if (!error_set)
error_ptr->SetErrorStringWithFormat("invalid address expression \"%s\"",
- s);
+ s.str().c_str());
}
return fail_value;
}
More information about the lldb-commits
mailing list