[Lldb-commits] [lldb] r287412 - Fix some accidental Prints of StringRefs that snuck in.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 18 16:50:29 PST 2016


Author: zturner
Date: Fri Nov 18 18:50:29 2016
New Revision: 287412

URL: http://llvm.org/viewvc/llvm-project?rev=287412&view=rev
Log:
Fix some accidental Prints of StringRefs that snuck in.

Modified:
    lldb/trunk/source/Symbol/Variable.cpp
    lldb/trunk/source/Target/TargetList.cpp

Modified: lldb/trunk/source/Symbol/Variable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Variable.cpp?rev=287412&r1=287411&r2=287412&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Variable.cpp (original)
+++ lldb/trunk/source/Symbol/Variable.cpp Fri Nov 18 18:50:29 2016
@@ -393,12 +393,14 @@ Error Variable::GetValuesForVariableExpr
     variable_list.Clear();
     if (!g_regex.Execute(variable_expr_path, &regex_match)) {
       error.SetErrorStringWithFormat(
-          "unable to extract a variable name from '%s'", variable_expr_path);
+          "unable to extract a variable name from '%s'",
+          variable_expr_path.str().c_str());
       return error;
     }
     if (!regex_match.GetMatchAtIndex(variable_expr_path, 1, variable_name)) {
       error.SetErrorStringWithFormat(
-          "unable to extract a variable name from '%s'", variable_expr_path);
+          "unable to extract a variable name from '%s'",
+          variable_expr_path.str().c_str());
       return error;
     }
     if (!callback(baton, variable_name.c_str(), variable_list)) {
@@ -434,7 +436,8 @@ Error Variable::GetValuesForVariableExpr
         if (!valobj_sp) {
           error.SetErrorStringWithFormat(
               "invalid expression path '%s' for variable '%s'",
-              variable_sub_expr_path, var_sp->GetName().GetCString());
+              variable_sub_expr_path.str().c_str(),
+              var_sp->GetName().GetCString());
           variable_list.RemoveVariableAtIndex(i);
           continue;
         }

Modified: lldb/trunk/source/Target/TargetList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=287412&r1=287411&r2=287412&view=diff
==============================================================================
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Fri Nov 18 18:50:29 2016
@@ -327,7 +327,8 @@ Error TargetList::CreateTargetInternal(D
                                        bool is_dummy_target) {
   Timer scoped_timer(LLVM_PRETTY_FUNCTION,
                      "TargetList::CreateTarget (file = '%s', arch = '%s')",
-                     user_exe_path, specified_arch.GetArchitectureName());
+                     user_exe_path.str().c_str(),
+                     specified_arch.GetArchitectureName());
   Error error;
 
   ArchSpec arch(specified_arch);




More information about the lldb-commits mailing list