diff options
Diffstat (limited to 'lldb/source/Plugins')
73 files changed, 492 insertions, 488 deletions
diff --git a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp index 7757b9c31db..de1f7d9fb7d 100644 --- a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp +++ b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp @@ -1604,7 +1604,7 @@ ValueObjectSP ABIMacOSX_arm::GetReturnValueObjectImpl( r2_reg_info->byte_size + r3_reg_info->byte_size && process_sp) { - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = process_sp->GetByteOrder(); RegisterValue r0_reg_value; @@ -1617,18 +1617,18 @@ ValueObjectSP ABIMacOSX_arm::GetReturnValueObjectImpl( reg_ctx->ReadRegister(r3_reg_info, r3_reg_value)) { Status error; if (r0_reg_value.GetAsMemoryData(r0_reg_info, - heap_data_ap->GetBytes() + 0, + heap_data_up->GetBytes() + 0, 4, byte_order, error) && r1_reg_value.GetAsMemoryData(r1_reg_info, - heap_data_ap->GetBytes() + 4, + heap_data_up->GetBytes() + 4, 4, byte_order, error) && r2_reg_value.GetAsMemoryData(r2_reg_info, - heap_data_ap->GetBytes() + 8, + heap_data_up->GetBytes() + 8, 4, byte_order, error) && r3_reg_value.GetAsMemoryData(r3_reg_info, - heap_data_ap->GetBytes() + 12, + heap_data_up->GetBytes() + 12, 4, byte_order, error)) { - DataExtractor data(DataBufferSP(heap_data_ap.release()), + DataExtractor data(DataBufferSP(heap_data_up.release()), byte_order, process_sp->GetAddressByteSize()); diff --git a/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp b/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp index 00f5dea303c..6f952ffbcc8 100644 --- a/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp +++ b/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp @@ -2114,7 +2114,7 @@ static bool LoadValueFromConsecutiveGPRRegisters( if (!byte_size || *byte_size == 0) return false; - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = exe_ctx.GetProcessRef().GetByteOrder(); Status error; @@ -2148,10 +2148,10 @@ static bool LoadValueFromConsecutiveGPRRegisters( if (!reg_ctx->ReadRegister(reg_info, reg_value)) return false; - // Make sure we have enough room in "heap_data_ap" - if ((data_offset + *base_byte_size) <= heap_data_ap->GetByteSize()) { + // Make sure we have enough room in "heap_data_up" + if ((data_offset + *base_byte_size) <= heap_data_up->GetByteSize()) { const size_t bytes_copied = reg_value.GetAsMemoryData( - reg_info, heap_data_ap->GetBytes() + data_offset, *base_byte_size, + reg_info, heap_data_up->GetBytes() + data_offset, *base_byte_size, byte_order, error); if (bytes_copied != *base_byte_size) return false; @@ -2162,7 +2162,7 @@ static bool LoadValueFromConsecutiveGPRRegisters( } data.SetByteOrder(byte_order); data.SetAddressByteSize(exe_ctx.GetProcessRef().GetAddressByteSize()); - data.SetData(DataBufferSP(heap_data_ap.release())); + data.SetData(DataBufferSP(heap_data_up.release())); return true; } } @@ -2191,7 +2191,7 @@ static bool LoadValueFromConsecutiveGPRRegisters( const size_t curr_byte_size = std::min<size_t>(8, bytes_left); const size_t bytes_copied = reg_value.GetAsMemoryData( - reg_info, heap_data_ap->GetBytes() + data_offset, curr_byte_size, + reg_info, heap_data_up->GetBytes() + data_offset, curr_byte_size, byte_order, error); if (bytes_copied == 0) return false; @@ -2235,15 +2235,15 @@ static bool LoadValueFromConsecutiveGPRRegisters( return false; if (exe_ctx.GetProcessRef().ReadMemory( - value_addr, heap_data_ap->GetBytes(), heap_data_ap->GetByteSize(), - error) != heap_data_ap->GetByteSize()) { + value_addr, heap_data_up->GetBytes(), heap_data_up->GetByteSize(), + error) != heap_data_up->GetByteSize()) { return false; } } data.SetByteOrder(byte_order); data.SetAddressByteSize(exe_ctx.GetProcessRef().GetAddressByteSize()); - data.SetData(DataBufferSP(heap_data_ap.release())); + data.SetData(DataBufferSP(heap_data_up.release())); return true; } @@ -2295,7 +2295,7 @@ ValueObjectSP ABIMacOSX_arm64::GetReturnValueObjectImpl( if (x1_reg_info) { if (*byte_size <= x0_reg_info->byte_size + x1_reg_info->byte_size) { - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = exe_ctx.GetProcessRef().GetByteOrder(); @@ -2305,13 +2305,13 @@ ValueObjectSP ABIMacOSX_arm64::GetReturnValueObjectImpl( reg_ctx->ReadRegister(x1_reg_info, x1_reg_value)) { Status error; if (x0_reg_value.GetAsMemoryData( - x0_reg_info, heap_data_ap->GetBytes() + 0, 8, + x0_reg_info, heap_data_up->GetBytes() + 0, 8, byte_order, error) && x1_reg_value.GetAsMemoryData( - x1_reg_info, heap_data_ap->GetBytes() + 8, 8, + x1_reg_info, heap_data_up->GetBytes() + 8, 8, byte_order, error)) { DataExtractor data( - DataBufferSP(heap_data_ap.release()), byte_order, + DataBufferSP(heap_data_up.release()), byte_order, exe_ctx.GetProcessRef().GetAddressByteSize()); return_valobj_sp = ValueObjectConstResult::Create( @@ -2395,16 +2395,16 @@ ValueObjectSP ABIMacOSX_arm64::GetReturnValueObjectImpl( if (v0_info) { if (*byte_size <= v0_info->byte_size) { - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = exe_ctx.GetProcessRef().GetByteOrder(); RegisterValue reg_value; if (reg_ctx->ReadRegister(v0_info, reg_value)) { Status error; - if (reg_value.GetAsMemoryData(v0_info, heap_data_ap->GetBytes(), - heap_data_ap->GetByteSize(), + if (reg_value.GetAsMemoryData(v0_info, heap_data_up->GetBytes(), + heap_data_up->GetByteSize(), byte_order, error)) { - DataExtractor data(DataBufferSP(heap_data_ap.release()), + DataExtractor data(DataBufferSP(heap_data_up.release()), byte_order, exe_ctx.GetProcessRef().GetAddressByteSize()); return_valobj_sp = ValueObjectConstResult::Create( diff --git a/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp b/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp index a84218986d5..a3daaef66be 100644 --- a/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp +++ b/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp @@ -2090,7 +2090,7 @@ static bool LoadValueFromConsecutiveGPRRegisters( if (byte_size || *byte_size == 0) return false; - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = exe_ctx.GetProcessRef().GetByteOrder(); Status error; @@ -2124,10 +2124,10 @@ static bool LoadValueFromConsecutiveGPRRegisters( if (!reg_ctx->ReadRegister(reg_info, reg_value)) return false; - // Make sure we have enough room in "heap_data_ap" - if ((data_offset + *base_byte_size) <= heap_data_ap->GetByteSize()) { + // Make sure we have enough room in "heap_data_up" + if ((data_offset + *base_byte_size) <= heap_data_up->GetByteSize()) { const size_t bytes_copied = reg_value.GetAsMemoryData( - reg_info, heap_data_ap->GetBytes() + data_offset, *base_byte_size, + reg_info, heap_data_up->GetBytes() + data_offset, *base_byte_size, byte_order, error); if (bytes_copied != *base_byte_size) return false; @@ -2138,7 +2138,7 @@ static bool LoadValueFromConsecutiveGPRRegisters( } data.SetByteOrder(byte_order); data.SetAddressByteSize(exe_ctx.GetProcessRef().GetAddressByteSize()); - data.SetData(DataBufferSP(heap_data_ap.release())); + data.SetData(DataBufferSP(heap_data_up.release())); return true; } } @@ -2163,7 +2163,7 @@ static bool LoadValueFromConsecutiveGPRRegisters( const size_t curr_byte_size = std::min<size_t>(8, bytes_left); const size_t bytes_copied = reg_value.GetAsMemoryData( - reg_info, heap_data_ap->GetBytes() + data_offset, curr_byte_size, + reg_info, heap_data_up->GetBytes() + data_offset, curr_byte_size, byte_order, error); if (bytes_copied == 0) return false; @@ -2204,15 +2204,15 @@ static bool LoadValueFromConsecutiveGPRRegisters( return false; if (exe_ctx.GetProcessRef().ReadMemory( - value_addr, heap_data_ap->GetBytes(), heap_data_ap->GetByteSize(), - error) != heap_data_ap->GetByteSize()) { + value_addr, heap_data_up->GetBytes(), heap_data_up->GetByteSize(), + error) != heap_data_up->GetByteSize()) { return false; } } data.SetByteOrder(byte_order); data.SetAddressByteSize(exe_ctx.GetProcessRef().GetAddressByteSize()); - data.SetData(DataBufferSP(heap_data_ap.release())); + data.SetData(DataBufferSP(heap_data_up.release())); return true; } @@ -2266,7 +2266,7 @@ ValueObjectSP ABISysV_arm64::GetReturnValueObjectImpl( if (x1_reg_info) { if (*byte_size <= x0_reg_info->byte_size + x1_reg_info->byte_size) { - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = exe_ctx.GetProcessRef().GetByteOrder(); @@ -2276,13 +2276,13 @@ ValueObjectSP ABISysV_arm64::GetReturnValueObjectImpl( reg_ctx->ReadRegister(x1_reg_info, x1_reg_value)) { Status error; if (x0_reg_value.GetAsMemoryData( - x0_reg_info, heap_data_ap->GetBytes() + 0, 8, + x0_reg_info, heap_data_up->GetBytes() + 0, 8, byte_order, error) && x1_reg_value.GetAsMemoryData( - x1_reg_info, heap_data_ap->GetBytes() + 8, 8, + x1_reg_info, heap_data_up->GetBytes() + 8, 8, byte_order, error)) { DataExtractor data( - DataBufferSP(heap_data_ap.release()), byte_order, + DataBufferSP(heap_data_up.release()), byte_order, exe_ctx.GetProcessRef().GetAddressByteSize()); return_valobj_sp = ValueObjectConstResult::Create( @@ -2364,16 +2364,16 @@ ValueObjectSP ABISysV_arm64::GetReturnValueObjectImpl( const RegisterInfo *v0_info = reg_ctx->GetRegisterInfoByName("v0", 0); if (v0_info) { - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = exe_ctx.GetProcessRef().GetByteOrder(); RegisterValue reg_value; if (reg_ctx->ReadRegister(v0_info, reg_value)) { Status error; - if (reg_value.GetAsMemoryData(v0_info, heap_data_ap->GetBytes(), - heap_data_ap->GetByteSize(), byte_order, + if (reg_value.GetAsMemoryData(v0_info, heap_data_up->GetBytes(), + heap_data_up->GetByteSize(), byte_order, error)) { - DataExtractor data(DataBufferSP(heap_data_ap.release()), byte_order, + DataExtractor data(DataBufferSP(heap_data_up.release()), byte_order, exe_ctx.GetProcessRef().GetAddressByteSize()); return_valobj_sp = ValueObjectConstResult::Create( &thread, return_compiler_type, ConstString(""), data); diff --git a/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp b/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp index 80b7d019880..402808ad4f3 100644 --- a/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp +++ b/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp @@ -1103,7 +1103,7 @@ bool ABISysV_hexagon::PrepareTrivialCall( sp -= argSize; // write this argument onto the stack of the host process - proc->WriteMemory(sp, arg.data_ap.get(), arg.size, error); + proc->WriteMemory(sp, arg.data_up.get(), arg.size, error); if (error.Fail()) return false; diff --git a/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp b/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp index 1d390bf1f02..d823c278dee 100644 --- a/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp +++ b/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp @@ -648,19 +648,20 @@ ValueObjectSP ABISysV_i386::GetReturnValueObjectSimple( if (*byte_size <= vec_reg->byte_size) { ProcessSP process_sp(thread.GetProcess()); if (process_sp) { - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = process_sp->GetByteOrder(); RegisterValue reg_value; if (reg_ctx->ReadRegister(vec_reg, reg_value)) { Status error; - if (reg_value.GetAsMemoryData(vec_reg, heap_data_ap->GetBytes(), - heap_data_ap->GetByteSize(), + if (reg_value.GetAsMemoryData(vec_reg, heap_data_up->GetBytes(), + heap_data_up->GetByteSize(), byte_order, error)) { - DataExtractor data(DataBufferSP(heap_data_ap.release()), - byte_order, process_sp->GetTarget() - .GetArchitecture() - .GetAddressByteSize()); + DataExtractor data(DataBufferSP(heap_data_up.release()), + byte_order, + process_sp->GetTarget() + .GetArchitecture() + .GetAddressByteSize()); return_valobj_sp = ValueObjectConstResult::Create( &thread, return_compiler_type, ConstString(""), data); } @@ -672,7 +673,7 @@ ValueObjectSP ABISysV_i386::GetReturnValueObjectSimple( if (vec_reg2) { ProcessSP process_sp(thread.GetProcess()); if (process_sp) { - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = process_sp->GetByteOrder(); RegisterValue reg_value; @@ -681,17 +682,18 @@ ValueObjectSP ABISysV_i386::GetReturnValueObjectSimple( reg_ctx->ReadRegister(vec_reg2, reg_value2)) { Status error; - if (reg_value.GetAsMemoryData(vec_reg, heap_data_ap->GetBytes(), + if (reg_value.GetAsMemoryData(vec_reg, heap_data_up->GetBytes(), vec_reg->byte_size, byte_order, error) && reg_value2.GetAsMemoryData( - vec_reg2, heap_data_ap->GetBytes() + vec_reg->byte_size, - heap_data_ap->GetByteSize() - vec_reg->byte_size, + vec_reg2, heap_data_up->GetBytes() + vec_reg->byte_size, + heap_data_up->GetByteSize() - vec_reg->byte_size, byte_order, error)) { - DataExtractor data(DataBufferSP(heap_data_ap.release()), - byte_order, process_sp->GetTarget() - .GetArchitecture() - .GetAddressByteSize()); + DataExtractor data(DataBufferSP(heap_data_up.release()), + byte_order, + process_sp->GetTarget() + .GetArchitecture() + .GetAddressByteSize()); return_valobj_sp = ValueObjectConstResult::Create( &thread, return_compiler_type, ConstString(""), data); } diff --git a/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp b/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp index c26ccd72de1..15762f8a0a7 100644 --- a/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp +++ b/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp @@ -618,16 +618,16 @@ ValueObjectSP ABISysV_ppc::GetReturnValueObjectSimple( if (*byte_size <= altivec_reg->byte_size) { ProcessSP process_sp(thread.GetProcess()); if (process_sp) { - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = process_sp->GetByteOrder(); RegisterValue reg_value; if (reg_ctx->ReadRegister(altivec_reg, reg_value)) { Status error; if (reg_value.GetAsMemoryData( - altivec_reg, heap_data_ap->GetBytes(), - heap_data_ap->GetByteSize(), byte_order, error)) { - DataExtractor data(DataBufferSP(heap_data_ap.release()), + altivec_reg, heap_data_up->GetBytes(), + heap_data_up->GetByteSize(), byte_order, error)) { + DataExtractor data(DataBufferSP(heap_data_up.release()), byte_order, process_sp->GetTarget() .GetArchitecture() diff --git a/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp b/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp index 983cec47896..50e280d4655 100644 --- a/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp +++ b/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp @@ -560,7 +560,7 @@ private: Thread &m_thread; CompilerType &m_type; uint64_t m_byte_size; - std::unique_ptr<DataBufferHeap> m_data_ap; + std::unique_ptr<DataBufferHeap> m_data_up; int32_t m_src_offs = 0; int32_t m_dst_offs = 0; bool m_packed = false; @@ -577,7 +577,7 @@ private: RegisterContext *reg_ctx, ProcessSP process_sp) : m_thread(thread), m_type(type), m_byte_size(m_type.GetByteSize(nullptr).getValueOr(0)), - m_data_ap(new DataBufferHeap(m_byte_size, 0)), m_reg_ctx(reg_ctx), + m_data_up(new DataBufferHeap(m_byte_size, 0)), m_reg_ctx(reg_ctx), m_process_sp(process_sp), m_byte_order(process_sp->GetByteOrder()), m_addr_size( process_sp->GetTarget().GetArchitecture().GetAddressByteSize()) {} @@ -686,7 +686,7 @@ private: // build the ValueObject from our data buffer ValueObjectSP BuildValueObject() { - DataExtractor de(DataBufferSP(m_data_ap.release()), m_byte_order, + DataExtractor de(DataBufferSP(m_data_up.release()), m_byte_order, m_addr_size); return ValueObjectConstResult::Create(&m_thread, m_type, ConstString(""), de); @@ -751,7 +751,7 @@ private: offs = vr_size - m_byte_size; // copy extracted data to our buffer - memcpy(m_data_ap->GetBytes(), vr_data->GetBytes() + offs, m_byte_size); + memcpy(m_data_up->GetBytes(), vr_data->GetBytes() + offs, m_byte_size); return BuildValueObject(); } @@ -765,7 +765,7 @@ private: return {}; Status error; - size_t rc = m_process_sp->ReadMemory(addr, m_data_ap->GetBytes(), + size_t rc = m_process_sp->ReadMemory(addr, m_data_up->GetBytes(), m_byte_size, error); if (rc != m_byte_size) { LLDB_LOG(m_log, LOG_PREFIX "Failed to read memory pointed by r3"); @@ -803,7 +803,8 @@ private: // copy to buffer Status error; size_t rc = val_sp->GetScalar().GetAsMemoryData( - m_data_ap->GetBytes() + m_dst_offs, *elem_size, m_byte_order, error); + m_data_up->GetBytes() + m_dst_offs, *elem_size, m_byte_order, + error); if (rc != *elem_size) { LLDB_LOG(m_log, LOG_PREFIX "Failed to get float data"); return {}; @@ -887,7 +888,7 @@ private: LOG_PREFIX "Extracting {0} alignment bytes at offset {1}", n, m_src_offs); // get alignment bytes - if (!ExtractFromRegs(m_src_offs, n, m_data_ap->GetBytes() + m_dst_offs)) + if (!ExtractFromRegs(m_src_offs, n, m_data_up->GetBytes() + m_dst_offs)) return false; m_src_offs += n; m_dst_offs += n; @@ -897,7 +898,7 @@ private: // get field LLDB_LOG(m_log, LOG_PREFIX "Extracting {0} field bytes at offset {1}", size, m_src_offs); - if (!ExtractFromRegs(m_src_offs, size, m_data_ap->GetBytes() + m_dst_offs)) + if (!ExtractFromRegs(m_src_offs, size, m_data_up->GetBytes() + m_dst_offs)) return false; m_src_offs += size; m_dst_offs += size; diff --git a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp index 3d3576cf18a..e20aad76bcd 100644 --- a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp +++ b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp @@ -1499,19 +1499,20 @@ ValueObjectSP ABISysV_x86_64::GetReturnValueObjectSimple( if (*byte_size <= altivec_reg->byte_size) { ProcessSP process_sp(thread.GetProcess()); if (process_sp) { - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = process_sp->GetByteOrder(); RegisterValue reg_value; if (reg_ctx->ReadRegister(altivec_reg, reg_value)) { Status error; if (reg_value.GetAsMemoryData( - altivec_reg, heap_data_ap->GetBytes(), - heap_data_ap->GetByteSize(), byte_order, error)) { - DataExtractor data(DataBufferSP(heap_data_ap.release()), - byte_order, process_sp->GetTarget() - .GetArchitecture() - .GetAddressByteSize()); + altivec_reg, heap_data_up->GetBytes(), + heap_data_up->GetByteSize(), byte_order, error)) { + DataExtractor data(DataBufferSP(heap_data_up.release()), + byte_order, + process_sp->GetTarget() + .GetArchitecture() + .GetAddressByteSize()); return_valobj_sp = ValueObjectConstResult::Create( &thread, return_compiler_type, ConstString(""), data); } @@ -1523,7 +1524,7 @@ ValueObjectSP ABISysV_x86_64::GetReturnValueObjectSimple( if (altivec_reg2) { ProcessSP process_sp(thread.GetProcess()); if (process_sp) { - std::unique_ptr<DataBufferHeap> heap_data_ap( + std::unique_ptr<DataBufferHeap> heap_data_up( new DataBufferHeap(*byte_size, 0)); const ByteOrder byte_order = process_sp->GetByteOrder(); RegisterValue reg_value; @@ -1533,17 +1534,18 @@ ValueObjectSP ABISysV_x86_64::GetReturnValueObjectSimple( Status error; if (reg_value.GetAsMemoryData( - altivec_reg, heap_data_ap->GetBytes(), + altivec_reg, heap_data_up->GetBytes(), altivec_reg->byte_size, byte_order, error) && reg_value2.GetAsMemoryData( altivec_reg2, - heap_data_ap->GetBytes() + altivec_reg->byte_size, - heap_data_ap->GetByteSize() - altivec_reg->byte_size, + heap_data_up->GetBytes() + altivec_reg->byte_size, + heap_data_up->GetByteSize() - altivec_reg->byte_size, byte_order, error)) { - DataExtractor data(DataBufferSP(heap_data_ap.release()), - byte_order, process_sp->GetTarget() - .GetArchitecture() - .GetAddressByteSize()); + DataExtractor data(DataBufferSP(heap_data_up.release()), + byte_order, + process_sp->GetTarget() + .GetArchitecture() + .GetAddressByteSize()); return_valobj_sp = ValueObjectConstResult::Create( &thread, return_compiler_type, ConstString(""), data); } diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp index e53d741adb2..ca53a18e146 100644 --- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp +++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp @@ -1196,7 +1196,7 @@ DisassemblerLLVMC::DisassemblerLLVMC(const ArchSpec &arch, if (triple.getArch() == llvm::Triple::aarch64) features_str += "+v8.2a"; - // We use m_disasm_ap.get() to tell whether we are valid or not, so if this + // We use m_disasm_up.get() to tell whether we are valid or not, so if this // isn't good for some reason, we won't be valid and FindPlugin will fail and // we won't get used. m_disasm_up = MCDisasmInstance::Create(triple_str, cpu, features_str.c_str(), @@ -1237,11 +1237,11 @@ DisassemblerLLVMC::~DisassemblerLLVMC() = default; Disassembler *DisassemblerLLVMC::CreateInstance(const ArchSpec &arch, const char *flavor) { if (arch.GetTriple().getArch() != llvm::Triple::UnknownArch) { - std::unique_ptr<DisassemblerLLVMC> disasm_ap( + std::unique_ptr<DisassemblerLLVMC> disasm_up( new DisassemblerLLVMC(arch, flavor)); - if (disasm_ap.get() && disasm_ap->IsValid()) - return disasm_ap.release(); + if (disasm_up.get() && disasm_up->IsValid()) + return disasm_up.release(); } return NULL; } diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp index 65fdc5515c0..266b1e22963 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -1062,10 +1062,10 @@ lldb_private::Status ClangExpressionParser::PrepareForExecution( lldb_private::Status err; - std::unique_ptr<llvm::Module> llvm_module_ap( + std::unique_ptr<llvm::Module> llvm_module_up( m_code_generator->ReleaseModule()); - if (!llvm_module_ap) { + if (!llvm_module_up) { err.SetErrorToGenericError(); err.SetErrorString("IR doesn't contain a module"); return err; @@ -1076,7 +1076,7 @@ lldb_private::Status ClangExpressionParser::PrepareForExecution( if (execution_policy != eExecutionPolicyTopLevel) { // Find the actual name of the function (it's often mangled somehow) - if (!FindFunctionInModule(function_name, llvm_module_ap.get(), + if (!FindFunctionInModule(function_name, llvm_module_up.get(), m_expr.FunctionName())) { err.SetErrorToGenericError(); err.SetErrorStringWithFormat("Couldn't find %s() in the module", @@ -1117,13 +1117,13 @@ lldb_private::Status ClangExpressionParser::PrepareForExecution( "expression module '%s'", __FUNCTION__, m_expr.FunctionName()); - custom_passes.EarlyPasses->run(*llvm_module_ap); + custom_passes.EarlyPasses->run(*llvm_module_up); } execution_unit_sp = std::make_shared<IRExecutionUnit>( m_llvm_context, // handed off here - llvm_module_ap, // handed off here - function_name, exe_ctx.GetTargetSP(), sc, + llvm_module_up, // handed off here + function_name, exe_ctx.GetTargetSP(), sc, m_compiler->getTargetOpts().Features); ClangExpressionHelper *type_system_helper = diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp index fb72d673e98..bc725c9af16 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp @@ -489,13 +489,13 @@ bool ClangUserExpression::Parse(DiagnosticManager &diagnostic_manager, // Parse the expression // - m_materializer_ap.reset(new Materializer()); + m_materializer_up.reset(new Materializer()); ResetDeclMap(exe_ctx, m_result_delegate, keep_result_in_memory); OnExit on_exit([this]() { ResetDeclMap(); }); - if (!DeclMap()->WillParse(exe_ctx, m_materializer_ap.get())) { + if (!DeclMap()->WillParse(exe_ctx, m_materializer_up.get())) { diagnostic_manager.PutString( eDiagnosticSeverityError, "current process state is unsuitable for expression parsing"); @@ -678,13 +678,13 @@ bool ClangUserExpression::Complete(ExecutionContext &exe_ctx, // Parse the expression // - m_materializer_ap.reset(new Materializer()); + m_materializer_up.reset(new Materializer()); ResetDeclMap(exe_ctx, m_result_delegate, /*keep result in memory*/ true); OnExit on_exit([this]() { ResetDeclMap(); }); - if (!DeclMap()->WillParse(exe_ctx, m_materializer_ap.get())) { + if (!DeclMap()->WillParse(exe_ctx, m_materializer_up.get())) { diagnostic_manager.PutString( eDiagnosticSeverityError, "current process state is unsuitable for expression parsing"); diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp index fb54aaaf259..86f5cefe03d 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -739,17 +739,17 @@ EmulateInstructionARM::CreateInstance(const ArchSpec &arch, if (EmulateInstructionARM::SupportsEmulatingInstructionsOfTypeStatic( inst_type)) { if (arch.GetTriple().getArch() == llvm::Triple::arm) { - std::unique_ptr<EmulateInstructionARM> emulate_insn_ap( + std::unique_ptr<EmulateInstructionARM> emulate_insn_up( new EmulateInstructionARM(arch)); - if (emulate_insn_ap) - return emulate_insn_ap.release(); + if (emulate_insn_up) + return emulate_insn_up.release(); } else if (arch.GetTriple().getArch() == llvm::Triple::thumb) { - std::unique_ptr<EmulateInstructionARM> emulate_insn_ap( + std::unique_ptr<EmulateInstructionARM> emulate_insn_up( new EmulateInstructionARM(arch)); - if (emulate_insn_ap) - return emulate_insn_ap.release(); + if (emulate_insn_up) + return emulate_insn_up.release(); } } diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp index 6081af6464f..7e4d6dff60b 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp @@ -51,7 +51,7 @@ AppleObjCRuntime::~AppleObjCRuntime() {} AppleObjCRuntime::AppleObjCRuntime(Process *process) : ObjCLanguageRuntime(process), m_read_objc_library(false), - m_objc_trampoline_handler_ap(), m_Foundation_major() { + m_objc_trampoline_handler_up(), m_Foundation_major() { ReadObjCLibraryIfNeeded(process->GetTarget().GetImages()); } @@ -327,9 +327,9 @@ bool AppleObjCRuntime::ReadObjCLibrary(const ModuleSP &module_sp) { // Maybe check here and if we have a handler already, and the UUID of this // module is the same as the one in the current module, then we don't have to // reread it? - m_objc_trampoline_handler_ap.reset( + m_objc_trampoline_handler_up.reset( new AppleObjCTrampolineHandler(m_process->shared_from_this(), module_sp)); - if (m_objc_trampoline_handler_ap != NULL) { + if (m_objc_trampoline_handler_up != NULL) { m_read_objc_library = true; return true; } else @@ -339,8 +339,8 @@ bool AppleObjCRuntime::ReadObjCLibrary(const ModuleSP &module_sp) { ThreadPlanSP AppleObjCRuntime::GetStepThroughTrampolinePlan(Thread &thread, bool stop_others) { ThreadPlanSP thread_plan_sp; - if (m_objc_trampoline_handler_ap) - thread_plan_sp = m_objc_trampoline_handler_ap->GetStepThroughDispatchPlan( + if (m_objc_trampoline_handler_up) + thread_plan_sp = m_objc_trampoline_handler_up->GetStepThroughDispatchPlan( thread, stop_others); return thread_plan_sp; } diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h index 8cb58521a68..bd72cd734a0 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h @@ -119,7 +119,7 @@ protected: std::unique_ptr<Address> m_PrintForDebugger_addr; bool m_read_objc_library; std::unique_ptr<lldb_private::AppleObjCTrampolineHandler> - m_objc_trampoline_handler_ap; + m_objc_trampoline_handler_up; lldb::BreakpointSP m_objc_exception_bp_sp; lldb::ModuleWP m_objc_module_wp; std::unique_ptr<FunctionCaller> m_print_object_caller_up; diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h index 79cca67cfc9..47214ff3b62 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h @@ -147,7 +147,7 @@ protected: HashTableSignature m_hash_signature; lldb::addr_t m_isa_hash_table_ptr; - std::unique_ptr<DeclVendor> m_decl_vendor_ap; + std::unique_ptr<DeclVendor> m_decl_vendor_up; private: AppleObjCRuntimeV1(Process *process); diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index 85ffc79966c..3408ad6b631 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -384,14 +384,13 @@ AppleObjCRuntimeV2::AppleObjCRuntimeV2(Process *process, m_get_class_info_args(LLDB_INVALID_ADDRESS), m_get_class_info_args_mutex(), m_get_shared_cache_class_info_code(), m_get_shared_cache_class_info_args(LLDB_INVALID_ADDRESS), - m_get_shared_cache_class_info_args_mutex(), m_decl_vendor_ap(), + m_get_shared_cache_class_info_args_mutex(), m_decl_vendor_up(), m_tagged_pointer_obfuscator(LLDB_INVALID_ADDRESS), - m_isa_hash_table_ptr(LLDB_INVALID_ADDRESS), - m_hash_signature(), + m_isa_hash_table_ptr(LLDB_INVALID_ADDRESS), m_hash_signature(), m_has_object_getClass(false), m_loaded_objc_opt(false), - m_non_pointer_isa_cache_ap( + m_non_pointer_isa_cache_up( NonPointerISACache::CreateInstance(*this, objc_module_sp)), - m_tagged_pointer_vendor_ap( + m_tagged_pointer_vendor_up( TaggedPointerVendorV2::CreateInstance(*this, objc_module_sp)), m_encoding_to_type_sp(), m_noclasses_warning_emitted(false), m_CFBoolean_values() { @@ -921,9 +920,9 @@ size_t AppleObjCRuntimeV2::GetByteOffsetForIvar(CompilerType &parent_ast_type, // computational effort as possible whether something could possibly be a // tagged pointer - false positives are possible but false negatives shouldn't bool AppleObjCRuntimeV2::IsTaggedPointer(addr_t ptr) { - if (!m_tagged_pointer_vendor_ap) + if (!m_tagged_pointer_vendor_up) return false; - return m_tagged_pointer_vendor_ap->IsPossibleTaggedPointer(ptr); + return m_tagged_pointer_vendor_up->IsPossibleTaggedPointer(ptr); } class RemoteNXMapTable { @@ -1148,8 +1147,8 @@ bool AppleObjCRuntimeV2::HashTableSignature::NeedsUpdate( ObjCLanguageRuntime::ClassDescriptorSP AppleObjCRuntimeV2::GetClassDescriptorFromISA(ObjCISA isa) { ObjCLanguageRuntime::ClassDescriptorSP class_descriptor_sp; - if (m_non_pointer_isa_cache_ap) - class_descriptor_sp = m_non_pointer_isa_cache_ap->GetClassDescriptor(isa); + if (m_non_pointer_isa_cache_up) + class_descriptor_sp = m_non_pointer_isa_cache_up->GetClassDescriptor(isa); if (!class_descriptor_sp) class_descriptor_sp = ObjCLanguageRuntime::GetClassDescriptorFromISA(isa); return class_descriptor_sp; @@ -1176,7 +1175,7 @@ AppleObjCRuntimeV2::GetClassDescriptor(ValueObject &valobj) { // tagged pointer if (IsTaggedPointer(isa_pointer)) { - return m_tagged_pointer_vendor_ap->GetClassDescriptor(isa_pointer); + return m_tagged_pointer_vendor_up->GetClassDescriptor(isa_pointer); } else { ExecutionContext exe_ctx(valobj.GetExecutionContextRef()); @@ -1946,10 +1945,10 @@ AppleObjCRuntimeV2::GetActualTypeName(ObjCLanguageRuntime::ObjCISA isa) { } DeclVendor *AppleObjCRuntimeV2::GetDeclVendor() { - if (!m_decl_vendor_ap) - m_decl_vendor_ap.reset(new AppleObjCDeclVendor(*this)); + if (!m_decl_vendor_up) + m_decl_vendor_up.reset(new AppleObjCDeclVendor(*this)); - return m_decl_vendor_ap.get(); + return m_decl_vendor_up.get(); } lldb::addr_t AppleObjCRuntimeV2::LookupRuntimeSymbol(const ConstString &name) { @@ -2559,8 +2558,8 @@ lldb_private::AppleObjCRuntime::ObjCISA AppleObjCRuntimeV2::GetPointerISA(ObjCISA isa) { ObjCISA ret = isa; - if (m_non_pointer_isa_cache_ap) - m_non_pointer_isa_cache_ap->EvaluateNonPointerISA(isa, ret); + if (m_non_pointer_isa_cache_up) + m_non_pointer_isa_cache_up->EvaluateNonPointerISA(isa, ret); return ret; } diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h index d9135e58b3d..1129309cb26 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h @@ -86,7 +86,7 @@ public: bool IsTaggedPointer(lldb::addr_t ptr) override; TaggedPointerVendor *GetTaggedPointerVendor() override { - return m_tagged_pointer_vendor_ap.get(); + return m_tagged_pointer_vendor_up.get(); } lldb::addr_t GetTaggedPointerObfuscator(); @@ -326,14 +326,14 @@ private: lldb::addr_t m_get_shared_cache_class_info_args; std::mutex m_get_shared_cache_class_info_args_mutex; - std::unique_ptr<DeclVendor> m_decl_vendor_ap; + std::unique_ptr<DeclVendor> m_decl_vendor_up; lldb::addr_t m_tagged_pointer_obfuscator; lldb::addr_t m_isa_hash_table_ptr; HashTableSignature m_hash_signature; bool m_has_object_getClass; bool m_loaded_objc_opt; - std::unique_ptr<NonPointerISACache> m_non_pointer_isa_cache_ap; - std::unique_ptr<TaggedPointerVendor> m_tagged_pointer_vendor_ap; + std::unique_ptr<NonPointerISACache> m_non_pointer_isa_cache_up; + std::unique_ptr<TaggedPointerVendor> m_tagged_pointer_vendor_up; EncodingToTypeSP m_encoding_to_type_sp; bool m_noclasses_warning_emitted; llvm::Optional<std::pair<lldb::addr_t, lldb::addr_t>> m_CFBoolean_values; diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp index 4270d2a7c4b..377c8b3c713 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp @@ -748,9 +748,9 @@ AppleObjCTrampolineHandler::AppleObjCTrampolineHandler( } // Build our vtable dispatch handler here: - m_vtables_ap.reset(new AppleObjCVTables(process_sp, m_objc_module_sp)); - if (m_vtables_ap) - m_vtables_ap->ReadRegions(); + m_vtables_up.reset(new AppleObjCVTables(process_sp, m_objc_module_sp)); + if (m_vtables_up) + m_vtables_up->ReadRegions(); } lldb::addr_t @@ -864,8 +864,8 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(Thread &thread, if (!found_it) { uint32_t flags; - if (m_vtables_ap) { - found_it = m_vtables_ap->IsAddressInVTables(curr_pc, flags); + if (m_vtables_up) { + found_it = m_vtables_up->IsAddressInVTables(curr_pc, flags); if (found_it) { this_dispatch.name = "vtable"; this_dispatch.stret_return = diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h index ed93fc194df..a172c54ebf2 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h @@ -149,7 +149,7 @@ private: lldb::addr_t m_impl_stret_fn_addr; lldb::addr_t m_msg_forward_addr; lldb::addr_t m_msg_forward_stret_addr; - std::unique_ptr<AppleObjCVTables> m_vtables_ap; + std::unique_ptr<AppleObjCVTables> m_vtables_up; }; } // namespace lldb_private diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp index fd02e71d867..e1068e8d403 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp @@ -23,8 +23,8 @@ using namespace lldb_utility; AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser( ObjCLanguageRuntime &runtime) : ObjCLanguageRuntime::EncodingToType(), m_runtime(runtime) { - if (!m_scratch_ast_ctx_ap) - m_scratch_ast_ctx_ap.reset(new ClangASTContext(runtime.GetProcess() + if (!m_scratch_ast_ctx_up) + m_scratch_ast_ctx_up.reset(new ClangASTContext(runtime.GetProcess() ->GetTarget() .GetArchitecture() .GetTriple() diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index b6739345c85..7dd3b87a3a0 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -1502,9 +1502,9 @@ void RenderScriptRuntime::CaptureAllocationDestroy(RuntimeHook *hook, uint64_t(args[eRsContext]), uint64_t(args[eRsAlloc])); for (auto iter = m_allocations.begin(); iter != m_allocations.end(); ++iter) { - auto &allocation_ap = *iter; // get the unique pointer - if (allocation_ap->address.isValid() && - *allocation_ap->address.get() == addr_t(args[eRsAlloc])) { + auto &allocation_up = *iter; // get the unique pointer + if (allocation_up->address.isValid() && + *allocation_up->address.get() == addr_t(args[eRsAlloc])) { m_allocations.erase(iter); if (log) log->Printf("%s - deleted allocation entry.", __FUNCTION__); diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp index 64de171549e..50e474917d7 100644 --- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -320,18 +320,18 @@ ObjectContainer *ObjectContainerBSDArchive::CreateInstance( Archive::shared_ptr archive_sp(Archive::FindCachedArchive( *file, module_sp->GetArchitecture(), module_sp->GetModificationTime(), file_offset)); - std::unique_ptr<ObjectContainerBSDArchive> container_ap( + std::unique_ptr<ObjectContainerBSDArchive> container_up( new ObjectContainerBSDArchive(module_sp, archive_data_sp, archive_data_offset, file, file_offset, length)); - if (container_ap) { + if (container_up) { if (archive_sp) { // We already have this archive in our cache, use it - container_ap->SetArchive(archive_sp); - return container_ap.release(); - } else if (container_ap->ParseHeader()) - return container_ap.release(); + container_up->SetArchive(archive_sp); + return container_up.release(); + } else if (container_up->ParseHeader()) + return container_up.release(); } } } else { @@ -340,14 +340,14 @@ ObjectContainer *ObjectContainerBSDArchive::CreateInstance( *file, module_sp->GetArchitecture(), module_sp->GetModificationTime(), file_offset)); if (archive_sp) { - std::unique_ptr<ObjectContainerBSDArchive> container_ap( + std::unique_ptr<ObjectContainerBSDArchive> container_up( new ObjectContainerBSDArchive(module_sp, data_sp, data_offset, file, file_offset, length)); - if (container_ap) { + if (container_up) { // We already have this archive in our cache, use it - container_ap->SetArchive(archive_sp); - return container_ap.release(); + container_up->SetArchive(archive_sp); + return container_up.release(); } } } diff --git a/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp b/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp index 808e4691c20..9e4dc5af0a4 100644 --- a/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp +++ b/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp @@ -49,11 +49,11 @@ ObjectContainer *ObjectContainerUniversalMachO::CreateInstance( DataExtractor data; data.SetData(data_sp, data_offset, length); if (ObjectContainerUniversalMachO::MagicBytesMatch(data)) { - std::unique_ptr<ObjectContainerUniversalMachO> container_ap( + std::unique_ptr<ObjectContainerUniversalMachO> container_up( new ObjectContainerUniversalMachO(module_sp, data_sp, data_offset, file, file_offset, length)); - if (container_ap->ParseHeader()) { - return container_ap.release(); + if (container_up->ParseHeader()) { + return container_up.release(); } } } diff --git a/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp b/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp index 5f36638f57c..ab68985691b 100644 --- a/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp +++ b/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp @@ -123,9 +123,9 @@ Symtab *ObjectFileBreakpad::GetSymtab() { } void ObjectFileBreakpad::CreateSections(SectionList &unified_section_list) { - if (m_sections_ap) + if (m_sections_up) return; - m_sections_ap = llvm::make_unique<SectionList>(); + m_sections_up = llvm::make_unique<SectionList>(); llvm::Optional<Record::Kind> current_section; offset_t section_start; @@ -141,7 +141,7 @@ void ObjectFileBreakpad::CreateSections(SectionList &unified_section_list) { ConstString(toString(*current_section)), eSectionTypeOther, /*file_vm_addr*/ 0, /*vm_size*/ 0, section_start, end_offset - section_start, /*log2align*/ 0, /*flags*/ 0); - m_sections_ap->AddSection(section_sp); + m_sections_up->AddSection(section_sp); unified_section_list.AddSection(section_sp); }; while (!text.empty()) { diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index eaafa84db03..e6a39dbc54d 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -435,11 +435,11 @@ ObjectFile *ObjectFileELF::CreateInstance(const lldb::ModuleSP &module_sp, unsigned address_size = ELFHeader::AddressSizeInBytes(magic); if (address_size == 4 || address_size == 8) { - std::unique_ptr<ObjectFileELF> objfile_ap(new ObjectFileELF( + std::unique_ptr<ObjectFileELF> objfile_up(new ObjectFileELF( module_sp, data_sp, data_offset, file, file_offset, length)); - ArchSpec spec = objfile_ap->GetArchitecture(); - if (spec && objfile_ap->SetModulesArchitecture(spec)) - return objfile_ap.release(); + ArchSpec spec = objfile_up->GetArchitecture(); + if (spec && objfile_up->SetModulesArchitecture(spec)) + return objfile_up.release(); } return NULL; @@ -453,11 +453,11 @@ ObjectFile *ObjectFileELF::CreateMemoryInstance( if (ELFHeader::MagicBytesMatch(magic)) { unsigned address_size = ELFHeader::AddressSizeInBytes(magic); if (address_size == 4 || address_size == 8) { - std::unique_ptr<ObjectFileELF> objfile_ap( + std::unique_ptr<ObjectFileELF> objfile_up( new ObjectFileELF(module_sp, data_sp, process_sp, header_addr)); - ArchSpec spec = objfile_ap->GetArchitecture(); - if (spec && objfile_ap->SetModulesArchitecture(spec)) - return objfile_ap.release(); + ArchSpec spec = objfile_up->GetArchitecture(); + if (spec && objfile_up->SetModulesArchitecture(spec)) + return objfile_up.release(); } } } @@ -774,7 +774,7 @@ ObjectFileELF::ObjectFileELF(const lldb::ModuleSP &module_sp, : ObjectFile(module_sp, file, file_offset, length, data_sp, data_offset), m_header(), m_uuid(), m_gnu_debuglink_file(), m_gnu_debuglink_crc(0), m_program_headers(), m_section_headers(), m_dynamic_symbols(), - m_filespec_ap(), m_entry_point_address(), m_arch_spec() { + m_filespec_up(), m_entry_point_address(), m_arch_spec() { if (file) m_file = *file; ::memset(&m_header, 0, sizeof(m_header)); @@ -787,7 +787,7 @@ ObjectFileELF::ObjectFileELF(const lldb::ModuleSP &module_sp, : ObjectFile(module_sp, process_sp, header_addr, header_data_sp), m_header(), m_uuid(), m_gnu_debuglink_file(), m_gnu_debuglink_crc(0), m_program_headers(), m_section_headers(), m_dynamic_symbols(), - m_filespec_ap(), m_entry_point_address(), m_arch_spec() { + m_filespec_up(), m_entry_point_address(), m_arch_spec() { ::memset(&m_header, 0, sizeof(m_header)); } @@ -950,7 +950,7 @@ uint32_t ObjectFileELF::GetDependentModules(FileSpecList &files) { uint32_t num_specs = 0; for (unsigned i = 0; i < num_modules; ++i) { - if (files.AppendIfUnique(m_filespec_ap->GetFileSpecAtIndex(i))) + if (files.AppendIfUnique(m_filespec_up->GetFileSpecAtIndex(i))) num_specs++; } @@ -1057,10 +1057,10 @@ Address ObjectFileELF::GetBaseAddress() { // ParseDependentModules //---------------------------------------------------------------------- size_t ObjectFileELF::ParseDependentModules() { - if (m_filespec_ap) - return m_filespec_ap->GetSize(); + if (m_filespec_up) + return m_filespec_up->GetSize(); - m_filespec_ap.reset(new FileSpecList()); + m_filespec_up.reset(new FileSpecList()); if (!ParseSectionHeaders()) return 0; @@ -1107,11 +1107,11 @@ size_t ObjectFileELF::ParseDependentModules() { const char *lib_name = dynstr_data.PeekCStr(str_index); FileSpec file_spec(lib_name); FileSystem::Instance().Resolve(file_spec); - m_filespec_ap->Append(file_spec); + m_filespec_up->Append(file_spec); } } - return m_filespec_ap->GetSize(); + return m_filespec_up->GetSize(); } //---------------------------------------------------------------------- @@ -1931,10 +1931,10 @@ public: } void ObjectFileELF::CreateSections(SectionList &unified_section_list) { - if (m_sections_ap) + if (m_sections_up) return; - m_sections_ap = llvm::make_unique<SectionList>(); + m_sections_up = llvm::make_unique<SectionList>(); VMAddressProvider address_provider(CalculateType()); size_t LoadID = 0; @@ -1954,7 +1954,7 @@ void ObjectFileELF::CreateSections(SectionList &unified_section_list) { eSectionTypeContainer, InfoOr->GetRangeBase(), InfoOr->GetByteSize(), PHdr.p_offset, PHdr.p_filesz, Log2Align, /*flags*/ 0); Segment->SetPermissions(GetPermissions(PHdr)); - m_sections_ap->AddSection(Segment); + m_sections_up->AddSection(Segment); address_provider.AddSegment(*InfoOr, std::move(Segment)); } @@ -2000,7 +2000,7 @@ void ObjectFileELF::CreateSections(SectionList &unified_section_list) { section_sp->SetPermissions(GetPermissions(header)); section_sp->SetIsThreadSpecific(header.sh_flags & SHF_TLS); - (InfoOr->Segment ? InfoOr->Segment->GetChildren() : *m_sections_ap) + (InfoOr->Segment ? InfoOr->Segment->GetChildren() : *m_sections_up) .AddSection(section_sp); address_provider.AddSection(std::move(*InfoOr), std::move(section_sp)); } @@ -2008,7 +2008,7 @@ void ObjectFileELF::CreateSections(SectionList &unified_section_list) { // For eTypeDebugInfo files, the Symbol Vendor will take care of updating the // unified section list. if (GetType() != eTypeDebugInfo) - unified_section_list = *m_sections_ap; + unified_section_list = *m_sections_up; } // Find the arm/aarch64 mapping symbol character in the given symbol name. @@ -2384,7 +2384,7 @@ unsigned ObjectFileELF::ParseSymbolTable(Symtab *symbol_table, } // Get section list for this object file. - SectionList *section_list = m_sections_ap.get(); + SectionList *section_list = m_sections_up.get(); if (!section_list) return 0; @@ -2612,7 +2612,7 @@ ObjectFileELF::ParseTrampolineSymbols(Symtab *symbol_table, user_id_t start_id, if (!sym_hdr) return 0; - SectionList *section_list = m_sections_ap.get(); + SectionList *section_list = m_sections_up.get(); if (!section_list) return 0; @@ -2805,7 +2805,7 @@ Symtab *ObjectFileELF::GetSymtab() { if (module_obj_file && module_obj_file != this) return module_obj_file->GetSymtab(); - if (m_symtab_ap == NULL) { + if (m_symtab_up == NULL) { SectionList *section_list = module_sp->GetSectionList(); if (!section_list) return NULL; @@ -2829,8 +2829,8 @@ Symtab *ObjectFileELF::GetSymtab() { .get(); } if (symtab) { - m_symtab_ap.reset(new Symtab(symtab->GetObjectFile())); - symbol_id += ParseSymbolTable(m_symtab_ap.get(), symbol_id, symtab); + m_symtab_up.reset(new Symtab(symtab->GetObjectFile())); + symbol_id += ParseSymbolTable(m_symtab_up.get(), symbol_id, symtab); } // DT_JMPREL @@ -2854,30 +2854,30 @@ Symtab *ObjectFileELF::GetSymtab() { GetSectionHeaderByIndex(reloc_id); assert(reloc_header); - if (m_symtab_ap == nullptr) - m_symtab_ap.reset(new Symtab(reloc_section->GetObjectFile())); + if (m_symtab_up == nullptr) + m_symtab_up.reset(new Symtab(reloc_section->GetObjectFile())); - ParseTrampolineSymbols(m_symtab_ap.get(), symbol_id, reloc_header, + ParseTrampolineSymbols(m_symtab_up.get(), symbol_id, reloc_header, reloc_id); } } DWARFCallFrameInfo *eh_frame = GetUnwindTable().GetEHFrameInfo(); if (eh_frame) { - if (m_symtab_ap == nullptr) - m_symtab_ap.reset(new Symtab(this)); - ParseUnwindSymbols(m_symtab_ap.get(), eh_frame); + if (m_symtab_up == nullptr) + m_symtab_up.reset(new Symtab(this)); + ParseUnwindSymbols(m_symtab_up.get(), eh_frame); } // If we still don't have any symtab then create an empty instance to avoid // do the section lookup next time. - if (m_symtab_ap == nullptr) - m_symtab_ap.reset(new Symtab(this)); + if (m_symtab_up == nullptr) + m_symtab_up.reset(new Symtab(this)); - m_symtab_ap->CalculateSymbolSizes(); + m_symtab_up->CalculateSymbolSizes(); } - return m_symtab_ap.get(); + return m_symtab_up.get(); } void ObjectFileELF::RelocateSection(lldb_private::Section *section) @@ -3276,7 +3276,7 @@ void ObjectFileELF::DumpDependentModules(lldb_private::Stream *s) { if (num_modules > 0) { s->PutCString("Dependent Modules:\n"); for (unsigned i = 0; i < num_modules; ++i) { - const FileSpec &spec = m_filespec_ap->GetFileSpecAtIndex(i); + const FileSpec &spec = m_filespec_up->GetFileSpecAtIndex(i); s->Printf(" %s\n", spec.GetFilename().GetCString()); } } diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h index fb51212a0a5..668cfa36566 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h @@ -210,7 +210,7 @@ private: /// List of file specifications corresponding to the modules (shared /// libraries) on which this object file depends. - mutable std::unique_ptr<lldb_private::FileSpecList> m_filespec_ap; + mutable std::unique_ptr<lldb_private::FileSpecList> m_filespec_up; /// Cached value of the entry point for this module. lldb_private::Address m_entry_point_address; @@ -264,7 +264,7 @@ private: lldb_private::ArchSpec &arch_spec); /// Scans the dynamic section and locates all dependent modules (shared - /// libraries) populating m_filespec_ap. This method will compute the + /// libraries) populating m_filespec_up. This method will compute the /// dependent module list only once. Returns the number of dependent /// modules parsed. size_t ParseDependentModules(); @@ -274,7 +274,7 @@ private: /// number of dynamic symbols parsed. size_t ParseDynamicSymbols(); - /// Populates m_symtab_ap will all non-dynamic linker symbols. This method + /// Populates m_symtab_up will all non-dynamic linker symbols. This method /// will parse the symbols only once. Returns the number of symbols parsed. unsigned ParseSymbolTable(lldb_private::Symtab *symbol_table, lldb::user_id_t start_id, diff --git a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp index 46daa5e9c21..2c9fed26b8c 100644 --- a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp +++ b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp @@ -115,18 +115,18 @@ Symtab *ObjectFileJIT::GetSymtab() { ModuleSP module_sp(GetModule()); if (module_sp) { std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex()); - if (m_symtab_ap == NULL) { - m_symtab_ap.reset(new Symtab(this)); + if (m_symtab_up == NULL) { + m_symtab_up.reset(new Symtab(this)); std::lock_guard<std::recursive_mutex> symtab_guard( - m_symtab_ap->GetMutex()); + m_symtab_up->GetMutex()); ObjectFileJITDelegateSP delegate_sp(m_delegate_wp.lock()); if (delegate_sp) - delegate_sp->PopulateSymtab(this, *m_symtab_ap); + delegate_sp->PopulateSymtab(this, *m_symtab_up); // TODO: get symbols from delegate - m_symtab_ap->Finalize(); + m_symtab_up->Finalize(); } } - return m_symtab_ap.get(); + return m_symtab_up.get(); } bool ObjectFileJIT::IsStripped() { @@ -134,12 +134,12 @@ bool ObjectFileJIT::IsStripped() { } void ObjectFileJIT::CreateSections(SectionList &unified_section_list) { - if (!m_sections_ap) { - m_sections_ap.reset(new SectionList()); + if (!m_sections_up) { + m_sections_up.reset(new SectionList()); ObjectFileJITDelegateSP delegate_sp(m_delegate_wp.lock()); if (delegate_sp) { - delegate_sp->PopulateSectionList(this, *m_sections_ap); - unified_section_list = *m_sections_ap; + delegate_sp->PopulateSectionList(this, *m_sections_up); + unified_section_list = *m_sections_up; } } } @@ -161,8 +161,8 @@ void ObjectFileJIT::Dump(Stream *s) { if (sections) sections->Dump(s, NULL, true, UINT32_MAX); - if (m_symtab_ap) - m_symtab_ap->Dump(s, NULL, eSortOrderNone); + if (m_symtab_up) + m_symtab_up->Dump(s, NULL, eSortOrderNone); } } diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 22839990da8..035142a34a2 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -872,22 +872,22 @@ ObjectFile *ObjectFileMachO::CreateInstance(const lldb::ModuleSP &module_sp, return nullptr; data_offset = 0; } - auto objfile_ap = llvm::make_unique<ObjectFileMachO>( + auto objfile_up = llvm::make_unique<ObjectFileMachO>( module_sp, data_sp, data_offset, file, file_offset, length); - if (!objfile_ap || !objfile_ap->ParseHeader()) + if (!objfile_up || !objfile_up->ParseHeader()) return nullptr; - return objfile_ap.release(); + return objfile_up.release(); } ObjectFile *ObjectFileMachO::CreateMemoryInstance( const lldb::ModuleSP &module_sp, DataBufferSP &data_sp, const ProcessSP &process_sp, lldb::addr_t header_addr) { if (ObjectFileMachO::MagicBytesMatch(data_sp, 0, data_sp->GetByteSize())) { - std::unique_ptr<ObjectFile> objfile_ap( + std::unique_ptr<ObjectFile> objfile_up( new ObjectFileMachO(module_sp, data_sp, process_sp, header_addr)); - if (objfile_ap.get() && objfile_ap->ParseHeader()) - return objfile_ap.release(); + if (objfile_up.get() && objfile_up->ParseHeader()) + return objfile_up.release(); } return NULL; } @@ -1312,15 +1312,15 @@ Symtab *ObjectFileMachO::GetSymtab() { ModuleSP module_sp(GetModule()); if (module_sp) { std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex()); - if (m_symtab_ap == NULL) { - m_symtab_ap.reset(new Symtab(this)); + if (m_symtab_up == NULL) { + m_symtab_up.reset(new Symtab(this)); std::lock_guard<std::recursive_mutex> symtab_guard( - m_symtab_ap->GetMutex()); + m_symtab_up->GetMutex()); ParseSymtab(); - m_symtab_ap->Finalize(); + m_symtab_up->Finalize(); } } - return m_symtab_ap.get(); + return m_symtab_up.get(); } bool ObjectFileMachO::IsStripped() { @@ -1668,7 +1668,7 @@ void ObjectFileMachO::ProcessSegmentCommand(const load_command &load_cmd_, load_cmd.flags); // Flags for this section segment_sp->SetIsEncrypted(segment_is_encrypted); - m_sections_ap->AddSection(segment_sp); + m_sections_up->AddSection(segment_sp); segment_sp->SetPermissions(segment_permissions); if (add_to_unified) context.UnifiedList.AddSection(segment_sp); @@ -1697,7 +1697,7 @@ void ObjectFileMachO::ProcessSegmentCommand(const load_command &load_cmd_, context.FileAddressesChanged = true; } } - m_sections_ap->AddSection(unified_section_sp); + m_sections_up->AddSection(unified_section_sp); } struct section_64 sect64; @@ -1810,7 +1810,7 @@ void ObjectFileMachO::ProcessSegmentCommand(const load_command &load_cmd_, load_cmd.flags); // Flags for this section segment_sp->SetIsFake(true); segment_sp->SetPermissions(segment_permissions); - m_sections_ap->AddSection(segment_sp); + m_sections_up->AddSection(segment_sp); if (add_to_unified) context.UnifiedList.AddSection(segment_sp); segment_sp->SetIsEncrypted(segment_is_encrypted); @@ -1877,10 +1877,10 @@ void ObjectFileMachO::ProcessDysymtabCommand(const load_command &load_cmd, } void ObjectFileMachO::CreateSections(SectionList &unified_section_list) { - if (m_sections_ap) + if (m_sections_up) return; - m_sections_ap.reset(new SectionList()); + m_sections_up.reset(new SectionList()); lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic); // bool dump_sections = false; @@ -2213,7 +2213,7 @@ size_t ObjectFileMachO::ParseSymtab() { } if (symtab_load_command.cmd) { - Symtab *symtab = m_symtab_ap.get(); + Symtab *symtab = m_symtab_up.get(); SectionList *section_list = GetSectionList(); if (section_list == NULL) return 0; @@ -4842,8 +4842,8 @@ void ObjectFileMachO::Dump(Stream *s) { if (sections) sections->Dump(s, NULL, true, UINT32_MAX); - if (m_symtab_ap) - m_symtab_ap->Dump(s, NULL, eSortOrderNone); + if (m_symtab_up) + m_symtab_up->Dump(s, NULL, eSortOrderNone); } } diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp index 5ad6abe4d22..ddc59aea62e 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -83,16 +83,16 @@ ObjectFile *ObjectFilePECOFF::CreateInstance(const lldb::ModuleSP &module_sp, return nullptr; } - auto objfile_ap = llvm::make_unique<ObjectFilePECOFF>( + auto objfile_up = llvm::make_unique<ObjectFilePECOFF>( module_sp, data_sp, data_offset, file, file_offset, length); - if (!objfile_ap || !objfile_ap->ParseHeader()) + if (!objfile_up || !objfile_up->ParseHeader()) return nullptr; // Cache coff binary. - if (!objfile_ap->CreateBinary()) + if (!objfile_up->CreateBinary()) return nullptr; - return objfile_ap.release(); + return objfile_up.release(); } ObjectFile *ObjectFilePECOFF::CreateMemoryInstance( @@ -100,10 +100,10 @@ ObjectFile *ObjectFilePECOFF::CreateMemoryInstance( const lldb::ProcessSP &process_sp, lldb::addr_t header_addr) { if (!data_sp || !ObjectFilePECOFF::MagicBytesMatch(data_sp)) return nullptr; - auto objfile_ap = llvm::make_unique<ObjectFilePECOFF>( + auto objfile_up = llvm::make_unique<ObjectFilePECOFF>( module_sp, data_sp, process_sp, header_addr); - if (objfile_ap.get() && objfile_ap->ParseHeader()) { - return objfile_ap.release(); + if (objfile_up.get() && objfile_up->ParseHeader()) { + return objfile_up.release(); } return nullptr; } @@ -477,13 +477,13 @@ DataExtractor ObjectFilePECOFF::ReadImageData(uint32_t offset, size_t size) { ProcessSP process_sp(m_process_wp.lock()); DataExtractor data; if (process_sp) { - auto data_ap = llvm::make_unique<DataBufferHeap>(size, 0); + auto data_up = llvm::make_unique<DataBufferHeap>(size, 0); Status readmem_error; size_t bytes_read = - process_sp->ReadMemory(m_image_base + offset, data_ap->GetBytes(), - data_ap->GetByteSize(), readmem_error); + process_sp->ReadMemory(m_image_base + offset, data_up->GetBytes(), + data_up->GetByteSize(), readmem_error); if (bytes_read == size) { - DataBufferSP buffer_sp(data_ap.release()); + DataBufferSP buffer_sp(data_up.release()); data.SetData(buffer_sp, 0, buffer_sp->GetByteSize()); } } @@ -552,10 +552,10 @@ Symtab *ObjectFilePECOFF::GetSymtab() { ModuleSP module_sp(GetModule()); if (module_sp) { std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex()); - if (m_symtab_ap == NULL) { + if (m_symtab_up == NULL) { SectionList *sect_list = GetSectionList(); - m_symtab_ap.reset(new Symtab(this)); - std::lock_guard<std::recursive_mutex> guard(m_symtab_ap->GetMutex()); + m_symtab_up.reset(new Symtab(this)); + std::lock_guard<std::recursive_mutex> guard(m_symtab_up->GetMutex()); const uint32_t num_syms = m_coff_header.nsyms; @@ -579,7 +579,7 @@ Symtab *ObjectFilePECOFF::GetSymtab() { offset = 0; std::string symbol_name; - Symbol *symbols = m_symtab_ap->Resize(num_syms); + Symbol *symbols = m_symtab_up->Resize(num_syms); for (uint32_t i = 0; i < num_syms; ++i) { coff_symbol_t symbol; const uint32_t symbol_offset = offset; @@ -660,7 +660,7 @@ Symtab *ObjectFilePECOFF::GetSymtab() { lldb::offset_t name_ordinal_offset = export_table.address_of_name_ordinals - data_start; - Symbol *symbols = m_symtab_ap->Resize(export_table.number_of_names); + Symbol *symbols = m_symtab_up->Resize(export_table.number_of_names); std::string symbol_name; @@ -687,10 +687,10 @@ Symtab *ObjectFilePECOFF::GetSymtab() { symbols[i].SetDebug(true); } } - m_symtab_ap->CalculateSymbolSizes(); + m_symtab_up->CalculateSymbolSizes(); } } - return m_symtab_ap.get(); + return m_symtab_up.get(); } bool ObjectFilePECOFF::IsStripped() { @@ -699,9 +699,9 @@ bool ObjectFilePECOFF::IsStripped() { } void ObjectFilePECOFF::CreateSections(SectionList &unified_section_list) { - if (m_sections_ap) + if (m_sections_up) return; - m_sections_ap.reset(new SectionList()); + m_sections_up.reset(new SectionList()); ModuleSP module_sp(GetModule()); if (module_sp) { @@ -832,7 +832,7 @@ void ObjectFilePECOFF::CreateSections(SectionList &unified_section_list) { // section_sp->SetIsEncrypted (segment_is_encrypted); unified_section_list.AddSection(section_sp); - m_sections_ap->AddSection(section_sp); + m_sections_up->AddSection(section_sp); } } } @@ -948,8 +948,8 @@ void ObjectFilePECOFF::Dump(Stream *s) { if (sections) sections->Dump(s, NULL, true, UINT32_MAX); - if (m_symtab_ap) - m_symtab_ap->Dump(s, NULL, eSortOrderNone); + if (m_symtab_up) + m_symtab_up->Dump(s, NULL, eSortOrderNone); if (m_dos_header.e_magic) DumpDOSHeader(s, m_dos_header); diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index dd5f4339fc9..be7e9849323 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -54,10 +54,10 @@ OperatingSystem *OperatingSystemPython::CreateInstance(Process *process, FileSpec python_os_plugin_spec(process->GetPythonOSPluginPath()); if (python_os_plugin_spec && FileSystem::Instance().Exists(python_os_plugin_spec)) { - std::unique_ptr<OperatingSystemPython> os_ap( + std::unique_ptr<OperatingSystemPython> os_up( new OperatingSystemPython(process, python_os_plugin_spec)); - if (os_ap.get() && os_ap->IsValid()) - return os_ap.release(); + if (os_up.get() && os_up->IsValid()) + return os_up.release(); } return NULL; } @@ -74,7 +74,7 @@ const char *OperatingSystemPython::GetPluginDescriptionStatic() { OperatingSystemPython::OperatingSystemPython(lldb_private::Process *process, const FileSpec &python_module_path) - : OperatingSystem(process), m_thread_list_valobj_sp(), m_register_info_ap(), + : OperatingSystem(process), m_thread_list_valobj_sp(), m_register_info_up(), m_interpreter(NULL), m_python_object_sp() { if (!process) return; @@ -116,7 +116,7 @@ OperatingSystemPython::OperatingSystemPython(lldb_private::Process *process, OperatingSystemPython::~OperatingSystemPython() {} DynamicRegisterInfo *OperatingSystemPython::GetDynamicRegisterInfo() { - if (m_register_info_ap == NULL) { + if (m_register_info_up == NULL) { if (!m_interpreter || !m_python_object_sp) return NULL; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OS)); @@ -131,12 +131,12 @@ DynamicRegisterInfo *OperatingSystemPython::GetDynamicRegisterInfo() { if (!dictionary) return NULL; - m_register_info_ap.reset(new DynamicRegisterInfo( + m_register_info_up.reset(new DynamicRegisterInfo( *dictionary, m_process->GetTarget().GetArchitecture())); - assert(m_register_info_ap->GetNumRegisters() > 0); - assert(m_register_info_ap->GetNumRegisterSets() > 0); + assert(m_register_info_up->GetNumRegisters() > 0); + assert(m_register_info_up->GetNumRegisterSets() > 0); } - return m_register_info_ap.get(); + return m_register_info_up.get(); } //------------------------------------------------------------------ diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h index 3d6414521d2..b5779090072 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h @@ -83,7 +83,7 @@ protected: DynamicRegisterInfo *GetDynamicRegisterInfo(); lldb::ValueObjectSP m_thread_list_valobj_sp; - std::unique_ptr<DynamicRegisterInfo> m_register_info_ap; + std::unique_ptr<DynamicRegisterInfo> m_register_info_up; lldb_private::ScriptInterpreter *m_interpreter; lldb_private::StructuredData::ObjectSP m_python_object_sp; }; diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index 68d53c2ca28..ff9c5aa974e 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -1700,12 +1700,12 @@ PlatformDarwin::FindBundleBinaryInExecSearchPaths (const ModuleSpec &module_spec // "UIFoundation" and "UIFoundation.framework" -- most likely the latter // will be the one we find there. - FileSpec platform_pull_apart(platform_file); + FileSpec platform_pull_upart(platform_file); std::vector<std::string> path_parts; path_parts.push_back( - platform_pull_apart.GetLastPathComponent().AsCString()); - while (platform_pull_apart.RemoveLastPathComponent()) { - ConstString part = platform_pull_apart.GetLastPathComponent(); + platform_pull_upart.GetLastPathComponent().AsCString()); + while (platform_pull_upart.RemoveLastPathComponent()) { + ConstString part = platform_pull_upart.GetLastPathComponent(); path_parts.push_back(part.AsCString()); } const size_t path_parts_size = path_parts.size(); diff --git a/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp b/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp index a1979c5a66a..bcd6d8c2c4c 100644 --- a/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp +++ b/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp @@ -138,7 +138,7 @@ bool NativeThreadDarwin::NotifyException(MachException::Data &exc) { // Allow the arch specific protocol to process (MachException::Data &)exc // first before possible reassignment of m_stop_exception with exc. See // also MachThread::GetStopException(). - bool handled = m_arch_ap->NotifyException(exc); + bool handled = m_arch_up->NotifyException(exc); if (m_stop_exception.IsValid()) { @@ -175,7 +175,7 @@ bool NativeThreadDarwin::ShouldStop(bool &step_more) const { } else { - if (m_arch_ap->StepNotComplete()) + if (m_arch_up->StepNotComplete()) { step_more = true; return false; @@ -217,7 +217,7 @@ void NativeThreadDarwin::ThreadDidStop() { // When this method gets called, the process state is still in the state it // was in while running so we can act accordingly. - m_arch_ap->ThreadDidStop(); + m_arch_up->ThreadDidStop(); // We may have suspended this thread so the primary thread could step diff --git a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp index 397b9315d37..74983553127 100644 --- a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp @@ -51,7 +51,7 @@ using namespace lldb; using namespace lldb_private; FreeBSDThread::FreeBSDThread(Process &process, lldb::tid_t tid) - : Thread(process, tid), m_frame_ap(), m_breakpoint(), + : Thread(process, tid), m_frame_up(), m_breakpoint(), m_thread_name_valid(false), m_thread_name(), m_posix_thread(nullptr) { Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD)); LLDB_LOGV(log, "tid = {0}", tid); @@ -276,10 +276,10 @@ bool FreeBSDThread::CalculateStopInfo() { } Unwind *FreeBSDThread::GetUnwinder() { - if (!m_unwinder_ap) - m_unwinder_ap.reset(new UnwindLLDB(*this)); + if (!m_unwinder_up) + m_unwinder_up.reset(new UnwindLLDB(*this)); - return m_unwinder_ap.get(); + return m_unwinder_up.get(); } void FreeBSDThread::DidStop() { diff --git a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h index 83a987cf75c..92faee7480c 100644 --- a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h +++ b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h @@ -86,7 +86,7 @@ protected: return m_posix_thread; } - std::unique_ptr<lldb_private::StackFrame> m_frame_ap; + std::unique_ptr<lldb_private::StackFrame> m_frame_up; lldb::BreakpointSiteSP m_breakpoint; diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp index c8d0417986a..d985a52ce44 100644 --- a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp @@ -1035,11 +1035,11 @@ bool ProcessFreeBSD::SupportHardwareSingleStepping() const { } Status ProcessFreeBSD::SetupSoftwareSingleStepping(lldb::tid_t tid) { - std::unique_ptr<EmulateInstruction> emulator_ap( + std::unique_ptr<EmulateInstruction> emulator_up( EmulateInstruction::FindPlugin(GetTarget().GetArchitecture(), eInstructionTypePCModifying, nullptr)); - if (emulator_ap == nullptr) + if (emulator_up == nullptr) return Status("Instruction emulator not found!"); FreeBSDThread *thread = static_cast<FreeBSDThread *>( @@ -1050,17 +1050,17 @@ Status ProcessFreeBSD::SetupSoftwareSingleStepping(lldb::tid_t tid) { lldb::RegisterContextSP register_context_sp = thread->GetRegisterContext(); EmulatorBaton baton(this, register_context_sp.get()); - emulator_ap->SetBaton(&baton); - emulator_ap->SetReadMemCallback(&ReadMemoryCallback); - emulator_ap->SetReadRegCallback(&ReadRegisterCallback); - emulator_ap->SetWriteMemCallback(&WriteMemoryCallback); - emulator_ap->SetWriteRegCallback(&WriteRegisterCallback); + emulator_up->SetBaton(&baton); + emulator_up->SetReadMemCallback(&ReadMemoryCallback); + emulator_up->SetReadRegCallback(&ReadRegisterCallback); + emulator_up->SetWriteMemCallback(&WriteMemoryCallback); + emulator_up->SetWriteRegCallback(&WriteRegisterCallback); - if (!emulator_ap->ReadInstruction()) + if (!emulator_up->ReadInstruction()) return Status("Read instruction failed!"); bool emulation_result = - emulator_ap->EvaluateInstruction(eEmulateInstructionOptionAutoAdvancePC); + emulator_up->EvaluateInstruction(eEmulateInstructionOptionAutoAdvancePC); const RegisterInfo *reg_info_pc = register_context_sp->GetRegisterInfo( eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC); auto pc_it = @@ -1077,7 +1077,7 @@ Status ProcessFreeBSD::SetupSoftwareSingleStepping(lldb::tid_t tid) { // PC modifying instruction should be successful. The failure most // likely caused by a not supported instruction which don't modify PC. next_pc = - register_context_sp->GetPC() + emulator_ap->GetOpcode().GetByteSize(); + register_context_sp->GetPC() + emulator_up->GetOpcode().GetByteSize(); } else { // The instruction emulation failed after it modified the PC. It is an // unknown error where we can't continue because the next instruction is diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index f5204a6e6fa..bab2a71de3d 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -948,25 +948,25 @@ NativeProcessLinux::SetupSoftwareSingleStepping(NativeThreadLinux &thread) { Status error; NativeRegisterContext& register_context = thread.GetRegisterContext(); - std::unique_ptr<EmulateInstruction> emulator_ap( + std::unique_ptr<EmulateInstruction> emulator_up( EmulateInstruction::FindPlugin(m_arch, eInstructionTypePCModifying, nullptr)); - if (emulator_ap == nullptr) + if (emulator_up == nullptr) return Status("Instruction emulator not found!"); EmulatorBaton baton(*this, register_context); - emulator_ap->SetBaton(&baton); - emulator_ap->SetReadMemCallback(&ReadMemoryCallback); - emulator_ap->SetReadRegCallback(&ReadRegisterCallback); - emulator_ap->SetWriteMemCallback(&WriteMemoryCallback); - emulator_ap->SetWriteRegCallback(&WriteRegisterCallback); + emulator_up->SetBaton(&baton); + emulator_up->SetReadMemCallback(&ReadMemoryCallback); + emulator_up->SetReadRegCallback(&ReadRegisterCallback); + emulator_up->SetWriteMemCallback(&WriteMemoryCallback); + emulator_up->SetWriteRegCallback(&WriteRegisterCallback); - if (!emulator_ap->ReadInstruction()) + if (!emulator_up->ReadInstruction()) return Status("Read instruction failed!"); bool emulation_result = - emulator_ap->EvaluateInstruction(eEmulateInstructionOptionAutoAdvancePC); + emulator_up->EvaluateInstruction(eEmulateInstructionOptionAutoAdvancePC); const RegisterInfo *reg_info_pc = register_context.GetRegisterInfo( eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC); @@ -994,7 +994,7 @@ NativeProcessLinux::SetupSoftwareSingleStepping(NativeThreadLinux &thread) { // the size of the current opcode because the emulation of all // PC modifying instruction should be successful. The failure most // likely caused by a not supported instruction which don't modify PC. - next_pc = register_context.GetPC() + emulator_ap->GetOpcode().GetByteSize(); + next_pc = register_context.GetPC() + emulator_up->GetOpcode().GetByteSize(); next_flags = ReadFlags(register_context); } else { // The instruction emulation failed after it modified the PC. It is an diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp index 3f5210adc49..590e8075a44 100644 --- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp @@ -940,25 +940,25 @@ NativeRegisterContextLinux_mips64::GetWatchpointHitAddress(uint32_t wp_index) { lldb_private::ArchSpec arch; arch = GetRegisterInfoInterface().GetTargetArchitecture(); - std::unique_ptr<EmulateInstruction> emulator_ap( + std::unique_ptr<EmulateInstruction> emulator_up( EmulateInstruction::FindPlugin(arch, lldb_private::eInstructionTypeAny, nullptr)); - if (emulator_ap == nullptr) + if (emulator_up == nullptr) return LLDB_INVALID_ADDRESS; EmulatorBaton baton( static_cast<NativeProcessLinux *>(&m_thread.GetProcess()), this); - emulator_ap->SetBaton(&baton); - emulator_ap->SetReadMemCallback(&ReadMemoryCallback); - emulator_ap->SetReadRegCallback(&ReadRegisterCallback); - emulator_ap->SetWriteMemCallback(&WriteMemoryCallback); - emulator_ap->SetWriteRegCallback(&WriteRegisterCallback); + emulator_up->SetBaton(&baton); + emulator_up->SetReadMemCallback(&ReadMemoryCallback); + emulator_up->SetReadRegCallback(&ReadRegisterCallback); + emulator_up->SetWriteMemCallback(&WriteMemoryCallback); + emulator_up->SetWriteRegCallback(&WriteRegisterCallback); - if (!emulator_ap->ReadInstruction()) + if (!emulator_up->ReadInstruction()) return LLDB_INVALID_ADDRESS; - if (emulator_ap->EvaluateInstruction(lldb::eEmulateInstructionOptionNone)) + if (emulator_up->EvaluateInstruction(lldb::eEmulateInstructionOptionNone)) return baton.m_watch_hit_addr; return LLDB_INVALID_ADDRESS; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp index b2955902967..93c59dd613a 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -231,27 +231,27 @@ Status ProcessKDP::DoConnectRemote(Stream *strm, llvm::StringRef remote_url) { return error; } - std::unique_ptr<ConnectionFileDescriptor> conn_ap( + std::unique_ptr<ConnectionFileDescriptor> conn_up( new ConnectionFileDescriptor()); - if (conn_ap) { + if (conn_up) { // Only try once for now. // TODO: check if we should be retrying? const uint32_t max_retry_count = 1; for (uint32_t retry_count = 0; retry_count < max_retry_count; ++retry_count) { - if (conn_ap->Connect(remote_url, &error) == eConnectionStatusSuccess) + if (conn_up->Connect(remote_url, &error) == eConnectionStatusSuccess) break; usleep(100000); } } - if (conn_ap->IsConnected()) { + if (conn_up->IsConnected()) { const TCPSocket &socket = - static_cast<const TCPSocket &>(*conn_ap->GetReadObject()); + static_cast<const TCPSocket &>(*conn_up->GetReadObject()); const uint16_t reply_port = socket.GetLocalPortNumber(); if (reply_port != 0) { - m_comm.SetConnection(conn_ap.release()); + m_comm.SetConnection(conn_up.release()); if (m_comm.SendRequestReattach(reply_port)) { if (m_comm.SendRequestConnect(reply_port, reply_port, @@ -408,11 +408,11 @@ void ProcessKDP::DidAttach(ArchSpec &process_arch) { addr_t ProcessKDP::GetImageInfoAddress() { return m_kernel_load_addr; } lldb_private::DynamicLoader *ProcessKDP::GetDynamicLoader() { - if (m_dyld_ap.get() == NULL) - m_dyld_ap.reset(DynamicLoader::FindPlugin( + if (m_dyld_up.get() == NULL) + m_dyld_up.reset(DynamicLoader::FindPlugin( this, m_dyld_plugin_name.IsEmpty() ? NULL : m_dyld_plugin_name.GetCString())); - return m_dyld_ap.get(); + return m_dyld_up.get(); } Status ProcessKDP::WillResume() { return Status(); } diff --git a/lldb/source/Plugins/Process/Utility/HistoryThread.cpp b/lldb/source/Plugins/Process/Utility/HistoryThread.cpp index a2b71b587d4..23f6077b32c 100644 --- a/lldb/source/Plugins/Process/Utility/HistoryThread.cpp +++ b/lldb/source/Plugins/Process/Utility/HistoryThread.cpp @@ -32,7 +32,7 @@ HistoryThread::HistoryThread(lldb_private::Process &process, lldb::tid_t tid, m_extended_unwind_token(LLDB_INVALID_ADDRESS), m_queue_name(), m_thread_name(), m_originating_unique_thread_id(tid), m_queue_id(LLDB_INVALID_QUEUE_ID) { - m_unwinder_ap.reset(new HistoryUnwind(*this, pcs, stop_id_is_valid)); + m_unwinder_up.reset(new HistoryUnwind(*this, pcs, stop_id_is_valid)); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT)); if (log) log->Printf("%p HistoryThread::HistoryThread", static_cast<void *>(this)); @@ -59,7 +59,7 @@ lldb::RegisterContextSP HistoryThread::GetRegisterContext() { lldb::RegisterContextSP HistoryThread::CreateRegisterContextForFrame(StackFrame *frame) { - return m_unwinder_ap->CreateRegisterContextForFrame(frame); + return m_unwinder_up->CreateRegisterContextForFrame(frame); } lldb::StackFrameListSP HistoryThread::GetStackFrameList() { diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp index 3c9efab8332..7366130dd9b 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp @@ -86,7 +86,7 @@ RegisterContextPOSIX_arm::RegisterContextPOSIX_arm( lldb_private::Thread &thread, uint32_t concrete_frame_idx, lldb_private::RegisterInfoInterface *register_info) : lldb_private::RegisterContext(thread, concrete_frame_idx) { - m_register_info_ap.reset(register_info); + m_register_info_up.reset(register_info); switch (register_info->m_target_arch.GetMachine()) { case llvm::Triple::arm: @@ -131,14 +131,14 @@ size_t RegisterContextPOSIX_arm::GetRegisterCount() { } size_t RegisterContextPOSIX_arm::GetGPRSize() { - return m_register_info_ap->GetGPRSize(); + return m_register_info_up->GetGPRSize(); } const lldb_private::RegisterInfo *RegisterContextPOSIX_arm::GetRegisterInfo() { // Commonly, this method is overridden and g_register_infos is copied and // specialized. So, use GetRegisterInfo() rather than g_register_infos in // this scope. - return m_register_info_ap->GetRegisterInfo(); + return m_register_info_up->GetRegisterInfo(); } const lldb_private::RegisterInfo * @@ -162,7 +162,7 @@ size_t RegisterContextPOSIX_arm::GetRegisterSetCount() { const lldb_private::RegisterSet * RegisterContextPOSIX_arm::GetRegisterSet(size_t set) { if (IsRegisterSetAvailable(set)) { - switch (m_register_info_ap->m_target_arch.GetMachine()) { + switch (m_register_info_up->m_target_arch.GetMachine()) { case llvm::Triple::arm: return &g_reg_sets_arm[set]; default: diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h index 70409efd21f..603ba76430e 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h @@ -83,7 +83,7 @@ protected: struct RegisterContextPOSIX_arm::FPU m_fpr; // floating-point registers including extended register sets. std::unique_ptr<lldb_private::RegisterInfoInterface> - m_register_info_ap; // Register Info Interface (FreeBSD or Linux) + m_register_info_up; // Register Info Interface (FreeBSD or Linux) // Determines if an extended register set is supported on the processor // running the inferior process. diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp index 586cb700924..5fb9f1f85a1 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp @@ -105,7 +105,7 @@ RegisterContextPOSIX_arm64::RegisterContextPOSIX_arm64( lldb_private::Thread &thread, uint32_t concrete_frame_idx, lldb_private::RegisterInfoInterface *register_info) : lldb_private::RegisterContext(thread, concrete_frame_idx) { - m_register_info_ap.reset(register_info); + m_register_info_up.reset(register_info); switch (register_info->m_target_arch.GetMachine()) { case llvm::Triple::aarch64: @@ -150,7 +150,7 @@ size_t RegisterContextPOSIX_arm64::GetRegisterCount() { } size_t RegisterContextPOSIX_arm64::GetGPRSize() { - return m_register_info_ap->GetGPRSize(); + return m_register_info_up->GetGPRSize(); } const lldb_private::RegisterInfo * @@ -158,7 +158,7 @@ RegisterContextPOSIX_arm64::GetRegisterInfo() { // Commonly, this method is overridden and g_register_infos is copied and // specialized. So, use GetRegisterInfo() rather than g_register_infos in // this scope. - return m_register_info_ap->GetRegisterInfo(); + return m_register_info_up->GetRegisterInfo(); } const lldb_private::RegisterInfo * @@ -182,7 +182,7 @@ size_t RegisterContextPOSIX_arm64::GetRegisterSetCount() { const lldb_private::RegisterSet * RegisterContextPOSIX_arm64::GetRegisterSet(size_t set) { if (IsRegisterSetAvailable(set)) { - switch (m_register_info_ap->m_target_arch.GetMachine()) { + switch (m_register_info_up->m_target_arch.GetMachine()) { case llvm::Triple::aarch64: return &g_reg_sets_arm64[set]; default: diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h index b8d967ee7c9..49a49b69da6 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h @@ -83,7 +83,7 @@ protected: struct RegisterContextPOSIX_arm64::FPU m_fpr; // floating-point registers including extended register sets. std::unique_ptr<lldb_private::RegisterInfoInterface> - m_register_info_ap; // Register Info Interface (FreeBSD or Linux) + m_register_info_up; // Register Info Interface (FreeBSD or Linux) // Determines if an extended register set is supported on the processor // running the inferior process. diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp index 84d89864de8..cedbcd42373 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp @@ -44,7 +44,7 @@ RegisterContextPOSIX_mips64::RegisterContextPOSIX_mips64( Thread &thread, uint32_t concrete_frame_idx, RegisterInfoInterface *register_info) : RegisterContext(thread, concrete_frame_idx) { - m_register_info_ap.reset(register_info); + m_register_info_up.reset(register_info); m_num_registers = GetRegisterCount(); int set = GetRegisterSetCount(); @@ -77,18 +77,18 @@ unsigned RegisterContextPOSIX_mips64::GetRegisterSize(unsigned reg) { } size_t RegisterContextPOSIX_mips64::GetRegisterCount() { - return m_register_info_ap->GetRegisterCount(); + return m_register_info_up->GetRegisterCount(); } size_t RegisterContextPOSIX_mips64::GetGPRSize() { - return m_register_info_ap->GetGPRSize(); + return m_register_info_up->GetGPRSize(); } const RegisterInfo *RegisterContextPOSIX_mips64::GetRegisterInfo() { // Commonly, this method is overridden and g_register_infos is copied and // specialized. So, use GetRegisterInfo() rather than g_register_infos in // this scope. - return m_register_info_ap->GetRegisterInfo(); + return m_register_info_up->GetRegisterInfo(); } const RegisterInfo * @@ -100,22 +100,22 @@ RegisterContextPOSIX_mips64::GetRegisterInfoAtIndex(size_t reg) { } size_t RegisterContextPOSIX_mips64::GetRegisterSetCount() { - ArchSpec target_arch = m_register_info_ap->GetTargetArchitecture(); + ArchSpec target_arch = m_register_info_up->GetTargetArchitecture(); switch (target_arch.GetTriple().getOS()) { case llvm::Triple::Linux: { if ((target_arch.GetMachine() == llvm::Triple::mipsel) || (target_arch.GetMachine() == llvm::Triple::mips)) { - const auto *context = static_cast<const RegisterContextLinux_mips *> - (m_register_info_ap.get()); + const auto *context = static_cast<const RegisterContextLinux_mips *>( + m_register_info_up.get()); return context->GetRegisterSetCount(); } - const auto *context = static_cast<const RegisterContextLinux_mips64 *> - (m_register_info_ap.get()); + const auto *context = static_cast<const RegisterContextLinux_mips64 *>( + m_register_info_up.get()); return context->GetRegisterSetCount(); } default: { - const auto *context = static_cast<const RegisterContextFreeBSD_mips64 *> - (m_register_info_ap.get()); + const auto *context = static_cast<const RegisterContextFreeBSD_mips64 *>( + m_register_info_up.get()); return context->GetRegisterSetCount(); } @@ -123,22 +123,22 @@ size_t RegisterContextPOSIX_mips64::GetRegisterSetCount() { } const RegisterSet *RegisterContextPOSIX_mips64::GetRegisterSet(size_t set) { - ArchSpec target_arch = m_register_info_ap->GetTargetArchitecture(); + ArchSpec target_arch = m_register_info_up->GetTargetArchitecture(); switch (target_arch.GetTriple().getOS()) { case llvm::Triple::Linux: { if ((target_arch.GetMachine() == llvm::Triple::mipsel) || (target_arch.GetMachine() == llvm::Triple::mips)) { - const auto *context = static_cast<const RegisterContextLinux_mips *> - (m_register_info_ap.get()); + const auto *context = static_cast<const RegisterContextLinux_mips *>( + m_register_info_up.get()); return context->GetRegisterSet(set); } - const auto *context = static_cast<const RegisterContextLinux_mips64 *> - (m_register_info_ap.get()); + const auto *context = static_cast<const RegisterContextLinux_mips64 *>( + m_register_info_up.get()); return context->GetRegisterSet(set); } default: { - const auto *context = static_cast<const RegisterContextFreeBSD_mips64 *> - (m_register_info_ap.get()); + const auto *context = static_cast<const RegisterContextFreeBSD_mips64 *>( + m_register_info_up.get()); return context->GetRegisterSet(set); } } diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h index 087ba923c2d..c507e14bd5b 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h @@ -61,7 +61,7 @@ protected: uint32_t m_num_registers; uint8_t m_registers_count[register_set_count]; std::unique_ptr<lldb_private::RegisterInfoInterface> - m_register_info_ap; // Register Info Interface (FreeBSD or Linux) + m_register_info_up; // Register Info Interface (FreeBSD or Linux) // Determines if an extended register set is supported on the processor // running the inferior process. diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp index b651850c615..9698b2d84d6 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp @@ -93,7 +93,7 @@ RegisterContextPOSIX_powerpc::RegisterContextPOSIX_powerpc( Thread &thread, uint32_t concrete_frame_idx, RegisterInfoInterface *register_info) : RegisterContext(thread, concrete_frame_idx) { - m_register_info_ap.reset(register_info); + m_register_info_up.reset(register_info); } RegisterContextPOSIX_powerpc::~RegisterContextPOSIX_powerpc() {} @@ -118,14 +118,14 @@ size_t RegisterContextPOSIX_powerpc::GetRegisterCount() { } size_t RegisterContextPOSIX_powerpc::GetGPRSize() { - return m_register_info_ap->GetGPRSize(); + return m_register_info_up->GetGPRSize(); } const RegisterInfo *RegisterContextPOSIX_powerpc::GetRegisterInfo() { // Commonly, this method is overridden and g_register_infos is copied and // specialized. So, use GetRegisterInfo() rather than g_register_infos in // this scope. - return m_register_info_ap->GetRegisterInfo(); + return m_register_info_up->GetRegisterInfo(); } const RegisterInfo * diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h index dc8c08ff76d..dbb3e6fa628 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h @@ -177,7 +177,7 @@ protected: m_fpr_powerpc[k_num_fpr_registers_powerpc]; // floating point registers. uint32_t m_vmx_powerpc[k_num_vmx_registers_powerpc][4]; std::unique_ptr<lldb_private::RegisterInfoInterface> - m_register_info_ap; // Register Info Interface (FreeBSD or Linux) + m_register_info_up; // Register Info Interface (FreeBSD or Linux) // Determines if an extended register set is supported on the processor // running the inferior process. diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp index d6d46f4f453..2b380797f19 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp @@ -115,7 +115,7 @@ RegisterContextPOSIX_ppc64le::RegisterContextPOSIX_ppc64le( Thread &thread, uint32_t concrete_frame_idx, RegisterInfoInterface *register_info) : RegisterContext(thread, concrete_frame_idx) { - m_register_info_ap.reset(register_info); + m_register_info_up.reset(register_info); } void RegisterContextPOSIX_ppc64le::InvalidateAllRegisters() {} @@ -136,14 +136,14 @@ size_t RegisterContextPOSIX_ppc64le::GetRegisterCount() { } size_t RegisterContextPOSIX_ppc64le::GetGPRSize() { - return m_register_info_ap->GetGPRSize(); + return m_register_info_up->GetGPRSize(); } const RegisterInfo *RegisterContextPOSIX_ppc64le::GetRegisterInfo() { // Commonly, this method is overridden and g_register_infos is copied and // specialized. So, use GetRegisterInfo() rather than g_register_infos in // this scope. - return m_register_info_ap->GetRegisterInfo(); + return m_register_info_up->GetRegisterInfo(); } const RegisterInfo * diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h index 06405352a53..37079775a3c 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h @@ -55,7 +55,7 @@ protected: // VSX registers. uint64_t m_vsx_ppc64le[k_num_vsx_registers_ppc64le * 2]; - std::unique_ptr<lldb_private::RegisterInfoInterface> m_register_info_ap; + std::unique_ptr<lldb_private::RegisterInfoInterface> m_register_info_up; // Determines if an extended register set is supported on the processor // running the inferior process. diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp index 5dbf6bf6a93..2301c822907 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp @@ -81,7 +81,7 @@ RegisterContextPOSIX_s390x::RegisterContextPOSIX_s390x( Thread &thread, uint32_t concrete_frame_idx, RegisterInfoInterface *register_info) : RegisterContext(thread, concrete_frame_idx) { - m_register_info_ap.reset(register_info); + m_register_info_up.reset(register_info); switch (register_info->m_target_arch.GetMachine()) { case llvm::Triple::systemz: @@ -105,7 +105,7 @@ void RegisterContextPOSIX_s390x::Invalidate() {} void RegisterContextPOSIX_s390x::InvalidateAllRegisters() {} const RegisterInfo *RegisterContextPOSIX_s390x::GetRegisterInfo() { - return m_register_info_ap->GetRegisterInfo(); + return m_register_info_up->GetRegisterInfo(); } const RegisterInfo * @@ -151,7 +151,7 @@ size_t RegisterContextPOSIX_s390x::GetRegisterSetCount() { const RegisterSet *RegisterContextPOSIX_s390x::GetRegisterSet(size_t set) { if (IsRegisterSetAvailable(set)) { - switch (m_register_info_ap->m_target_arch.GetMachine()) { + switch (m_register_info_up->m_target_arch.GetMachine()) { case llvm::Triple::systemz: return &g_reg_sets_s390x[set]; default: diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h index 54191e839a2..54993ce6c3e 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h @@ -58,7 +58,7 @@ protected: }; RegInfo m_reg_info; - std::unique_ptr<lldb_private::RegisterInfoInterface> m_register_info_ap; + std::unique_ptr<lldb_private::RegisterInfoInterface> m_register_info_up; virtual bool IsRegisterSetAvailable(size_t set_index); diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp index 43c6973d626..ee447642426 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp @@ -318,7 +318,7 @@ RegisterContextPOSIX_x86::RegisterContextPOSIX_x86( Thread &thread, uint32_t concrete_frame_idx, RegisterInfoInterface *register_info) : RegisterContext(thread, concrete_frame_idx) { - m_register_info_ap.reset(register_info); + m_register_info_up.reset(register_info); switch (register_info->m_target_arch.GetMachine()) { case llvm::Triple::x86: @@ -404,7 +404,7 @@ size_t RegisterContextPOSIX_x86::GetRegisterCount() { } size_t RegisterContextPOSIX_x86::GetGPRSize() { - return m_register_info_ap->GetGPRSize(); + return m_register_info_up->GetGPRSize(); } size_t RegisterContextPOSIX_x86::GetFXSAVEOffset() { @@ -415,7 +415,7 @@ const RegisterInfo *RegisterContextPOSIX_x86::GetRegisterInfo() { // Commonly, this method is overridden and g_register_infos is copied and // specialized. So, use GetRegisterInfo() rather than g_register_infos in // this scope. - return m_register_info_ap->GetRegisterInfo(); + return m_register_info_up->GetRegisterInfo(); } const RegisterInfo * @@ -438,7 +438,7 @@ size_t RegisterContextPOSIX_x86::GetRegisterSetCount() { const RegisterSet *RegisterContextPOSIX_x86::GetRegisterSet(size_t set) { if (IsRegisterSetAvailable(set)) { - switch (m_register_info_ap->m_target_arch.GetMachine()) { + switch (m_register_info_up->m_target_arch.GetMachine()) { case llvm::Triple::x86: return &g_reg_sets_i386[set]; case llvm::Triple::x86_64: diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h index 8291d658547..1642d52021c 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h @@ -148,7 +148,7 @@ protected: // register sets. lldb_private::YMM m_ymm_set; // copy of ymmh and xmm register halves. std::unique_ptr<lldb_private::RegisterInfoInterface> - m_register_info_ap; // Register Info Interface (FreeBSD or Linux) + m_register_info_up; // Register Info Interface (FreeBSD or Linux) // Determines if an extended register set is supported on the processor // running the inferior process. diff --git a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp index be5846d0b03..2f36ffb1b21 100644 --- a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp @@ -105,9 +105,9 @@ bool TargetThreadWindows::CalculateStopInfo() { Unwind *TargetThreadWindows::GetUnwinder() { // FIXME: Implement an unwinder based on the Windows unwinder exposed through // DIA SDK. - if (!m_unwinder_ap) - m_unwinder_ap.reset(new UnwindLLDB(*this)); - return m_unwinder_ap.get(); + if (!m_unwinder_up) + m_unwinder_up.reset(new UnwindLLDB(*this)); + return m_unwinder_up.get(); } Status TargetThreadWindows::DoResume() { diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp index 708609aad03..9db6ebcafb0 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -254,10 +254,10 @@ Status ProcessElfCore::DoLoadCore() { } lldb_private::DynamicLoader *ProcessElfCore::GetDynamicLoader() { - if (m_dyld_ap.get() == NULL) - m_dyld_ap.reset(DynamicLoader::FindPlugin( + if (m_dyld_up.get() == NULL) + m_dyld_up.reset(DynamicLoader::FindPlugin( this, DynamicLoaderPOSIXDYLD::GetPluginNameStatic().GetCString())); - return m_dyld_ap.get(); + return m_dyld_up.get(); } bool ProcessElfCore::UpdateThreadList(ThreadList &old_thread_list, diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp index e15ba78c2cc..3601f3b3b21 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp @@ -52,7 +52,7 @@ bool RegisterContextCorePOSIX_mips64::ReadRegister(const RegisterInfo *reg_info, RegisterValue &value) { lldb::offset_t offset = reg_info->byte_offset; - lldb_private::ArchSpec arch = m_register_info_ap->GetTargetArchitecture(); + lldb_private::ArchSpec arch = m_register_info_up->GetTargetArchitecture(); uint64_t v; if (IsGPR(reg_info->kinds[lldb::eRegisterKindLLDB])) { if (reg_info->byte_size == 4 && !(arch.GetMachine() == llvm::Triple::mips64el)) diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 1969d652744..74a00dfd66a 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1020,14 +1020,14 @@ Status ProcessGDBRemote::ConnectToDebugserver(llvm::StringRef connect_url) { if (log) log->Printf("ProcessGDBRemote::%s Connecting to %s", __FUNCTION__, connect_url.str().c_str()); - std::unique_ptr<ConnectionFileDescriptor> conn_ap( + std::unique_ptr<ConnectionFileDescriptor> conn_up( new ConnectionFileDescriptor()); - if (conn_ap) { + if (conn_up) { const uint32_t max_retry_count = 50; uint32_t retry_count = 0; while (!m_gdb_comm.IsConnected()) { - if (conn_ap->Connect(connect_url, &error) == eConnectionStatusSuccess) { - m_gdb_comm.SetConnection(conn_ap.release()); + if (conn_up->Connect(connect_url, &error) == eConnectionStatusSuccess) { + m_gdb_comm.SetConnection(conn_up.release()); break; } else if (error.WasInterrupted()) { // If we were interrupted, don't keep retrying. @@ -4032,9 +4032,9 @@ bool ProcessGDBRemote::StopNoticingNewThreads() { } DynamicLoader *ProcessGDBRemote::GetDynamicLoader() { - if (m_dyld_ap.get() == NULL) - m_dyld_ap.reset(DynamicLoader::FindPlugin(this, NULL)); - return m_dyld_ap.get(); + if (m_dyld_up.get() == NULL) + m_dyld_up.reset(DynamicLoader::FindPlugin(this, NULL)); + return m_dyld_up.get(); } Status ProcessGDBRemote::SendEventData(const char *data) { diff --git a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp index 05f378d7f4a..ed2cb7f2a97 100644 --- a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp +++ b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp @@ -455,11 +455,11 @@ Status ProcessMachCore::DoLoadCore() { } lldb_private::DynamicLoader *ProcessMachCore::GetDynamicLoader() { - if (m_dyld_ap.get() == NULL) - m_dyld_ap.reset(DynamicLoader::FindPlugin( + if (m_dyld_up.get() == NULL) + m_dyld_up.reset(DynamicLoader::FindPlugin( this, m_dyld_plugin_name.IsEmpty() ? NULL : m_dyld_plugin_name.GetCString())); - return m_dyld_ap.get(); + return m_dyld_up.get(); } bool ProcessMachCore::UpdateThreadList(ThreadList &old_thread_list, diff --git a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp index 91075cce036..c702d843809 100644 --- a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp +++ b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp @@ -409,10 +409,10 @@ bool ProcessMinidump::GetProcessInfo(ProcessInstanceInfo &info) { // try to set up symbolic breakpoints, which in turn may force loading more // debug information than needed. JITLoaderList &ProcessMinidump::GetJITLoaders() { - if (!m_jit_loaders_ap) { - m_jit_loaders_ap = llvm::make_unique<JITLoaderList>(); + if (!m_jit_loaders_up) { + m_jit_loaders_up = llvm::make_unique<JITLoaderList>(); } - return *m_jit_loaders_ap; + return *m_jit_loaders_up; } #define INIT_BOOL(VAR, LONG, SHORT, DESC) \ diff --git a/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp b/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp index 44880970c06..63ddcbf7778 100644 --- a/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp +++ b/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp @@ -108,8 +108,8 @@ ThreadMinidump::CreateRegisterContextForFrame(StackFrame *frame) { } reg_ctx_sp = m_thread_reg_ctx_sp; - } else if (m_unwinder_ap) { - reg_ctx_sp = m_unwinder_ap->CreateRegisterContextForFrame(frame); + } else if (m_unwinder_up) { + reg_ctx_sp = m_unwinder_up->CreateRegisterContextForFrame(frame); } return reg_ctx_sp; diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 294c4b005d8..93497f13d7d 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -473,16 +473,16 @@ void ScriptInterpreterPython::IOHandlerInputComplete(IOHandler &io_handler, if (!bp_options) continue; - auto data_ap = llvm::make_unique<CommandDataPython>(); - if (!data_ap) + auto data_up = llvm::make_unique<CommandDataPython>(); + if (!data_up) break; - data_ap->user_source.SplitIntoLines(data); + data_up->user_source.SplitIntoLines(data); - if (GenerateBreakpointCommandCallbackData(data_ap->user_source, - data_ap->script_source) + if (GenerateBreakpointCommandCallbackData(data_up->user_source, + data_up->script_source) .Success()) { auto baton_sp = std::make_shared<BreakpointOptions::CommandBaton>( - std::move(data_ap)); + std::move(data_up)); bp_options->SetCallback( ScriptInterpreterPython::BreakpointCallbackFunction, baton_sp); } else if (!batch_mode) { @@ -498,13 +498,13 @@ void ScriptInterpreterPython::IOHandlerInputComplete(IOHandler &io_handler, case eIOHandlerWatchpoint: { WatchpointOptions *wp_options = (WatchpointOptions *)io_handler.GetUserData(); - auto data_ap = llvm::make_unique<WatchpointOptions::CommandData>(); - data_ap->user_source.SplitIntoLines(data); + auto data_up = llvm::make_unique<WatchpointOptions::CommandData>(); + data_up->user_source.SplitIntoLines(data); - if (GenerateWatchpointCommandCallbackData(data_ap->user_source, - data_ap->script_source)) { + if (GenerateWatchpointCommandCallbackData(data_up->user_source, + data_up->script_source)) { auto baton_sp = - std::make_shared<WatchpointOptions::CommandBaton>(std::move(data_ap)); + std::make_shared<WatchpointOptions::CommandBaton>(std::move(data_up)); wp_options->SetCallback( ScriptInterpreterPython::WatchpointCallbackFunction, baton_sp); } else if (!batch_mode) { @@ -797,15 +797,15 @@ bool ScriptInterpreterPython::ExecuteOneLine( #if defined(_WIN32) lldb::file_t read_file = pipe.GetReadNativeHandle(); pipe.ReleaseReadFileDescriptor(); - std::unique_ptr<ConnectionGenericFile> conn_ap( + std::unique_ptr<ConnectionGenericFile> conn_up( new ConnectionGenericFile(read_file, true)); #else - std::unique_ptr<ConnectionFileDescriptor> conn_ap( + std::unique_ptr<ConnectionFileDescriptor> conn_up( new ConnectionFileDescriptor(pipe.ReleaseReadFileDescriptor(), true)); #endif - if (conn_ap->IsConnected()) { - output_comm.SetConnection(conn_ap.release()); + if (conn_up->IsConnected()) { + output_comm.SetConnection(conn_up.release()); output_comm.SetReadThreadBytesReceivedCallback( ReadThreadBytesReceived, &result->GetOutputStream()); output_comm.StartReadThread(); @@ -1299,19 +1299,19 @@ Status ScriptInterpreterPython::SetBreakpointCommandCallback( // Set a Python one-liner as the callback for the breakpoint. Status ScriptInterpreterPython::SetBreakpointCommandCallback( BreakpointOptions *bp_options, const char *command_body_text) { - auto data_ap = llvm::make_unique<CommandDataPython>(); + auto data_up = llvm::make_unique<CommandDataPython>(); // Split the command_body_text into lines, and pass that to // GenerateBreakpointCommandCallbackData. That will wrap the body in an // auto-generated function, and return the function name in script_source. // That is what the callback will actually invoke. - data_ap->user_source.SplitIntoLines(command_body_text); - Status error = GenerateBreakpointCommandCallbackData(data_ap->user_source, - data_ap->script_source); + data_up->user_source.SplitIntoLines(command_body_text); + Status error = GenerateBreakpointCommandCallbackData(data_up->user_source, + data_up->script_source); if (error.Success()) { auto baton_sp = - std::make_shared<BreakpointOptions::CommandBaton>(std::move(data_ap)); + std::make_shared<BreakpointOptions::CommandBaton>(std::move(data_up)); bp_options->SetCallback(ScriptInterpreterPython::BreakpointCallbackFunction, baton_sp); return error; @@ -1322,20 +1322,20 @@ Status ScriptInterpreterPython::SetBreakpointCommandCallback( // Set a Python one-liner as the callback for the watchpoint. void ScriptInterpreterPython::SetWatchpointCommandCallback( WatchpointOptions *wp_options, const char *oneliner) { - auto data_ap = llvm::make_unique<WatchpointOptions::CommandData>(); + auto data_up = llvm::make_unique<WatchpointOptions::CommandData>(); // It's necessary to set both user_source and script_source to the oneliner. // The former is used to generate callback description (as in watchpoint // command list) while the latter is used for Python to interpret during the // actual callback. - data_ap->user_source.AppendString(oneliner); - data_ap->script_source.assign(oneliner); + data_up->user_source.AppendString(oneliner); + data_up->script_source.assign(oneliner); - if (GenerateWatchpointCommandCallbackData(data_ap->user_source, - data_ap->script_source)) { + if (GenerateWatchpointCommandCallbackData(data_up->user_source, + data_up->script_source)) { auto baton_sp = - std::make_shared<WatchpointOptions::CommandBaton>(std::move(data_ap)); + std::make_shared<WatchpointOptions::CommandBaton>(std::move(data_up)); wp_options->SetCallback(ScriptInterpreterPython::WatchpointCallbackFunction, baton_sp); } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index 936111b3d42..aa759c4533d 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -118,10 +118,10 @@ struct BitfieldInfo { }; ClangASTImporter &DWARFASTParserClang::GetClangASTImporter() { - if (!m_clang_ast_importer_ap) { - m_clang_ast_importer_ap.reset(new ClangASTImporter); + if (!m_clang_ast_importer_up) { + m_clang_ast_importer_up.reset(new ClangASTImporter); } - return *m_clang_ast_importer_ap; + return *m_clang_ast_importer_up; } /// Detect a forward declaration that is nested in a DW_TAG_module. @@ -608,7 +608,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc, // the stack, put it on the heap. This function is often called // recursively and clang isn't good and sharing the stack space for // variables in different blocks. - std::unique_ptr<UniqueDWARFASTType> unique_ast_entry_ap( + std::unique_ptr<UniqueDWARFASTType> unique_ast_entry_up( new UniqueDWARFASTType()); ConstString unique_typename(type_name_const_str); @@ -628,8 +628,8 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc, if (dwarf->GetUniqueDWARFASTTypeMap().Find( unique_typename, die, unique_decl, - byte_size ? *byte_size : -1, *unique_ast_entry_ap)) { - type_sp = unique_ast_entry_ap->m_type_sp; + byte_size ? *byte_size : -1, *unique_ast_entry_up)) { + type_sp = unique_ast_entry_up->m_type_sp; if (type_sp) { dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get(); return type_sp; @@ -853,12 +853,12 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc, // Add our type to the unique type map so we don't end up creating many // copies of the same type over and over in the ASTContext for our // module - unique_ast_entry_ap->m_type_sp = type_sp; - unique_ast_entry_ap->m_die = die; - unique_ast_entry_ap->m_declaration = unique_decl; - unique_ast_entry_ap->m_byte_size = byte_size.getValueOr(0); + unique_ast_entry_up->m_type_sp = type_sp; + unique_ast_entry_up->m_die = die; + unique_ast_entry_up->m_declaration = unique_decl; + unique_ast_entry_up->m_byte_size = byte_size.getValueOr(0); dwarf->GetUniqueDWARFASTTypeMap().Insert(unique_typename, - *unique_ast_entry_ap); + *unique_ast_entry_up); if (is_forward_declaration && die.HasChildren()) { // Check to see if the DIE actually has a definition, some version of @@ -1919,8 +1919,8 @@ public: m_property_getter_name(property_getter_name), m_property_attributes(property_attributes) { if (metadata != NULL) { - m_metadata_ap.reset(new ClangASTMetadata()); - *m_metadata_ap = *metadata; + m_metadata_up.reset(new ClangASTMetadata()); + *m_metadata_up = *metadata; } } @@ -1938,9 +1938,9 @@ public: m_property_getter_name = rhs.m_property_getter_name; m_property_attributes = rhs.m_property_attributes; - if (rhs.m_metadata_ap) { - m_metadata_ap.reset(new ClangASTMetadata()); - *m_metadata_ap = *rhs.m_metadata_ap; + if (rhs.m_metadata_up) { + m_metadata_up.reset(new ClangASTMetadata()); + *m_metadata_up = *rhs.m_metadata_up; } return *this; } @@ -1949,7 +1949,7 @@ public: return ClangASTContext::AddObjCClassProperty( m_class_opaque_type, m_property_name, m_property_opaque_type, m_ivar_decl, m_property_setter_name, m_property_getter_name, - m_property_attributes, m_metadata_ap.get()); + m_property_attributes, m_metadata_up.get()); } private: @@ -1960,7 +1960,7 @@ private: const char *m_property_setter_name; const char *m_property_getter_name; uint32_t m_property_attributes; - std::unique_ptr<ClangASTMetadata> m_metadata_ap; + std::unique_ptr<ClangASTMetadata> m_metadata_up; }; bool DWARFASTParserClang::ParseTemplateDIE( @@ -2640,9 +2640,9 @@ Function *DWARFASTParserClang::ParseFunctionFromDWARF(CompileUnit &comp_unit, func_name.SetValue(ConstString(name), false); FunctionSP func_sp; - std::unique_ptr<Declaration> decl_ap; + std::unique_ptr<Declaration> decl_up; if (decl_file != 0 || decl_line != 0 || decl_column != 0) - decl_ap.reset(new Declaration( + decl_up.reset(new Declaration( comp_unit.GetSupportFiles().GetFileSpecAtIndex(decl_file), decl_line, decl_column)); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h index 75411c22044..0ad97e5fe5d 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h @@ -149,7 +149,7 @@ protected: DeclToDIEMap m_decl_to_die; DIEToDeclContextMap m_die_to_decl_ctx; DeclContextToDIEMap m_decl_ctx_to_die; - std::unique_ptr<lldb_private::ClangASTImporter> m_clang_ast_importer_ap; + std::unique_ptr<lldb_private::ClangASTImporter> m_clang_ast_importer_up; }; #endif // SymbolFileDWARF_DWARFASTParserClang_h_ diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp index d36208999c5..f5b698382ed 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp @@ -32,7 +32,7 @@ using namespace std; // Constructor //---------------------------------------------------------------------- DWARFDebugInfo::DWARFDebugInfo() - : m_dwarf2Data(NULL), m_compile_units(), m_cu_aranges_ap() {} + : m_dwarf2Data(NULL), m_compile_units(), m_cu_aranges_up() {} //---------------------------------------------------------------------- // SetDwarfData @@ -43,10 +43,10 @@ void DWARFDebugInfo::SetDwarfData(SymbolFileDWARF *dwarf2Data) { } DWARFDebugAranges &DWARFDebugInfo::GetCompileUnitAranges() { - if (m_cu_aranges_ap == NULL && m_dwarf2Data) { + if (m_cu_aranges_up == NULL && m_dwarf2Data) { Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_ARANGES)); - m_cu_aranges_ap.reset(new DWARFDebugAranges()); + m_cu_aranges_up.reset(new DWARFDebugAranges()); const DWARFDataExtractor &debug_aranges_data = m_dwarf2Data->get_debug_aranges_data(); if (debug_aranges_data.GetByteSize() > 0) { @@ -55,13 +55,13 @@ DWARFDebugAranges &DWARFDebugInfo::GetCompileUnitAranges() { "DWARFDebugInfo::GetCompileUnitAranges() for \"%s\" from " ".debug_aranges", m_dwarf2Data->GetObjectFile()->GetFileSpec().GetPath().c_str()); - m_cu_aranges_ap->Extract(debug_aranges_data); + m_cu_aranges_up->Extract(debug_aranges_data); } // Make a list of all CUs represented by the arange data in the file. std::set<dw_offset_t> cus_with_data; - for (size_t n = 0; n < m_cu_aranges_ap->GetNumRanges(); n++) { - dw_offset_t offset = m_cu_aranges_ap->OffsetAtIndex(n); + for (size_t n = 0; n < m_cu_aranges_up->GetNumRanges(); n++) { + dw_offset_t offset = m_cu_aranges_up->OffsetAtIndex(n); if (offset != DW_INVALID_OFFSET) cus_with_data.insert(offset); } @@ -82,14 +82,14 @@ DWARFDebugAranges &DWARFDebugInfo::GetCompileUnitAranges() { m_dwarf2Data->GetObjectFile()->GetFileSpec().GetPath().c_str()); printed = true; } - cu->BuildAddressRangeTable(m_dwarf2Data, m_cu_aranges_ap.get()); + cu->BuildAddressRangeTable(m_dwarf2Data, m_cu_aranges_up.get()); } } const bool minimize = true; - m_cu_aranges_ap->Sort(minimize); + m_cu_aranges_up->Sort(minimize); } - return *m_cu_aranges_ap; + return *m_cu_aranges_up; } void DWARFDebugInfo::ParseCompileUnitHeadersIfNeeded() { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h index 4e92d1aab9d..2468272ee2e 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h @@ -64,7 +64,7 @@ protected: SymbolFileDWARF *m_dwarf2Data; CompileUnitColl m_compile_units; std::unique_ptr<DWARFDebugAranges> - m_cu_aranges_ap; // A quick address to compile unit table + m_cu_aranges_up; // A quick address to compile unit table private: // All parsing needs to be done partially any managed by this class as diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp index c9ece8a9f27..0ffbe98592a 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp @@ -843,8 +843,8 @@ SymbolFileDWARFDwo *DWARFUnit::GetDwoSymbolFile() const { dw_offset_t DWARFUnit::GetBaseObjOffset() const { return m_base_obj_offset; } const DWARFDebugAranges &DWARFUnit::GetFunctionAranges() { - if (m_func_aranges_ap == NULL) { - m_func_aranges_ap.reset(new DWARFDebugAranges()); + if (m_func_aranges_up == NULL) { + m_func_aranges_up.reset(new DWARFDebugAranges()); Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_ARANGES)); if (log) { @@ -857,19 +857,19 @@ const DWARFDebugAranges &DWARFUnit::GetFunctionAranges() { const DWARFDebugInfoEntry *die = DIEPtr(); if (die) die->BuildFunctionAddressRangeTable(m_dwarf, this, - m_func_aranges_ap.get()); + m_func_aranges_up.get()); if (m_dwo_symbol_file) { DWARFUnit *dwo_cu = m_dwo_symbol_file->GetCompileUnit(); const DWARFDebugInfoEntry *dwo_die = dwo_cu->DIEPtr(); if (dwo_die) dwo_die->BuildFunctionAddressRangeTable(m_dwo_symbol_file.get(), dwo_cu, - m_func_aranges_ap.get()); + m_func_aranges_up.get()); } const bool minimize = false; - m_func_aranges_ap->Sort(minimize); + m_func_aranges_up->Sort(minimize); } - return *m_func_aranges_ap; + return *m_func_aranges_up; } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h index be820e9e20d..0bfa4c04e47 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h @@ -202,7 +202,7 @@ protected: llvm::sys::RWMutex m_first_die_mutex; // A table similar to the .debug_aranges table, but this one points to the // exact DW_TAG_subprogram DIEs - std::unique_ptr<DWARFDebugAranges> m_func_aranges_ap; + std::unique_ptr<DWARFDebugAranges> m_func_aranges_up; dw_addr_t m_base_addr = 0; dw_offset_t m_length = 0; uint16_t m_version = 0; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 24e5cfc7e98..6a1e67411ba 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -952,7 +952,7 @@ bool SymbolFileDWARF::ParseImportedModules( struct ParseDWARFLineTableCallbackInfo { LineTable *line_table; - std::unique_ptr<LineSequence> sequence_ap; + std::unique_ptr<LineSequence> sequence_up; lldb::addr_t addr_mask; }; @@ -972,19 +972,19 @@ static void ParseDWARFLineTableCallback(dw_offset_t offset, LineTable *line_table = info->line_table; // If this is our first time here, we need to create a sequence container. - if (!info->sequence_ap) { - info->sequence_ap.reset(line_table->CreateLineSequenceContainer()); - assert(info->sequence_ap.get()); + if (!info->sequence_up) { + info->sequence_up.reset(line_table->CreateLineSequenceContainer()); + assert(info->sequence_up.get()); } line_table->AppendLineEntryToSequence( - info->sequence_ap.get(), state.address & info->addr_mask, state.line, + info->sequence_up.get(), state.address & info->addr_mask, state.line, state.column, state.file, state.is_stmt, state.basic_block, state.prologue_end, state.epilogue_begin, state.end_sequence); if (state.end_sequence) { // First, put the current sequence into the line table. - line_table->InsertSequence(info->sequence_ap.get()); + line_table->InsertSequence(info->sequence_up.get()); // Then, empty it to prepare for the next sequence. - info->sequence_ap->Clear(); + info->sequence_up->Clear(); } } } @@ -1002,10 +1002,10 @@ bool SymbolFileDWARF::ParseLineTable(CompileUnit &comp_unit) { dwarf_cu_die.GetAttributeValueAsUnsigned(DW_AT_stmt_list, DW_INVALID_OFFSET); if (cu_line_offset != DW_INVALID_OFFSET) { - std::unique_ptr<LineTable> line_table_ap(new LineTable(&comp_unit)); - if (line_table_ap) { + std::unique_ptr<LineTable> line_table_up(new LineTable(&comp_unit)); + if (line_table_up) { ParseDWARFLineTableCallbackInfo info; - info.line_table = line_table_ap.get(); + info.line_table = line_table_up.get(); /* * MIPS: @@ -1038,9 +1038,9 @@ bool SymbolFileDWARF::ParseLineTable(CompileUnit &comp_unit) { // addresses that are relative to the .o file into addresses for // the main executable. comp_unit.SetLineTable( - debug_map_symfile->LinkOSOLineTable(this, line_table_ap.get())); + debug_map_symfile->LinkOSOLineTable(this, line_table_up.get())); } else { - comp_unit.SetLineTable(line_table_ap.release()); + comp_unit.SetLineTable(line_table_up.release()); return true; } } @@ -1174,20 +1174,20 @@ size_t SymbolFileDWARF::ParseBlocksRecursive( if (tag != DW_TAG_subprogram && (name != NULL || mangled_name != NULL)) { - std::unique_ptr<Declaration> decl_ap; + std::unique_ptr<Declaration> decl_up; if (decl_file != 0 || decl_line != 0 || decl_column != 0) - decl_ap.reset(new Declaration( + decl_up.reset(new Declaration( comp_unit.GetSupportFiles().GetFileSpecAtIndex(decl_file), decl_line, decl_column)); - std::unique_ptr<Declaration> call_ap; + std::unique_ptr<Declaration> call_up; if (call_file != 0 || call_line != 0 || call_column != 0) - call_ap.reset(new Declaration( + call_up.reset(new Declaration( comp_unit.GetSupportFiles().GetFileSpecAtIndex(call_file), call_line, call_column)); - block->SetInlinedFunctionInfo(name, mangled_name, decl_ap.get(), - call_ap.get()); + block->SetInlinedFunctionInfo(name, mangled_name, decl_up.get(), + call_up.get()); } ++blocks_added; @@ -1674,8 +1674,8 @@ void SymbolFileDWARF::UpdateExternalModuleListIfNeeded() { } SymbolFileDWARF::GlobalVariableMap &SymbolFileDWARF::GetGlobalAranges() { - if (!m_global_aranges_ap) { - m_global_aranges_ap.reset(new GlobalVariableMap()); + if (!m_global_aranges_up) { + m_global_aranges_up.reset(new GlobalVariableMap()); ModuleSP module_sp = GetObjectFile()->GetModule(); if (module_sp) { @@ -1702,7 +1702,7 @@ SymbolFileDWARF::GlobalVariableMap &SymbolFileDWARF::GetGlobalAranges() { if (var_sp->GetType()) byte_size = var_sp->GetType()->GetByteSize().getValueOr(0); - m_global_aranges_ap->Append(GlobalVariableMap::Entry( + m_global_aranges_up->Append(GlobalVariableMap::Entry( file_addr, byte_size, var_sp.get())); } } @@ -1712,9 +1712,9 @@ SymbolFileDWARF::GlobalVariableMap &SymbolFileDWARF::GetGlobalAranges() { } } } - m_global_aranges_ap->Sort(); + m_global_aranges_up->Sort(); } - return *m_global_aranges_ap; + return *m_global_aranges_up; } uint32_t SymbolFileDWARF::ResolveSymbolContext(const Address &so_addr, diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h index da1a0f33061..36c267a2d86 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h @@ -489,7 +489,7 @@ protected: std::unique_ptr<DWARFDebugAbbrev> m_abbr; std::unique_ptr<DWARFDebugInfo> m_info; std::unique_ptr<DWARFDebugLine> m_line; - std::unique_ptr<GlobalVariableMap> m_global_aranges_ap; + std::unique_ptr<GlobalVariableMap> m_global_aranges_up; typedef std::unordered_map<lldb::offset_t, lldb_private::DebugMacrosSP> DebugMacrosMap; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index 5fca171e0e3..eccc757bffd 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -179,8 +179,8 @@ public: GetSymbolVendor(bool can_create = true, lldb_private::Stream *feedback_strm = NULL) override { // Scope for locker - if (m_symfile_ap.get() || !can_create) - return m_symfile_ap.get(); + if (m_symfile_up.get() || !can_create) + return m_symfile_up.get(); ModuleSP exe_module_sp(m_exe_module_wp.lock()); if (exe_module_sp) { diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp index b6b0f98ddeb..53e32586dfa 100644 --- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp +++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp @@ -56,11 +56,11 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( return false; if (range.GetByteSize() > 0 && range.GetBaseAddress().IsValid() && - m_inst_emulator_ap.get()) { + m_inst_emulator_up.get()) { // The instruction emulation subclass setup the unwind plan for the first // instruction. - m_inst_emulator_ap->CreateFunctionEntryUnwind(unwind_plan); + m_inst_emulator_up->CreateFunctionEntryUnwind(unwind_plan); // CreateFunctionEntryUnwind should have created the first row. If it // doesn't, then we are done. @@ -82,7 +82,7 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( const uint32_t addr_byte_size = m_arch.GetAddressByteSize(); const bool show_address = true; const bool show_bytes = true; - m_inst_emulator_ap->GetRegisterInfo(unwind_plan.GetRegisterKind(), + m_inst_emulator_up->GetRegisterInfo(unwind_plan.GetRegisterKind(), unwind_plan.GetInitialCFARegister(), m_cfa_reg_info); @@ -128,14 +128,14 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( // cache the pc register number (in whatever register numbering this // UnwindPlan uses) for quick reference during instruction parsing. RegisterInfo pc_reg_info; - m_inst_emulator_ap->GetRegisterInfo( + m_inst_emulator_up->GetRegisterInfo( eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, pc_reg_info); // cache the return address register number (in whatever register // numbering this UnwindPlan uses) for quick reference during // instruction parsing. RegisterInfo ra_reg_info; - m_inst_emulator_ap->GetRegisterInfo( + m_inst_emulator_up->GetRegisterInfo( eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA, ra_reg_info); // The architecture dependent condition code of the last processed @@ -169,12 +169,12 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( m_register_values = it->second.second; } - m_inst_emulator_ap->SetInstruction(inst->GetOpcode(), + m_inst_emulator_up->SetInstruction(inst->GetOpcode(), inst->GetAddress(), nullptr); if (last_condition != - m_inst_emulator_ap->GetInstructionCondition()) { - if (m_inst_emulator_ap->GetInstructionCondition() != + m_inst_emulator_up->GetInstructionCondition()) { + if (m_inst_emulator_up->GetInstructionCondition() != EmulateInstruction::UnconditionalCondition && saved_unwind_states.count(current_offset) == 0) { // If we don't have a saved row for the current offset then @@ -219,9 +219,9 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( log->PutString(strm.GetString()); } - last_condition = m_inst_emulator_ap->GetInstructionCondition(); + last_condition = m_inst_emulator_up->GetInstructionCondition(); - m_inst_emulator_ap->EvaluateInstruction( + m_inst_emulator_up->EvaluateInstruction( eEmulateInstructionOptionIgnoreConditions); // If the current instruction is a branch forward then save the @@ -296,12 +296,12 @@ bool UnwindAssemblyInstEmulation::FirstNonPrologueInsn( UnwindAssembly * UnwindAssemblyInstEmulation::CreateInstance(const ArchSpec &arch) { - std::unique_ptr<EmulateInstruction> inst_emulator_ap( + std::unique_ptr<EmulateInstruction> inst_emulator_up( EmulateInstruction::FindPlugin(arch, eInstructionTypePrologueEpilogue, NULL)); // Make sure that all prologue instructions are handled - if (inst_emulator_ap) - return new UnwindAssemblyInstEmulation(arch, inst_emulator_ap.release()); + if (inst_emulator_up) + return new UnwindAssemblyInstEmulation(arch, inst_emulator_up.release()); return NULL; } diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h index 3bbccc01eb0..704865ce5d0 100644 --- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h +++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h @@ -66,14 +66,14 @@ private: // Call CreateInstance to get an instance of this class UnwindAssemblyInstEmulation(const lldb_private::ArchSpec &arch, lldb_private::EmulateInstruction *inst_emulator) - : UnwindAssembly(arch), m_inst_emulator_ap(inst_emulator), + : UnwindAssembly(arch), m_inst_emulator_up(inst_emulator), m_range_ptr(NULL), m_unwind_plan_ptr(NULL), m_curr_row(), m_cfa_reg_info(), m_fp_is_cfa(false), m_register_values(), m_pushed_regs(), m_curr_row_modified(false), m_forward_branch_offset(0) { - if (m_inst_emulator_ap.get()) { - m_inst_emulator_ap->SetBaton(this); - m_inst_emulator_ap->SetCallbacks(ReadMemory, WriteMemory, ReadRegister, + if (m_inst_emulator_up.get()) { + m_inst_emulator_up->SetBaton(this); + m_inst_emulator_up->SetCallbacks(ReadMemory, WriteMemory, ReadRegister, WriteRegister); } } @@ -128,7 +128,7 @@ private: bool GetRegisterValue(const lldb_private::RegisterInfo ®_info, lldb_private::RegisterValue ®_value); - std::unique_ptr<lldb_private::EmulateInstruction> m_inst_emulator_ap; + std::unique_ptr<lldb_private::EmulateInstruction> m_inst_emulator_up; lldb_private::AddressRange *m_range_ptr; lldb_private::UnwindPlan *m_unwind_plan_ptr; lldb_private::UnwindPlan::RowSP m_curr_row; |