LLVM  6.0.0svn
Classes | Macros | Enumerations | Functions | Variables
DWARFDebugFrame.cpp File Reference
#include "llvm/DebugInfo/DWARF/DWARFDebugFrame.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DataExtractor.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cinttypes>
#include <cstdint>
#include <string>
#include <vector>
Include dependency graph for DWARFDebugFrame.cpp:

Go to the source code of this file.

Classes

class  llvm::FrameEntry
 Abstract frame entry defining the common interface concrete entries implement. More...
 
struct  llvm::FrameEntry::Instruction
 

Macros

#define DECLARE_OP2(OP, OPTYPE0, OPTYPE1)
 
#define DECLARE_OP1(OP, OPTYPE0)   DECLARE_OP2(OP, OPTYPE0, OT_None)
 
#define DECLARE_OP0(OP)   DECLARE_OP1(OP, OT_None)
 

Enumerations

enum  OperandType
 Types of operands to CF instructions. More...
 

Functions

static ArrayRef< OperandType[2]> getOperandTypes ()
 Initialize the array describing the types of operands. More...
 
static void printOperand (raw_ostream &OS, uint8_t Opcode, unsigned OperandIdx, uint64_t Operand, uint64_t CodeAlignmentFactor, int64_t DataAlignmentFactor)
 Print Opcode's operand number OperandIdx which has value Operand. More...
 
static void LLVM_ATTRIBUTE_UNUSED dumpDataAux (DataExtractor Data, uint32_t Offset, int Length)
 
static unsigned getSizeForEncoding (const DataExtractor &Data, unsigned symbolEncoding)
 
static uint64_t readPointer (const DataExtractor &Data, uint32_t &Offset, unsigned Encoding)
 
static void LLVM_ATTRIBUTE_NORETURN ReportError (uint32_t StartOffset, const char *ErrorMsg)
 

Variables

const uint8_t DWARF_CFI_PRIMARY_OPCODE_MASK = 0xc0
 
const uint8_t DWARF_CFI_PRIMARY_OPERAND_MASK = 0x3f
 
static ArrayRef< OperandType[2]> OpTypes = getOperandTypes()
 

Macro Definition Documentation

◆ DECLARE_OP0

#define DECLARE_OP0 (   OP)    DECLARE_OP1(OP, OT_None)

Referenced by getOperandTypes().

◆ DECLARE_OP1

#define DECLARE_OP1 (   OP,
  OPTYPE0 
)    DECLARE_OP2(OP, OPTYPE0, OT_None)

Referenced by getOperandTypes().

◆ DECLARE_OP2

#define DECLARE_OP2 (   OP,
  OPTYPE0,
  OPTYPE1 
)
Value:
do { \
OpTypes[OP][0] = OPTYPE0; \
OpTypes[OP][1] = OPTYPE1; \
} while (false)
#define OP(n)
Definition: regex2.h:73

Referenced by getOperandTypes().

Enumeration Type Documentation

◆ OperandType

Types of operands to CF instructions.

Definition at line 336 of file DWARFDebugFrame.cpp.

Function Documentation

◆ dumpDataAux()

static void LLVM_ATTRIBUTE_UNUSED dumpDataAux ( DataExtractor  Data,
uint32_t  Offset,
int  Length 
)
static

◆ getOperandTypes()

static ArrayRef<OperandType[2]> getOperandTypes ( )
static

Initialize the array describing the types of operands.

Definition at line 351 of file DWARFDebugFrame.cpp.

References DECLARE_OP0, DECLARE_OP1, DECLARE_OP2, and OpTypes.

◆ getSizeForEncoding()

static unsigned getSizeForEncoding ( const DataExtractor Data,
unsigned  symbolEncoding 
)
static

◆ printOperand()

static void printOperand ( raw_ostream OS,
uint8_t  Opcode,
unsigned  OperandIdx,
uint64_t  Operand,
uint64_t  CodeAlignmentFactor,
int64_t  DataAlignmentFactor 
)
static

Print Opcode's operand number OperandIdx which has value Operand.

Definition at line 403 of file DWARFDebugFrame.cpp.

References assert(), llvm::dwarf::CallFrameString(), and llvm::format().

Referenced by llvm::FrameEntry::dumpInstructions().

◆ readPointer()

static uint64_t readPointer ( const DataExtractor Data,
uint32_t Offset,
unsigned  Encoding 
)
static

◆ ReportError()

static void LLVM_ATTRIBUTE_NORETURN ReportError ( uint32_t  StartOffset,
const char ErrorMsg 
)
static

Variable Documentation

◆ DWARF_CFI_PRIMARY_OPCODE_MASK

const uint8_t DWARF_CFI_PRIMARY_OPCODE_MASK = 0xc0

◆ DWARF_CFI_PRIMARY_OPERAND_MASK

const uint8_t DWARF_CFI_PRIMARY_OPERAND_MASK = 0x3f

Definition at line 111 of file DWARFDebugFrame.cpp.

Referenced by llvm::FrameEntry::parseInstructions().

◆ OpTypes

ArrayRef<OperandType[2]> OpTypes = getOperandTypes()
static

Definition at line 399 of file DWARFDebugFrame.cpp.

Referenced by getOperandTypes().