[Lldb-commits] [PATCH] Fix warning about the use of mktemp and make platform agnostic by adding and using PipeBase::CreateWithUniqueName.
flackr at gmail.com
Mon Feb 2 08:24:26 PST 2015
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8552 bytes
Desc: not available
More information about the lldb-commits