Lines Matching +full:current +full:- +full:limit
1 //===-- CommandObjectDisassemble.cpp --------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
98 // Disassemble the current source line kind of implies showing mixed source in SetOptionValue()
110 execution_context ? execution_context->GetTargetSP() : TargetSP(); in SetOptionValue()
111 if (target_sp && (target_sp->GetArchitecture().GetTriple().getArch() == in SetOptionValue()
113 target_sp->GetArchitecture().GetTriple().getArch() == in SetOptionValue()
133 const auto &target_sp = execution_context->GetTargetSP(); in SetOptionValue()
134 auto platform_ptr = target_sp ? target_sp->GetPlatform().get() : nullptr; in SetOptionValue()
176 execution_context ? execution_context->GetTargetPtr() : nullptr; in OptionParsingStarting()
183 if (target->GetArchitecture().GetTriple().getArch() == llvm::Triple::x86 || in OptionParsingStarting()
184 target->GetArchitecture().GetTriple().getArch() == in OptionParsingStarting()
186 flavor_string.assign(target->GetDisassemblyFlavor()); in OptionParsingStarting()
216 "Disassemble specified instructions in the current target. " in CommandObjectDisassemble()
217 "Defaults to the current function for the current thread and " in CommandObjectDisassemble()
219 "disassemble [<cmd-options>]", eCommandRequiresTarget) {} in CommandObjectDisassemble()
232 msg << ". To disassemble specify an instruction count limit, start/stop " in CheckRangeSize()
233 "addresses or use the --force option."; in CheckRangeSize()
245 addr.GetModule()->ResolveSymbolContextForAddress( in GetContainingAddressRanges()
265 if (module_sp->ResolveFileAddress(m_options.symbol_containing_addr, in GetContainingAddressRanges()
292 "Cannot disassemble around the current " in GetCurrentFunctionRanges()
296 "Cannot disassemble around the current " in GetCurrentFunctionRanges()
302 frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol)); in GetCurrentFunctionRanges()
305 range = sc.function->GetAddressRange(); in GetCurrentFunctionRanges()
306 else if (sc.symbol && sc.symbol->ValueIsAddress()) { in GetCurrentFunctionRanges()
307 range = {sc.symbol->GetAddress(), sc.symbol->GetByteSize()}; in GetCurrentFunctionRanges()
309 range = {frame->GetFrameCodeAddress(), default_disasm_byte_size}; in GetCurrentFunctionRanges()
311 if (llvm::Error err = CheckRangeSize(range, "the current function")) in GetCurrentFunctionRanges()
324 "Cannot disassemble around the current " in GetCurrentLineRanges()
328 "Cannot disassemble around the current " in GetCurrentLineRanges()
335 frame->GetSymbolContext(eSymbolContextLineEntry).line_entry); in GetCurrentLineRanges()
339 // No line entry, so just disassemble around the current pc in GetCurrentLineRanges()
393 "Cannot disassemble around the current " in GetPCRanges()
397 "Cannot disassemble around the current " in GetPCRanges()
408 return std::vector<AddressRange>{{frame->GetFrameCodeAddress(), 0}}; in GetPCRanges()
419 size = m_options.end_addr - m_options.start_addr; in GetStartEndAddressRanges()
445 m_options.arch = target->GetArchitecture(); in DoExecute()
449 "use the --arch option or set the target architecture to disassemble"); in DoExecute()
462 "Unable to find Disassembler plug-in named '%s' that supports the " in DoExecute()
467 "Unable to find Disassembler plug-in for the '%s' architecture.\n", in DoExecute()
470 } else if (flavor_string != nullptr && !disassembler->FlavorValidForArchSpec( in DoExecute()
482 GetOptions()->GenerateOptionUsage(result.GetErrorStream(), *this, in DoExecute()
493 // Mark the source line for the current PC only if we are doing mixed source in DoExecute()
514 bool print_sc_header = ranges->size() > 1; in DoExecute()
516 Disassembler::Limit limit; in DoExecute() local
518 limit = {Disassembler::Limit::Bytes, cur_range.GetByteSize()}; in DoExecute()
519 if (limit.value == 0) in DoExecute()
520 limit.value = default_disasm_byte_size; in DoExecute()
522 limit = {Disassembler::Limit::Instructions, m_options.num_instructions}; in DoExecute()
526 m_exe_ctx, cur_range.GetBaseAddress(), limit, m_options.show_mixed, in DoExecute()