[Lldb-commits] [PATCH] D62500: Add support to read aux vector values
António Afonso via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed May 29 22:59:28 PDT 2019
aadsm marked an inline comment as done.
aadsm added inline comments.
Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:2091-2093
+ DataExtractor auxv_data(buffer_or_error.get()->getBufferStart(),
+ GetByteOrder(), GetAddressByteSize());
> We need to get a copy of the data here right? I believe the "buffer_or_error" local variable will go out of scope and the data pointed to will be freed. You can use:
> lldb::offset_t DataExtractor::CopyData(lldb::offset_t offset, lldb::offset_t length, void *dst) const;
> which will copy of the data and internally own it in a DataBufferSP. Or you can create a DataBufferSP yourself using DataBufferHeap and placing it into a DataBufferSP and then passing that to the DataExtractor constructor or SetData method.
Forgot to answer this, this is actually not needed because the ELFAuxVector copies what's given to it, it doesn't keep a a reference to the passed data.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the lldb-commits