GDB (xrefs)

aarch64-linux.h
Go to the documentation of this file.
1 /* Copyright (C) 2009-2018 Free Software Foundation, Inc.
2 Contributed by ARM Ltd.
3
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19 #ifndef AARCH64_LINUX_H
20 #define AARCH64_LINUX_H 1
21
22 #include <signal.h>
23
24 /* Defines ps_err_e, struct ps_prochandle. */
25 #include "gdb_proc_service.h"
26
27 typedef int compat_int_t;
28 typedef unsigned int compat_uptr_t;
29
30 typedef int compat_time_t;
31 typedef int compat_timer_t;
32 typedef int compat_clock_t;
33
34 struct compat_timeval
35 {
36 compat_time_t tv_sec;
37 int tv_usec;
38 };
39
40 typedef union compat_sigval
41 {
42 compat_int_t sival_int;
43 compat_uptr_t sival_ptr;
44 } compat_sigval_t;
45
46 typedef struct compat_siginfo
47 {
48 int si_signo;
49 int si_errno;
50 int si_code;
51
52 union
53 {
54 int _pad[((128 / sizeof (int)) - 3)];
55
56 /* kill() */
57 struct
58 {
59 unsigned int _pid;
60 unsigned int _uid;
61 } _kill;
62
63 /* POSIX.1b timers */
64 struct
65 {
66 compat_timer_t _tid;
67 int _overrun;
68 compat_sigval_t _sigval;
69 } _timer;
70
71 /* POSIX.1b signals */
72 struct
73 {
74 unsigned int _pid;
75 unsigned int _uid;
76 compat_sigval_t _sigval;
77 } _rt;
78
79 /* SIGCHLD */
80 struct
81 {
82 unsigned int _pid;
83 unsigned int _uid;
84 int _status;
85 compat_clock_t _utime;
86 compat_clock_t _stime;
87 } _sigchld;
88
89 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
90 struct
91 {
92 unsigned int _addr;
93 } _sigfault;
94
95 /* SIGPOLL */
96 struct
97 {
98 int _band;
99 int _fd;
100 } _sigpoll;
101 } _sifields;
102 } compat_siginfo_t;
103
104 #define cpt_si_pid _sifields._kill._pid
105 #define cpt_si_uid _sifields._kill._uid
106 #define cpt_si_timerid _sifields._timer._tid
107 #define cpt_si_overrun _sifields._timer._overrun
108 #define cpt_si_status _sifields._sigchld._status
109 #define cpt_si_utime _sifields._sigchld._utime
110 #define cpt_si_stime _sifields._sigchld._stime
111 #define cpt_si_ptr _sifields._rt._sigval.sival_ptr
112 #define cpt_si_addr _sifields._sigfault._addr
113 #define cpt_si_band _sifields._sigpoll._band
114 #define cpt_si_fd _sifields._sigpoll._fd
115
116 void aarch64_siginfo_from_compat_siginfo (siginfo_t *to,
117 compat_siginfo_t *from);
118 void aarch64_compat_siginfo_from_siginfo (compat_siginfo_t *to,
119 siginfo_t *from);
120
121 void aarch64_linux_prepare_to_resume (struct lwp_info *lwp);
122
123 void aarch64_linux_new_thread (struct lwp_info *lwp);
124
125 /* Function to call when a thread is being deleted. */
126 void aarch64_linux_delete_thread (struct arch_lwp_info *arch_lwp);
127
128 ps_err_e aarch64_ps_get_thread_area (struct ps_prochandle *ph,
129 lwpid_t lwpid, int idx, void **base,
130 int is_64bit_p);
131
132 #endif /* AARCH64_LINUX_H */
lwpid_t
unsigned int lwpid_t
Definition: gdb_proc_service.h:80
compat_sigval_t
union compat_sigval compat_sigval_t
compat_siginfo::_fd
int _fd
Definition: aarch64-linux.h:99
compat_time_t
int compat_time_t
Definition: aarch64-linux.h:30
lwp_info
Definition: linux-nat.h:30
compat_siginfo::_overrun
int _overrun
Definition: aarch64-linux.h:67
ps_prochandle
Definition: gdb_proc_service.h:179
aarch64_siginfo_from_compat_siginfo
void aarch64_siginfo_from_compat_siginfo(siginfo_t *to, compat_siginfo_t *from)
Definition: aarch64-linux.c:157
compat_int_t
int compat_int_t
Definition: aarch64-linux.h:27
ps_err_e
ps_err_e
Definition: gdb_proc_service.h:68
compat_siginfo::_addr
unsigned int _addr
Definition: aarch64-linux.h:92
compat_siginfo::_sigfault
struct compat_siginfo::@102::@107 _sigfault
gdb_proc_service.h
aarch64_linux_new_thread
void aarch64_linux_new_thread(struct lwp_info *lwp)
Definition: aarch64-linux.c:74
aarch64_linux_prepare_to_resume
void aarch64_linux_prepare_to_resume(struct lwp_info *lwp)
Definition: aarch64-linux.c:34
aarch64_ps_get_thread_area
ps_err_e aarch64_ps_get_thread_area(struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base, int is_64bit_p)
Definition: aarch64-linux.c:216
compat_sigval::sival_ptr
compat_uptr_t sival_ptr
Definition: aarch64-linux.h:43
compat_siginfo::_pid
unsigned int _pid
Definition: aarch64-linux.h:59
compat_siginfo::_rt
struct compat_siginfo::@102::@105 _rt
compat_siginfo::_band
int _band
Definition: aarch64-linux.h:98
arch_lwp_info
Definition: arm-linux-nat.c:731
compat_siginfo::_pad
int _pad[((128/sizeof(int)) - 3)]
Definition: aarch64-linux.h:54
compat_sigval
Definition: aarch64-linux.h:40
compat_sigval::sival_int
compat_int_t sival_int
Definition: aarch64-linux.h:42
compat_siginfo::_sigval
compat_sigval_t _sigval
Definition: aarch64-linux.h:68
compat_siginfo::_uid
unsigned int _uid
Definition: aarch64-linux.h:60
compat_siginfo::_sigpoll
struct compat_siginfo::@102::@108 _sigpoll
compat_clock_t
int compat_clock_t
Definition: aarch64-linux.h:32
compat_siginfo::si_code
int si_code
Definition: aarch64-linux.h:50
compat_siginfo_t
struct compat_siginfo compat_siginfo_t
compat_siginfo::_stime
compat_clock_t _stime
Definition: aarch64-linux.h:86
compat_siginfo::si_signo
int si_signo
Definition: aarch64-linux.h:48
compat_timer_t
int compat_timer_t
Definition: aarch64-linux.h:31
compat_siginfo::_timer
struct compat_siginfo::@102::@104 _timer
compat_siginfo::_status
int _status
Definition: aarch64-linux.h:84
compat_siginfo::_sifields
union compat_siginfo::@102 _sifields
aarch64_compat_siginfo_from_siginfo
void aarch64_compat_siginfo_from_siginfo(compat_siginfo_t *to, siginfo_t *from)
Definition: aarch64-linux.c:99
compat_siginfo::_utime
compat_clock_t _utime
Definition: aarch64-linux.h:85
compat_siginfo::_tid
compat_timer_t _tid
Definition: aarch64-linux.h:66
compat_timeval::tv_sec
compat_time_t tv_sec
Definition: aarch64-linux.h:36
selftests::ptid::lwp
static constexpr ptid_t lwp
Definition: ptid-selftests.c:42
aarch64_linux_delete_thread
void aarch64_linux_delete_thread(struct arch_lwp_info *arch_lwp)
Definition: aarch64-linux.c:90
compat_timeval::tv_usec
int tv_usec
Definition: aarch64-linux.h:37
compat_timeval
Definition: aarch64-linux.h:34
compat_siginfo::_kill
struct compat_siginfo::@102::@103 _kill
compat_siginfo::si_errno
int si_errno
Definition: aarch64-linux.h:49
compat_siginfo
Definition: aarch64-linux.h:46
compat_siginfo::_sigchld
struct compat_siginfo::@102::@106 _sigchld
compat_uptr_t
unsigned int compat_uptr_t
Definition: aarch64-linux.h:28