37 : m_unwind_table(unwind_table), m_range(range), m_mutex(),
38 m_unwind_plan_assembly_sp(), m_unwind_plan_eh_frame_sp(),
39 m_unwind_plan_eh_frame_augmented_sp(), m_unwind_plan_compact_unwind(),
40 m_unwind_plan_arm_unwind_sp(), m_unwind_plan_fast_sp(),
41 m_unwind_plan_arch_default_sp(),
42 m_unwind_plan_arch_default_at_func_entry_sp(),
43 m_tried_unwind_plan_assembly(false), m_tried_unwind_plan_eh_frame(false),
44 m_tried_unwind_plan_object_file(false),
45 m_tried_unwind_plan_debug_frame(false),
46 m_tried_unwind_plan_object_file_augmented(false),
47 m_tried_unwind_plan_eh_frame_augmented(false),
48 m_tried_unwind_plan_debug_frame_augmented(false),
49 m_tried_unwind_plan_compact_unwind(false),
50 m_tried_unwind_plan_arm_unwind(false),
51 m_tried_unwind_plan_symbol_file(false), m_tried_unwind_fast(false),
52 m_tried_unwind_arch_default(false),
53 m_tried_unwind_arch_default_at_func_entry(false),
54 m_first_non_prologue_insn() {}
62 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
81 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
94 if (compact_unwind->
GetUnwindPlan(target, current_pc, *unwind_plan_sp)) {
106 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
114 if (object_file_frame) {
126 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
144 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
162 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
170 if (arm_unwind_info) {
186 const RegisterInfo *ResolveName(llvm::StringRef name)
const override {
187 return m_ctx.GetRegisterInfoByName(name);
190 uint32_t number)
const override {
191 return m_ctx.GetRegisterInfo(kind, number);
200 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
216 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
224 if (!object_file_unwind_plan)
228 std::make_shared<UnwindPlan>(*object_file_unwind_plan);
234 if (assembly_profiler_sp) {
235 if (!assembly_profiler_sp->AugmentUnwindPlanFromCallSite(
247 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
269 std::make_shared<UnwindPlan>(*eh_frame_plan);
275 if (assembly_profiler_sp) {
276 if (!assembly_profiler_sp->AugmentUnwindPlanFromCallSite(
288 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
306 if (!debug_frame_plan)
310 std::make_shared<UnwindPlan>(*debug_frame_plan);
317 if (assembly_profiler_sp) {
318 if (!assembly_profiler_sp->AugmentUnwindPlanFromCallSite(
329 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
338 if (assembly_profiler_sp) {
341 if (!assembly_profiler_sp->GetNonCallSiteUnwindPlanFromAssembly(
359 if (a.get() && b.get()) {
363 if (a_first_row.get() && b_first_row.get()) {
367 a_first_row->GetRegisterInfo(pc_reg_lldb_regnum, a_pc_regloc);
368 b_first_row->GetRegisterInfo(pc_reg_lldb_regnum, b_pc_regloc);
372 if (a_first_row->GetCFAValue() != b_first_row->GetCFAValue()) {
375 if (a_pc_regloc != b_pc_regloc) {
380 return plans_are_identical;
414 thread, eh_frame_sp, arch_default_at_entry_sp) ==
eLazyBoolNo &&
416 thread, eh_frame_sp, arch_default_sp) ==
eLazyBoolNo &&
418 thread, assembly_sp, arch_default_sp) ==
eLazyBoolNo) {
436 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
443 if (assembly_profiler_sp) {
446 if (!assembly_profiler_sp->GetFastUnwindPlan(
m_range, thread,
455 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
464 ABI *abi = process_sp->GetABI().get();
479 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
489 ABI *abi = process_sp->GetABI().get();
504 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
510 if (assembly_profiler_sp)
511 assembly_profiler_sp->FirstNonPrologueInsn(
m_range, exe_ctx,
527 return assembly_profiler_sp;
534 if (unwind_plan_sp.get() ==
nullptr) {
537 if (unwind_plan_sp.get() ==
nullptr) {
540 if (unwind_plan_sp.get() && unwind_plan_sp->GetLSDAAddress().IsValid()) {
541 lsda_addr = unwind_plan_sp->GetLSDAAddress();
550 if (unwind_plan_sp.get() ==
nullptr) {
553 if (unwind_plan_sp.get() ==
nullptr) {
556 if (unwind_plan_sp.get() &&
557 unwind_plan_sp->GetPersonalityFunctionPtr().IsValid()) {
558 personality_addr = unwind_plan_sp->GetPersonalityFunctionPtr();
561 return personality_addr;
A class to represent register numbers, and able to convert between different register numbering schem...
uint32_t GetAsKind(lldb::RegisterKind kind)
virtual bool CreateDefaultUnwindPlan(UnwindPlan &unwind_plan)=0
virtual bool CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan)=0
A section + offset based address range class.
Address & GetBaseAddress()
Get accessor for the base address of the range.
A section + offset based address class.
bool IsValid() const
Check if the object state is valid.
An architecture specification class.
bool GetUnwindPlan(Target &target, const Address &addr, UnwindPlan &unwind_plan)
virtual bool GetUnwindPlan(const Address &addr, UnwindPlan &unwind_plan)=0
bool GetUnwindPlan(Target &target, Address addr, UnwindPlan &unwind_plan)
bool GetUnwindPlan(const Address &addr, UnwindPlan &unwind_plan)
Return an UnwindPlan based on the call frame information encoded in the FDE of this DWARFCallFrameInf...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Address & GetFirstNonPrologueInsn(Target &target)
~FuncUnwinders()
destructor
lldb::UnwindPlanSP m_unwind_plan_debug_frame_augmented_sp
bool m_tried_unwind_arch_default_at_func_entry
lldb::UnwindPlanSP GetAssemblyUnwindPlan(Target &target, Thread &thread)
lldb::UnwindPlanSP GetEHFrameUnwindPlan(Target &target)
lldb::UnwindPlanSP GetUnwindPlanFastUnwind(Target &target, lldb_private::Thread &thread)
std::vector< lldb::UnwindPlanSP > m_unwind_plan_compact_unwind
lldb::UnwindPlanSP GetObjectFileAugmentedUnwindPlan(Target &target, Thread &thread)
Address GetLSDAAddress(Target &target)
lldb::UnwindPlanSP m_unwind_plan_object_file_sp
lldb_private::LazyBool CompareUnwindPlansForIdenticalInitialPCLocation(Thread &thread, const lldb::UnwindPlanSP &a, const lldb::UnwindPlanSP &b)
bool m_tried_unwind_plan_eh_frame_augmented
bool m_tried_unwind_plan_symbol_file
bool m_tried_unwind_plan_object_file
Address m_first_non_prologue_insn
const Address & GetFunctionStartAddress() const
lldb::UnwindPlanSP m_unwind_plan_assembly_sp
lldb::UnwindPlanSP GetEHFrameAugmentedUnwindPlan(Target &target, Thread &thread)
lldb::UnwindPlanSP GetDebugFrameUnwindPlan(Target &target)
lldb::UnwindPlanSP m_unwind_plan_arch_default_sp
lldb::UnwindPlanSP GetUnwindPlanAtNonCallSite(Target &target, lldb_private::Thread &thread)
bool m_tried_unwind_plan_debug_frame
bool m_tried_unwind_plan_debug_frame_augmented
UnwindTable & m_unwind_table
lldb::UnwindPlanSP m_unwind_plan_debug_frame_sp
FuncUnwinders(lldb_private::UnwindTable &unwind_table, AddressRange range)
constructor
std::recursive_mutex m_mutex
lldb::UnwindPlanSP m_unwind_plan_eh_frame_augmented_sp
lldb::UnwindPlanSP m_unwind_plan_eh_frame_sp
lldb::UnwindPlanSP GetDebugFrameAugmentedUnwindPlan(Target &target, Thread &thread)
bool m_tried_unwind_plan_object_file_augmented
Address GetPersonalityRoutinePtrAddress(Target &target)
bool m_tried_unwind_plan_compact_unwind
lldb::UnwindPlanSP m_unwind_plan_arch_default_at_func_entry_sp
bool m_tried_unwind_plan_eh_frame
lldb::UnwindPlanSP m_unwind_plan_arm_unwind_sp
lldb::UnwindPlanSP GetCompactUnwindUnwindPlan(Target &target)
bool m_tried_unwind_plan_arm_unwind
bool m_tried_unwind_arch_default
lldb::UnwindPlanSP GetUnwindPlanArchitectureDefault(lldb_private::Thread &thread)
lldb::UnwindPlanSP m_unwind_plan_fast_sp
bool m_tried_unwind_plan_assembly
lldb::UnwindPlanSP m_unwind_plan_symbol_file_sp
lldb::UnwindAssemblySP GetUnwindAssemblyProfiler(Target &target)
lldb::UnwindPlanSP GetArmUnwindUnwindPlan(Target &target)
lldb::UnwindPlanSP GetObjectFileUnwindPlan(Target &target)
lldb::UnwindPlanSP GetUnwindPlanAtCallSite(Target &target, Thread &thread)
lldb::UnwindPlanSP GetUnwindPlanArchitectureDefaultAtFunctionEntry(lldb_private::Thread &thread)
lldb::UnwindPlanSP m_unwind_plan_object_file_augmented_sp
lldb::UnwindPlanSP GetSymbolFileUnwindPlan(Thread &thread)
Provides public interface for all SymbolFiles.
const ArchSpec & GetArchitecture() const
virtual lldb::RegisterContextSP GetRegisterContext()=0
lldb::ProcessSP CalculateProcess() override
static lldb::UnwindAssemblySP FindPlugin(const ArchSpec &arch)
std::shared_ptr< Row > RowSP
lldb_private::DWARFCallFrameInfo * GetEHFrameInfo()
bool GetAllowAssemblyEmulationUnwindPlans()
ArmUnwindInfo * GetArmUnwindInfo()
SymbolFile * GetSymbolFile()
ArchSpec GetArchitecture()
lldb_private::DWARFCallFrameInfo * GetDebugFrameInfo()
lldb_private::CompactUnwindInfo * GetCompactUnwindInfo()
lldb_private::CallFrameInfo * GetObjectFileUnwindInfo()
#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::UnwindPlan > UnwindPlanSP
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
@ eRegisterKindLLDB
lldb's internal register numbers
Every register is described in detail including its name, alternate name (optional),...