[Lldb-commits] [PATCH] Fix warning about the use of mktemp and make platform agnostic by adding and using PipeBase::CreateWithUniqueName.
Robert Flack
flackr at gmail.com
Mon Feb 2 08:24:26 PST 2015
Hi zturner,
Fixes the following warning:
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp:791: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
mktemp is used to generate a path for creating a named pipe over which the gdb socket is negotiated with the launched process. Since pipes on windows do not exist in filesystem paths, and the mkstemp function is unsuitable given it creates a file at that path, a method PipeBase::CreateWithUniqueName is added which will find a usable name and create a pipe with that name. PipeBase::GetName is added so the caller can retrieve the generated name and pass it to the created gdbserver process to write to.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7348
Files:
include/lldb/Host/PipeBase.h
include/lldb/Host/posix/PipePosix.h
include/lldb/Host/windows/PipeWindows.h
source/Host/posix/PipePosix.cpp
source/Host/windows/PipeWindows.cpp
source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7348.19157.patch
Type: text/x-patch
Size: 8552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150202/68e97613/attachment.bin>
More information about the lldb-commits
mailing list