LLDB  mainline
FuncUnwinders.cpp
Go to the documentation of this file.
1 //===-- FuncUnwinders.cpp -------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 #include "lldb/Core/Address.h"
11 #include "lldb/Core/AddressRange.h"
16 #include "lldb/Symbol/ObjectFile.h"
17 #include "lldb/Symbol/SymbolFile.h"
18 #include "lldb/Symbol/UnwindPlan.h"
20 #include "lldb/Target/ABI.h"
22 #include "lldb/Target/Process.h"
25 #include "lldb/Target/Target.h"
26 #include "lldb/Target/Thread.h"
28 
29 #include <memory>
30 
31 using namespace lldb;
32 using namespace lldb_private;
33 
34 /// constructor
35 
36 FuncUnwinders::FuncUnwinders(UnwindTable &unwind_table, AddressRange range)
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() {}
55 
56 /// destructor
57 
59 
61  Thread &thread) {
62  std::lock_guard<std::recursive_mutex> guard(m_mutex);
63 
64  if (UnwindPlanSP plan_sp = GetObjectFileUnwindPlan(target))
65  return plan_sp;
66  if (UnwindPlanSP plan_sp = GetSymbolFileUnwindPlan(thread))
67  return plan_sp;
68  if (UnwindPlanSP plan_sp = GetDebugFrameUnwindPlan(target))
69  return plan_sp;
70  if (UnwindPlanSP plan_sp = GetEHFrameUnwindPlan(target))
71  return plan_sp;
72  if (UnwindPlanSP plan_sp = GetCompactUnwindUnwindPlan(target))
73  return plan_sp;
74  if (UnwindPlanSP plan_sp = GetArmUnwindUnwindPlan(target))
75  return plan_sp;
76 
77  return nullptr;
78 }
79 
81  std::lock_guard<std::recursive_mutex> guard(m_mutex);
82  if (m_unwind_plan_compact_unwind.size() > 0)
83  return m_unwind_plan_compact_unwind[0]; // FIXME support multiple compact
84  // unwind plans for one func
86  return UnwindPlanSP();
87 
89  if (m_range.GetBaseAddress().IsValid()) {
90  Address current_pc(m_range.GetBaseAddress());
92  if (compact_unwind) {
93  UnwindPlanSP unwind_plan_sp(new UnwindPlan(lldb::eRegisterKindGeneric));
94  if (compact_unwind->GetUnwindPlan(target, current_pc, *unwind_plan_sp)) {
95  m_unwind_plan_compact_unwind.push_back(unwind_plan_sp);
96  return m_unwind_plan_compact_unwind[0]; // FIXME support multiple
97  // compact unwind plans for one
98  // func
99  }
100  }
101  }
102  return UnwindPlanSP();
103 }
104 
105 lldb::UnwindPlanSP FuncUnwinders::GetObjectFileUnwindPlan(Target &target) {
106  std::lock_guard<std::recursive_mutex> guard(m_mutex);
107  if (m_unwind_plan_object_file_sp.get() ||
110 
112  if (m_range.GetBaseAddress().IsValid()) {
114  if (object_file_frame) {
116  std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
117  if (!object_file_frame->GetUnwindPlan(m_range,
120  }
121  }
123 }
124 
126  std::lock_guard<std::recursive_mutex> guard(m_mutex);
129 
131  if (m_range.GetBaseAddress().IsValid()) {
133  if (eh_frame) {
135  std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
138  }
139  }
141 }
142 
144  std::lock_guard<std::recursive_mutex> guard(m_mutex);
147 
149  if (m_range.GetBaseAddress().IsValid()) {
151  if (debug_frame) {
153  std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
156  }
157  }
159 }
160 
162  std::lock_guard<std::recursive_mutex> guard(m_mutex);
165 
167  if (m_range.GetBaseAddress().IsValid()) {
168  Address current_pc(m_range.GetBaseAddress());
169  ArmUnwindInfo *arm_unwind_info = m_unwind_table.GetArmUnwindInfo();
170  if (arm_unwind_info) {
172  std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
173  if (!arm_unwind_info->GetUnwindPlan(target, current_pc,
176  }
177  }
179 }
180 
181 namespace {
182 class RegisterContextToInfo: public SymbolFile::RegisterInfoResolver {
183 public:
184  RegisterContextToInfo(RegisterContext &ctx) : m_ctx(ctx) {}
185 
186  const RegisterInfo *ResolveName(llvm::StringRef name) const override {
187  return m_ctx.GetRegisterInfoByName(name);
188  }
189  const RegisterInfo *ResolveNumber(lldb::RegisterKind kind,
190  uint32_t number) const override {
191  return m_ctx.GetRegisterInfo(kind, number);
192  }
193 
194 private:
195  RegisterContext &m_ctx;
196 };
197 } // namespace
198 
200  std::lock_guard<std::recursive_mutex> guard(m_mutex);
203 
205  if (SymbolFile *symfile = m_unwind_table.GetSymbolFile()) {
206  m_unwind_plan_symbol_file_sp = symfile->GetUnwindPlan(
208  RegisterContextToInfo(*thread.GetRegisterContext()));
209  }
211 }
212 
213 UnwindPlanSP
215  Thread &thread) {
216  std::lock_guard<std::recursive_mutex> guard(m_mutex);
220 
222 
223  UnwindPlanSP object_file_unwind_plan = GetObjectFileUnwindPlan(target);
224  if (!object_file_unwind_plan)
226 
228  std::make_shared<UnwindPlan>(*object_file_unwind_plan);
229 
230  // Augment the instructions with epilogue descriptions if necessary
231  // so the UnwindPlan can be used at any instruction in the function.
232 
233  UnwindAssemblySP assembly_profiler_sp(GetUnwindAssemblyProfiler(target));
234  if (assembly_profiler_sp) {
235  if (!assembly_profiler_sp->AugmentUnwindPlanFromCallSite(
238  }
239  } else {
241  }
243 }
244 
246  Thread &thread) {
247  std::lock_guard<std::recursive_mutex> guard(m_mutex);
251 
252  // Only supported on x86 architectures where we get eh_frame from the
253  // compiler that describes the prologue instructions perfectly, and sometimes
254  // the epilogue instructions too.
260  }
261 
263 
264  UnwindPlanSP eh_frame_plan = GetEHFrameUnwindPlan(target);
265  if (!eh_frame_plan)
267 
269  std::make_shared<UnwindPlan>(*eh_frame_plan);
270 
271  // Augment the eh_frame instructions with epilogue descriptions if necessary
272  // so the UnwindPlan can be used at any instruction in the function.
273 
274  UnwindAssemblySP assembly_profiler_sp(GetUnwindAssemblyProfiler(target));
275  if (assembly_profiler_sp) {
276  if (!assembly_profiler_sp->AugmentUnwindPlanFromCallSite(
279  }
280  } else {
282  }
284 }
285 
287  Thread &thread) {
288  std::lock_guard<std::recursive_mutex> guard(m_mutex);
292 
293  // Only supported on x86 architectures where we get debug_frame from the
294  // compiler that describes the prologue instructions perfectly, and sometimes
295  // the epilogue instructions too.
301  }
302 
304 
305  UnwindPlanSP debug_frame_plan = GetDebugFrameUnwindPlan(target);
306  if (!debug_frame_plan)
308 
310  std::make_shared<UnwindPlan>(*debug_frame_plan);
311 
312  // Augment the debug_frame instructions with epilogue descriptions if
313  // necessary so the UnwindPlan can be used at any instruction in the
314  // function.
315 
316  UnwindAssemblySP assembly_profiler_sp(GetUnwindAssemblyProfiler(target));
317  if (assembly_profiler_sp) {
318  if (!assembly_profiler_sp->AugmentUnwindPlanFromCallSite(
321  }
322  } else
325 }
326 
328  Thread &thread) {
329  std::lock_guard<std::recursive_mutex> guard(m_mutex);
333  }
334 
336 
337  UnwindAssemblySP assembly_profiler_sp(GetUnwindAssemblyProfiler(target));
338  if (assembly_profiler_sp) {
340  std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
341  if (!assembly_profiler_sp->GetNonCallSiteUnwindPlanFromAssembly(
342  m_range, thread, *m_unwind_plan_assembly_sp)) {
344  }
345  }
347 }
348 
349 // This method compares the pc unwind rule in the first row of two UnwindPlans.
350 // If they have the same way of getting the pc value (e.g. "CFA - 8" + "CFA is
351 // sp"), then it will return LazyBoolTrue.
353  Thread &thread, const UnwindPlanSP &a, const UnwindPlanSP &b) {
354  LazyBool plans_are_identical = eLazyBoolCalculate;
355 
357  uint32_t pc_reg_lldb_regnum = pc_reg.GetAsKind(eRegisterKindLLDB);
358 
359  if (a.get() && b.get()) {
360  UnwindPlan::RowSP a_first_row = a->GetRowAtIndex(0);
361  UnwindPlan::RowSP b_first_row = b->GetRowAtIndex(0);
362 
363  if (a_first_row.get() && b_first_row.get()) {
366 
367  a_first_row->GetRegisterInfo(pc_reg_lldb_regnum, a_pc_regloc);
368  b_first_row->GetRegisterInfo(pc_reg_lldb_regnum, b_pc_regloc);
369 
370  plans_are_identical = eLazyBoolYes;
371 
372  if (a_first_row->GetCFAValue() != b_first_row->GetCFAValue()) {
373  plans_are_identical = eLazyBoolNo;
374  }
375  if (a_pc_regloc != b_pc_regloc) {
376  plans_are_identical = eLazyBoolNo;
377  }
378  }
379  }
380  return plans_are_identical;
381 }
382 
384  Thread &thread) {
385  UnwindPlanSP eh_frame_sp = GetEHFrameUnwindPlan(target);
386  if (!eh_frame_sp)
387  eh_frame_sp = GetDebugFrameUnwindPlan(target);
388  if (!eh_frame_sp)
389  eh_frame_sp = GetObjectFileUnwindPlan(target);
390  UnwindPlanSP arch_default_at_entry_sp =
392  UnwindPlanSP arch_default_sp = GetUnwindPlanArchitectureDefault(thread);
393  UnwindPlanSP assembly_sp = GetAssemblyUnwindPlan(target, thread);
394 
395  // This point of this code is to detect when a function is using a non-
396  // standard ABI, and the eh_frame correctly describes that alternate ABI.
397  // This is addressing a specific situation on x86_64 linux systems where one
398  // function in a library pushes a value on the stack and jumps to another
399  // function. So using an assembly instruction based unwind will not work
400  // when you're in the second function - the stack has been modified in a non-
401  // ABI way. But we have eh_frame that correctly describes how to unwind from
402  // this location. So we're looking to see if the initial pc register save
403  // location from the eh_frame is different from the assembly unwind, the arch
404  // default unwind, and the arch default at initial function entry.
405  //
406  // We may have eh_frame that describes the entire function -- or we may have
407  // eh_frame that only describes the unwind after the prologue has executed --
408  // so we need to check both the arch default (once the prologue has executed)
409  // and the arch default at initial function entry. And we may be running on
410  // a target where we have only some of the assembly/arch default unwind plans
411  // available.
412 
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) {
419  return eh_frame_sp;
420  }
421 
422  if (UnwindPlanSP plan_sp = GetSymbolFileUnwindPlan(thread))
423  return plan_sp;
424  if (UnwindPlanSP plan_sp = GetDebugFrameAugmentedUnwindPlan(target, thread))
425  return plan_sp;
426  if (UnwindPlanSP plan_sp = GetEHFrameAugmentedUnwindPlan(target, thread))
427  return plan_sp;
428  if (UnwindPlanSP plan_sp = GetObjectFileAugmentedUnwindPlan(target, thread))
429  return plan_sp;
430 
431  return assembly_sp;
432 }
433 
435  Thread &thread) {
436  std::lock_guard<std::recursive_mutex> guard(m_mutex);
438  return m_unwind_plan_fast_sp;
439 
440  m_tried_unwind_fast = true;
441 
442  UnwindAssemblySP assembly_profiler_sp(GetUnwindAssemblyProfiler(target));
443  if (assembly_profiler_sp) {
445  std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
446  if (!assembly_profiler_sp->GetFastUnwindPlan(m_range, thread,
448  m_unwind_plan_fast_sp.reset();
449  }
450  }
451  return m_unwind_plan_fast_sp;
452 }
453 
455  std::lock_guard<std::recursive_mutex> guard(m_mutex);
458 
460 
461  Address current_pc;
462  ProcessSP process_sp(thread.CalculateProcess());
463  if (process_sp) {
464  ABI *abi = process_sp->GetABI().get();
465  if (abi) {
467  std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
470  }
471  }
472  }
473 
475 }
476 
477 UnwindPlanSP
479  std::lock_guard<std::recursive_mutex> guard(m_mutex);
483 
485 
486  Address current_pc;
487  ProcessSP process_sp(thread.CalculateProcess());
488  if (process_sp) {
489  ABI *abi = process_sp->GetABI().get();
490  if (abi) {
492  std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
496  }
497  }
498  }
499 
501 }
502 
504  std::lock_guard<std::recursive_mutex> guard(m_mutex);
507 
508  ExecutionContext exe_ctx(target.shared_from_this(), false);
509  UnwindAssemblySP assembly_profiler_sp(GetUnwindAssemblyProfiler(target));
510  if (assembly_profiler_sp)
511  assembly_profiler_sp->FirstNonPrologueInsn(m_range, exe_ctx,
514 }
515 
517  return m_range.GetBaseAddress();
518 }
519 
520 lldb::UnwindAssemblySP
522  UnwindAssemblySP assembly_profiler_sp;
523  if (ArchSpec arch = m_unwind_table.GetArchitecture()) {
524  arch.MergeFrom(target.GetArchitecture());
525  assembly_profiler_sp = UnwindAssembly::FindPlugin(arch);
526  }
527  return assembly_profiler_sp;
528 }
529 
531  Address lsda_addr;
532 
533  UnwindPlanSP unwind_plan_sp = GetEHFrameUnwindPlan(target);
534  if (unwind_plan_sp.get() == nullptr) {
535  unwind_plan_sp = GetCompactUnwindUnwindPlan(target);
536  }
537  if (unwind_plan_sp.get() == nullptr) {
538  unwind_plan_sp = GetObjectFileUnwindPlan(target);
539  }
540  if (unwind_plan_sp.get() && unwind_plan_sp->GetLSDAAddress().IsValid()) {
541  lsda_addr = unwind_plan_sp->GetLSDAAddress();
542  }
543  return lsda_addr;
544 }
545 
547  Address personality_addr;
548 
549  UnwindPlanSP unwind_plan_sp = GetEHFrameUnwindPlan(target);
550  if (unwind_plan_sp.get() == nullptr) {
551  unwind_plan_sp = GetCompactUnwindUnwindPlan(target);
552  }
553  if (unwind_plan_sp.get() == nullptr) {
554  unwind_plan_sp = GetObjectFileUnwindPlan(target);
555  }
556  if (unwind_plan_sp.get() &&
557  unwind_plan_sp->GetPersonalityFunctionPtr().IsValid()) {
558  personality_addr = unwind_plan_sp->GetPersonalityFunctionPtr();
559  }
560 
561  return personality_addr;
562 }
lldb_private::UnwindTable::GetSymbolFile
SymbolFile * GetSymbolFile()
Definition: UnwindTable.cpp:201
lldb_private::FuncUnwinders::GetUnwindPlanFastUnwind
lldb::UnwindPlanSP GetUnwindPlanFastUnwind(Target &target, lldb_private::Thread &thread)
Definition: FuncUnwinders.cpp:434
lldb_private::FuncUnwinders::CompareUnwindPlansForIdenticalInitialPCLocation
lldb_private::LazyBool CompareUnwindPlansForIdenticalInitialPCLocation(Thread &thread, const lldb::UnwindPlanSP &a, const lldb::UnwindPlanSP &b)
Definition: FuncUnwinders.cpp:352
lldb_private::AddressRange::GetBaseAddress
Address & GetBaseAddress()
Get accessor for the base address of the range.
Definition: AddressRange.h:209
lldb_private::SymbolFile
Definition: SymbolFile.h:37
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::UnwindTable::GetEHFrameInfo
lldb_private::DWARFCallFrameInfo * GetEHFrameInfo()
Definition: UnwindTable.cpp:181
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::UnwindTable::GetDebugFrameInfo
lldb_private::DWARFCallFrameInfo * GetDebugFrameInfo()
Definition: UnwindTable.cpp:186
lldb_private::Address::IsValid
bool IsValid() const
Check if the object state is valid.
Definition: Address.h:336
lldb_private::ABI
Definition: ABI.h:27
lldb_private::UnwindTable::GetArchitecture
ArchSpec GetArchitecture()
Definition: UnwindTable.cpp:203
lldb_private::FuncUnwinders::m_unwind_plan_debug_frame_augmented_sp
lldb::UnwindPlanSP m_unwind_plan_debug_frame_augmented_sp
Definition: FuncUnwinders.h:128
lldb::eRegisterKindGeneric
@ eRegisterKindGeneric
insn ptr reg, stack ptr reg, etc not specific to any particular target
Definition: lldb-enumerations.h:230
lldb_private::FuncUnwinders::m_unwind_plan_fast_sp
lldb::UnwindPlanSP m_unwind_plan_fast_sp
Definition: FuncUnwinders.h:133
lldb_private::FuncUnwinders::m_tried_unwind_arch_default_at_func_entry
bool m_tried_unwind_arch_default_at_func_entry
Definition: FuncUnwinders.h:148
lldb_private::ArchSpec::GetCore
Core GetCore() const
Definition: ArchSpec.h:423
lldb_private::FuncUnwinders::m_unwind_table
UnwindTable & m_unwind_table
Definition: FuncUnwinders.h:115
lldb_private::FuncUnwinders::m_tried_unwind_plan_object_file_augmented
bool m_tried_unwind_plan_object_file_augmented
Definition: FuncUnwinders.h:142
lldb_private::eLazyBoolYes
@ eLazyBoolYes
Definition: lldb-private-enumerations.h:115
lldb_private::FuncUnwinders::m_tried_unwind_arch_default
bool m_tried_unwind_arch_default
Definition: FuncUnwinders.h:147
lldb_private::FuncUnwinders::m_unwind_plan_symbol_file_sp
lldb::UnwindPlanSP m_unwind_plan_symbol_file_sp
Definition: FuncUnwinders.h:132
lldb_private::FuncUnwinders::m_tried_unwind_plan_debug_frame_augmented
bool m_tried_unwind_plan_debug_frame_augmented
Definition: FuncUnwinders.h:144
lldb_private::ArmUnwindInfo
Definition: ArmUnwindInfo.h:30
lldb_private::ArmUnwindInfo::GetUnwindPlan
bool GetUnwindPlan(Target &target, const Address &addr, UnwindPlan &unwind_plan)
Definition: ArmUnwindInfo.cpp:99
lldb_private::UnwindTable
Definition: UnwindTable.h:23
lldb_private::FuncUnwinders::~FuncUnwinders
~FuncUnwinders()
destructor
lldb_private::UnwindTable::GetAllowAssemblyEmulationUnwindPlans
bool GetAllowAssemblyEmulationUnwindPlans()
Definition: UnwindTable.cpp:205
lldb_private::FuncUnwinders::GetUnwindAssemblyProfiler
lldb::UnwindAssemblySP GetUnwindAssemblyProfiler(Target &target)
Definition: FuncUnwinders.cpp:521
lldb_private::LazyBool
LazyBool
Definition: lldb-private-enumerations.h:115
lldb_private::CallFrameInfo::GetUnwindPlan
virtual bool GetUnwindPlan(const Address &addr, UnwindPlan &unwind_plan)=0
lldb_private::FuncUnwinders::GetFirstNonPrologueInsn
Address & GetFirstNonPrologueInsn(Target &target)
Definition: FuncUnwinders.cpp:503
lldb_private::Target
Definition: Target.h:451
lldb_private::FuncUnwinders::m_tried_unwind_plan_debug_frame
bool m_tried_unwind_plan_debug_frame
Definition: FuncUnwinders.h:141
lldb_private::CompactUnwindInfo
Definition: CompactUnwindInfo.h:36
lldb_private::FuncUnwinders::m_tried_unwind_plan_compact_unwind
bool m_tried_unwind_plan_compact_unwind
Definition: FuncUnwinders.h:145
ABI.h
lldb_private::FuncUnwinders::GetEHFrameAugmentedUnwindPlan
lldb::UnwindPlanSP GetEHFrameAugmentedUnwindPlan(Target &target, Thread &thread)
Definition: FuncUnwinders.cpp:245
Process.h
lldb_private::CompactUnwindInfo::GetUnwindPlan
bool GetUnwindPlan(Target &target, Address addr, UnwindPlan &unwind_plan)
Definition: CompactUnwindInfo.cpp:172
lldb_private::FuncUnwinders::m_unwind_plan_assembly_sp
lldb::UnwindPlanSP m_unwind_plan_assembly_sp
Definition: FuncUnwinders.h:120
Target.h
lldb_private::FuncUnwinders::m_unwind_plan_eh_frame_augmented_sp
lldb::UnwindPlanSP m_unwind_plan_eh_frame_augmented_sp
Definition: FuncUnwinders.h:127
CompactUnwindInfo.h
lldb_private::FuncUnwinders::GetAssemblyUnwindPlan
lldb::UnwindPlanSP GetAssemblyUnwindPlan(Target &target, Thread &thread)
Definition: FuncUnwinders.cpp:327
lldb_private::FuncUnwinders::GetObjectFileAugmentedUnwindPlan
lldb::UnwindPlanSP GetObjectFileAugmentedUnwindPlan(Target &target, Thread &thread)
Definition: FuncUnwinders.cpp:214
lldb_private::Thread::CalculateProcess
lldb::ProcessSP CalculateProcess() override
Definition: Thread.cpp:1397
RegisterNumber
A class to represent register numbers, and able to convert between different register numbering schem...
Definition: RegisterNumber.h:19
lldb::eRegisterKindLLDB
@ eRegisterKindLLDB
lldb's internal register numbers
Definition: lldb-enumerations.h:234
lldb_private::FuncUnwinders::m_unwind_plan_arch_default_at_func_entry_sp
lldb::UnwindPlanSP m_unwind_plan_arch_default_at_func_entry_sp
Definition: FuncUnwinders.h:135
lldb_private::FuncUnwinders::m_tried_unwind_plan_symbol_file
bool m_tried_unwind_plan_symbol_file
Definition: FuncUnwinders.h:146
lldb_private::FuncUnwinders::m_unwind_plan_eh_frame_sp
lldb::UnwindPlanSP m_unwind_plan_eh_frame_sp
Definition: FuncUnwinders.h:122
lldb_private::FuncUnwinders::m_tried_unwind_plan_object_file
bool m_tried_unwind_plan_object_file
Definition: FuncUnwinders.h:140
lldb_private::Thread
Definition: Thread.h:60
lldb_private::ABI::CreateFunctionEntryUnwindPlan
virtual bool CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan)=0
lldb_private::ArchSpec::eCore_x86_64_x86_64h
@ eCore_x86_64_x86_64h
Definition: ArchSpec.h:189
ArmUnwindInfo.h
lldb_private::UnwindTable::GetCompactUnwindInfo
lldb_private::CompactUnwindInfo * GetCompactUnwindInfo()
Definition: UnwindTable.cpp:191
DWARFCallFrameInfo.h
UnwindTable.h
lldb_private::AddressRange
Definition: AddressRange.h:25
lldb_private::FuncUnwinders::GetUnwindPlanAtNonCallSite
lldb::UnwindPlanSP GetUnwindPlanAtNonCallSite(Target &target, lldb_private::Thread &thread)
Definition: FuncUnwinders.cpp:383
lldb_private::DWARFCallFrameInfo::GetUnwindPlan
bool GetUnwindPlan(const Address &addr, UnwindPlan &unwind_plan)
Return an UnwindPlan based on the call frame information encoded in the FDE of this DWARFCallFrameInf...
Definition: DWARFCallFrameInfo.cpp:150
RegisterNumber::GetAsKind
uint32_t GetAsKind(lldb::RegisterKind kind)
Definition: RegisterNumber.cpp:80
lldb_private::ArchSpec::eCore_x86_32_i386
@ eCore_x86_32_i386
Definition: ArchSpec.h:183
lldb_private::FuncUnwinders::GetUnwindPlanArchitectureDefault
lldb::UnwindPlanSP GetUnwindPlanArchitectureDefault(lldb_private::Thread &thread)
Definition: FuncUnwinders.cpp:454
lldb_private::SymbolFile::RegisterInfoResolver
Definition: SymbolFile.h:281
lldb_private::CallFrameInfo
Definition: CallFrameInfo.h:16
lldb_private::FuncUnwinders::GetLSDAAddress
Address GetLSDAAddress(Target &target)
Definition: FuncUnwinders.cpp:530
lldb_private::FuncUnwinders::GetDebugFrameAugmentedUnwindPlan
lldb::UnwindPlanSP GetDebugFrameAugmentedUnwindPlan(Target &target, Thread &thread)
Definition: FuncUnwinders.cpp:286
lldb_private::UnwindTable::GetObjectFileUnwindInfo
lldb_private::CallFrameInfo * GetObjectFileUnwindInfo()
Definition: UnwindTable.cpp:176
Thread.h
lldb_private::UnwindTable::GetArmUnwindInfo
ArmUnwindInfo * GetArmUnwindInfo()
Definition: UnwindTable.cpp:196
Address.h
UnwindPlan.h
lldb_private::RegisterContext
Definition: RegisterContext.h:17
ObjectFile.h
lldb::RegisterKind
RegisterKind
Register numbering types.
Definition: lldb-enumerations.h:227
lldb_private::UnwindPlan::Row::RegisterLocation
Definition: UnwindPlan.h:57
lldb_private::FuncUnwinders::m_unwind_plan_debug_frame_sp
lldb::UnwindPlanSP m_unwind_plan_debug_frame_sp
Definition: FuncUnwinders.h:123
lldb_private::FuncUnwinders::GetEHFrameUnwindPlan
lldb::UnwindPlanSP GetEHFrameUnwindPlan(Target &target)
Definition: FuncUnwinders.cpp:125
lldb_private::UnwindPlan::RowSP
std::shared_ptr< Row > RowSP
Definition: UnwindPlan.h:395
lldb_private::FuncUnwinders::m_unwind_plan_compact_unwind
std::vector< lldb::UnwindPlanSP > m_unwind_plan_compact_unwind
Definition: FuncUnwinders.h:130
lldb_private::FuncUnwinders::GetArmUnwindUnwindPlan
lldb::UnwindPlanSP GetArmUnwindUnwindPlan(Target &target)
Definition: FuncUnwinders.cpp:161
lldb_private::FuncUnwinders::m_tried_unwind_fast
bool m_tried_unwind_fast
Definition: FuncUnwinders.h:147
FuncUnwinders.h
lldb_private::FuncUnwinders::m_unwind_plan_arch_default_sp
lldb::UnwindPlanSP m_unwind_plan_arch_default_sp
Definition: FuncUnwinders.h:134
lldb_private::Target::GetArchitecture
const ArchSpec & GetArchitecture() const
Definition: Target.h:967
lldb_private::FuncUnwinders::m_tried_unwind_plan_eh_frame_augmented
bool m_tried_unwind_plan_eh_frame_augmented
Definition: FuncUnwinders.h:143
lldb_private::FuncUnwinders::GetSymbolFileUnwindPlan
lldb::UnwindPlanSP GetSymbolFileUnwindPlan(Thread &thread)
Definition: FuncUnwinders.cpp:199
uint32_t
lldb_private::eLazyBoolNo
@ eLazyBoolNo
Definition: lldb-private-enumerations.h:115
lldb_private::FuncUnwinders::GetDebugFrameUnwindPlan
lldb::UnwindPlanSP GetDebugFrameUnwindPlan(Target &target)
Definition: FuncUnwinders.cpp:143
lldb_private::Address
Definition: Address.h:59
lldb_private::FuncUnwinders::m_tried_unwind_plan_assembly
bool m_tried_unwind_plan_assembly
Definition: FuncUnwinders.h:139
lldb_private::FuncUnwinders::GetPersonalityRoutinePtrAddress
Address GetPersonalityRoutinePtrAddress(Target &target)
Definition: FuncUnwinders.cpp:546
lldb_private::FuncUnwinders::GetUnwindPlanAtCallSite
lldb::UnwindPlanSP GetUnwindPlanAtCallSite(Target &target, Thread &thread)
Definition: FuncUnwinders.cpp:60
lldb_private::FuncUnwinders::m_tried_unwind_plan_arm_unwind
bool m_tried_unwind_plan_arm_unwind
Definition: FuncUnwinders.h:146
CallFrameInfo.h
lldb_private::FuncUnwinders::GetCompactUnwindUnwindPlan
lldb::UnwindPlanSP GetCompactUnwindUnwindPlan(Target &target)
Definition: FuncUnwinders.cpp:80
lldb_private::FuncUnwinders::m_unwind_plan_arm_unwind_sp
lldb::UnwindPlanSP m_unwind_plan_arm_unwind_sp
Definition: FuncUnwinders.h:131
lldb_private::FuncUnwinders::m_first_non_prologue_insn
Address m_first_non_prologue_insn
Definition: FuncUnwinders.h:150
lldb_private::DWARFCallFrameInfo
Definition: DWARFCallFrameInfo.h:33
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::eLazyBoolCalculate
@ eLazyBoolCalculate
Definition: lldb-private-enumerations.h:115
lldb_private::FuncUnwinders::m_range
AddressRange m_range
Definition: FuncUnwinders.h:116
lldb_private::FuncUnwinders::m_tried_unwind_plan_eh_frame
bool m_tried_unwind_plan_eh_frame
Definition: FuncUnwinders.h:139
lldb_private::ArchSpec::eCore_x86_64_x86_64
@ eCore_x86_64_x86_64
Definition: ArchSpec.h:188
lldb_private::FuncUnwinders::GetObjectFileUnwindPlan
lldb::UnwindPlanSP GetObjectFileUnwindPlan(Target &target)
Definition: FuncUnwinders.cpp:105
lldb_private::ABI::CreateDefaultUnwindPlan
virtual bool CreateDefaultUnwindPlan(UnwindPlan &unwind_plan)=0
LLDB_REGNUM_GENERIC_PC
#define LLDB_REGNUM_GENERIC_PC
Definition: lldb-defines.h:63
lldb_private::FuncUnwinders::GetFunctionStartAddress
const Address & GetFunctionStartAddress() const
Definition: FuncUnwinders.cpp:516
UnwindAssembly.h
RegisterNumber.h
lldb_private::Thread::GetRegisterContext
virtual lldb::RegisterContextSP GetRegisterContext()=0
AddressRange.h
lldb_private::UnwindPlan
Definition: UnwindPlan.h:53
lldb
Definition: SBAddress.h:15
lldb_private::FuncUnwinders::m_unwind_plan_object_file_sp
lldb::UnwindPlanSP m_unwind_plan_object_file_sp
Definition: FuncUnwinders.h:121
RegisterContext.h
lldb_private::FuncUnwinders::m_mutex
std::recursive_mutex m_mutex
Definition: FuncUnwinders.h:118
SymbolFile.h
ExecutionContext.h
lldb_private::FuncUnwinders::m_unwind_plan_object_file_augmented_sp
lldb::UnwindPlanSP m_unwind_plan_object_file_augmented_sp
Definition: FuncUnwinders.h:126
lldb_private::FuncUnwinders::GetUnwindPlanArchitectureDefaultAtFunctionEntry
lldb::UnwindPlanSP GetUnwindPlanArchitectureDefaultAtFunctionEntry(lldb_private::Thread &thread)
Definition: FuncUnwinders.cpp:478
lldb_private::UnwindAssembly::FindPlugin
static lldb::UnwindAssemblySP FindPlugin(const ArchSpec &arch)
Definition: UnwindAssembly.cpp:17