55std::shared_ptr<const UnwindPlan>
57 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
59 if (std::shared_ptr<const UnwindPlan> plan_sp =
62 if (std::shared_ptr<const UnwindPlan> plan_sp =
65 if (std::shared_ptr<const UnwindPlan> plan_sp =
70 if (std::shared_ptr<const UnwindPlan> plan_sp =
73 if (std::shared_ptr<const UnwindPlan> plan_sp =
80std::shared_ptr<const UnwindPlan>
82 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
97 if (compact_unwind->
GetUnwindPlan(target, current_pc, *unwind_plan_sp)) {
108std::shared_ptr<const UnwindPlan>
110 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
123std::shared_ptr<const UnwindPlan>
125 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
137std::shared_ptr<const UnwindPlan>
139 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
152std::shared_ptr<const UnwindPlan>
154 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
163 if (arm_unwind_info) {
165 if (arm_unwind_info->
GetUnwindPlan(target, current_pc, *plan_sp))
177 const RegisterInfo *ResolveName(llvm::StringRef name)
const override {
178 return m_ctx.GetRegisterInfoByName(name);
181 uint32_t number)
const override {
182 return m_ctx.GetRegisterInfo(kind, number);
186 RegisterContext &m_ctx;
190std::shared_ptr<const UnwindPlan>
192 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
201 RegisterContextToInfo(*thread.GetRegisterContext()));
206std::shared_ptr<const UnwindPlan>
209 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
216 std::shared_ptr<const UnwindPlan> object_file_unwind_plan =
218 if (!object_file_unwind_plan)
226 if (assembly_profiler_sp &&
m_ranges.size() == 1) {
227 auto plan_sp = std::make_shared<UnwindPlan>(*object_file_unwind_plan);
229 if (assembly_profiler_sp->AugmentUnwindPlanFromCallSite(
m_ranges[0], thread,
236std::shared_ptr<const UnwindPlan>
238 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
255 std::shared_ptr<const UnwindPlan> eh_frame_plan =
265 if (assembly_profiler_sp &&
m_ranges.size() == 1) {
266 auto plan_sp = std::make_shared<UnwindPlan>(*eh_frame_plan);
267 if (assembly_profiler_sp->AugmentUnwindPlanFromCallSite(
m_ranges[0], thread,
274std::shared_ptr<const UnwindPlan>
277 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
294 std::shared_ptr<const UnwindPlan> debug_frame_plan =
296 if (!debug_frame_plan)
305 if (assembly_profiler_sp &&
m_ranges.size() == 1) {
306 auto plan_sp = std::make_shared<UnwindPlan>(*debug_frame_plan);
308 if (assembly_profiler_sp->AugmentUnwindPlanFromCallSite(
m_ranges[0], thread,
315std::shared_ptr<const UnwindPlan>
317 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
327 if (assembly_profiler_sp &&
m_ranges.size() == 1) {
339 if (assembly_profiler_sp->GetNonCallSiteUnwindPlanFromAssembly(
340 range, thread, *plan_sp))
350 Thread &thread,
const std::shared_ptr<const UnwindPlan> &a,
351 const std::shared_ptr<const UnwindPlan> &b) {
357 if (!a_first_row || !b_first_row)
361 uint32_t a_pc_regnum = pc_reg.
GetAsKind(a->GetRegisterKind());
362 uint32_t b_pc_regnum = pc_reg.
GetAsKind(b->GetRegisterKind());
372 if (a_pc_regloc != b_pc_regloc)
378std::shared_ptr<const UnwindPlan>
385 std::shared_ptr<const UnwindPlan> arch_default_at_entry_sp =
387 std::shared_ptr<const UnwindPlan> arch_default_sp =
389 std::shared_ptr<const UnwindPlan> assembly_sp =
411 thread, eh_frame_sp, arch_default_at_entry_sp) ==
eLazyBoolNo &&
413 thread, eh_frame_sp, arch_default_sp) ==
eLazyBoolNo &&
415 thread, assembly_sp, arch_default_sp) ==
eLazyBoolNo) {
419 if (std::shared_ptr<const UnwindPlan> plan_sp =
422 if (std::shared_ptr<const UnwindPlan> plan_sp =
425 if (std::shared_ptr<const UnwindPlan> plan_sp =
428 if (std::shared_ptr<const UnwindPlan> plan_sp =
435std::shared_ptr<const UnwindPlan>
437 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
444 if (assembly_profiler_sp &&
m_ranges.size() == 1) {
446 if (assembly_profiler_sp->GetFastUnwindPlan(
m_ranges[0], thread, *plan_sp))
452std::shared_ptr<const UnwindPlan>
454 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
460 ProcessSP process_sp(thread.CalculateProcess());
462 if (
ABI *abi = process_sp->GetABI().get())
469std::shared_ptr<const UnwindPlan>
471 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
479 ProcessSP process_sp(thread.CalculateProcess());
481 if (
ABI *abi = process_sp->GetABI().get()) {
483 abi->CreateFunctionEntryUnwindPlan();
499 return assembly_profiler_sp;
A class to represent register numbers, and able to convert between different register numbering schem...
uint32_t GetAsKind(lldb::RegisterKind kind)
A section + offset based address range class.
void SetByteSize(lldb::addr_t byte_size)
Set accessor for the byte size of this range.
lldb::addr_t GetByteSize() const
Get accessor for the byte size of this range.
A section + offset based address class.
An architecture specification class.
bool GetUnwindPlan(Target &target, const Address &addr, UnwindPlan &unwind_plan)
bool GetUnwindPlan(Target &target, Address addr, UnwindPlan &unwind_plan)
~FuncUnwinders()
destructor
std::shared_ptr< const UnwindPlan > m_unwind_plan_arch_default_sp
bool m_tried_unwind_arch_default_at_func_entry
std::shared_ptr< const UnwindPlan > GetUnwindPlanFastUnwind(Target &target, lldb_private::Thread &thread)
std::shared_ptr< const UnwindPlan > GetEHFrameAugmentedUnwindPlan(Target &target, Thread &thread)
std::shared_ptr< const UnwindPlan > GetUnwindPlanArchitectureDefault(lldb_private::Thread &thread)
std::shared_ptr< const UnwindPlan > m_unwind_plan_eh_frame_sp
std::shared_ptr< const UnwindPlan > GetAssemblyUnwindPlan(Target &target, Thread &thread)
std::shared_ptr< const UnwindPlan > GetSymbolFileUnwindPlan(Thread &thread)
bool m_tried_unwind_plan_eh_frame_augmented
bool m_tried_unwind_plan_symbol_file
std::shared_ptr< const UnwindPlan > m_unwind_plan_eh_frame_augmented_sp
bool m_tried_unwind_plan_object_file
std::shared_ptr< const UnwindPlan > GetObjectFileUnwindPlan(Target &target)
Address m_first_non_prologue_insn
const Address & GetFunctionStartAddress() const
std::shared_ptr< const UnwindPlan > m_unwind_plan_object_file_sp
std::shared_ptr< const UnwindPlan > GetObjectFileAugmentedUnwindPlan(Target &target, Thread &thread)
lldb_private::LazyBool CompareUnwindPlansForIdenticalInitialPCLocation(Thread &thread, const std::shared_ptr< const UnwindPlan > &a, const std::shared_ptr< const UnwindPlan > &b)
AddressRanges m_ranges
The address ranges of the function.
std::shared_ptr< const UnwindPlan > m_unwind_plan_object_file_augmented_sp
bool m_tried_unwind_plan_debug_frame
bool m_tried_unwind_plan_debug_frame_augmented
UnwindTable & m_unwind_table
std::shared_ptr< const UnwindPlan > GetArmUnwindUnwindPlan(Target &target)
std::recursive_mutex m_mutex
std::shared_ptr< const UnwindPlan > GetCompactUnwindUnwindPlan(Target &target)
bool m_tried_unwind_plan_object_file_augmented
std::shared_ptr< const UnwindPlan > m_unwind_plan_arch_default_at_func_entry_sp
bool m_tried_unwind_plan_compact_unwind
bool m_tried_unwind_plan_eh_frame
std::shared_ptr< const UnwindPlan > m_unwind_plan_assembly_sp
std::shared_ptr< const UnwindPlan > m_unwind_plan_fast_sp
std::shared_ptr< const UnwindPlan > m_unwind_plan_debug_frame_sp
bool m_tried_unwind_plan_arm_unwind
bool m_tried_unwind_arch_default
std::shared_ptr< const UnwindPlan > GetUnwindPlanAtNonCallSite(Target &target, lldb_private::Thread &thread)
std::shared_ptr< const UnwindPlan > m_unwind_plan_arm_unwind_sp
std::shared_ptr< const UnwindPlan > GetUnwindPlanArchitectureDefaultAtFunctionEntry(lldb_private::Thread &thread)
std::shared_ptr< const UnwindPlan > GetDebugFrameAugmentedUnwindPlan(Target &target, Thread &thread)
std::shared_ptr< const UnwindPlan > m_unwind_plan_debug_frame_augmented_sp
std::vector< std::shared_ptr< const UnwindPlan > > m_unwind_plan_compact_unwind
FuncUnwinders(lldb_private::UnwindTable &unwind_table, Address addr, AddressRanges ranges)
bool m_tried_unwind_plan_assembly
std::shared_ptr< const UnwindPlan > GetEHFrameUnwindPlan(Target &target)
lldb::UnwindAssemblySP GetUnwindAssemblyProfiler(Target &target)
std::shared_ptr< const UnwindPlan > GetUnwindPlanAtCallSite(Target &target, Thread &thread)
std::shared_ptr< const UnwindPlan > GetDebugFrameUnwindPlan(Target &target)
std::shared_ptr< const UnwindPlan > m_unwind_plan_symbol_file_sp
Address m_addr
Start address of the function described by this object.
Provides public interface for all SymbolFiles.
const ArchSpec & GetArchitecture() const
static lldb::UnwindAssemblySP FindPlugin(const ArchSpec &arch)
const FAValue & GetCFAValue() const
bool GetRegisterInfo(uint32_t reg_num, AbstractRegisterLocation ®ister_location) const
#define LLDB_REGNUM_GENERIC_PC
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::UnwindAssembly > UnwindAssemblySP
RegisterKind
Register numbering types.
@ eRegisterKindGeneric
insn ptr reg, stack ptr reg, etc not specific to any particular target
Every register is described in detail including its name, alternate name (optional),...