Linux Perf
dwarf-regs.c File Reference
#include <stddef.h>
#include <linux/stringify.h>
#include <dwarf-regs.h>
Include dependency graph for dwarf-regs.c:

Go to the source code of this file.

Classes

struct  pt_regs_dwarfnum
 

Macros

#define REG_DWARFNUM_NAME(r, num)   {.name = r, .dwarfnum = num}
 
#define GPR_DWARFNUM_NAME(num)   {.name = __stringify(%r##num), .dwarfnum = num}
 
#define REG_DWARFNUM_END   {.name = NULL, .dwarfnum = 0}
 

Functions

const char * get_arch_regstr (unsigned int n)
 

Variables

static const struct pt_regs_dwarfnum regdwarfnum_table []
 

Macro Definition Documentation

◆ GPR_DWARFNUM_NAME

#define GPR_DWARFNUM_NAME (   num)    {.name = __stringify(%r##num), .dwarfnum = num}

Definition at line 21 of file dwarf-regs.c.

◆ REG_DWARFNUM_END

#define REG_DWARFNUM_END   {.name = NULL, .dwarfnum = 0}

Definition at line 23 of file dwarf-regs.c.

◆ REG_DWARFNUM_NAME

#define REG_DWARFNUM_NAME (   r,
  num 
)    {.name = r, .dwarfnum = num}

Definition at line 20 of file dwarf-regs.c.

Function Documentation

◆ get_arch_regstr()

const char* get_arch_regstr ( unsigned int  n)

get_arch_regstr() - lookup register name from it's DWARF register number
: the DWARF register number

get_arch_regstr() returns the name of the register in struct regdwarfnum_table from it's DWARF register number. If the register is not found in the table, this returns NULL;

Definition at line 57 of file dwarf-regs.c.

Variable Documentation

◆ regdwarfnum_table

const struct pt_regs_dwarfnum regdwarfnum_table[]
static
Initial value:

Definition at line 29 of file dwarf-regs.c.