diff options
Diffstat (limited to 'source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp')
-rw-r--r-- | source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp b/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp index 742644d4d..161af9f8c 100644 --- a/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp +++ b/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -#include <stddef.h> - #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Endian.h" @@ -17,6 +15,10 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Compiler.h" +#include <stddef.h> + +#include <memory> + // Support building against older versions of LLVM, this macro was added // recently. #ifndef LLVM_EXTENSION @@ -831,7 +833,7 @@ bool RegisterContextDarwin_i386::WriteRegister(const RegisterInfo *reg_info, bool RegisterContextDarwin_i386::ReadAllRegisterValues( lldb::DataBufferSP &data_sp) { - data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0)); + data_sp = std::make_shared<DataBufferHeap>(REG_CONTEXT_SIZE, 0); if (data_sp && ReadGPR(false) == 0 && ReadFPU(false) == 0 && ReadEXC(false) == 0) { uint8_t *dst = data_sp->GetBytes(); |