GDBserver

Macros | Functions | Variables
linux-amd64-ipa.c File Reference
`#include "server.h"`
`#include <sys/mman.h>`
`#include "tracepoint.h"`
`#include "linux-x86-tdesc.h"`
`#include "common/x86-xstate.h"`

Go to the source code of this file.

## Macros
#define | FT_CR_RIP 0
#define | FT_CR_EFLAGS 1
#define | FT_CR_R8 2
#define | FT_CR_R9 3
#define | FT_CR_R10 4
#define | FT_CR_R11 5
#define | FT_CR_R12 6
#define | FT_CR_R13 7
#define | FT_CR_R14 8
#define | FT_CR_R15 9
#define | FT_CR_RAX 10
#define | FT_CR_RBX 11
#define | FT_CR_RCX 12
#define | FT_CR_RDX 13
#define | FT_CR_RSI 14
#define | FT_CR_RDI 15
#define | FT_CR_RBP 16
#define | FT_CR_RSP 17
#define | X86_64_NUM_FT_COLLECT_GREGS (sizeof (x86_64_ft_collect_regmap) / sizeof(x86_64_ft_collect_regmap[0]))

## Functions
void | init_registers_amd64_linux (void)
void | supply_fast_tracepoint_registers (struct regcache *regcache, const unsigned char *buf)
ULONGEST | get_raw_reg (const unsigned char *raw_regs, int regnum)
const struct target_desc * | get_ipa_tdesc (int idx)
void * | alloc_jump_pad_buffer (size_t size)
void | initialize_low_tracepoint (void)

## Variables
const struct target_desc * | tdesc_amd64_linux
static const int | x86_64_ft_collect_regmap []
static uint64_t | idx2mask [X86_TDESC_LAST]

## Macro Definition Documentation

## ◆ FT_CR_EFLAGS

#define FT_CR_EFLAGS 1

Definition at line 34 of file linux-amd64-ipa.c.

## ◆ FT_CR_R10

#define FT_CR_R10 4

Definition at line 37 of file linux-amd64-ipa.c.

## ◆ FT_CR_R11

#define FT_CR_R11 5

Definition at line 38 of file linux-amd64-ipa.c.

## ◆ FT_CR_R12

#define FT_CR_R12 6

Definition at line 39 of file linux-amd64-ipa.c.

## ◆ FT_CR_R13

#define FT_CR_R13 7

Definition at line 40 of file linux-amd64-ipa.c.

## ◆ FT_CR_R14

#define FT_CR_R14 8

Definition at line 41 of file linux-amd64-ipa.c.

## ◆ FT_CR_R15

#define FT_CR_R15 9

Definition at line 42 of file linux-amd64-ipa.c.

## ◆ FT_CR_R8

#define FT_CR_R8 2

Definition at line 35 of file linux-amd64-ipa.c.

## ◆ FT_CR_R9

#define FT_CR_R9 3

Definition at line 36 of file linux-amd64-ipa.c.

## ◆ FT_CR_RAX

#define FT_CR_RAX 10

Definition at line 43 of file linux-amd64-ipa.c.

## ◆ FT_CR_RBP

#define FT_CR_RBP 16

Definition at line 49 of file linux-amd64-ipa.c.

## ◆ FT_CR_RBX

#define FT_CR_RBX 11

Definition at line 44 of file linux-amd64-ipa.c.

## ◆ FT_CR_RCX

#define FT_CR_RCX 12

Definition at line 45 of file linux-amd64-ipa.c.

## ◆ FT_CR_RDI

#define FT_CR_RDI 15

Definition at line 48 of file linux-amd64-ipa.c.

## ◆ FT_CR_RDX

#define FT_CR_RDX 13

Definition at line 46 of file linux-amd64-ipa.c.

## ◆ FT_CR_RIP

#define FT_CR_RIP 0

Definition at line 33 of file linux-amd64-ipa.c.

## ◆ FT_CR_RSI

#define FT_CR_RSI 14

Definition at line 47 of file linux-amd64-ipa.c.

## ◆ FT_CR_RSP

#define FT_CR_RSP 17

Definition at line 50 of file linux-amd64-ipa.c.

## ◆ X86_64_NUM_FT_COLLECT_GREGS

#define X86_64_NUM_FT_COLLECT_GREGS (sizeof (x86_64_ft_collect_regmap) / sizeof(x86_64_ft_collect_regmap[0]))

Definition at line 60 of file linux-amd64-ipa.c.

Referenced by get_raw_reg(), and supply_fast_tracepoint_registers().

## Function Documentation

## ◆ alloc_jump_pad_buffer()

void* alloc_jump_pad_buffer | ( | size_t | size | ) |

Definition at line 232 of file linux-amd64-ipa.c.

References perror_with_name().

## ◆ get_ipa_tdesc()

const struct target_desc* get_ipa_tdesc | ( | int | idx | ) |

Definition at line 189 of file linux-amd64-ipa.c.

References idx2mask, internal_error(), X86_TDESC_AVX, X86_TDESC_AVX_AVX512, X86_TDESC_LAST, X86_TDESC_SSE, X86_XSTATE_AVX_AVX512_MASK, X86_XSTATE_AVX_MASK, and X86_XSTATE_SSE_MASK.

## ◆ get_raw_reg()

ULONGEST get_raw_reg | ( | const unsigned char * | raw_regs,
|  | int | regnum
| ) |  |

Definition at line 75 of file linux-amd64-ipa.c.

References x86_64_ft_collect_regmap, and X86_64_NUM_FT_COLLECT_GREGS.

## ◆ init_registers_amd64_linux()

void init_registers_amd64_linux | ( | void |  | ) |

Referenced by initialize_low_tdesc().

## ◆ initialize_low_tracepoint()

void initialize_low_tracepoint | ( | void |  | ) |

Definition at line 279 of file linux-amd64-ipa.c.

References idx2mask, X86_TDESC_LAST, X86_XSTATE_AVX_AVX512_MASK, X86_XSTATE_AVX_MASK, and X86_XSTATE_SSE_MASK.

## ◆ supply_fast_tracepoint_registers()

void supply_fast_tracepoint_registers | ( | struct regcache * | regcache,
|  | const unsigned char * | buf
| ) |  |

Definition at line 64 of file linux-amd64-ipa.c.

References supply_register(), x86_64_ft_collect_regmap, and X86_64_NUM_FT_COLLECT_GREGS.

## Variable Documentation

## ◆ idx2mask

uint64_t idx2mask[X86_TDESC_LAST]
| static

Initial value:
= {
X86_XSTATE_X87_MASK,
X86_XSTATE_SSE_MASK,
X86_XSTATE_AVX_MASK,
X86_XSTATE_MPX_MASK,
X86_XSTATE_AVX_MPX_MASK,
X86_XSTATE_AVX_AVX512_MASK,
X86_XSTATE_AVX_MPX_AVX512_PKU_MASK,
}
X86_XSTATE_AVX_MASK
#define X86_XSTATE_AVX_MASK
Definition: x86-xstate.h:43
X86_XSTATE_SSE_MASK
#define X86_XSTATE_SSE_MASK
Definition: x86-xstate.h:42
X86_XSTATE_MPX_MASK
#define X86_XSTATE_MPX_MASK
Definition: x86-xstate.h:44
X86_XSTATE_AVX_AVX512_MASK
#define X86_XSTATE_AVX_AVX512_MASK
Definition: x86-xstate.h:46
X86_XSTATE_X87_MASK
#define X86_XSTATE_X87_MASK
Definition: x86-xstate.h:41
X86_XSTATE_AVX_MPX_MASK
#define X86_XSTATE_AVX_MPX_MASK
Definition: x86-xstate.h:45
X86_XSTATE_AVX_MPX_AVX512_PKU_MASK
#define X86_XSTATE_AVX_MPX_AVX512_PKU_MASK
Definition: x86-xstate.h:47

Definition at line 174 of file linux-amd64-ipa.c.

Referenced by get_ipa_tdesc(), and initialize_low_tracepoint().

## ◆ tdesc_amd64_linux

const struct target_desc* tdesc_amd64_linux

## ◆ x86_64_ft_collect_regmap

const int x86_64_ft_collect_regmap[]
| static

Initial value:
= {
FT_CR_RAX * 8, FT_CR_RBX * 8, FT_CR_RCX * 8, FT_CR_RDX * 8,
FT_CR_RSI * 8, FT_CR_RDI * 8, FT_CR_RBP * 8, FT_CR_RSP * 8,
FT_CR_R8 * 8, FT_CR_R9 * 8, FT_CR_R10 * 8, FT_CR_R11 * 8,
FT_CR_R12 * 8, FT_CR_R13 * 8, FT_CR_R14 * 8, FT_CR_R15 * 8,
FT_CR_RIP * 8, FT_CR_EFLAGS * 8
}
FT_CR_RSI
#define FT_CR_RSI
Definition: linux-amd64-ipa.c:47
FT_CR_EFLAGS
#define FT_CR_EFLAGS
Definition: linux-amd64-ipa.c:34
FT_CR_RDX
#define FT_CR_RDX
Definition: linux-amd64-ipa.c:46
FT_CR_RIP
#define FT_CR_RIP
Definition: linux-amd64-ipa.c:33
FT_CR_R15
#define FT_CR_R15
Definition: linux-amd64-ipa.c:42
FT_CR_R11
#define FT_CR_R11
Definition: linux-amd64-ipa.c:38
FT_CR_R10
#define FT_CR_R10
Definition: linux-amd64-ipa.c:37
FT_CR_RSP
#define FT_CR_RSP
Definition: linux-amd64-ipa.c:50
FT_CR_RCX
#define FT_CR_RCX
Definition: linux-amd64-ipa.c:45
FT_CR_R13
#define FT_CR_R13
Definition: linux-amd64-ipa.c:40
FT_CR_R8
#define FT_CR_R8
Definition: linux-amd64-ipa.c:35
FT_CR_RBX
#define FT_CR_RBX
Definition: linux-amd64-ipa.c:44
FT_CR_R12
#define FT_CR_R12
Definition: linux-amd64-ipa.c:39
FT_CR_R9
#define FT_CR_R9
Definition: linux-amd64-ipa.c:36
FT_CR_RDI
#define FT_CR_RDI
Definition: linux-amd64-ipa.c:48
FT_CR_RBP
#define FT_CR_RBP
Definition: linux-amd64-ipa.c:49
FT_CR_R14
#define FT_CR_R14
Definition: linux-amd64-ipa.c:41
FT_CR_RAX
#define FT_CR_RAX
Definition: linux-amd64-ipa.c:43

Definition at line 52 of file linux-amd64-ipa.c.

Referenced by get_raw_reg(), and supply_fast_tracepoint_registers().