From 58e9cc13e24f668a33abdae201d59a02e10c22c0 Mon Sep 17 00:00:00 2001 From: Muhammad Omair Javaid Date: Mon, 19 Dec 2022 13:50:31 +0500 Subject: Revert "[lldb] Remove redundant .c_str() and .get() calls" This reverts commit fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd. This has broken all LLDB buildbots: https://lab.llvm.org/buildbot/#/builders/68/builds/44990 https://lab.llvm.org/buildbot/#/builders/96/builds/33160 --- .../Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index e6fece1..c2c01d1 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -747,8 +747,9 @@ GDBRemoteCommunicationServerCommon::Handle_qPlatform_shell( std::string output; FileSpec working_spec(working_dir); FileSystem::Instance().Resolve(working_spec); - Status err = Host::RunShellCommand(path, working_spec, &status, &signo, - &output, std::chrono::seconds(10)); + Status err = + Host::RunShellCommand(path.c_str(), working_spec, &status, &signo, + &output, std::chrono::seconds(10)); StreamGDBRemote response; if (err.Fail()) { response.PutCString("F,"); @@ -1135,7 +1136,8 @@ GDBRemoteCommunicationServerCommon::Handle_qModuleInfo( response.PutChar(';'); response.PutCString("file_path:"); - response.PutStringAsRawHex8(matched_module_spec.GetFileSpec().GetPath()); + response.PutStringAsRawHex8( + matched_module_spec.GetFileSpec().GetPath().c_str()); response.PutChar(';'); response.PutCString("file_offset:"); response.PutHex64(file_offset); @@ -1210,7 +1212,7 @@ void GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse( proc_info.GetUserID(), proc_info.GetGroupID(), proc_info.GetEffectiveUserID(), proc_info.GetEffectiveGroupID()); response.PutCString("name:"); - response.PutStringAsRawHex8(proc_info.GetExecutableFile().GetPath()); + response.PutStringAsRawHex8(proc_info.GetExecutableFile().GetPath().c_str()); response.PutChar(';'); response.PutCString("args:"); -- cgit v1.1