summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp')
-rw-r--r--lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp b/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
index 387f04afa5b..76f9badbfb9 100644
--- a/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
+++ b/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
@@ -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() {
OpenPOWER on IntegriCloud