[Lldb-commits] [lldb] r322476 - Fix NetBSD build for llvm r322475
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 15 03:32:43 PST 2018
Author: labath
Date: Mon Jan 15 03:32:43 2018
New Revision: 322476
URL: http://llvm.org/viewvc/llvm-project?rev=322476&view=rev
Log:
Fix NetBSD build for llvm r322475
Modified:
lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp?rev=322476&r1=322475&r2=322476&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp Mon Jan 15 03:32:43 2018
@@ -871,13 +871,13 @@ NativeProcessNetBSD::GetAuxvData() const
*/
size_t auxv_size = 100 * sizeof(AuxInfo);
- ErrorOr<std::unique_ptr<MemoryBuffer>> buf =
+ ErrorOr<std::unique_ptr<WritableMemoryBuffer>> buf =
llvm::MemoryBuffer::getNewMemBuffer(auxv_size);
struct ptrace_io_desc io;
io.piod_op = PIOD_READ_AUXV;
io.piod_offs = 0;
- io.piod_addr = const_cast<void *>(static_cast<const void *>(buf.get()->getBufferStart()));
+ io.piod_addr = static_cast<void *>(buf.get()->getBufferStart());
io.piod_len = auxv_size;
Status error = NativeProcessNetBSD::PtraceWrapper(PT_IO, GetID(), &io);
@@ -888,7 +888,7 @@ NativeProcessNetBSD::GetAuxvData() const
if (io.piod_len < 1)
return std::error_code(ECANCELED, std::generic_category());
- return buf;
+ return std::move(buf);
}
Status NativeProcessNetBSD::ReinitializeThreads() {
More information about the lldb-commits
mailing list