GDBserver

Classes | Macros | Typedefs | Functions
amd64-linux-siginfo.c File Reference
`#include <signal.h>`
`#include "common-defs.h"`
`#include "amd64-linux-siginfo.h"`

Go to the source code of this file.

## Classes
union | nat_sigval
struct | nat_siginfo
struct | compat_timeval
union | compat_sigval
struct | compat_siginfo

## Macros
#define | GDB_SI_SIZE 128
#define | cpt_si_pid _sifields._kill._pid
#define | cpt_si_uid _sifields._kill._uid
#define | cpt_si_timerid _sifields._timer._tid
#define | cpt_si_overrun _sifields._timer._overrun
#define | cpt_si_status _sifields._sigchld._status
#define | cpt_si_utime _sifields._sigchld._utime
#define | cpt_si_stime _sifields._sigchld._stime
#define | cpt_si_ptr _sifields._rt._sigval.sival_ptr
#define | cpt_si_addr _sifields._sigfault._addr
#define | cpt_si_addr_lsb _sifields._sigfault._addr_lsb
#define | cpt_si_band _sifields._sigpoll._band
#define | cpt_si_fd _sifields._sigpoll._fd
#define | si_timerid si_timer1
#define | si_overrun si_timer2

## Typedefs
typedef int | nat_int_t
typedef unsigned long | nat_uptr_t
typedef int | nat_time_t
typedef int | nat_timer_t
typedef long | nat_clock_t
typedef union nat_sigval | nat_sigval_t
typedef struct nat_siginfo | nat_siginfo_t
typedef int | compat_int_t
typedef unsigned int | compat_uptr_t
typedef int | compat_time_t
typedef int | compat_timer_t
typedef int | compat_clock_t
typedef union compat_sigval | compat_sigval_t
typedef struct compat_siginfo | compat_siginfo_t
typedef long | __attribute__((__aligned__(4)))
typedef nat_siginfo_t | ptrace_siginfo_t

## Functions
compat_x32_siginfo_t | __attribute__ ((__aligned__(8)))
static void | compat_siginfo_from_siginfo (compat_siginfo_t *to, const siginfo_t *from)
static void | siginfo_from_compat_siginfo (siginfo_t *to, const compat_siginfo_t *from)
static void | compat_x32_siginfo_from_siginfo (compat_x32_siginfo_t *to, const siginfo_t *from)
static void | siginfo_from_compat_x32_siginfo (siginfo_t *to, const compat_x32_siginfo_t *from)
int | amd64_linux_siginfo_fixup_common (siginfo_t *ptrace, gdb_byte *inf, int direction, enum amd64_siginfo_fixup_mode mode)
| gdb_static_assert (sizeof(siginfo_t)==GDB_SI_SIZE)
| gdb_static_assert (sizeof(nat_siginfo_t)==GDB_SI_SIZE)
| gdb_static_assert (sizeof(compat_x32_siginfo_t)==GDB_SI_SIZE)
| gdb_static_assert (sizeof(compat_siginfo_t)==GDB_SI_SIZE)

## Macro Definition Documentation

## ◆ cpt_si_addr

#define cpt_si_addr _sifields._sigfault._addr

Definition at line 278 of file amd64-linux-siginfo.c.

## ◆ cpt_si_addr_lsb

#define cpt_si_addr_lsb _sifields._sigfault._addr_lsb

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

## ◆ cpt_si_band

#define cpt_si_band _sifields._sigpoll._band

Definition at line 280 of file amd64-linux-siginfo.c.

## ◆ cpt_si_fd

#define cpt_si_fd _sifields._sigpoll._fd

Definition at line 281 of file amd64-linux-siginfo.c.

## ◆ cpt_si_overrun

#define cpt_si_overrun _sifields._timer._overrun

Definition at line 273 of file amd64-linux-siginfo.c.

## ◆ cpt_si_pid

#define cpt_si_pid _sifields._kill._pid

Definition at line 270 of file amd64-linux-siginfo.c.

## ◆ cpt_si_ptr

#define cpt_si_ptr _sifields._rt._sigval.sival_ptr

Definition at line 277 of file amd64-linux-siginfo.c.

## ◆ cpt_si_status

#define cpt_si_status _sifields._sigchld._status

Definition at line 274 of file amd64-linux-siginfo.c.

## ◆ cpt_si_stime

#define cpt_si_stime _sifields._sigchld._stime

Definition at line 276 of file amd64-linux-siginfo.c.

## ◆ cpt_si_timerid

#define cpt_si_timerid _sifields._timer._tid

Definition at line 272 of file amd64-linux-siginfo.c.

## ◆ cpt_si_uid

#define cpt_si_uid _sifields._kill._uid

Definition at line 271 of file amd64-linux-siginfo.c.

## ◆ cpt_si_utime

#define cpt_si_utime _sifields._sigchld._utime

Definition at line 275 of file amd64-linux-siginfo.c.

## ◆ GDB_SI_SIZE

#define GDB_SI_SIZE 128

Definition at line 24 of file amd64-linux-siginfo.c.

## ◆ si_overrun

#define si_overrun si_timer2

Definition at line 290 of file amd64-linux-siginfo.c.

## ◆ si_timerid

#define si_timerid si_timer1

Definition at line 287 of file amd64-linux-siginfo.c.

## Typedef Documentation

## ◆ __attribute__

struct mips64_watch_regs __attribute__ | ( | (__aligned__(4)) |  | ) |

Definition at line 207 of file amd64-linux-siginfo.c.

## ◆ compat_clock_t

typedef int compat_clock_t

Definition at line 128 of file amd64-linux-siginfo.c.

## ◆ compat_int_t

typedef int compat_int_t

Definition at line 123 of file amd64-linux-siginfo.c.

## ◆ compat_siginfo_t

typedef struct compat_siginfo compat_siginfo_t

## ◆ compat_sigval_t

typedef union compat_sigval compat_sigval_t

## ◆ compat_time_t

typedef int compat_time_t

Definition at line 126 of file amd64-linux-siginfo.c.

## ◆ compat_timer_t

typedef int compat_timer_t

Definition at line 127 of file amd64-linux-siginfo.c.

## ◆ compat_uptr_t

typedef unsigned int compat_uptr_t

Definition at line 124 of file amd64-linux-siginfo.c.

## ◆ nat_clock_t

typedef long nat_clock_t

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

## ◆ nat_int_t

typedef int nat_int_t

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

## ◆ nat_siginfo_t

typedef struct nat_siginfo nat_siginfo_t

## ◆ nat_sigval_t

typedef union nat_sigval nat_sigval_t

## ◆ nat_time_t

typedef int nat_time_t

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

## ◆ nat_timer_t

typedef int nat_timer_t

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

## ◆ nat_uptr_t

typedef unsigned long nat_uptr_t

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

## ◆ ptrace_siginfo_t

typedef nat_siginfo_t ptrace_siginfo_t

Definition at line 299 of file amd64-linux-siginfo.c.

## Function Documentation

## ◆ __attribute__()

compat_x32_siginfo_t __attribute__ | ( | (__aligned__(8)) |  | ) |

## ◆ amd64_linux_siginfo_fixup_common()

int amd64_linux_siginfo_fixup_common | ( | siginfo_t * | ptrace,
|  | gdb_byte * | inf,
|  | int | direction,
|  | enum amd64_siginfo_fixup_mode | mode
| ) |  |

Definition at line 561 of file amd64-linux-siginfo.c.

References compat_siginfo_from_siginfo(), compat_x32_siginfo_from_siginfo(), FIXUP_32, FIXUP_X32, ptrace(), siginfo_from_compat_siginfo(), and siginfo_from_compat_x32_siginfo().

Referenced by x86_siginfo_fixup().

## ◆ compat_siginfo_from_siginfo()

static void compat_siginfo_from_siginfo | ( | compat_siginfo_t * | to,
|  | const siginfo_t * | from
| ) |  |
| static

Definition at line 305 of file amd64-linux-siginfo.c.

References memset(), compat_siginfo::si_code, nat_siginfo::si_code, compat_siginfo::si_errno, nat_siginfo::si_errno, compat_siginfo::si_signo, and nat_siginfo::si_signo.

Referenced by amd64_linux_siginfo_fixup_common().

## ◆ compat_x32_siginfo_from_siginfo()

static void compat_x32_siginfo_from_siginfo | ( | compat_x32_siginfo_t * | to,
|  | const siginfo_t * | from
| ) |  |
| static

Definition at line 428 of file amd64-linux-siginfo.c.

References memset(), nat_siginfo::si_code, nat_siginfo::si_errno, and nat_siginfo::si_signo.

Referenced by amd64_linux_siginfo_fixup_common().

## ◆ gdb_static_assert() [1/4]

gdb_static_assert | ( | sizeof(siginfo_t) | = `=GDB_SI_SIZE` | ) |

## ◆ gdb_static_assert() [2/4]

gdb_static_assert | ( | sizeof(nat_siginfo_t) | = `=GDB_SI_SIZE` | ) |

## ◆ gdb_static_assert() [3/4]

gdb_static_assert | ( | sizeof(compat_x32_siginfo_t) | = `=GDB_SI_SIZE` | ) |

## ◆ gdb_static_assert() [4/4]

gdb_static_assert | ( | sizeof(compat_siginfo_t) | = `=GDB_SI_SIZE` | ) |

## ◆ siginfo_from_compat_siginfo()

static void siginfo_from_compat_siginfo | ( | siginfo_t * | to,
|  | const compat_siginfo_t * | from
| ) |  |
| static

Definition at line 366 of file amd64-linux-siginfo.c.

References memset(), compat_siginfo::si_code, nat_siginfo::si_code, compat_siginfo::si_errno, nat_siginfo::si_errno, compat_siginfo::si_signo, and nat_siginfo::si_signo.

Referenced by amd64_linux_siginfo_fixup_common().

## ◆ siginfo_from_compat_x32_siginfo()

static void siginfo_from_compat_x32_siginfo | ( | siginfo_t * | to,
|  | const compat_x32_siginfo_t * | from
| ) |  |
| static

Definition at line 494 of file amd64-linux-siginfo.c.

References memset(), nat_siginfo::si_code, nat_siginfo::si_errno, and nat_siginfo::si_signo.

Referenced by amd64_linux_siginfo_fixup_common().