GDBserver

Macros | Enumerations | Functions | Variables
linux-i386-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 | i386_num_regs 16
#define | FT_CR_EAX 15
#define | FT_CR_ECX 14
#define | FT_CR_EDX 13
#define | FT_CR_EBX 12
#define | FT_CR_UESP 11
#define | FT_CR_EBP 10
#define | FT_CR_ESI 9
#define | FT_CR_EDI 8
#define | FT_CR_EIP 7
#define | FT_CR_EFL 6
#define | FT_CR_DS 5
#define | FT_CR_ES 4
#define | FT_CR_FS 3
#define | FT_CR_GS 2
#define | FT_CR_SS 1
#define | FT_CR_CS 0

## Enumerations
enum | i386_gdb_regnum { I386_EAX_REGNUM, I386_ECX_REGNUM, I386_EDX_REGNUM, I386_EBX_REGNUM, I386_ESP_REGNUM, I386_EBP_REGNUM, I386_ESI_REGNUM, I386_EDI_REGNUM, I386_EIP_REGNUM, I386_EFLAGS_REGNUM, I386_CS_REGNUM, I386_SS_REGNUM, I386_DS_REGNUM, I386_ES_REGNUM, I386_FS_REGNUM, I386_GS_REGNUM, I386_ST0_REGNUM }

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

## Variables
static const int | i386_ft_collect_regmap []
const char * | gdbserver_xmltarget
static uint64_t | idx2mask [X86_TDESC_LAST]

## Macro Definition Documentation

## ◆ FT_CR_CS

#define FT_CR_CS 0

Definition at line 67 of file linux-i386-ipa.c.

## ◆ FT_CR_DS

#define FT_CR_DS 5

Definition at line 62 of file linux-i386-ipa.c.

## ◆ FT_CR_EAX

#define FT_CR_EAX 15

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

## ◆ FT_CR_EBP

#define FT_CR_EBP 10

Definition at line 57 of file linux-i386-ipa.c.

## ◆ FT_CR_EBX

#define FT_CR_EBX 12

Definition at line 55 of file linux-i386-ipa.c.

## ◆ FT_CR_ECX

#define FT_CR_ECX 14

Definition at line 53 of file linux-i386-ipa.c.

## ◆ FT_CR_EDI

#define FT_CR_EDI 8

Definition at line 59 of file linux-i386-ipa.c.

## ◆ FT_CR_EDX

#define FT_CR_EDX 13

Definition at line 54 of file linux-i386-ipa.c.

## ◆ FT_CR_EFL

#define FT_CR_EFL 6

Definition at line 61 of file linux-i386-ipa.c.

## ◆ FT_CR_EIP

#define FT_CR_EIP 7

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

## ◆ FT_CR_ES

#define FT_CR_ES 4

Definition at line 63 of file linux-i386-ipa.c.

## ◆ FT_CR_ESI

#define FT_CR_ESI 9

Definition at line 58 of file linux-i386-ipa.c.

## ◆ FT_CR_FS

#define FT_CR_FS 3

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

## ◆ FT_CR_GS

#define FT_CR_GS 2

Definition at line 65 of file linux-i386-ipa.c.

## ◆ FT_CR_SS

#define FT_CR_SS 1

Definition at line 66 of file linux-i386-ipa.c.

## ◆ FT_CR_UESP

#define FT_CR_UESP 11

Definition at line 56 of file linux-i386-ipa.c.

## ◆ i386_num_regs

#define i386_num_regs 16

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

Referenced by get_raw_reg(), and supply_fast_tracepoint_registers().

## Enumeration Type Documentation

## ◆ i386_gdb_regnum

enum i386_gdb_regnum

Enumerator
I386_EAX_REGNUM |
I386_ECX_REGNUM |
I386_EDX_REGNUM |
I386_EBX_REGNUM |
I386_ESP_REGNUM |
I386_EBP_REGNUM |
I386_ESI_REGNUM |
I386_EDI_REGNUM |
I386_EIP_REGNUM |
I386_EFLAGS_REGNUM |
I386_CS_REGNUM |
I386_SS_REGNUM |
I386_DS_REGNUM |
I386_ES_REGNUM |
I386_FS_REGNUM |
I386_GS_REGNUM |
I386_ST0_REGNUM |

Definition at line 29 of file linux-i386-ipa.c.

## Function Documentation

## ◆ alloc_jump_pad_buffer()

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

Definition at line 277 of file linux-i386-ipa.c.

## ◆ get_ipa_tdesc()

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

Definition at line 263 of file linux-i386-ipa.c.

References i386_linux_read_description(), idx2mask, internal_error(), and X86_TDESC_LAST.

## ◆ get_raw_reg()

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

Definition at line 100 of file linux-i386-ipa.c.

References I386_CS_REGNUM, i386_ft_collect_regmap, I386_GS_REGNUM, and i386_num_regs.

## ◆ initialize_fast_tracepoint_trampoline_buffer()

static void initialize_fast_tracepoint_trampoline_buffer | ( | void |  | ) |
| static

Definition at line 199 of file linux-i386-ipa.c.

References errno, IPA_BUFSIZ, and strerror().

Referenced by initialize_low_tracepoint().

## ◆ initialize_low_tracepoint()

void initialize_low_tracepoint | ( | void |  | ) |

Definition at line 289 of file linux-i386-ipa.c.

References i386_linux_read_description(), idx2mask, initialize_fast_tracepoint_trampoline_buffer(), and X86_TDESC_LAST.

## ◆ supply_fast_tracepoint_registers()

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

Definition at line 81 of file linux-i386-ipa.c.

References I386_CS_REGNUM, i386_ft_collect_regmap, I386_GS_REGNUM, i386_num_regs, and supply_register().

## Variable Documentation

## ◆ gdbserver_xmltarget

const char* gdbserver_xmltarget

Definition at line 193 of file linux-i386-ipa.c.

## ◆ i386_ft_collect_regmap

const int i386_ft_collect_regmap[]
| static

Initial value:
=
{
FT_CR_EAX * 4, FT_CR_ECX * 4, FT_CR_EDX * 4, FT_CR_EBX * 4,
FT_CR_UESP * 4, FT_CR_EBP * 4, FT_CR_ESI * 4, FT_CR_EDI * 4,
FT_CR_EIP * 4, FT_CR_EFL * 4, FT_CR_CS * 4, FT_CR_SS * 4,
FT_CR_DS * 4, FT_CR_ES * 4, FT_CR_FS * 4, FT_CR_GS * 4
}
FT_CR_EBP
#define FT_CR_EBP
Definition: linux-i386-ipa.c:57
FT_CR_ECX
#define FT_CR_ECX
Definition: linux-i386-ipa.c:53
FT_CR_GS
#define FT_CR_GS
Definition: linux-i386-ipa.c:65
FT_CR_EIP
#define FT_CR_EIP
Definition: linux-i386-ipa.c:60
FT_CR_ESI
#define FT_CR_ESI
Definition: linux-i386-ipa.c:58
FT_CR_SS
#define FT_CR_SS
Definition: linux-i386-ipa.c:66
FT_CR_EFL
#define FT_CR_EFL
Definition: linux-i386-ipa.c:61
FT_CR_FS
#define FT_CR_FS
Definition: linux-i386-ipa.c:64
FT_CR_CS
#define FT_CR_CS
Definition: linux-i386-ipa.c:67
FT_CR_EBX
#define FT_CR_EBX
Definition: linux-i386-ipa.c:55
FT_CR_EDI
#define FT_CR_EDI
Definition: linux-i386-ipa.c:59
FT_CR_DS
#define FT_CR_DS
Definition: linux-i386-ipa.c:62
FT_CR_EDX
#define FT_CR_EDX
Definition: linux-i386-ipa.c:54
FT_CR_UESP
#define FT_CR_UESP
Definition: linux-i386-ipa.c:56
FT_CR_EAX
#define FT_CR_EAX
Definition: linux-i386-ipa.c:52
FT_CR_ES
#define FT_CR_ES
Definition: linux-i386-ipa.c:63

Definition at line 72 of file linux-i386-ipa.c.

Referenced by get_raw_reg(), and supply_fast_tracepoint_registers().

## ◆ 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 249 of file linux-i386-ipa.c.

Referenced by get_ipa_tdesc(), and initialize_low_tracepoint().