1 /* Process record and replay target code for GNU/Linux.
3 Copyright (C) 2008-2015 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #ifndef _LINUX_RECORD_H_
21 #define _LINUX_RECORD_H_
23 struct linux_record_tdep
25 /* The size of the type that will be used in a system call. */
27 int size__old_kernel_stat
;
31 int size_oldold_utsname
;
33 int size_old_sigaction
;
34 int size_old_sigset_t
;
61 int size_fs_quota_stat
;
66 int size_TASK_COMM_LEN
;
70 int size_cap_user_data_t
;
89 int size_serial_struct
;
90 int size_serial_icounter_struct
;
91 int size_hayes_esp_config
;
95 /* The values of the second argument of system call "sys_ioctl". */
114 int ioctl_TIOCGWINSZ
;
115 int ioctl_TIOCSWINSZ
;
120 int ioctl_TIOCGSOFTCAR
;
121 int ioctl_TIOCSSOFTCAR
;
126 int ioctl_TIOCGSERIAL
;
127 int ioctl_TIOCSSERIAL
;
134 int ioctl_TIOCTTYGSTRUCT
;
143 int ioctl_TIOCSPTLCK
;
147 int ioctl_TIOCSERCONFIG
;
148 int ioctl_TIOCSERGWILD
;
149 int ioctl_TIOCSERSWILD
;
150 int ioctl_TIOCGLCKTRMIOS
;
151 int ioctl_TIOCSLCKTRMIOS
;
152 int ioctl_TIOCSERGSTRUCT
;
153 int ioctl_TIOCSERGETLSR
;
154 int ioctl_TIOCSERGETMULTI
;
155 int ioctl_TIOCSERSETMULTI
;
156 int ioctl_TIOCMIWAIT
;
157 int ioctl_TIOCGICOUNT
;
158 int ioctl_TIOCGHAYESESP
;
159 int ioctl_TIOCSHAYESESP
;
162 /* The values of the second argument of system call "sys_fcntl"
163 and "sys_fcntl64". */
167 int fcntl_F_SETLKW64
;
169 /* The number of the registers that are used as the arguments of
180 /* Enum that defines the gdb-canonical set of Linux syscall identifiers.
181 Different architectures will have different sets of syscall ids, and
182 each must provide a mapping from their set to this one. */
185 /* An unknown GDB syscall, not a real syscall. */
186 gdb_sys_no_syscall
= -1,
188 gdb_sys_restart_syscall
= 0,
204 gdb_sys_lchown16
= 16,
205 gdb_sys_ni_syscall17
= 17,
210 gdb_sys_oldumount
= 22,
211 gdb_sys_setuid16
= 23,
212 gdb_sys_getuid16
= 24,
219 gdb_sys_ni_syscall31
= 31,
220 gdb_sys_ni_syscall32
= 32,
223 gdb_sys_ni_syscall35
= 35,
232 gdb_sys_ni_syscall44
= 44,
234 gdb_sys_setgid16
= 46,
235 gdb_sys_getgid16
= 47,
237 gdb_sys_geteuid16
= 49,
238 gdb_sys_getegid16
= 50,
241 gdb_sys_ni_syscall53
= 53,
244 gdb_sys_ni_syscall56
= 56,
245 gdb_sys_setpgid
= 57,
246 gdb_sys_ni_syscall58
= 58,
247 gdb_sys_olduname
= 59,
252 gdb_sys_getppid
= 64,
253 gdb_sys_getpgrp
= 65,
255 gdb_sys_sigaction
= 67,
256 gdb_sys_sgetmask
= 68,
257 gdb_sys_ssetmask
= 69,
258 gdb_sys_setreuid16
= 70,
259 gdb_sys_setregid16
= 71,
260 gdb_sys_sigsuspend
= 72,
261 gdb_sys_sigpending
= 73,
262 gdb_sys_sethostname
= 74,
263 gdb_sys_setrlimit
= 75,
264 gdb_sys_old_getrlimit
= 76,
265 gdb_sys_getrusage
= 77,
266 gdb_sys_gettimeofday
= 78,
267 gdb_sys_settimeofday
= 79,
268 gdb_sys_getgroups16
= 80,
269 gdb_sys_setgroups16
= 81,
271 gdb_sys_symlink
= 83,
273 gdb_sys_readlink
= 85,
277 gdb_old_readdir
= 89,
280 gdb_sys_truncate
= 92,
281 gdb_sys_ftruncate
= 93,
283 gdb_sys_fchown16
= 95,
284 gdb_sys_getpriority
= 96,
285 gdb_sys_setpriority
= 97,
286 gdb_sys_ni_syscall98
= 98,
288 gdb_sys_fstatfs
= 100,
289 gdb_sys_ioperm
= 101,
290 gdb_sys_socketcall
= 102,
291 gdb_sys_syslog
= 103,
292 gdb_sys_setitimer
= 104,
293 gdb_sys_getitimer
= 105,
294 gdb_sys_newstat
= 106,
295 gdb_sys_newlstat
= 107,
296 gdb_sys_newfstat
= 108,
299 gdb_sys_vhangup
= 111,
300 gdb_sys_ni_syscall112
= 112,
301 gdb_sys_vm86old
= 113,
303 gdb_sys_swapoff
= 115,
304 gdb_sys_sysinfo
= 116,
307 gdb_sys_sigreturn
= 119,
309 gdb_sys_setdomainname
= 121,
310 gdb_sys_newuname
= 122,
311 gdb_sys_modify_ldt
= 123,
312 gdb_sys_adjtimex
= 124,
313 gdb_sys_mprotect
= 125,
314 gdb_sys_sigprocmask
= 126,
315 gdb_sys_ni_syscall127
= 127,
316 gdb_sys_init_module
= 128,
317 gdb_sys_delete_module
= 129,
318 gdb_sys_ni_syscall130
= 130,
319 gdb_sys_quotactl
= 131,
320 gdb_sys_getpgid
= 132,
321 gdb_sys_fchdir
= 133,
322 gdb_sys_bdflush
= 134,
324 gdb_sys_personality
= 136,
325 gdb_sys_ni_syscall137
= 137,
326 gdb_sys_setfsuid16
= 138,
327 gdb_sys_setfsgid16
= 139,
328 gdb_sys_llseek
= 140,
329 gdb_sys_getdents
= 141,
330 gdb_sys_select
= 142,
334 gdb_sys_writev
= 146,
335 gdb_sys_getsid
= 147,
336 gdb_sys_fdatasync
= 148,
337 gdb_sys_sysctl
= 149,
339 gdb_sys_munlock
= 151,
340 gdb_sys_mlockall
= 152,
341 gdb_sys_munlockall
= 153,
342 gdb_sys_sched_setparam
= 154,
343 gdb_sys_sched_getparam
= 155,
344 gdb_sys_sched_setscheduler
= 156,
345 gdb_sys_sched_getscheduler
= 157,
346 gdb_sys_sched_yield
= 158,
347 gdb_sys_sched_get_priority_max
= 159,
348 gdb_sys_sched_get_priority_min
= 160,
349 gdb_sys_sched_rr_get_interval
= 161,
350 gdb_sys_nanosleep
= 162,
351 gdb_sys_mremap
= 163,
352 gdb_sys_setresuid16
= 164,
353 gdb_sys_getresuid16
= 165,
355 gdb_sys_ni_syscall167
= 167,
357 gdb_sys_nfsservctl
= 169,
358 gdb_sys_setresgid16
= 170,
359 gdb_sys_getresgid16
= 171,
361 gdb_sys_rt_sigreturn
= 173,
362 gdb_sys_rt_sigaction
= 174,
363 gdb_sys_rt_sigprocmask
= 175,
364 gdb_sys_rt_sigpending
= 176,
365 gdb_sys_rt_sigtimedwait
= 177,
366 gdb_sys_rt_sigqueueinfo
= 178,
367 gdb_sys_rt_sigsuspend
= 179,
368 gdb_sys_pread64
= 180,
369 gdb_sys_pwrite64
= 181,
370 gdb_sys_chown16
= 182,
371 gdb_sys_getcwd
= 183,
372 gdb_sys_capget
= 184,
373 gdb_sys_capset
= 185,
374 gdb_sys_sigaltstack
= 186,
375 gdb_sys_sendfile
= 187,
376 gdb_sys_ni_syscall188
= 188,
377 gdb_sys_ni_syscall189
= 189,
379 gdb_sys_getrlimit
= 191,
381 gdb_sys_truncate64
= 193,
382 gdb_sys_ftruncate64
= 194,
383 gdb_sys_stat64
= 195,
384 gdb_sys_lstat64
= 196,
385 gdb_sys_fstat64
= 197,
386 gdb_sys_lchown
= 198,
387 gdb_sys_getuid
= 199,
388 gdb_sys_getgid
= 200,
389 gdb_sys_geteuid
= 201,
390 gdb_sys_getegid
= 202,
391 gdb_sys_setreuid
= 203,
392 gdb_sys_setregid
= 204,
393 gdb_sys_getgroups
= 205,
394 gdb_sys_setgroups
= 206,
395 gdb_sys_fchown
= 207,
396 gdb_sys_setresuid
= 208,
397 gdb_sys_getresuid
= 209,
398 gdb_sys_setresgid
= 210,
399 gdb_sys_getresgid
= 211,
401 gdb_sys_setuid
= 213,
402 gdb_sys_setgid
= 214,
403 gdb_sys_setfsuid
= 215,
404 gdb_sys_setfsgid
= 216,
405 gdb_sys_pivot_root
= 217,
406 gdb_sys_mincore
= 218,
407 gdb_sys_madvise
= 219,
408 gdb_sys_getdents64
= 220,
409 gdb_sys_fcntl64
= 221,
410 gdb_sys_ni_syscall222
= 222,
411 gdb_sys_ni_syscall223
= 223,
412 gdb_sys_gettid
= 224,
413 gdb_sys_readahead
= 225,
414 gdb_sys_setxattr
= 226,
415 gdb_sys_lsetxattr
= 227,
416 gdb_sys_fsetxattr
= 228,
417 gdb_sys_getxattr
= 229,
418 gdb_sys_lgetxattr
= 230,
419 gdb_sys_fgetxattr
= 231,
420 gdb_sys_listxattr
= 232,
421 gdb_sys_llistxattr
= 233,
422 gdb_sys_flistxattr
= 234,
423 gdb_sys_removexattr
= 235,
424 gdb_sys_lremovexattr
= 236,
425 gdb_sys_fremovexattr
= 237,
427 gdb_sys_sendfile64
= 239,
429 gdb_sys_sched_setaffinity
= 241,
430 gdb_sys_sched_getaffinity
= 242,
431 gdb_sys_set_thread_area
= 243,
432 gdb_sys_get_thread_area
= 244,
433 gdb_sys_io_setup
= 245,
434 gdb_sys_io_destroy
= 246,
435 gdb_sys_io_getevents
= 247,
436 gdb_sys_io_submit
= 248,
437 gdb_sys_io_cancel
= 249,
438 gdb_sys_fadvise64
= 250,
439 gdb_sys_ni_syscall251
= 251,
440 gdb_sys_exit_group
= 252,
441 gdb_sys_lookup_dcookie
= 253,
442 gdb_sys_epoll_create
= 254,
443 gdb_sys_epoll_ctl
= 255,
444 gdb_sys_epoll_wait
= 256,
445 gdb_sys_remap_file_pages
= 257,
446 gdb_sys_set_tid_address
= 258,
447 gdb_sys_timer_create
= 259,
448 gdb_sys_timer_settime
= 260,
449 gdb_sys_timer_gettime
= 261,
450 gdb_sys_timer_getoverrun
= 262,
451 gdb_sys_timer_delete
= 263,
452 gdb_sys_clock_settime
= 264,
453 gdb_sys_clock_gettime
= 265,
454 gdb_sys_clock_getres
= 266,
455 gdb_sys_clock_nanosleep
= 267,
456 gdb_sys_statfs64
= 268,
457 gdb_sys_fstatfs64
= 269,
458 gdb_sys_tgkill
= 270,
459 gdb_sys_utimes
= 271,
460 gdb_sys_fadvise64_64
= 272,
461 gdb_sys_ni_syscall273
= 273,
463 gdb_sys_get_mempolicy
= 275,
464 gdb_sys_set_mempolicy
= 276,
465 gdb_sys_mq_open
= 277,
466 gdb_sys_mq_unlink
= 278,
467 gdb_sys_mq_timedsend
= 279,
468 gdb_sys_mq_timedreceive
= 280,
469 gdb_sys_mq_notify
= 281,
470 gdb_sys_mq_getsetattr
= 282,
471 gdb_sys_kexec_load
= 283,
472 gdb_sys_waitid
= 284,
473 gdb_sys_ni_syscall285
= 285,
474 gdb_sys_add_key
= 286,
475 gdb_sys_request_key
= 287,
476 gdb_sys_keyctl
= 288,
477 gdb_sys_ioprio_set
= 289,
478 gdb_sys_ioprio_get
= 290,
479 gdb_sys_inotify_init
= 291,
480 gdb_sys_inotify_add_watch
= 292,
481 gdb_sys_inotify_rm_watch
= 293,
482 gdb_sys_migrate_pages
= 294,
483 gdb_sys_openat
= 295,
484 gdb_sys_mkdirat
= 296,
485 gdb_sys_mknodat
= 297,
486 gdb_sys_fchownat
= 298,
487 gdb_sys_futimesat
= 299,
488 gdb_sys_fstatat64
= 300,
489 gdb_sys_unlinkat
= 301,
490 gdb_sys_renameat
= 302,
491 gdb_sys_linkat
= 303,
492 gdb_sys_symlinkat
= 304,
493 gdb_sys_readlinkat
= 305,
494 gdb_sys_fchmodat
= 306,
495 gdb_sys_faccessat
= 307,
496 gdb_sys_pselect6
= 308,
498 gdb_sys_unshare
= 310,
499 gdb_sys_set_robust_list
= 311,
500 gdb_sys_get_robust_list
= 312,
501 gdb_sys_splice
= 313,
502 gdb_sys_sync_file_range
= 314,
504 gdb_sys_vmsplice
= 316,
505 gdb_sys_move_pages
= 317,
506 gdb_sys_getcpu
= 318,
507 gdb_sys_epoll_pwait
= 319,
508 gdb_sys_socket
= 500,
509 gdb_sys_connect
= 501,
510 gdb_sys_accept
= 502,
511 gdb_sys_sendto
= 503,
512 gdb_sys_recvfrom
= 504,
513 gdb_sys_sendmsg
= 505,
514 gdb_sys_recvmsg
= 506,
515 gdb_sys_shutdown
= 507,
517 gdb_sys_listen
= 509,
518 gdb_sys_getsockname
= 510,
519 gdb_sys_getpeername
= 511,
520 gdb_sys_socketpair
= 512,
521 gdb_sys_setsockopt
= 513,
522 gdb_sys_getsockopt
= 514,
524 gdb_sys_shmget
= 520,
526 gdb_sys_shmctl
= 522,
527 gdb_sys_semget
= 523,
529 gdb_sys_semctl
= 525,
531 gdb_sys_msgget
= 528,
532 gdb_sys_msgsnd
= 529,
533 gdb_sys_msgrcv
= 530,
534 gdb_sys_msgctl
= 531,
535 gdb_sys_semtimedop
= 532,
536 gdb_sys_newfstatat
= 540,
539 /* Record a linux syscall. */
541 extern int record_linux_system_call (enum gdb_syscall num
,
542 struct regcache
*regcache
,
543 struct linux_record_tdep
*tdep
);
544 #endif /* _LINUX_RECORD_H_ */