diff options
-rw-r--r-- | lldb/source/Core/DataExtractor.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Core/Disassembler.cpp | 45 | ||||
-rw-r--r-- | lldb/source/Expression/IRExecutionUnit.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Target/Process.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepRange.cpp | 10 |
6 files changed, 9 insertions, 63 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp index 05c43da248e..f7f01df3e9b 100644 --- a/lldb/source/Core/DataExtractor.cpp +++ b/lldb/source/Core/DataExtractor.cpp @@ -1475,10 +1475,6 @@ DataExtractor::Dump (Stream *s, ExecutionContext exe_ctx; exe_scope->CalculateExecutionContext(exe_ctx); disassembler_sp->GetInstructionList().Dump (s, show_address, show_bytes, &exe_ctx); - - // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. - // I'll fix that but for now, just clear the list and it will go away nicely. - disassembler_sp->GetInstructionList().Clear(); } } } diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp index 9ef716d3f3f..1e6a245261b 100644 --- a/lldb/source/Core/Disassembler.cpp +++ b/lldb/source/Core/Disassembler.cpp @@ -302,19 +302,8 @@ Disassembler::Disassemble(Debugger &debugger, if (bytes_disassembled == 0) return false; - bool result = PrintInstructions (disasm_sp.get(), - debugger, - arch, - exe_ctx, - num_instructions, - num_mixed_context_lines, - options, - strm); - - // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. - // I'll fix that but for now, just clear the list and it will go away nicely. - disasm_sp->GetInstructionList().Clear(); - return result; + return PrintInstructions(disasm_sp.get(), debugger, arch, exe_ctx, num_instructions, + num_mixed_context_lines, options, strm); } } return false; @@ -349,33 +338,17 @@ Disassembler::Disassemble(Debugger &debugger, prefer_file_cache); if (bytes_disassembled == 0) return false; - bool result = PrintInstructions (disasm_sp.get(), - debugger, - arch, - exe_ctx, - num_instructions, - num_mixed_context_lines, - options, - strm); - - // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. - // I'll fix that but for now, just clear the list and it will go away nicely. - disasm_sp->GetInstructionList().Clear(); - return result; + return PrintInstructions(disasm_sp.get(), debugger, arch, exe_ctx, num_instructions, + num_mixed_context_lines, options, strm); } } return false; } - -bool -Disassembler::PrintInstructions(Disassembler *disasm_ptr, - Debugger &debugger, - const ArchSpec &arch, - const ExecutionContext &exe_ctx, - uint32_t num_instructions, - uint32_t num_mixed_context_lines, - uint32_t options, - Stream &strm) + +bool +Disassembler::PrintInstructions(Disassembler *disasm_ptr, Debugger &debugger, const ArchSpec &arch, + const ExecutionContext &exe_ctx, uint32_t num_instructions, + uint32_t num_mixed_context_lines, uint32_t options, Stream &strm) { // We got some things disassembled... size_t num_instructions_found = disasm_ptr->GetInstructionList().GetSize(); diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp index 05f40deae07..103d76328c3 100644 --- a/lldb/source/Expression/IRExecutionUnit.cpp +++ b/lldb/source/Expression/IRExecutionUnit.cpp @@ -216,10 +216,6 @@ IRExecutionUnit::DisassembleFunction (Stream &stream, InstructionList &instruction_list = disassembler_sp->GetInstructionList(); instruction_list.Dump(&stream, true, true, &exe_ctx); - - // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. - // I'll fix that but for now, just clear the list and it will go away nicely. - disassembler_sp->GetInstructionList().Clear(); return ret; } diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp index e168add266b..72adf757627 100644 --- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp +++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp @@ -229,9 +229,6 @@ UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly (AddressRange& } } } - // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. - // I'll fix that but for now, just clear the list and it will go away nicely. - disasm_sp->GetInstructionList().Clear(); } if (log && log->GetVerbose ()) diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index d4938094134..7f7b3eb69a5 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -6605,11 +6605,5 @@ Process::AdvanceAddressToNextBranchInstruction (Address default_stop_addr, Addre } } - if (disassembler_sp) - { - // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. - disassembler_sp->GetInstructionList().Clear(); - } - return retval; } diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp b/lldb/source/Target/ThreadPlanStepRange.cpp index f3f85b63918..32e225c4af7 100644 --- a/lldb/source/Target/ThreadPlanStepRange.cpp +++ b/lldb/source/Target/ThreadPlanStepRange.cpp @@ -64,16 +64,6 @@ ThreadPlanStepRange::ThreadPlanStepRange (ThreadPlanKind kind, ThreadPlanStepRange::~ThreadPlanStepRange () { ClearNextBranchBreakpoint(); - - size_t num_instruction_ranges = m_instruction_ranges.size(); - - // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. - // I'll fix that but for now, just clear the list and it will go away nicely. - for (size_t i = 0; i < num_instruction_ranges; i++) - { - if (m_instruction_ranges[i]) - m_instruction_ranges[i]->GetInstructionList().Clear(); - } } void |