LLDB mainline
Namespaces | Macros | Enumerations | Functions
CompactUnwindInfo.cpp File Reference
#include "lldb/Symbol/CompactUnwindInfo.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/Section.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/UnwindPlan.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"
#include "llvm/Support/MathExtras.h"
#include <algorithm>
#include <memory>

Go to the source code of this file.

Namespaces

namespace  lldb_private
 A class that represents a running process on the host machine.
 

Macros

#define UNWIND_SECOND_LEVEL_REGULAR   2
 
#define UNWIND_SECOND_LEVEL_COMPRESSED   3
 
#define UNWIND_INFO_COMPRESSED_ENTRY_FUNC_OFFSET(entry)   (entry & 0x00FFFFFF)
 
#define UNWIND_INFO_COMPRESSED_ENTRY_ENCODING_INDEX(entry)    ((entry >> 24) & 0xFF)
 
#define EXTRACT_BITS(value, mask)
 

Enumerations

enum  {
  lldb_private::UNWIND_X86_REG_NONE = 0 , lldb_private::UNWIND_X86_REG_EBX = 1 , lldb_private::UNWIND_X86_REG_ECX = 2 , lldb_private::UNWIND_X86_REG_EDX = 3 ,
  lldb_private::UNWIND_X86_REG_EDI = 4 , lldb_private::UNWIND_X86_REG_ESI = 5 , lldb_private::UNWIND_X86_REG_EBP = 6
}
 
enum  {
  lldb_private::UNWIND_X86_64_REG_NONE = 0 , lldb_private::UNWIND_X86_64_REG_RBX = 1 , lldb_private::UNWIND_X86_64_REG_R12 = 2 , lldb_private::UNWIND_X86_64_REG_R13 = 3 ,
  lldb_private::UNWIND_X86_64_REG_R14 = 4 , lldb_private::UNWIND_X86_64_REG_R15 = 5 , lldb_private::UNWIND_X86_64_REG_RBP = 6
}
 
enum  x86_64_eh_regnum {
  rax = 0 , rdx = 1 , rcx = 2 , rbx = 3 ,
  rsi = 4 , rdi = 5 , rbp = 6 , rsp = 7 ,
  r8 = 8 , r9 = 9 , r10 = 10 , r11 = 11 ,
  r12 = 12 , r13 = 13 , r14 = 14 , r15 = 15 ,
  rip = 16
}
 
enum  i386_eh_regnum {
  eax = 0 , ecx = 1 , edx = 2 , ebx = 3 ,
  ebp = 4 , esp = 5 , esi = 6 , edi = 7 ,
  eip = 8
}
 
enum  arm64_eh_regnum {
  x19 = 19 , x20 = 20 , x21 = 21 , x22 = 22 ,
  x23 = 23 , x24 = 24 , x25 = 25 , x26 = 26 ,
  x27 = 27 , x28 = 28 , fp = 29 , ra = 30 ,
  sp = 31 , pc = 32 , v8 = 72 , v9 = 73 ,
  v10 = 74 , v11 = 75 , v12 = 76 , v13 = 77 ,
  v14 = 78 , v15 = 79
}
 
enum  arm_eh_regnum {
  arm_r0 = 0 , arm_r1 = 1 , arm_r2 = 2 , arm_r3 = 3 ,
  arm_r4 = 4 , arm_r5 = 5 , arm_r6 = 6 , arm_r7 = 7 ,
  arm_r8 = 8 , arm_r9 = 9 , arm_r10 = 10 , arm_r11 = 11 ,
  arm_r12 = 12 , arm_sp = 13 , arm_lr = 14 , arm_pc = 15 ,
  arm_d0 = 256 , arm_d1 = 257 , arm_d2 = 258 , arm_d3 = 259 ,
  arm_d4 = 260 , arm_d5 = 261 , arm_d6 = 262 , arm_d7 = 263 ,
  arm_d8 = 264 , arm_d9 = 265 , arm_d10 = 266 , arm_d11 = 267 ,
  arm_d12 = 268 , arm_d13 = 269 , arm_d14 = 270
}
 

Functions

 lldb_private::FLAGS_ANONYMOUS_ENUM ()
 
uint32_t translate_to_eh_frame_regnum_x86_64 (uint32_t unwind_regno)
 
uint32_t translate_to_eh_frame_regnum_i386 (uint32_t unwind_regno)
 

Macro Definition Documentation

◆ EXTRACT_BITS

#define EXTRACT_BITS (   value,
  mask 
)
Value:
((value >> llvm::countr_zero(static_cast<uint32_t>(mask))) & \
(((1 << llvm::popcount(static_cast<uint32_t>(mask)))) - 1))

Definition at line 157 of file CompactUnwindInfo.cpp.

◆ UNWIND_INFO_COMPRESSED_ENTRY_ENCODING_INDEX

#define UNWIND_INFO_COMPRESSED_ENTRY_ENCODING_INDEX (   entry)     ((entry >> 24) & 0xFF)

Definition at line 153 of file CompactUnwindInfo.cpp.

◆ UNWIND_INFO_COMPRESSED_ENTRY_FUNC_OFFSET

#define UNWIND_INFO_COMPRESSED_ENTRY_FUNC_OFFSET (   entry)    (entry & 0x00FFFFFF)

Definition at line 149 of file CompactUnwindInfo.cpp.

◆ UNWIND_SECOND_LEVEL_COMPRESSED

#define UNWIND_SECOND_LEVEL_COMPRESSED   3

Definition at line 145 of file CompactUnwindInfo.cpp.

◆ UNWIND_SECOND_LEVEL_REGULAR

#define UNWIND_SECOND_LEVEL_REGULAR   2

Definition at line 141 of file CompactUnwindInfo.cpp.

Enumeration Type Documentation

◆ arm64_eh_regnum

Enumerator
x19 
x20 
x21 
x22 
x23 
x24 
x25 
x26 
x27 
x28 
fp 
ra 
sp 
pc 
v8 
v9 
v10 
v11 
v12 
v13 
v14 
v15 

Definition at line 1235 of file CompactUnwindInfo.cpp.

◆ arm_eh_regnum

Enumerator
arm_r0 
arm_r1 
arm_r2 
arm_r3 
arm_r4 
arm_r5 
arm_r6 
arm_r7 
arm_r8 
arm_r9 
arm_r10 
arm_r11 
arm_r12 
arm_sp 
arm_lr 
arm_pc 
arm_d0 
arm_d1 
arm_d2 
arm_d3 
arm_d4 
arm_d5 
arm_d6 
arm_d7 
arm_d8 
arm_d9 
arm_d10 
arm_d11 
arm_d12 
arm_d13 
arm_d14 

Definition at line 1267 of file CompactUnwindInfo.cpp.

◆ i386_eh_regnum

Enumerator
eax 
ecx 
edx 
ebx 
ebp 
esp 
esi 
edi 
eip 

Definition at line 972 of file CompactUnwindInfo.cpp.

◆ x86_64_eh_regnum

Enumerator
rax 
rdx 
rcx 
rbx 
rsi 
rdi 
rbp 
rsp 
r8 
r9 
r10 
r11 
r12 
r13 
r14 
r15 
rip 

Definition at line 692 of file CompactUnwindInfo.cpp.

Function Documentation

◆ translate_to_eh_frame_regnum_i386()

uint32_t translate_to_eh_frame_regnum_i386 ( uint32_t  unwind_regno)

◆ translate_to_eh_frame_regnum_x86_64()

uint32_t translate_to_eh_frame_regnum_x86_64 ( uint32_t  unwind_regno)