GDB (API)
|
00001 /* Target-dependent code for GNU/Linux AMD64. 00002 00003 Copyright (C) 2006-2013 Free Software Foundation, Inc. 00004 00005 This file is part of GDB. 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00019 00020 #ifndef AMD64_LINUX_TDEP_H 00021 #define AMD64_LINUX_TDEP_H 00022 00023 /* Like for i386 GNU/Linux, there is an extra "register" 00024 used to control syscall restarting. */ 00025 00026 /* Register number for the "orig_rax" register. If this register 00027 contains a value >= 0 it is interpreted as the system call number 00028 that the kernel is supposed to restart. */ 00029 #define AMD64_LINUX_ORIG_RAX_REGNUM (AMD64_YMM15H_REGNUM + 1) 00030 00031 /* Total number of registers for GNU/Linux. */ 00032 #define AMD64_LINUX_NUM_REGS (AMD64_LINUX_ORIG_RAX_REGNUM + 1) 00033 00034 /* Linux target description. */ 00035 extern struct target_desc *tdesc_amd64_linux; 00036 extern struct target_desc *tdesc_amd64_avx_linux; 00037 extern struct target_desc *tdesc_x32_linux; 00038 extern struct target_desc *tdesc_x32_avx_linux; 00039 00040 /* Enum that defines the syscall identifiers for amd64 linux. 00041 Used for process record/replay, these will be translated into 00042 a gdb-canonical set of syscall ids in linux-record.c. */ 00043 00044 enum amd64_syscall { 00045 amd64_sys_read = 0, 00046 amd64_sys_write = 1, 00047 amd64_sys_open = 2, 00048 amd64_sys_close = 3, 00049 amd64_sys_newstat = 4, 00050 amd64_sys_newfstat = 5, 00051 amd64_sys_newlstat = 6, 00052 amd64_sys_poll = 7, 00053 amd64_sys_lseek = 8, 00054 amd64_sys_mmap = 9, 00055 amd64_sys_mprotect = 10, 00056 amd64_sys_munmap = 11, 00057 amd64_sys_brk = 12, 00058 amd64_sys_rt_sigaction = 13, 00059 amd64_sys_rt_sigprocmask = 14, 00060 amd64_sys_rt_sigreturn = 15, 00061 amd64_sys_ioctl = 16, 00062 amd64_sys_pread64 = 17, 00063 amd64_sys_pwrite64 = 18, 00064 amd64_sys_readv = 19, 00065 amd64_sys_writev = 20, 00066 amd64_sys_access = 21, 00067 amd64_sys_pipe = 22, 00068 amd64_sys_select = 23, 00069 amd64_sys_sched_yield = 24, 00070 amd64_sys_mremap = 25, 00071 amd64_sys_msync = 26, 00072 amd64_sys_mincore = 27, 00073 amd64_sys_madvise = 28, 00074 amd64_sys_shmget = 29, 00075 amd64_sys_shmat = 30, 00076 amd64_sys_shmctl = 31, 00077 amd64_sys_dup = 32, 00078 amd64_sys_dup2 = 33, 00079 amd64_sys_pause = 34, 00080 amd64_sys_nanosleep = 35, 00081 amd64_sys_getitimer = 36, 00082 amd64_sys_alarm = 37, 00083 amd64_sys_setitimer = 38, 00084 amd64_sys_getpid = 39, 00085 amd64_sys_sendfile64 = 40, 00086 amd64_sys_socket = 41, 00087 amd64_sys_connect = 42, 00088 amd64_sys_accept = 43, 00089 amd64_sys_sendto = 44, 00090 amd64_sys_recvfrom = 45, 00091 amd64_sys_sendmsg = 46, 00092 amd64_sys_recvmsg = 47, 00093 amd64_sys_shutdown = 48, 00094 amd64_sys_bind = 49, 00095 amd64_sys_listen = 50, 00096 amd64_sys_getsockname = 51, 00097 amd64_sys_getpeername = 52, 00098 amd64_sys_socketpair = 53, 00099 amd64_sys_setsockopt = 54, 00100 amd64_sys_getsockopt = 55, 00101 amd64_sys_clone = 56, 00102 amd64_sys_fork = 57, 00103 amd64_sys_vfork = 58, 00104 amd64_sys_execve = 59, 00105 amd64_sys_exit = 60, 00106 amd64_sys_wait4 = 61, 00107 amd64_sys_kill = 62, 00108 amd64_sys_uname = 63, 00109 amd64_sys_semget = 64, 00110 amd64_sys_semop = 65, 00111 amd64_sys_semctl = 66, 00112 amd64_sys_shmdt = 67, 00113 amd64_sys_msgget = 68, 00114 amd64_sys_msgsnd = 69, 00115 amd64_sys_msgrcv = 70, 00116 amd64_sys_msgctl = 71, 00117 amd64_sys_fcntl = 72, 00118 amd64_sys_flock = 73, 00119 amd64_sys_fsync = 74, 00120 amd64_sys_fdatasync = 75, 00121 amd64_sys_truncate = 76, 00122 amd64_sys_ftruncate = 77, 00123 amd64_sys_getdents = 78, 00124 amd64_sys_getcwd = 79, 00125 amd64_sys_chdir = 80, 00126 amd64_sys_fchdir = 81, 00127 amd64_sys_rename = 82, 00128 amd64_sys_mkdir = 83, 00129 amd64_sys_rmdir = 84, 00130 amd64_sys_creat = 85, 00131 amd64_sys_link = 86, 00132 amd64_sys_unlink = 87, 00133 amd64_sys_symlink = 88, 00134 amd64_sys_readlink = 89, 00135 amd64_sys_chmod = 90, 00136 amd64_sys_fchmod = 91, 00137 amd64_sys_chown = 92, 00138 amd64_sys_fchown = 93, 00139 amd64_sys_lchown = 94, 00140 amd64_sys_umask = 95, 00141 amd64_sys_gettimeofday = 96, 00142 amd64_sys_getrlimit = 97, 00143 amd64_sys_getrusage = 98, 00144 amd64_sys_sysinfo = 99, 00145 amd64_sys_times = 100, 00146 amd64_sys_ptrace = 101, 00147 amd64_sys_getuid = 102, 00148 amd64_sys_syslog = 103, 00149 amd64_sys_getgid = 104, 00150 amd64_sys_setuid = 105, 00151 amd64_sys_setgid = 106, 00152 amd64_sys_geteuid = 107, 00153 amd64_sys_getegid = 108, 00154 amd64_sys_setpgid = 109, 00155 amd64_sys_getppid = 110, 00156 amd64_sys_getpgrp = 111, 00157 amd64_sys_setsid = 112, 00158 amd64_sys_setreuid = 113, 00159 amd64_sys_setregid = 114, 00160 amd64_sys_getgroups = 115, 00161 amd64_sys_setgroups = 116, 00162 amd64_sys_setresuid = 117, 00163 amd64_sys_getresuid = 118, 00164 amd64_sys_setresgid = 119, 00165 amd64_sys_getresgid = 120, 00166 amd64_sys_getpgid = 121, 00167 amd64_sys_setfsuid = 122, 00168 amd64_sys_setfsgid = 123, 00169 amd64_sys_getsid = 124, 00170 amd64_sys_capget = 125, 00171 amd64_sys_capset = 126, 00172 amd64_sys_rt_sigpending = 127, 00173 amd64_sys_rt_sigtimedwait = 128, 00174 amd64_sys_rt_sigqueueinfo = 129, 00175 amd64_sys_rt_sigsuspend = 130, 00176 amd64_sys_sigaltstack = 131, 00177 amd64_sys_utime = 132, 00178 amd64_sys_mknod = 133, 00179 amd64_sys_personality = 135, 00180 amd64_sys_ustat = 136, 00181 amd64_sys_statfs = 137, 00182 amd64_sys_fstatfs = 138, 00183 amd64_sys_sysfs = 139, 00184 amd64_sys_getpriority = 140, 00185 amd64_sys_setpriority = 141, 00186 amd64_sys_sched_setparam = 142, 00187 amd64_sys_sched_getparam = 143, 00188 amd64_sys_sched_setscheduler = 144, 00189 amd64_sys_sched_getscheduler = 145, 00190 amd64_sys_sched_get_priority_max = 146, 00191 amd64_sys_sched_get_priority_min = 147, 00192 amd64_sys_sched_rr_get_interval = 148, 00193 amd64_sys_mlock = 149, 00194 amd64_sys_munlock = 150, 00195 amd64_sys_mlockall = 151, 00196 amd64_sys_munlockall = 152, 00197 amd64_sys_vhangup = 153, 00198 amd64_sys_modify_ldt = 154, 00199 amd64_sys_pivot_root = 155, 00200 amd64_sys_sysctl = 156, 00201 amd64_sys_prctl = 157, 00202 amd64_sys_arch_prctl = 158, 00203 amd64_sys_adjtimex = 159, 00204 amd64_sys_setrlimit = 160, 00205 amd64_sys_chroot = 161, 00206 amd64_sys_sync = 162, 00207 amd64_sys_acct = 163, 00208 amd64_sys_settimeofday = 164, 00209 amd64_sys_mount = 165, 00210 amd64_sys_umount = 166, 00211 amd64_sys_swapon = 167, 00212 amd64_sys_swapoff = 168, 00213 amd64_sys_reboot = 169, 00214 amd64_sys_sethostname = 170, 00215 amd64_sys_setdomainname = 171, 00216 amd64_sys_iopl = 172, 00217 amd64_sys_ioperm = 173, 00218 amd64_sys_init_module = 175, 00219 amd64_sys_delete_module = 176, 00220 amd64_sys_quotactl = 179, 00221 amd64_sys_nfsservctl = 180, 00222 amd64_sys_gettid = 186, 00223 amd64_sys_readahead = 187, 00224 amd64_sys_setxattr = 188, 00225 amd64_sys_lsetxattr = 189, 00226 amd64_sys_fsetxattr = 190, 00227 amd64_sys_getxattr = 191, 00228 amd64_sys_lgetxattr = 192, 00229 amd64_sys_fgetxattr = 193, 00230 amd64_sys_listxattr = 194, 00231 amd64_sys_llistxattr = 195, 00232 amd64_sys_flistxattr = 196, 00233 amd64_sys_removexattr = 197, 00234 amd64_sys_lremovexattr = 198, 00235 amd64_sys_fremovexattr = 199, 00236 amd64_sys_tkill = 200, 00237 amd64_sys_time = 201, 00238 amd64_sys_futex = 202, 00239 amd64_sys_sched_setaffinity = 203, 00240 amd64_sys_sched_getaffinity = 204, 00241 amd64_sys_io_setup = 206, 00242 amd64_sys_io_destroy = 207, 00243 amd64_sys_io_getevents = 208, 00244 amd64_sys_io_submit = 209, 00245 amd64_sys_io_cancel = 210, 00246 amd64_sys_lookup_dcookie = 212, 00247 amd64_sys_epoll_create = 213, 00248 amd64_sys_remap_file_pages = 216, 00249 amd64_sys_getdents64 = 217, 00250 amd64_sys_set_tid_address = 218, 00251 amd64_sys_restart_syscall = 219, 00252 amd64_sys_semtimedop = 220, 00253 amd64_sys_fadvise64 = 221, 00254 amd64_sys_timer_create = 222, 00255 amd64_sys_timer_settime = 223, 00256 amd64_sys_timer_gettime = 224, 00257 amd64_sys_timer_getoverrun = 225, 00258 amd64_sys_timer_delete = 226, 00259 amd64_sys_clock_settime = 227, 00260 amd64_sys_clock_gettime = 228, 00261 amd64_sys_clock_getres = 229, 00262 amd64_sys_clock_nanosleep = 230, 00263 amd64_sys_exit_group = 231, 00264 amd64_sys_epoll_wait = 232, 00265 amd64_sys_epoll_ctl = 233, 00266 amd64_sys_tgkill = 234, 00267 amd64_sys_utimes = 235, 00268 amd64_sys_mbind = 237, 00269 amd64_sys_set_mempolicy = 238, 00270 amd64_sys_get_mempolicy = 239, 00271 amd64_sys_mq_open = 240, 00272 amd64_sys_mq_unlink = 241, 00273 amd64_sys_mq_timedsend = 242, 00274 amd64_sys_mq_timedreceive = 243, 00275 amd64_sys_mq_notify = 244, 00276 amd64_sys_mq_getsetattr = 245, 00277 amd64_sys_kexec_load = 246, 00278 amd64_sys_waitid = 247, 00279 amd64_sys_add_key = 248, 00280 amd64_sys_request_key = 249, 00281 amd64_sys_keyctl = 250, 00282 amd64_sys_ioprio_set = 251, 00283 amd64_sys_ioprio_get = 252, 00284 amd64_sys_inotify_init = 253, 00285 amd64_sys_inotify_add_watch = 254, 00286 amd64_sys_inotify_rm_watch = 255, 00287 amd64_sys_migrate_pages = 256, 00288 amd64_sys_openat = 257, 00289 amd64_sys_mkdirat = 258, 00290 amd64_sys_mknodat = 259, 00291 amd64_sys_fchownat = 260, 00292 amd64_sys_futimesat = 261, 00293 amd64_sys_newfstatat = 262, 00294 amd64_sys_unlinkat = 263, 00295 amd64_sys_renameat = 264, 00296 amd64_sys_linkat = 265, 00297 amd64_sys_symlinkat = 266, 00298 amd64_sys_readlinkat = 267, 00299 amd64_sys_fchmodat = 268, 00300 amd64_sys_faccessat = 269, 00301 amd64_sys_pselect6 = 270, 00302 amd64_sys_ppoll = 271, 00303 amd64_sys_unshare = 272, 00304 amd64_sys_set_robust_list = 273, 00305 amd64_sys_get_robust_list = 274, 00306 amd64_sys_splice = 275, 00307 amd64_sys_tee = 276, 00308 amd64_sys_sync_file_range = 277, 00309 amd64_sys_vmsplice = 278, 00310 amd64_sys_move_pages = 279, 00311 }; 00312 00313 #endif /* amd64-linux-tdep.h */