| 1 | /* Machine independent support for SVR4 /proc (process file system) for GDB. |
| 2 | Copyright 1999 Free Software Foundation, Inc. |
| 3 | Written by Michael Snyder at Cygnus Solutions. |
| 4 | Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others. |
| 5 | |
| 6 | This file is part of GDB. |
| 7 | |
| 8 | This program is free software; you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation; either version 2 of the License, or |
| 11 | (at your option) any later version. |
| 12 | |
| 13 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with this program; if not, write to the Free Software Foundation, |
| 20 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
| 21 | |
| 22 | /* |
| 23 | * Pretty-print "events of interest". |
| 24 | * |
| 25 | * This module includes pretty-print routines for: |
| 26 | * faults (hardware exceptions): |
| 27 | * signals (software interrupts): |
| 28 | * syscalls |
| 29 | * |
| 30 | * FIXME: At present, the syscall translation table must be initialized, |
| 31 | * which is not true of the other translation tables. |
| 32 | */ |
| 33 | |
| 34 | #include "defs.h" |
| 35 | |
| 36 | #if defined (NEW_PROC_API) |
| 37 | #define _STRUCTURED_PROC 1 |
| 38 | #endif |
| 39 | |
| 40 | #include <stdio.h> |
| 41 | #include <sys/types.h> |
| 42 | #include <sys/procfs.h> |
| 43 | #include <sys/syscall.h> |
| 44 | #include <sys/fault.h> |
| 45 | |
| 46 | /* Much of the information used in the /proc interface, particularly for |
| 47 | printing status information, is kept as tables of structures of the |
| 48 | following form. These tables can be used to map numeric values to |
| 49 | their symbolic names and to a string that describes their specific use. */ |
| 50 | |
| 51 | struct trans { |
| 52 | int value; /* The numeric value */ |
| 53 | char *name; /* The equivalent symbolic value */ |
| 54 | char *desc; /* Short description of value */ |
| 55 | }; |
| 56 | |
| 57 | /* |
| 58 | * pretty print syscalls |
| 59 | */ |
| 60 | |
| 61 | /* Ugh -- Unixware and Solaris spell these differently! */ |
| 62 | |
| 63 | #ifdef SYS_lwpcreate |
| 64 | #define SYS_lwp_create SYS_lwpcreate |
| 65 | #endif |
| 66 | |
| 67 | #ifdef SYS_lwpexit |
| 68 | #define SYS_lwp_exit SYS_lwpexit |
| 69 | #endif |
| 70 | |
| 71 | #ifdef SYS_lwpwait |
| 72 | #define SYS_lwp_wait SYS_lwpwait |
| 73 | #endif |
| 74 | |
| 75 | #ifdef SYS_lwpself |
| 76 | #define SYS_lwp_self SYS_lwpself |
| 77 | #endif |
| 78 | |
| 79 | #ifdef SYS_lwpinfo |
| 80 | #define SYS_lwp_info SYS_lwpinfo |
| 81 | #endif |
| 82 | |
| 83 | #ifdef SYS_lwpprivate |
| 84 | #define SYS_lwp_private SYS_lwpprivate |
| 85 | #endif |
| 86 | |
| 87 | #ifdef SYS_lwpkill |
| 88 | #define SYS_lwp_kill SYS_lwpkill |
| 89 | #endif |
| 90 | |
| 91 | #ifdef SYS_lwpsuspend |
| 92 | #define SYS_lwp_suspend SYS_lwpsuspend |
| 93 | #endif |
| 94 | |
| 95 | #ifdef SYS_lwpcontinue |
| 96 | #define SYS_lwp_continue SYS_lwpcontinue |
| 97 | #endif |
| 98 | |
| 99 | |
| 100 | /* Syscall translation table. */ |
| 101 | |
| 102 | #define MAX_SYSCALLS 262 /* pretty arbitrary */ |
| 103 | static char * syscall_table[MAX_SYSCALLS]; |
| 104 | |
| 105 | void |
| 106 | init_syscall_table (void) |
| 107 | { |
| 108 | #if defined (SYS_BSD_getime) |
| 109 | syscall_table[SYS_BSD_getime] = "BSD_getime"; |
| 110 | #endif |
| 111 | #if defined (SYS_BSDgetpgrp) |
| 112 | syscall_table[SYS_BSDgetpgrp] = "BSDgetpgrp"; |
| 113 | #endif |
| 114 | #if defined (SYS_BSDsetpgrp) |
| 115 | syscall_table[SYS_BSDsetpgrp] = "BSDsetpgrp"; |
| 116 | #endif |
| 117 | #if defined (SYS_acancel) |
| 118 | syscall_table[SYS_acancel] = "acancel"; |
| 119 | #endif |
| 120 | #if defined (SYS_accept) |
| 121 | syscall_table[SYS_accept] = "accept"; |
| 122 | #endif |
| 123 | #if defined (SYS_access) |
| 124 | syscall_table[SYS_access] = "access"; |
| 125 | #endif |
| 126 | #if defined (SYS_acct) |
| 127 | syscall_table[SYS_acct] = "acct"; |
| 128 | #endif |
| 129 | #if defined (SYS_acl) |
| 130 | syscall_table[SYS_acl] = "acl"; |
| 131 | #endif |
| 132 | #if defined (SYS_aclipc) |
| 133 | syscall_table[SYS_aclipc] = "aclipc"; |
| 134 | #endif |
| 135 | #if defined (SYS_adjtime) |
| 136 | syscall_table[SYS_adjtime] = "adjtime"; |
| 137 | #endif |
| 138 | #if defined (SYS_afs_syscall) |
| 139 | syscall_table[SYS_afs_syscall] = "afs_syscall"; |
| 140 | #endif |
| 141 | #if defined (SYS_alarm) |
| 142 | syscall_table[SYS_alarm] = "alarm"; |
| 143 | #endif |
| 144 | #if defined (SYS_alt_plock) |
| 145 | syscall_table[SYS_alt_plock] = "alt_plock"; |
| 146 | #endif |
| 147 | #if defined (SYS_alt_sigpending) |
| 148 | syscall_table[SYS_alt_sigpending] = "alt_sigpending"; |
| 149 | #endif |
| 150 | #if defined (SYS_async) |
| 151 | syscall_table[SYS_async] = "async"; |
| 152 | #endif |
| 153 | #if defined (SYS_async_daemon) |
| 154 | syscall_table[SYS_async_daemon] = "async_daemon"; |
| 155 | #endif |
| 156 | #if defined (SYS_audcntl) |
| 157 | syscall_table[SYS_audcntl] = "audcntl"; |
| 158 | #endif |
| 159 | #if defined (SYS_audgen) |
| 160 | syscall_table[SYS_audgen] = "audgen"; |
| 161 | #endif |
| 162 | #if defined (SYS_auditbuf) |
| 163 | syscall_table[SYS_auditbuf] = "auditbuf"; |
| 164 | #endif |
| 165 | #if defined (SYS_auditctl) |
| 166 | syscall_table[SYS_auditctl] = "auditctl"; |
| 167 | #endif |
| 168 | #if defined (SYS_auditdmp) |
| 169 | syscall_table[SYS_auditdmp] = "auditdmp"; |
| 170 | #endif |
| 171 | #if defined (SYS_auditevt) |
| 172 | syscall_table[SYS_auditevt] = "auditevt"; |
| 173 | #endif |
| 174 | #if defined (SYS_auditlog) |
| 175 | syscall_table[SYS_auditlog] = "auditlog"; |
| 176 | #endif |
| 177 | #if defined (SYS_auditsys) |
| 178 | syscall_table[SYS_auditsys] = "auditsys"; |
| 179 | #endif |
| 180 | #if defined (SYS_bind) |
| 181 | syscall_table[SYS_bind] = "bind"; |
| 182 | #endif |
| 183 | #if defined (SYS_block) |
| 184 | syscall_table[SYS_block] = "block"; |
| 185 | #endif |
| 186 | #if defined (SYS_brk) |
| 187 | syscall_table[SYS_brk] = "brk"; |
| 188 | #endif |
| 189 | #if defined (SYS_cachectl) |
| 190 | syscall_table[SYS_cachectl] = "cachectl"; |
| 191 | #endif |
| 192 | #if defined (SYS_cacheflush) |
| 193 | syscall_table[SYS_cacheflush] = "cacheflush"; |
| 194 | #endif |
| 195 | #if defined (SYS_cancelblock) |
| 196 | syscall_table[SYS_cancelblock] = "cancelblock"; |
| 197 | #endif |
| 198 | #if defined (SYS_cg_bind) |
| 199 | syscall_table[SYS_cg_bind] = "cg_bind"; |
| 200 | #endif |
| 201 | #if defined (SYS_cg_current) |
| 202 | syscall_table[SYS_cg_current] = "cg_current"; |
| 203 | #endif |
| 204 | #if defined (SYS_cg_ids) |
| 205 | syscall_table[SYS_cg_ids] = "cg_ids"; |
| 206 | #endif |
| 207 | #if defined (SYS_cg_info) |
| 208 | syscall_table[SYS_cg_info] = "cg_info"; |
| 209 | #endif |
| 210 | #if defined (SYS_cg_memloc) |
| 211 | syscall_table[SYS_cg_memloc] = "cg_memloc"; |
| 212 | #endif |
| 213 | #if defined (SYS_cg_processors) |
| 214 | syscall_table[SYS_cg_processors] = "cg_processors"; |
| 215 | #endif |
| 216 | #if defined (SYS_chdir) |
| 217 | syscall_table[SYS_chdir] = "chdir"; |
| 218 | #endif |
| 219 | #if defined (SYS_chflags) |
| 220 | syscall_table[SYS_chflags] = "chflags"; |
| 221 | #endif |
| 222 | #if defined (SYS_chmod) |
| 223 | syscall_table[SYS_chmod] = "chmod"; |
| 224 | #endif |
| 225 | #if defined (SYS_chown) |
| 226 | syscall_table[SYS_chown] = "chown"; |
| 227 | #endif |
| 228 | #if defined (SYS_chroot) |
| 229 | syscall_table[SYS_chroot] = "chroot"; |
| 230 | #endif |
| 231 | #if defined (SYS_clocal) |
| 232 | syscall_table[SYS_clocal] = "clocal"; |
| 233 | #endif |
| 234 | #if defined (SYS_clock_getres) |
| 235 | syscall_table[SYS_clock_getres] = "clock_getres"; |
| 236 | #endif |
| 237 | #if defined (SYS_clock_gettime) |
| 238 | syscall_table[SYS_clock_gettime] = "clock_gettime"; |
| 239 | #endif |
| 240 | #if defined (SYS_clock_settime) |
| 241 | syscall_table[SYS_clock_settime] = "clock_settime"; |
| 242 | #endif |
| 243 | #if defined (SYS_close) |
| 244 | syscall_table[SYS_close] = "close"; |
| 245 | #endif |
| 246 | #if defined (SYS_connect) |
| 247 | syscall_table[SYS_connect] = "connect"; |
| 248 | #endif |
| 249 | #if defined (SYS_context) |
| 250 | syscall_table[SYS_context] = "context"; |
| 251 | #endif |
| 252 | #if defined (SYS_creat) |
| 253 | syscall_table[SYS_creat] = "creat"; |
| 254 | #endif |
| 255 | #if defined (SYS_creat64) |
| 256 | syscall_table[SYS_creat64] = "creat64"; |
| 257 | #endif |
| 258 | #if defined (SYS_devstat) |
| 259 | syscall_table[SYS_devstat] = "devstat"; |
| 260 | #endif |
| 261 | #if defined (SYS_dmi) |
| 262 | syscall_table[SYS_dmi] = "dmi"; |
| 263 | #endif |
| 264 | #if defined (SYS_door) |
| 265 | syscall_table[SYS_door] = "door"; |
| 266 | #endif |
| 267 | #if defined (SYS_dshmsys) |
| 268 | syscall_table[SYS_dshmsys] = "dshmsys"; |
| 269 | #endif |
| 270 | #if defined (SYS_dup) |
| 271 | syscall_table[SYS_dup] = "dup"; |
| 272 | #endif |
| 273 | #if defined (SYS_dup2) |
| 274 | syscall_table[SYS_dup2] = "dup2"; |
| 275 | #endif |
| 276 | #if defined (SYS_evsys) |
| 277 | syscall_table[SYS_evsys] = "evsys"; |
| 278 | #endif |
| 279 | #if defined (SYS_evtrapret) |
| 280 | syscall_table[SYS_evtrapret] = "evtrapret"; |
| 281 | #endif |
| 282 | #if defined (SYS_exec) |
| 283 | syscall_table[SYS_exec] = "exec"; |
| 284 | #endif |
| 285 | #if defined (SYS_exec_with_loader) |
| 286 | syscall_table[SYS_exec_with_loader] = "exec_with_loader"; |
| 287 | #endif |
| 288 | #if defined (SYS_execv) |
| 289 | syscall_table[SYS_execv] = "execv"; |
| 290 | #endif |
| 291 | #if defined (SYS_execve) |
| 292 | syscall_table[SYS_execve] = "execve"; |
| 293 | #endif |
| 294 | #if defined (SYS_exit) |
| 295 | syscall_table[SYS_exit] = "exit"; |
| 296 | #endif |
| 297 | #if defined (SYS_exportfs) |
| 298 | syscall_table[SYS_exportfs] = "exportfs"; |
| 299 | #endif |
| 300 | #if defined (SYS_facl) |
| 301 | syscall_table[SYS_facl] = "facl"; |
| 302 | #endif |
| 303 | #if defined (SYS_fchdir) |
| 304 | syscall_table[SYS_fchdir] = "fchdir"; |
| 305 | #endif |
| 306 | #if defined (SYS_fchflags) |
| 307 | syscall_table[SYS_fchflags] = "fchflags"; |
| 308 | #endif |
| 309 | #if defined (SYS_fchmod) |
| 310 | syscall_table[SYS_fchmod] = "fchmod"; |
| 311 | #endif |
| 312 | #if defined (SYS_fchown) |
| 313 | syscall_table[SYS_fchown] = "fchown"; |
| 314 | #endif |
| 315 | #if defined (SYS_fchroot) |
| 316 | syscall_table[SYS_fchroot] = "fchroot"; |
| 317 | #endif |
| 318 | #if defined (SYS_fcntl) |
| 319 | syscall_table[SYS_fcntl] = "fcntl"; |
| 320 | #endif |
| 321 | #if defined (SYS_fdatasync) |
| 322 | syscall_table[SYS_fdatasync] = "fdatasync"; |
| 323 | #endif |
| 324 | #if defined (SYS_fdevstat) |
| 325 | syscall_table[SYS_fdevstat] = "fdevstat"; |
| 326 | #endif |
| 327 | #if defined (SYS_fdsync) |
| 328 | syscall_table[SYS_fdsync] = "fdsync"; |
| 329 | #endif |
| 330 | #if defined (SYS_filepriv) |
| 331 | syscall_table[SYS_filepriv] = "filepriv"; |
| 332 | #endif |
| 333 | #if defined (SYS_flock) |
| 334 | syscall_table[SYS_flock] = "flock"; |
| 335 | #endif |
| 336 | #if defined (SYS_flvlfile) |
| 337 | syscall_table[SYS_flvlfile] = "flvlfile"; |
| 338 | #endif |
| 339 | #if defined (SYS_fork) |
| 340 | syscall_table[SYS_fork] = "fork"; |
| 341 | #endif |
| 342 | #if defined (SYS_fork1) |
| 343 | syscall_table[SYS_fork1] = "fork1"; |
| 344 | #endif |
| 345 | #if defined (SYS_forkall) |
| 346 | syscall_table[SYS_forkall] = "forkall"; |
| 347 | #endif |
| 348 | #if defined (SYS_fpathconf) |
| 349 | syscall_table[SYS_fpathconf] = "fpathconf"; |
| 350 | #endif |
| 351 | #if defined (SYS_fstat) |
| 352 | syscall_table[SYS_fstat] = "fstat"; |
| 353 | #endif |
| 354 | #if defined (SYS_fstat64) |
| 355 | syscall_table[SYS_fstat64] = "fstat64"; |
| 356 | #endif |
| 357 | #if defined (SYS_fstatfs) |
| 358 | syscall_table[SYS_fstatfs] = "fstatfs"; |
| 359 | #endif |
| 360 | #if defined (SYS_fstatvfs) |
| 361 | syscall_table[SYS_fstatvfs] = "fstatvfs"; |
| 362 | #endif |
| 363 | #if defined (SYS_fstatvfs64) |
| 364 | syscall_table[SYS_fstatvfs64] = "fstatvfs64"; |
| 365 | #endif |
| 366 | #if defined (SYS_fsync) |
| 367 | syscall_table[SYS_fsync] = "fsync"; |
| 368 | #endif |
| 369 | #if defined (SYS_ftruncate) |
| 370 | syscall_table[SYS_ftruncate] = "ftruncate"; |
| 371 | #endif |
| 372 | #if defined (SYS_ftruncate64) |
| 373 | syscall_table[SYS_ftruncate64] = "ftruncate64"; |
| 374 | #endif |
| 375 | #if defined (SYS_fuser) |
| 376 | syscall_table[SYS_fuser] = "fuser"; |
| 377 | #endif |
| 378 | #if defined (SYS_fxstat) |
| 379 | syscall_table[SYS_fxstat] = "fxstat"; |
| 380 | #endif |
| 381 | #if defined (SYS_get_sysinfo) |
| 382 | syscall_table[SYS_get_sysinfo] = "get_sysinfo"; |
| 383 | #endif |
| 384 | #if defined (SYS_getaddressconf) |
| 385 | syscall_table[SYS_getaddressconf] = "getaddressconf"; |
| 386 | #endif |
| 387 | #if defined (SYS_getcontext) |
| 388 | syscall_table[SYS_getcontext] = "getcontext"; |
| 389 | #endif |
| 390 | #if defined (SYS_getdents) |
| 391 | syscall_table[SYS_getdents] = "getdents"; |
| 392 | #endif |
| 393 | #if defined (SYS_getdents64) |
| 394 | syscall_table[SYS_getdents64] = "getdents64"; |
| 395 | #endif |
| 396 | #if defined (SYS_getdirentries) |
| 397 | syscall_table[SYS_getdirentries] = "getdirentries"; |
| 398 | #endif |
| 399 | #if defined (SYS_getdomainname) |
| 400 | syscall_table[SYS_getdomainname] = "getdomainname"; |
| 401 | #endif |
| 402 | #if defined (SYS_getdtablesize) |
| 403 | syscall_table[SYS_getdtablesize] = "getdtablesize"; |
| 404 | #endif |
| 405 | #if defined (SYS_getfh) |
| 406 | syscall_table[SYS_getfh] = "getfh"; |
| 407 | #endif |
| 408 | #if defined (SYS_getfsstat) |
| 409 | syscall_table[SYS_getfsstat] = "getfsstat"; |
| 410 | #endif |
| 411 | #if defined (SYS_getgid) |
| 412 | syscall_table[SYS_getgid] = "getgid"; |
| 413 | #endif |
| 414 | #if defined (SYS_getgroups) |
| 415 | syscall_table[SYS_getgroups] = "getgroups"; |
| 416 | #endif |
| 417 | #if defined (SYS_gethostid) |
| 418 | syscall_table[SYS_gethostid] = "gethostid"; |
| 419 | #endif |
| 420 | #if defined (SYS_gethostname) |
| 421 | syscall_table[SYS_gethostname] = "gethostname"; |
| 422 | #endif |
| 423 | #if defined (SYS_getitimer) |
| 424 | syscall_table[SYS_getitimer] = "getitimer"; |
| 425 | #endif |
| 426 | #if defined (SYS_getksym) |
| 427 | syscall_table[SYS_getksym] = "getksym"; |
| 428 | #endif |
| 429 | #if defined (SYS_getlogin) |
| 430 | syscall_table[SYS_getlogin] = "getlogin"; |
| 431 | #endif |
| 432 | #if defined (SYS_getmnt) |
| 433 | syscall_table[SYS_getmnt] = "getmnt"; |
| 434 | #endif |
| 435 | #if defined (SYS_getmsg) |
| 436 | syscall_table[SYS_getmsg] = "getmsg"; |
| 437 | #endif |
| 438 | #if defined (SYS_getpagesize) |
| 439 | syscall_table[SYS_getpagesize] = "getpagesize"; |
| 440 | #endif |
| 441 | #if defined (SYS_getpeername) |
| 442 | syscall_table[SYS_getpeername] = "getpeername"; |
| 443 | #endif |
| 444 | #if defined (SYS_getpgid) |
| 445 | syscall_table[SYS_getpgid] = "getpgid"; |
| 446 | #endif |
| 447 | #if defined (SYS_getpgrp) |
| 448 | syscall_table[SYS_getpgrp] = "getpgrp"; |
| 449 | #endif |
| 450 | #if defined (SYS_getpid) |
| 451 | syscall_table[SYS_getpid] = "getpid"; |
| 452 | #endif |
| 453 | #if defined (SYS_getpmsg) |
| 454 | syscall_table[SYS_getpmsg] = "getpmsg"; |
| 455 | #endif |
| 456 | #if defined (SYS_getpriority) |
| 457 | syscall_table[SYS_getpriority] = "getpriority"; |
| 458 | #endif |
| 459 | #if defined (SYS_getrlimit) |
| 460 | syscall_table[SYS_getrlimit] = "getrlimit"; |
| 461 | #endif |
| 462 | #if defined (SYS_getrlimit64) |
| 463 | syscall_table[SYS_getrlimit64] = "getrlimit64"; |
| 464 | #endif |
| 465 | #if defined (SYS_getrusage) |
| 466 | syscall_table[SYS_getrusage] = "getrusage"; |
| 467 | #endif |
| 468 | #if defined (SYS_getsid) |
| 469 | syscall_table[SYS_getsid] = "getsid"; |
| 470 | #endif |
| 471 | #if defined (SYS_getsockname) |
| 472 | syscall_table[SYS_getsockname] = "getsockname"; |
| 473 | #endif |
| 474 | #if defined (SYS_getsockopt) |
| 475 | syscall_table[SYS_getsockopt] = "getsockopt"; |
| 476 | #endif |
| 477 | #if defined (SYS_gettimeofday) |
| 478 | syscall_table[SYS_gettimeofday] = "gettimeofday"; |
| 479 | #endif |
| 480 | #if defined (SYS_getuid) |
| 481 | syscall_table[SYS_getuid] = "getuid"; |
| 482 | #endif |
| 483 | #if defined (SYS_gtty) |
| 484 | syscall_table[SYS_gtty] = "gtty"; |
| 485 | #endif |
| 486 | #if defined (SYS_hrtsys) |
| 487 | syscall_table[SYS_hrtsys] = "hrtsys"; |
| 488 | #endif |
| 489 | #if defined (SYS_inst_sync) |
| 490 | syscall_table[SYS_inst_sync] = "inst_sync"; |
| 491 | #endif |
| 492 | #if defined (SYS_install_utrap) |
| 493 | syscall_table[SYS_install_utrap] = "install_utrap"; |
| 494 | #endif |
| 495 | #if defined (SYS_invlpg) |
| 496 | syscall_table[SYS_invlpg] = "invlpg"; |
| 497 | #endif |
| 498 | #if defined (SYS_ioctl) |
| 499 | syscall_table[SYS_ioctl] = "ioctl"; |
| 500 | #endif |
| 501 | #if defined (SYS_kaio) |
| 502 | syscall_table[SYS_kaio] = "kaio"; |
| 503 | #endif |
| 504 | #if defined (SYS_keyctl) |
| 505 | syscall_table[SYS_keyctl] = "keyctl"; |
| 506 | #endif |
| 507 | #if defined (SYS_kill) |
| 508 | syscall_table[SYS_kill] = "kill"; |
| 509 | #endif |
| 510 | #if defined (SYS_killpg) |
| 511 | syscall_table[SYS_killpg] = "killpg"; |
| 512 | #endif |
| 513 | #if defined (SYS_kloadcall) |
| 514 | syscall_table[SYS_kloadcall] = "kloadcall"; |
| 515 | #endif |
| 516 | #if defined (SYS_kmodcall) |
| 517 | syscall_table[SYS_kmodcall] = "kmodcall"; |
| 518 | #endif |
| 519 | #if defined (SYS_ksigaction) |
| 520 | syscall_table[SYS_ksigaction] = "ksigaction"; |
| 521 | #endif |
| 522 | #if defined (SYS_ksigprocmask) |
| 523 | syscall_table[SYS_ksigprocmask] = "ksigprocmask"; |
| 524 | #endif |
| 525 | #if defined (SYS_ksigqueue) |
| 526 | syscall_table[SYS_ksigqueue] = "ksigqueue"; |
| 527 | #endif |
| 528 | #if defined (SYS_lchown) |
| 529 | syscall_table[SYS_lchown] = "lchown"; |
| 530 | #endif |
| 531 | #if defined (SYS_link) |
| 532 | syscall_table[SYS_link] = "link"; |
| 533 | #endif |
| 534 | #if defined (SYS_listen) |
| 535 | syscall_table[SYS_listen] = "listen"; |
| 536 | #endif |
| 537 | #if defined (SYS_llseek) |
| 538 | syscall_table[SYS_llseek] = "llseek"; |
| 539 | #endif |
| 540 | #if defined (SYS_lseek) |
| 541 | syscall_table[SYS_lseek] = "lseek"; |
| 542 | #endif |
| 543 | #if defined (SYS_lseek64) |
| 544 | syscall_table[SYS_lseek64] = "lseek64"; |
| 545 | #endif |
| 546 | #if defined (SYS_lstat) |
| 547 | syscall_table[SYS_lstat] = "lstat"; |
| 548 | #endif |
| 549 | #if defined (SYS_lstat64) |
| 550 | syscall_table[SYS_lstat64] = "lstat64"; |
| 551 | #endif |
| 552 | #if defined (SYS_lvldom) |
| 553 | syscall_table[SYS_lvldom] = "lvldom"; |
| 554 | #endif |
| 555 | #if defined (SYS_lvlequal) |
| 556 | syscall_table[SYS_lvlequal] = "lvlequal"; |
| 557 | #endif |
| 558 | #if defined (SYS_lvlfile) |
| 559 | syscall_table[SYS_lvlfile] = "lvlfile"; |
| 560 | #endif |
| 561 | #if defined (SYS_lvlipc) |
| 562 | syscall_table[SYS_lvlipc] = "lvlipc"; |
| 563 | #endif |
| 564 | #if defined (SYS_lvlproc) |
| 565 | syscall_table[SYS_lvlproc] = "lvlproc"; |
| 566 | #endif |
| 567 | #if defined (SYS_lvlvfs) |
| 568 | syscall_table[SYS_lvlvfs] = "lvlvfs"; |
| 569 | #endif |
| 570 | #if defined (SYS_lwp_alarm) |
| 571 | syscall_table[SYS_lwp_alarm] = "lwp_alarm"; |
| 572 | #endif |
| 573 | #if defined (SYS_lwp_cond_broadcast) |
| 574 | syscall_table[SYS_lwp_cond_broadcast] = "lwp_cond_broadcast"; |
| 575 | #endif |
| 576 | #if defined (SYS_lwp_cond_signal) |
| 577 | syscall_table[SYS_lwp_cond_signal] = "lwp_cond_signal"; |
| 578 | #endif |
| 579 | #if defined (SYS_lwp_cond_wait) |
| 580 | syscall_table[SYS_lwp_cond_wait] = "lwp_cond_wait"; |
| 581 | #endif |
| 582 | #if defined (SYS_lwp_continue) |
| 583 | syscall_table[SYS_lwp_continue] = "lwp_continue"; |
| 584 | #endif |
| 585 | #if defined (SYS_lwp_create) |
| 586 | syscall_table[SYS_lwp_create] = "lwp_create"; |
| 587 | #endif |
| 588 | #if defined (SYS_lwp_exit) |
| 589 | syscall_table[SYS_lwp_exit] = "lwp_exit"; |
| 590 | #endif |
| 591 | #if defined (SYS_lwp_getprivate) |
| 592 | syscall_table[SYS_lwp_getprivate] = "lwp_getprivate"; |
| 593 | #endif |
| 594 | #if defined (SYS_lwp_info) |
| 595 | syscall_table[SYS_lwp_info] = "lwp_info"; |
| 596 | #endif |
| 597 | #if defined (SYS_lwp_kill) |
| 598 | syscall_table[SYS_lwp_kill] = "lwp_kill"; |
| 599 | #endif |
| 600 | #if defined (SYS_lwp_mutex_init) |
| 601 | syscall_table[SYS_lwp_mutex_init] = "lwp_mutex_init"; |
| 602 | #endif |
| 603 | #if defined (SYS_lwp_mutex_lock) |
| 604 | syscall_table[SYS_lwp_mutex_lock] = "lwp_mutex_lock"; |
| 605 | #endif |
| 606 | #if defined (SYS_lwp_mutex_trylock) |
| 607 | syscall_table[SYS_lwp_mutex_trylock] = "lwp_mutex_trylock"; |
| 608 | #endif |
| 609 | #if defined (SYS_lwp_mutex_unlock) |
| 610 | syscall_table[SYS_lwp_mutex_unlock] = "lwp_mutex_unlock"; |
| 611 | #endif |
| 612 | #if defined (SYS_lwp_private) |
| 613 | syscall_table[SYS_lwp_private] = "lwp_private"; |
| 614 | #endif |
| 615 | #if defined (SYS_lwp_self) |
| 616 | syscall_table[SYS_lwp_self] = "lwp_self"; |
| 617 | #endif |
| 618 | #if defined (SYS_lwp_sema_post) |
| 619 | syscall_table[SYS_lwp_sema_post] = "lwp_sema_post"; |
| 620 | #endif |
| 621 | #if defined (SYS_lwp_sema_trywait) |
| 622 | syscall_table[SYS_lwp_sema_trywait] = "lwp_sema_trywait"; |
| 623 | #endif |
| 624 | #if defined (SYS_lwp_sema_wait) |
| 625 | syscall_table[SYS_lwp_sema_wait] = "lwp_sema_wait"; |
| 626 | #endif |
| 627 | #if defined (SYS_lwp_setprivate) |
| 628 | syscall_table[SYS_lwp_setprivate] = "lwp_setprivate"; |
| 629 | #endif |
| 630 | #if defined (SYS_lwp_sigredirect) |
| 631 | syscall_table[SYS_lwp_sigredirect] = "lwp_sigredirect"; |
| 632 | #endif |
| 633 | #if defined (SYS_lwp_suspend) |
| 634 | syscall_table[SYS_lwp_suspend] = "lwp_suspend"; |
| 635 | #endif |
| 636 | #if defined (SYS_lwp_wait) |
| 637 | syscall_table[SYS_lwp_wait] = "lwp_wait"; |
| 638 | #endif |
| 639 | #if defined (SYS_lxstat) |
| 640 | syscall_table[SYS_lxstat] = "lxstat"; |
| 641 | #endif |
| 642 | #if defined (SYS_madvise) |
| 643 | syscall_table[SYS_madvise] = "madvise"; |
| 644 | #endif |
| 645 | #if defined (SYS_memcntl) |
| 646 | syscall_table[SYS_memcntl] = "memcntl"; |
| 647 | #endif |
| 648 | #if defined (SYS_mincore) |
| 649 | syscall_table[SYS_mincore] = "mincore"; |
| 650 | #endif |
| 651 | #if defined (SYS_mincore) |
| 652 | syscall_table[SYS_mincore] = "mincore"; |
| 653 | #endif |
| 654 | #if defined (SYS_mkdir) |
| 655 | syscall_table[SYS_mkdir] = "mkdir"; |
| 656 | #endif |
| 657 | #if defined (SYS_mkmld) |
| 658 | syscall_table[SYS_mkmld] = "mkmld"; |
| 659 | #endif |
| 660 | #if defined (SYS_mknod) |
| 661 | syscall_table[SYS_mknod] = "mknod"; |
| 662 | #endif |
| 663 | #if defined (SYS_mldmode) |
| 664 | syscall_table[SYS_mldmode] = "mldmode"; |
| 665 | #endif |
| 666 | #if defined (SYS_mmap) |
| 667 | syscall_table[SYS_mmap] = "mmap"; |
| 668 | #endif |
| 669 | #if defined (SYS_mmap64) |
| 670 | syscall_table[SYS_mmap64] = "mmap64"; |
| 671 | #endif |
| 672 | #if defined (SYS_modadm) |
| 673 | syscall_table[SYS_modadm] = "modadm"; |
| 674 | #endif |
| 675 | #if defined (SYS_modctl) |
| 676 | syscall_table[SYS_modctl] = "modctl"; |
| 677 | #endif |
| 678 | #if defined (SYS_modload) |
| 679 | syscall_table[SYS_modload] = "modload"; |
| 680 | #endif |
| 681 | #if defined (SYS_modpath) |
| 682 | syscall_table[SYS_modpath] = "modpath"; |
| 683 | #endif |
| 684 | #if defined (SYS_modstat) |
| 685 | syscall_table[SYS_modstat] = "modstat"; |
| 686 | #endif |
| 687 | #if defined (SYS_moduload) |
| 688 | syscall_table[SYS_moduload] = "moduload"; |
| 689 | #endif |
| 690 | #if defined (SYS_mount) |
| 691 | syscall_table[SYS_mount] = "mount"; |
| 692 | #endif |
| 693 | #if defined (SYS_mprotect) |
| 694 | syscall_table[SYS_mprotect] = "mprotect"; |
| 695 | #endif |
| 696 | #if defined (SYS_mremap) |
| 697 | syscall_table[SYS_mremap] = "mremap"; |
| 698 | #endif |
| 699 | #if defined (SYS_msfs_syscall) |
| 700 | syscall_table[SYS_msfs_syscall] = "msfs_syscall"; |
| 701 | #endif |
| 702 | #if defined (SYS_msgctl) |
| 703 | syscall_table[SYS_msgctl] = "msgctl"; |
| 704 | #endif |
| 705 | #if defined (SYS_msgget) |
| 706 | syscall_table[SYS_msgget] = "msgget"; |
| 707 | #endif |
| 708 | #if defined (SYS_msgrcv) |
| 709 | syscall_table[SYS_msgrcv] = "msgrcv"; |
| 710 | #endif |
| 711 | #if defined (SYS_msgsnd) |
| 712 | syscall_table[SYS_msgsnd] = "msgsnd"; |
| 713 | #endif |
| 714 | #if defined (SYS_msgsys) |
| 715 | syscall_table[SYS_msgsys] = "msgsys"; |
| 716 | #endif |
| 717 | #if defined (SYS_msleep) |
| 718 | syscall_table[SYS_msleep] = "msleep"; |
| 719 | #endif |
| 720 | #if defined (SYS_msync) |
| 721 | syscall_table[SYS_msync] = "msync"; |
| 722 | #endif |
| 723 | #if defined (SYS_munmap) |
| 724 | syscall_table[SYS_munmap] = "munmap"; |
| 725 | #endif |
| 726 | #if defined (SYS_mvalid) |
| 727 | syscall_table[SYS_mvalid] = "mvalid"; |
| 728 | #endif |
| 729 | #if defined (SYS_mwakeup) |
| 730 | syscall_table[SYS_mwakeup] = "mwakeup"; |
| 731 | #endif |
| 732 | #if defined (SYS_naccept) |
| 733 | syscall_table[SYS_naccept] = "naccept"; |
| 734 | #endif |
| 735 | #if defined (SYS_nanosleep) |
| 736 | syscall_table[SYS_nanosleep] = "nanosleep"; |
| 737 | #endif |
| 738 | #if defined (SYS_nfssvc) |
| 739 | syscall_table[SYS_nfssvc] = "nfssvc"; |
| 740 | #endif |
| 741 | #if defined (SYS_nfssys) |
| 742 | syscall_table[SYS_nfssys] = "nfssys"; |
| 743 | #endif |
| 744 | #if defined (SYS_ngetpeername) |
| 745 | syscall_table[SYS_ngetpeername] = "ngetpeername"; |
| 746 | #endif |
| 747 | #if defined (SYS_ngetsockname) |
| 748 | syscall_table[SYS_ngetsockname] = "ngetsockname"; |
| 749 | #endif |
| 750 | #if defined (SYS_nice) |
| 751 | syscall_table[SYS_nice] = "nice"; |
| 752 | #endif |
| 753 | #if defined (SYS_nrecvfrom) |
| 754 | syscall_table[SYS_nrecvfrom] = "nrecvfrom"; |
| 755 | #endif |
| 756 | #if defined (SYS_nrecvmsg) |
| 757 | syscall_table[SYS_nrecvmsg] = "nrecvmsg"; |
| 758 | #endif |
| 759 | #if defined (SYS_nsendmsg) |
| 760 | syscall_table[SYS_nsendmsg] = "nsendmsg"; |
| 761 | #endif |
| 762 | #if defined (SYS_ntp_adjtime) |
| 763 | syscall_table[SYS_ntp_adjtime] = "ntp_adjtime"; |
| 764 | #endif |
| 765 | #if defined (SYS_ntp_gettime) |
| 766 | syscall_table[SYS_ntp_gettime] = "ntp_gettime"; |
| 767 | #endif |
| 768 | #if defined (SYS_nuname) |
| 769 | syscall_table[SYS_nuname] = "nuname"; |
| 770 | #endif |
| 771 | #if defined (SYS_obreak) |
| 772 | syscall_table[SYS_obreak] = "obreak"; |
| 773 | #endif |
| 774 | #if defined (SYS_old_accept) |
| 775 | syscall_table[SYS_old_accept] = "old_accept"; |
| 776 | #endif |
| 777 | #if defined (SYS_old_fstat) |
| 778 | syscall_table[SYS_old_fstat] = "old_fstat"; |
| 779 | #endif |
| 780 | #if defined (SYS_old_getpeername) |
| 781 | syscall_table[SYS_old_getpeername] = "old_getpeername"; |
| 782 | #endif |
| 783 | #if defined (SYS_old_getpgrp) |
| 784 | syscall_table[SYS_old_getpgrp] = "old_getpgrp"; |
| 785 | #endif |
| 786 | #if defined (SYS_old_getsockname) |
| 787 | syscall_table[SYS_old_getsockname] = "old_getsockname"; |
| 788 | #endif |
| 789 | #if defined (SYS_old_killpg) |
| 790 | syscall_table[SYS_old_killpg] = "old_killpg"; |
| 791 | #endif |
| 792 | #if defined (SYS_old_lstat) |
| 793 | syscall_table[SYS_old_lstat] = "old_lstat"; |
| 794 | #endif |
| 795 | #if defined (SYS_old_recv) |
| 796 | syscall_table[SYS_old_recv] = "old_recv"; |
| 797 | #endif |
| 798 | #if defined (SYS_old_recvfrom) |
| 799 | syscall_table[SYS_old_recvfrom] = "old_recvfrom"; |
| 800 | #endif |
| 801 | #if defined (SYS_old_recvmsg) |
| 802 | syscall_table[SYS_old_recvmsg] = "old_recvmsg"; |
| 803 | #endif |
| 804 | #if defined (SYS_old_send) |
| 805 | syscall_table[SYS_old_send] = "old_send"; |
| 806 | #endif |
| 807 | #if defined (SYS_old_sendmsg) |
| 808 | syscall_table[SYS_old_sendmsg] = "old_sendmsg"; |
| 809 | #endif |
| 810 | #if defined (SYS_old_sigblock) |
| 811 | syscall_table[SYS_old_sigblock] = "old_sigblock"; |
| 812 | #endif |
| 813 | #if defined (SYS_old_sigsetmask) |
| 814 | syscall_table[SYS_old_sigsetmask] = "old_sigsetmask"; |
| 815 | #endif |
| 816 | #if defined (SYS_old_sigvec) |
| 817 | syscall_table[SYS_old_sigvec] = "old_sigvec"; |
| 818 | #endif |
| 819 | #if defined (SYS_old_stat) |
| 820 | syscall_table[SYS_old_stat] = "old_stat"; |
| 821 | #endif |
| 822 | #if defined (SYS_old_vhangup) |
| 823 | syscall_table[SYS_old_vhangup] = "old_vhangup"; |
| 824 | #endif |
| 825 | #if defined (SYS_old_wait) |
| 826 | syscall_table[SYS_old_wait] = "old_wait"; |
| 827 | #endif |
| 828 | #if defined (SYS_oldquota) |
| 829 | syscall_table[SYS_oldquota] = "oldquota"; |
| 830 | #endif |
| 831 | #if defined (SYS_online) |
| 832 | syscall_table[SYS_online] = "online"; |
| 833 | #endif |
| 834 | #if defined (SYS_open) |
| 835 | syscall_table[SYS_open] = "open"; |
| 836 | #endif |
| 837 | #if defined (SYS_open64) |
| 838 | syscall_table[SYS_open64] = "open64"; |
| 839 | #endif |
| 840 | #if defined (SYS_ovadvise) |
| 841 | syscall_table[SYS_ovadvise] = "ovadvise"; |
| 842 | #endif |
| 843 | #if defined (SYS_p_online) |
| 844 | syscall_table[SYS_p_online] = "p_online"; |
| 845 | #endif |
| 846 | #if defined (SYS_pagelock) |
| 847 | syscall_table[SYS_pagelock] = "pagelock"; |
| 848 | #endif |
| 849 | #if defined (SYS_pathconf) |
| 850 | syscall_table[SYS_pathconf] = "pathconf"; |
| 851 | #endif |
| 852 | #if defined (SYS_pause) |
| 853 | syscall_table[SYS_pause] = "pause"; |
| 854 | #endif |
| 855 | #if defined (SYS_pgrpsys) |
| 856 | syscall_table[SYS_pgrpsys] = "pgrpsys"; |
| 857 | #endif |
| 858 | #if defined (SYS_pid_block) |
| 859 | syscall_table[SYS_pid_block] = "pid_block"; |
| 860 | #endif |
| 861 | #if defined (SYS_pid_unblock) |
| 862 | syscall_table[SYS_pid_unblock] = "pid_unblock"; |
| 863 | #endif |
| 864 | #if defined (SYS_pipe) |
| 865 | syscall_table[SYS_pipe] = "pipe"; |
| 866 | #endif |
| 867 | #if defined (SYS_plock) |
| 868 | syscall_table[SYS_plock] = "plock"; |
| 869 | #endif |
| 870 | #if defined (SYS_poll) |
| 871 | syscall_table[SYS_poll] = "poll"; |
| 872 | #endif |
| 873 | #if defined (SYS_prctl) |
| 874 | syscall_table[SYS_prctl] = "prctl"; |
| 875 | #endif |
| 876 | #if defined (SYS_pread) |
| 877 | syscall_table[SYS_pread] = "pread"; |
| 878 | #endif |
| 879 | #if defined (SYS_pread64) |
| 880 | syscall_table[SYS_pread64] = "pread64"; |
| 881 | #endif |
| 882 | #if defined (SYS_pread64) |
| 883 | syscall_table[SYS_pread64] = "pread64"; |
| 884 | #endif |
| 885 | #if defined (SYS_prepblock) |
| 886 | syscall_table[SYS_prepblock] = "prepblock"; |
| 887 | #endif |
| 888 | #if defined (SYS_priocntl) |
| 889 | syscall_table[SYS_priocntl] = "priocntl"; |
| 890 | #endif |
| 891 | #if defined (SYS_priocntllst) |
| 892 | syscall_table[SYS_priocntllst] = "priocntllst"; |
| 893 | #endif |
| 894 | #if defined (SYS_priocntlset) |
| 895 | syscall_table[SYS_priocntlset] = "priocntlset"; |
| 896 | #endif |
| 897 | #if defined (SYS_priocntlsys) |
| 898 | syscall_table[SYS_priocntlsys] = "priocntlsys"; |
| 899 | #endif |
| 900 | #if defined (SYS_procblk) |
| 901 | syscall_table[SYS_procblk] = "procblk"; |
| 902 | #endif |
| 903 | #if defined (SYS_processor_bind) |
| 904 | syscall_table[SYS_processor_bind] = "processor_bind"; |
| 905 | #endif |
| 906 | #if defined (SYS_processor_exbind) |
| 907 | syscall_table[SYS_processor_exbind] = "processor_exbind"; |
| 908 | #endif |
| 909 | #if defined (SYS_processor_info) |
| 910 | syscall_table[SYS_processor_info] = "processor_info"; |
| 911 | #endif |
| 912 | #if defined (SYS_procpriv) |
| 913 | syscall_table[SYS_procpriv] = "procpriv"; |
| 914 | #endif |
| 915 | #if defined (SYS_profil) |
| 916 | syscall_table[SYS_profil] = "profil"; |
| 917 | #endif |
| 918 | #if defined (SYS_proplist_syscall) |
| 919 | syscall_table[SYS_proplist_syscall] = "proplist_syscall"; |
| 920 | #endif |
| 921 | #if defined (SYS_pset) |
| 922 | syscall_table[SYS_pset] = "pset"; |
| 923 | #endif |
| 924 | #if defined (SYS_ptrace) |
| 925 | syscall_table[SYS_ptrace] = "ptrace"; |
| 926 | #endif |
| 927 | #if defined (SYS_putmsg) |
| 928 | syscall_table[SYS_putmsg] = "putmsg"; |
| 929 | #endif |
| 930 | #if defined (SYS_putpmsg) |
| 931 | syscall_table[SYS_putpmsg] = "putpmsg"; |
| 932 | #endif |
| 933 | #if defined (SYS_pwrite) |
| 934 | syscall_table[SYS_pwrite] = "pwrite"; |
| 935 | #endif |
| 936 | #if defined (SYS_pwrite64) |
| 937 | syscall_table[SYS_pwrite64] = "pwrite64"; |
| 938 | #endif |
| 939 | #if defined (SYS_quotactl) |
| 940 | syscall_table[SYS_quotactl] = "quotactl"; |
| 941 | #endif |
| 942 | #if defined (SYS_rdblock) |
| 943 | syscall_table[SYS_rdblock] = "rdblock"; |
| 944 | #endif |
| 945 | #if defined (SYS_read) |
| 946 | syscall_table[SYS_read] = "read"; |
| 947 | #endif |
| 948 | #if defined (SYS_readlink) |
| 949 | syscall_table[SYS_readlink] = "readlink"; |
| 950 | #endif |
| 951 | #if defined (SYS_readv) |
| 952 | syscall_table[SYS_readv] = "readv"; |
| 953 | #endif |
| 954 | #if defined (SYS_reboot) |
| 955 | syscall_table[SYS_reboot] = "reboot"; |
| 956 | #endif |
| 957 | #if defined (SYS_recv) |
| 958 | syscall_table[SYS_recv] = "recv"; |
| 959 | #endif |
| 960 | #if defined (SYS_recvfrom) |
| 961 | syscall_table[SYS_recvfrom] = "recvfrom"; |
| 962 | #endif |
| 963 | #if defined (SYS_recvmsg) |
| 964 | syscall_table[SYS_recvmsg] = "recvmsg"; |
| 965 | #endif |
| 966 | #if defined (SYS_rename) |
| 967 | syscall_table[SYS_rename] = "rename"; |
| 968 | #endif |
| 969 | #if defined (SYS_resolvepath) |
| 970 | syscall_table[SYS_resolvepath] = "resolvepath"; |
| 971 | #endif |
| 972 | #if defined (SYS_revoke) |
| 973 | syscall_table[SYS_revoke] = "revoke"; |
| 974 | #endif |
| 975 | #if defined (SYS_rfsys) |
| 976 | syscall_table[SYS_rfsys] = "rfsys"; |
| 977 | #endif |
| 978 | #if defined (SYS_rmdir) |
| 979 | syscall_table[SYS_rmdir] = "rmdir"; |
| 980 | #endif |
| 981 | #if defined (SYS_rpcsys) |
| 982 | syscall_table[SYS_rpcsys] = "rpcsys"; |
| 983 | #endif |
| 984 | #if defined (SYS_sbrk) |
| 985 | syscall_table[SYS_sbrk] = "sbrk"; |
| 986 | #endif |
| 987 | #if defined (SYS_schedctl) |
| 988 | syscall_table[SYS_schedctl] = "schedctl"; |
| 989 | #endif |
| 990 | #if defined (SYS_secadvise) |
| 991 | syscall_table[SYS_secadvise] = "secadvise"; |
| 992 | #endif |
| 993 | #if defined (SYS_secsys) |
| 994 | syscall_table[SYS_secsys] = "secsys"; |
| 995 | #endif |
| 996 | #if defined (SYS_security) |
| 997 | syscall_table[SYS_security] = "security"; |
| 998 | #endif |
| 999 | #if defined (SYS_select) |
| 1000 | syscall_table[SYS_select] = "select"; |
| 1001 | #endif |
| 1002 | #if defined (SYS_semctl) |
| 1003 | syscall_table[SYS_semctl] = "semctl"; |
| 1004 | #endif |
| 1005 | #if defined (SYS_semget) |
| 1006 | syscall_table[SYS_semget] = "semget"; |
| 1007 | #endif |
| 1008 | #if defined (SYS_semop) |
| 1009 | syscall_table[SYS_semop] = "semop"; |
| 1010 | #endif |
| 1011 | #if defined (SYS_semsys) |
| 1012 | syscall_table[SYS_semsys] = "semsys"; |
| 1013 | #endif |
| 1014 | #if defined (SYS_send) |
| 1015 | syscall_table[SYS_send] = "send"; |
| 1016 | #endif |
| 1017 | #if defined (SYS_sendmsg) |
| 1018 | syscall_table[SYS_sendmsg] = "sendmsg"; |
| 1019 | #endif |
| 1020 | #if defined (SYS_sendto) |
| 1021 | syscall_table[SYS_sendto] = "sendto"; |
| 1022 | #endif |
| 1023 | #if defined (SYS_set_program_attributes) |
| 1024 | syscall_table[SYS_set_program_attributes] = "set_program_attributes"; |
| 1025 | #endif |
| 1026 | #if defined (SYS_set_speculative) |
| 1027 | syscall_table[SYS_set_speculative] = "set_speculative"; |
| 1028 | #endif |
| 1029 | #if defined (SYS_set_sysinfo) |
| 1030 | syscall_table[SYS_set_sysinfo] = "set_sysinfo"; |
| 1031 | #endif |
| 1032 | #if defined (SYS_setcontext) |
| 1033 | syscall_table[SYS_setcontext] = "setcontext"; |
| 1034 | #endif |
| 1035 | #if defined (SYS_setdomainname) |
| 1036 | syscall_table[SYS_setdomainname] = "setdomainname"; |
| 1037 | #endif |
| 1038 | #if defined (SYS_setegid) |
| 1039 | syscall_table[SYS_setegid] = "setegid"; |
| 1040 | #endif |
| 1041 | #if defined (SYS_seteuid) |
| 1042 | syscall_table[SYS_seteuid] = "seteuid"; |
| 1043 | #endif |
| 1044 | #if defined (SYS_setgid) |
| 1045 | syscall_table[SYS_setgid] = "setgid"; |
| 1046 | #endif |
| 1047 | #if defined (SYS_setgroups) |
| 1048 | syscall_table[SYS_setgroups] = "setgroups"; |
| 1049 | #endif |
| 1050 | #if defined (SYS_sethostid) |
| 1051 | syscall_table[SYS_sethostid] = "sethostid"; |
| 1052 | #endif |
| 1053 | #if defined (SYS_sethostname) |
| 1054 | syscall_table[SYS_sethostname] = "sethostname"; |
| 1055 | #endif |
| 1056 | #if defined (SYS_setitimer) |
| 1057 | syscall_table[SYS_setitimer] = "setitimer"; |
| 1058 | #endif |
| 1059 | #if defined (SYS_setlogin) |
| 1060 | syscall_table[SYS_setlogin] = "setlogin"; |
| 1061 | #endif |
| 1062 | #if defined (SYS_setpgid) |
| 1063 | syscall_table[SYS_setpgid] = "setpgid"; |
| 1064 | #endif |
| 1065 | #if defined (SYS_setpgrp) |
| 1066 | syscall_table[SYS_setpgrp] = "setpgrp"; |
| 1067 | #endif |
| 1068 | #if defined (SYS_setpriority) |
| 1069 | syscall_table[SYS_setpriority] = "setpriority"; |
| 1070 | #endif |
| 1071 | #if defined (SYS_setregid) |
| 1072 | syscall_table[SYS_setregid] = "setregid"; |
| 1073 | #endif |
| 1074 | #if defined (SYS_setreuid) |
| 1075 | syscall_table[SYS_setreuid] = "setreuid"; |
| 1076 | #endif |
| 1077 | #if defined (SYS_setrlimit) |
| 1078 | syscall_table[SYS_setrlimit] = "setrlimit"; |
| 1079 | #endif |
| 1080 | #if defined (SYS_setrlimit64) |
| 1081 | syscall_table[SYS_setrlimit64] = "setrlimit64"; |
| 1082 | #endif |
| 1083 | #if defined (SYS_setsid) |
| 1084 | syscall_table[SYS_setsid] = "setsid"; |
| 1085 | #endif |
| 1086 | #if defined (SYS_setsockopt) |
| 1087 | syscall_table[SYS_setsockopt] = "setsockopt"; |
| 1088 | #endif |
| 1089 | #if defined (SYS_settimeofday) |
| 1090 | syscall_table[SYS_settimeofday] = "settimeofday"; |
| 1091 | #endif |
| 1092 | #if defined (SYS_setuid) |
| 1093 | syscall_table[SYS_setuid] = "setuid"; |
| 1094 | #endif |
| 1095 | #if defined (SYS_sgi) |
| 1096 | syscall_table[SYS_sgi] = "sgi"; |
| 1097 | #endif |
| 1098 | #if defined (SYS_sgifastpath) |
| 1099 | syscall_table[SYS_sgifastpath] = "sgifastpath"; |
| 1100 | #endif |
| 1101 | #if defined (SYS_sgikopt) |
| 1102 | syscall_table[SYS_sgikopt] = "sgikopt"; |
| 1103 | #endif |
| 1104 | #if defined (SYS_sginap) |
| 1105 | syscall_table[SYS_sginap] = "sginap"; |
| 1106 | #endif |
| 1107 | #if defined (SYS_shmat) |
| 1108 | syscall_table[SYS_shmat] = "shmat"; |
| 1109 | #endif |
| 1110 | #if defined (SYS_shmctl) |
| 1111 | syscall_table[SYS_shmctl] = "shmctl"; |
| 1112 | #endif |
| 1113 | #if defined (SYS_shmdt) |
| 1114 | syscall_table[SYS_shmdt] = "shmdt"; |
| 1115 | #endif |
| 1116 | #if defined (SYS_shmget) |
| 1117 | syscall_table[SYS_shmget] = "shmget"; |
| 1118 | #endif |
| 1119 | #if defined (SYS_shmsys) |
| 1120 | syscall_table[SYS_shmsys] = "shmsys"; |
| 1121 | #endif |
| 1122 | #if defined (SYS_shutdown) |
| 1123 | syscall_table[SYS_shutdown] = "shutdown"; |
| 1124 | #endif |
| 1125 | #if defined (SYS_sigaction) |
| 1126 | syscall_table[SYS_sigaction] = "sigaction"; |
| 1127 | #endif |
| 1128 | #if defined (SYS_sigaltstack) |
| 1129 | syscall_table[SYS_sigaltstack] = "sigaltstack"; |
| 1130 | #endif |
| 1131 | #if defined (SYS_sigaltstack) |
| 1132 | syscall_table[SYS_sigaltstack] = "sigaltstack"; |
| 1133 | #endif |
| 1134 | #if defined (SYS_sigblock) |
| 1135 | syscall_table[SYS_sigblock] = "sigblock"; |
| 1136 | #endif |
| 1137 | #if defined (SYS_signal) |
| 1138 | syscall_table[SYS_signal] = "signal"; |
| 1139 | #endif |
| 1140 | #if defined (SYS_signotify) |
| 1141 | syscall_table[SYS_signotify] = "signotify"; |
| 1142 | #endif |
| 1143 | #if defined (SYS_signotifywait) |
| 1144 | syscall_table[SYS_signotifywait] = "signotifywait"; |
| 1145 | #endif |
| 1146 | #if defined (SYS_sigpending) |
| 1147 | syscall_table[SYS_sigpending] = "sigpending"; |
| 1148 | #endif |
| 1149 | #if defined (SYS_sigpoll) |
| 1150 | syscall_table[SYS_sigpoll] = "sigpoll"; |
| 1151 | #endif |
| 1152 | #if defined (SYS_sigprocmask) |
| 1153 | syscall_table[SYS_sigprocmask] = "sigprocmask"; |
| 1154 | #endif |
| 1155 | #if defined (SYS_sigqueue) |
| 1156 | syscall_table[SYS_sigqueue] = "sigqueue"; |
| 1157 | #endif |
| 1158 | #if defined (SYS_sigreturn) |
| 1159 | syscall_table[SYS_sigreturn] = "sigreturn"; |
| 1160 | #endif |
| 1161 | #if defined (SYS_sigsendset) |
| 1162 | syscall_table[SYS_sigsendset] = "sigsendset"; |
| 1163 | #endif |
| 1164 | #if defined (SYS_sigsendsys) |
| 1165 | syscall_table[SYS_sigsendsys] = "sigsendsys"; |
| 1166 | #endif |
| 1167 | #if defined (SYS_sigsetmask) |
| 1168 | syscall_table[SYS_sigsetmask] = "sigsetmask"; |
| 1169 | #endif |
| 1170 | #if defined (SYS_sigstack) |
| 1171 | syscall_table[SYS_sigstack] = "sigstack"; |
| 1172 | #endif |
| 1173 | #if defined (SYS_sigsuspend) |
| 1174 | syscall_table[SYS_sigsuspend] = "sigsuspend"; |
| 1175 | #endif |
| 1176 | #if defined (SYS_sigvec) |
| 1177 | syscall_table[SYS_sigvec] = "sigvec"; |
| 1178 | #endif |
| 1179 | #if defined (SYS_sigwait) |
| 1180 | syscall_table[SYS_sigwait] = "sigwait"; |
| 1181 | #endif |
| 1182 | #if defined (SYS_sigwaitprim) |
| 1183 | syscall_table[SYS_sigwaitprim] = "sigwaitprim"; |
| 1184 | #endif |
| 1185 | #if defined (SYS_sleep) |
| 1186 | syscall_table[SYS_sleep] = "sleep"; |
| 1187 | #endif |
| 1188 | #if defined (SYS_so_socket) |
| 1189 | syscall_table[SYS_so_socket] = "so_socket"; |
| 1190 | #endif |
| 1191 | #if defined (SYS_so_socketpair) |
| 1192 | syscall_table[SYS_so_socketpair] = "so_socketpair"; |
| 1193 | #endif |
| 1194 | #if defined (SYS_sockconfig) |
| 1195 | syscall_table[SYS_sockconfig] = "sockconfig"; |
| 1196 | #endif |
| 1197 | #if defined (SYS_socket) |
| 1198 | syscall_table[SYS_socket] = "socket"; |
| 1199 | #endif |
| 1200 | #if defined (SYS_socketpair) |
| 1201 | syscall_table[SYS_socketpair] = "socketpair"; |
| 1202 | #endif |
| 1203 | #if defined (SYS_sproc) |
| 1204 | syscall_table[SYS_sproc] = "sproc"; |
| 1205 | #endif |
| 1206 | #if defined (SYS_sprocsp) |
| 1207 | syscall_table[SYS_sprocsp] = "sprocsp"; |
| 1208 | #endif |
| 1209 | #if defined (SYS_sstk) |
| 1210 | syscall_table[SYS_sstk] = "sstk"; |
| 1211 | #endif |
| 1212 | #if defined (SYS_stat) |
| 1213 | syscall_table[SYS_stat] = "stat"; |
| 1214 | #endif |
| 1215 | #if defined (SYS_stat64) |
| 1216 | syscall_table[SYS_stat64] = "stat64"; |
| 1217 | #endif |
| 1218 | #if defined (SYS_statfs) |
| 1219 | syscall_table[SYS_statfs] = "statfs"; |
| 1220 | #endif |
| 1221 | #if defined (SYS_statvfs) |
| 1222 | syscall_table[SYS_statvfs] = "statvfs"; |
| 1223 | #endif |
| 1224 | #if defined (SYS_statvfs64) |
| 1225 | syscall_table[SYS_statvfs64] = "statvfs64"; |
| 1226 | #endif |
| 1227 | #if defined (SYS_stime) |
| 1228 | syscall_table[SYS_stime] = "stime"; |
| 1229 | #endif |
| 1230 | #if defined (SYS_stty) |
| 1231 | syscall_table[SYS_stty] = "stty"; |
| 1232 | #endif |
| 1233 | #if defined (SYS_subsys_info) |
| 1234 | syscall_table[SYS_subsys_info] = "subsys_info"; |
| 1235 | #endif |
| 1236 | #if defined (SYS_swapctl) |
| 1237 | syscall_table[SYS_swapctl] = "swapctl"; |
| 1238 | #endif |
| 1239 | #if defined (SYS_swapon) |
| 1240 | syscall_table[SYS_swapon] = "swapon"; |
| 1241 | #endif |
| 1242 | #if defined (SYS_symlink) |
| 1243 | syscall_table[SYS_symlink] = "symlink"; |
| 1244 | #endif |
| 1245 | #if defined (SYS_sync) |
| 1246 | syscall_table[SYS_sync] = "sync"; |
| 1247 | #endif |
| 1248 | #if defined (SYS_sys3b) |
| 1249 | syscall_table[SYS_sys3b] = "sys3b"; |
| 1250 | #endif |
| 1251 | #if defined (SYS_syscall) |
| 1252 | syscall_table[SYS_syscall] = "syscall"; |
| 1253 | #endif |
| 1254 | #if defined (SYS_sysconfig) |
| 1255 | syscall_table[SYS_sysconfig] = "sysconfig"; |
| 1256 | #endif |
| 1257 | #if defined (SYS_sysfs) |
| 1258 | syscall_table[SYS_sysfs] = "sysfs"; |
| 1259 | #endif |
| 1260 | #if defined (SYS_sysi86) |
| 1261 | syscall_table[SYS_sysi86] = "sysi86"; |
| 1262 | #endif |
| 1263 | #if defined (SYS_sysinfo) |
| 1264 | syscall_table[SYS_sysinfo] = "sysinfo"; |
| 1265 | #endif |
| 1266 | #if defined (SYS_sysmips) |
| 1267 | syscall_table[SYS_sysmips] = "sysmips"; |
| 1268 | #endif |
| 1269 | #if defined (SYS_syssun) |
| 1270 | syscall_table[SYS_syssun] = "syssun"; |
| 1271 | #endif |
| 1272 | #if defined (SYS_systeminfo) |
| 1273 | syscall_table[SYS_systeminfo] = "systeminfo"; |
| 1274 | #endif |
| 1275 | #if defined (SYS_table) |
| 1276 | syscall_table[SYS_table] = "table"; |
| 1277 | #endif |
| 1278 | #if defined (SYS_time) |
| 1279 | syscall_table[SYS_time] = "time"; |
| 1280 | #endif |
| 1281 | #if defined (SYS_timedwait) |
| 1282 | syscall_table[SYS_timedwait] = "timedwait"; |
| 1283 | #endif |
| 1284 | #if defined (SYS_timer_create) |
| 1285 | syscall_table[SYS_timer_create] = "timer_create"; |
| 1286 | #endif |
| 1287 | #if defined (SYS_timer_delete) |
| 1288 | syscall_table[SYS_timer_delete] = "timer_delete"; |
| 1289 | #endif |
| 1290 | #if defined (SYS_timer_getoverrun) |
| 1291 | syscall_table[SYS_timer_getoverrun] = "timer_getoverrun"; |
| 1292 | #endif |
| 1293 | #if defined (SYS_timer_gettime) |
| 1294 | syscall_table[SYS_timer_gettime] = "timer_gettime"; |
| 1295 | #endif |
| 1296 | #if defined (SYS_timer_settime) |
| 1297 | syscall_table[SYS_timer_settime] = "timer_settime"; |
| 1298 | #endif |
| 1299 | #if defined (SYS_times) |
| 1300 | syscall_table[SYS_times] = "times"; |
| 1301 | #endif |
| 1302 | #if defined (SYS_truncate) |
| 1303 | syscall_table[SYS_truncate] = "truncate"; |
| 1304 | #endif |
| 1305 | #if defined (SYS_truncate64) |
| 1306 | syscall_table[SYS_truncate64] = "truncate64"; |
| 1307 | #endif |
| 1308 | #if defined (SYS_tsolsys) |
| 1309 | syscall_table[SYS_tsolsys] = "tsolsys"; |
| 1310 | #endif |
| 1311 | #if defined (SYS_uadmin) |
| 1312 | syscall_table[SYS_uadmin] = "uadmin"; |
| 1313 | #endif |
| 1314 | #if defined (SYS_ulimit) |
| 1315 | syscall_table[SYS_ulimit] = "ulimit"; |
| 1316 | #endif |
| 1317 | #if defined (SYS_umask) |
| 1318 | syscall_table[SYS_umask] = "umask"; |
| 1319 | #endif |
| 1320 | #if defined (SYS_umount) |
| 1321 | syscall_table[SYS_umount] = "umount"; |
| 1322 | #endif |
| 1323 | #if defined (SYS_uname) |
| 1324 | syscall_table[SYS_uname] = "uname"; |
| 1325 | #endif |
| 1326 | #if defined (SYS_unblock) |
| 1327 | syscall_table[SYS_unblock] = "unblock"; |
| 1328 | #endif |
| 1329 | #if defined (SYS_unlink) |
| 1330 | syscall_table[SYS_unlink] = "unlink"; |
| 1331 | #endif |
| 1332 | #if defined (SYS_unmount) |
| 1333 | syscall_table[SYS_unmount] = "unmount"; |
| 1334 | #endif |
| 1335 | #if defined (SYS_usleep_thread) |
| 1336 | syscall_table[SYS_usleep_thread] = "usleep_thread"; |
| 1337 | #endif |
| 1338 | #if defined (SYS_uswitch) |
| 1339 | syscall_table[SYS_uswitch] = "uswitch"; |
| 1340 | #endif |
| 1341 | #if defined (SYS_utc_adjtime) |
| 1342 | syscall_table[SYS_utc_adjtime] = "utc_adjtime"; |
| 1343 | #endif |
| 1344 | #if defined (SYS_utc_gettime) |
| 1345 | syscall_table[SYS_utc_gettime] = "utc_gettime"; |
| 1346 | #endif |
| 1347 | #if defined (SYS_utime) |
| 1348 | syscall_table[SYS_utime] = "utime"; |
| 1349 | #endif |
| 1350 | #if defined (SYS_utimes) |
| 1351 | syscall_table[SYS_utimes] = "utimes"; |
| 1352 | #endif |
| 1353 | #if defined (SYS_utssys) |
| 1354 | syscall_table[SYS_utssys] = "utssys"; |
| 1355 | #endif |
| 1356 | #if defined (SYS_vfork) |
| 1357 | syscall_table[SYS_vfork] = "vfork"; |
| 1358 | #endif |
| 1359 | #if defined (SYS_vhangup) |
| 1360 | syscall_table[SYS_vhangup] = "vhangup"; |
| 1361 | #endif |
| 1362 | #if defined (SYS_vtrace) |
| 1363 | syscall_table[SYS_vtrace] = "vtrace"; |
| 1364 | #endif |
| 1365 | #if defined (SYS_wait) |
| 1366 | syscall_table[SYS_wait] = "wait"; |
| 1367 | #endif |
| 1368 | #if defined (SYS_waitid) |
| 1369 | syscall_table[SYS_waitid] = "waitid"; |
| 1370 | #endif |
| 1371 | #if defined (SYS_waitsys) |
| 1372 | syscall_table[SYS_waitsys] = "waitsys"; |
| 1373 | #endif |
| 1374 | #if defined (SYS_write) |
| 1375 | syscall_table[SYS_write] = "write"; |
| 1376 | #endif |
| 1377 | #if defined (SYS_writev) |
| 1378 | syscall_table[SYS_writev] = "writev"; |
| 1379 | #endif |
| 1380 | #if defined (SYS_xenix) |
| 1381 | syscall_table[SYS_xenix] = "xenix"; |
| 1382 | #endif |
| 1383 | #if defined (SYS_xmknod) |
| 1384 | syscall_table[SYS_xmknod] = "xmknod"; |
| 1385 | #endif |
| 1386 | #if defined (SYS_xstat) |
| 1387 | syscall_table[SYS_xstat] = "xstat"; |
| 1388 | #endif |
| 1389 | #if defined (SYS_yield) |
| 1390 | syscall_table[SYS_yield] = "yield"; |
| 1391 | #endif |
| 1392 | } |
| 1393 | |
| 1394 | /* |
| 1395 | * Prettyprint a single syscall by number. |
| 1396 | */ |
| 1397 | |
| 1398 | void |
| 1399 | proc_prettyfprint_syscall (file, num, verbose) |
| 1400 | FILE *file; |
| 1401 | int num; |
| 1402 | int verbose; |
| 1403 | { |
| 1404 | if (syscall_table[num]) |
| 1405 | fprintf (file, "SYS_%s ", syscall_table[num]); |
| 1406 | else |
| 1407 | fprintf (file, "<Unknown syscall %d> ", num); |
| 1408 | } |
| 1409 | |
| 1410 | void |
| 1411 | proc_prettyprint_syscall (num, verbose) |
| 1412 | int num; |
| 1413 | int verbose; |
| 1414 | { |
| 1415 | proc_prettyfprint_syscall (stdout, num, verbose); |
| 1416 | } |
| 1417 | |
| 1418 | /* |
| 1419 | * Prettyprint all of the syscalls in a sysset_t set. |
| 1420 | */ |
| 1421 | |
| 1422 | void |
| 1423 | proc_prettyfprint_syscalls (file, sysset, verbose) |
| 1424 | FILE *file; |
| 1425 | sysset_t *sysset; |
| 1426 | int verbose; |
| 1427 | { |
| 1428 | int i; |
| 1429 | |
| 1430 | for (i = 0; i < MAX_SYSCALLS; i++) |
| 1431 | if (prismember (sysset, i)) |
| 1432 | { |
| 1433 | proc_prettyfprint_syscall (file, i, verbose); |
| 1434 | } |
| 1435 | fprintf (file, "\n"); |
| 1436 | } |
| 1437 | |
| 1438 | void |
| 1439 | proc_prettyprint_syscalls (sysset, verbose) |
| 1440 | sysset_t *sysset; |
| 1441 | int verbose; |
| 1442 | { |
| 1443 | proc_prettyfprint_syscalls (stdout, sysset, verbose); |
| 1444 | } |
| 1445 | |
| 1446 | /* FIXME: add real-time signals */ |
| 1447 | |
| 1448 | static struct trans signal_table[] = |
| 1449 | { |
| 1450 | { 0, "<no signal>", "no signal" }, |
| 1451 | #ifdef SIGHUP |
| 1452 | { SIGHUP, "SIGHUP", "Hangup" }, |
| 1453 | #endif |
| 1454 | #ifdef SIGINT |
| 1455 | { SIGINT, "SIGINT", "Interrupt (rubout)" }, |
| 1456 | #endif |
| 1457 | #ifdef SIGQUIT |
| 1458 | { SIGQUIT, "SIGQUIT", "Quit (ASCII FS)" }, |
| 1459 | #endif |
| 1460 | #ifdef SIGILL |
| 1461 | { SIGILL, "SIGILL", "Illegal instruction" }, /* not reset when caught */ |
| 1462 | #endif |
| 1463 | #ifdef SIGTRAP |
| 1464 | { SIGTRAP, "SIGTRAP", "Trace trap" }, /* not reset when caught */ |
| 1465 | #endif |
| 1466 | #ifdef SIGABRT |
| 1467 | { SIGABRT, "SIGABRT", "used by abort()" }, /* replaces SIGIOT */ |
| 1468 | #endif |
| 1469 | #ifdef SIGIOT |
| 1470 | { SIGIOT, "SIGIOT", "IOT instruction" }, |
| 1471 | #endif |
| 1472 | #ifdef SIGEMT |
| 1473 | { SIGEMT, "SIGEMT", "EMT instruction" }, |
| 1474 | #endif |
| 1475 | #ifdef SIGFPE |
| 1476 | { SIGFPE, "SIGFPE", "Floating point exception" }, |
| 1477 | #endif |
| 1478 | #ifdef SIGKILL |
| 1479 | { SIGKILL, "SIGKILL", "Kill" }, /* Solaris: cannot be caught/ignored */ |
| 1480 | #endif |
| 1481 | #ifdef SIGBUS |
| 1482 | { SIGBUS, "SIGBUS", "Bus error" }, |
| 1483 | #endif |
| 1484 | #ifdef SIGSEGV |
| 1485 | { SIGSEGV, "SIGSEGV", "Segmentation violation" }, |
| 1486 | #endif |
| 1487 | #ifdef SIGSYS |
| 1488 | { SIGSYS, "SIGSYS", "Bad argument to system call" }, |
| 1489 | #endif |
| 1490 | #ifdef SIGPIPE |
| 1491 | { SIGPIPE, "SIGPIPE", "Write to pipe with no one to read it" }, |
| 1492 | #endif |
| 1493 | #ifdef SIGALRM |
| 1494 | { SIGALRM, "SIGALRM", "Alarm clock" }, |
| 1495 | #endif |
| 1496 | #ifdef SIGTERM |
| 1497 | { SIGTERM, "SIGTERM", "Software termination signal from kill" }, |
| 1498 | #endif |
| 1499 | #ifdef SIGUSR1 |
| 1500 | { SIGUSR1, "SIGUSR1", "User defined signal 1" }, |
| 1501 | #endif |
| 1502 | #ifdef SIGUSR2 |
| 1503 | { SIGUSR2, "SIGUSR2", "User defined signal 2" }, |
| 1504 | #endif |
| 1505 | #ifdef SIGCHLD |
| 1506 | { SIGCHLD, "SIGCHLD", "Child status changed" }, /* Posix version */ |
| 1507 | #endif |
| 1508 | #ifdef SIGCLD |
| 1509 | { SIGCLD, "SIGCLD", "Child status changed" }, /* Solaris version */ |
| 1510 | #endif |
| 1511 | #ifdef SIGPWR |
| 1512 | { SIGPWR, "SIGPWR", "Power-fail restart" }, |
| 1513 | #endif |
| 1514 | #ifdef SIGWINCH |
| 1515 | { SIGWINCH, "SIGWINCH", "Window size change" }, |
| 1516 | #endif |
| 1517 | #ifdef SIGURG |
| 1518 | { SIGURG, "SIGURG", "Urgent socket condition" }, |
| 1519 | #endif |
| 1520 | #ifdef SIGPOLL |
| 1521 | { SIGPOLL, "SIGPOLL", "Pollable event" }, |
| 1522 | #endif |
| 1523 | #ifdef SIGIO |
| 1524 | { SIGIO, "SIGIO", "Socket I/O possible" }, /* alias for SIGPOLL */ |
| 1525 | #endif |
| 1526 | #ifdef SIGSTOP |
| 1527 | { SIGSTOP, "SIGSTOP", "Stop, not from tty" }, /* cannot be caught or ignored */ |
| 1528 | #endif |
| 1529 | #ifdef SIGTSTP |
| 1530 | { SIGTSTP, "SIGTSTP", "User stop from tty" }, |
| 1531 | #endif |
| 1532 | #ifdef SIGCONT |
| 1533 | { SIGCONT, "SIGCONT", "Stopped process has been continued" }, |
| 1534 | #endif |
| 1535 | #ifdef SIGTTIN |
| 1536 | { SIGTTIN, "SIGTTIN", "Background tty read attempted" }, |
| 1537 | #endif |
| 1538 | #ifdef SIGTTOU |
| 1539 | { SIGTTOU, "SIGTTOU", "Background tty write attempted" }, |
| 1540 | #endif |
| 1541 | #ifdef SIGVTALRM |
| 1542 | { SIGVTALRM, "SIGVTALRM", "Virtual timer expired" }, |
| 1543 | #endif |
| 1544 | #ifdef SIGPROF |
| 1545 | { SIGPROF, "SIGPROF", "Profiling timer expired" }, |
| 1546 | #endif |
| 1547 | #ifdef SIGXCPU |
| 1548 | { SIGXCPU, "SIGXCPU", "Exceeded CPU limit" }, |
| 1549 | #endif |
| 1550 | #ifdef SIGXFSZ |
| 1551 | { SIGXFSZ, "SIGXFSZ", "Exceeded file size limit" }, |
| 1552 | #endif |
| 1553 | #ifdef SIGWAITING |
| 1554 | { SIGWAITING, "SIGWAITING", "Process's LWPs are blocked" }, |
| 1555 | #endif |
| 1556 | #ifdef SIGLWP |
| 1557 | { SIGLWP, "SIGLWP", "Used by thread library" }, |
| 1558 | #endif |
| 1559 | #ifdef SIGFREEZE |
| 1560 | { SIGFREEZE, "SIGFREEZE", "Used by CPR" }, |
| 1561 | #endif |
| 1562 | #ifdef SIGTHAW |
| 1563 | { SIGTHAW, "SIGTHAW", "Used by CPR" }, |
| 1564 | #endif |
| 1565 | #ifdef SIGCANCEL |
| 1566 | { SIGCANCEL, "SIGCANCEL", "Used by libthread" }, |
| 1567 | #endif |
| 1568 | #ifdef SIGLOST |
| 1569 | { SIGLOST, "SIGLOST", "Resource lost" }, |
| 1570 | #endif |
| 1571 | #ifdef SIG32 |
| 1572 | { SIG32, "SIG32", "Reserved for kernel usage (Irix)" }, |
| 1573 | #endif |
| 1574 | #ifdef SIGPTINTR |
| 1575 | { SIGPTINTR, "SIGPTINTR", "Posix 1003.1b" }, |
| 1576 | #endif |
| 1577 | #ifdef SIGTRESCHED |
| 1578 | { SIGTRESCHED, "SIGTRESCHED", "Posix 1003.1b" }, |
| 1579 | #endif |
| 1580 | #ifdef SIGINFO |
| 1581 | { SIGINFO, "SIGINFO", "Information request" }, |
| 1582 | #endif |
| 1583 | #ifdef SIGRESV |
| 1584 | { SIGRESV, "SIGRESV", "Reserved by Digital for future use" }, |
| 1585 | #endif |
| 1586 | #ifdef SIGAIO |
| 1587 | { SIGAIO, "SIGAIO", "Asynchronous I/O signal" }, |
| 1588 | #endif |
| 1589 | }; |
| 1590 | |
| 1591 | /* |
| 1592 | * Prettyprint a single signal by number. |
| 1593 | * Accepts a signal number and finds it in the signal table, |
| 1594 | * then pretty-prints it. |
| 1595 | */ |
| 1596 | |
| 1597 | void |
| 1598 | proc_prettyfprint_signal (file, signo, verbose) |
| 1599 | FILE *file; |
| 1600 | int signo; |
| 1601 | int verbose; |
| 1602 | { |
| 1603 | int i; |
| 1604 | |
| 1605 | for (i = 0; i < sizeof (signal_table) / sizeof (signal_table[0]); i++) |
| 1606 | if (signo == signal_table[i].value) |
| 1607 | { |
| 1608 | fprintf (file, "%s", signal_table[i].name); |
| 1609 | if (verbose) |
| 1610 | fprintf (file, ": %s\n", signal_table[i].desc); |
| 1611 | else |
| 1612 | fprintf (file, " "); |
| 1613 | return; |
| 1614 | } |
| 1615 | fprintf (file, "Unknown signal %d%c", signo, verbose ? '\n' : ' '); |
| 1616 | } |
| 1617 | |
| 1618 | void |
| 1619 | proc_prettyprint_signal (signo, verbose) |
| 1620 | int signo; |
| 1621 | int verbose; |
| 1622 | { |
| 1623 | proc_prettyfprint_signal (stdout, signo, verbose); |
| 1624 | } |
| 1625 | |
| 1626 | /* |
| 1627 | * Prettyprint all of the signals in a sigset_t set. |
| 1628 | * |
| 1629 | * This function loops over all signal numbers from 0 to NSIG, |
| 1630 | * uses them as indexes for prismember, and prints them pretty. |
| 1631 | * |
| 1632 | * It does not loop over the signal table, as is done with the |
| 1633 | * fault table, because the signal table may contain aliases. |
| 1634 | * If it did, both aliases would be printed. |
| 1635 | */ |
| 1636 | |
| 1637 | void |
| 1638 | proc_prettyfprint_signalset (file, sigset, verbose) |
| 1639 | FILE *file; |
| 1640 | sigset_t *sigset; |
| 1641 | int verbose; |
| 1642 | { |
| 1643 | int i; |
| 1644 | |
| 1645 | for (i = 0; i < NSIG; i++) |
| 1646 | if (prismember (sigset, i)) |
| 1647 | proc_prettyfprint_signal (file, i, verbose); |
| 1648 | |
| 1649 | if (!verbose) |
| 1650 | fprintf (file, "\n"); |
| 1651 | } |
| 1652 | |
| 1653 | void |
| 1654 | proc_prettyprint_signalset (sigset, verbose) |
| 1655 | sigset_t *sigset; |
| 1656 | int verbose; |
| 1657 | { |
| 1658 | proc_prettyfprint_signalset (stdout, sigset, verbose); |
| 1659 | } |
| 1660 | |
| 1661 | /* Hardware fault translation table. */ |
| 1662 | |
| 1663 | static struct trans fault_table[] = |
| 1664 | { |
| 1665 | #if defined (FLTILL) |
| 1666 | { FLTILL, "FLTILL", "Illegal instruction" }, |
| 1667 | #endif |
| 1668 | #if defined (FLTPRIV) |
| 1669 | { FLTPRIV, "FLTPRIV", "Privileged instruction" }, |
| 1670 | #endif |
| 1671 | #if defined (FLTBPT) |
| 1672 | { FLTBPT, "FLTBPT", "Breakpoint trap" }, |
| 1673 | #endif |
| 1674 | #if defined (FLTTRACE) |
| 1675 | { FLTTRACE, "FLTTRACE", "Trace trap" }, |
| 1676 | #endif |
| 1677 | #if defined (FLTACCESS) |
| 1678 | { FLTACCESS, "FLTACCESS", "Memory access fault" }, |
| 1679 | #endif |
| 1680 | #if defined (FLTBOUNDS) |
| 1681 | { FLTBOUNDS, "FLTBOUNDS", "Memory bounds violation" }, |
| 1682 | #endif |
| 1683 | #if defined (FLTIOVF) |
| 1684 | { FLTIOVF, "FLTIOVF", "Integer overflow" }, |
| 1685 | #endif |
| 1686 | #if defined (FLTIZDIV) |
| 1687 | { FLTIZDIV, "FLTIZDIV", "Integer zero divide" }, |
| 1688 | #endif |
| 1689 | #if defined (FLTFPE) |
| 1690 | { FLTFPE, "FLTFPE", "Floating-point exception" }, |
| 1691 | #endif |
| 1692 | #if defined (FLTSTACK) |
| 1693 | { FLTSTACK, "FLTSTACK", "Unrecoverable stack fault" }, |
| 1694 | #endif |
| 1695 | #if defined (FLTPAGE) |
| 1696 | { FLTPAGE, "FLTPAGE", "Recoverable page fault" }, |
| 1697 | #endif |
| 1698 | #if defined (FLTPCINVAL) |
| 1699 | { FLTPCINVAL, "FLTPCINVAL", "Invalid PC exception" }, |
| 1700 | #endif |
| 1701 | #if defined (FLTWATCH) |
| 1702 | { FLTWATCH, "FLTWATCH", "User watchpoint" }, |
| 1703 | #endif |
| 1704 | #if defined (FLTKWATCH) |
| 1705 | { FLTKWATCH, "FLTKWATCH", "Kernel watchpoint" }, |
| 1706 | #endif |
| 1707 | #if defined (FLTSCWATCH) |
| 1708 | { FLTSCWATCH, "FLTSCWATCH", "Hit a store conditional on a watched page" }, |
| 1709 | #endif |
| 1710 | }; |
| 1711 | |
| 1712 | /* |
| 1713 | * Work horse. Accepts an index into the fault table, prints it pretty. |
| 1714 | */ |
| 1715 | |
| 1716 | static void |
| 1717 | prettyfprint_faulttable_entry (file, i, verbose) |
| 1718 | FILE *file; |
| 1719 | int i; |
| 1720 | int verbose; |
| 1721 | { |
| 1722 | fprintf (file, "%s", fault_table[i].name); |
| 1723 | if (verbose) |
| 1724 | fprintf (file, ": %s\n", fault_table[i].desc); |
| 1725 | else |
| 1726 | fprintf (file, " "); |
| 1727 | } |
| 1728 | |
| 1729 | /* |
| 1730 | * Prettyprint a hardware fault by number. |
| 1731 | */ |
| 1732 | |
| 1733 | void |
| 1734 | proc_prettyfprint_fault (file, faultno, verbose) |
| 1735 | FILE *file; |
| 1736 | int faultno; |
| 1737 | int verbose; |
| 1738 | { |
| 1739 | int i; |
| 1740 | |
| 1741 | for (i = 0; i < sizeof (fault_table) / sizeof (fault_table[0]); i++) |
| 1742 | if (faultno == fault_table[i].value) |
| 1743 | { |
| 1744 | prettyfprint_faulttable_entry (file, i, verbose); |
| 1745 | return; |
| 1746 | } |
| 1747 | |
| 1748 | fprintf (file, "Unknown hardware fault %d%c", |
| 1749 | faultno, verbose ? '\n' : ' '); |
| 1750 | } |
| 1751 | |
| 1752 | void |
| 1753 | proc_prettyprint_fault (faultno, verbose) |
| 1754 | int faultno; |
| 1755 | int verbose; |
| 1756 | { |
| 1757 | proc_prettyfprint_fault (stdout, faultno, verbose); |
| 1758 | } |
| 1759 | |
| 1760 | /* |
| 1761 | * Prettyprint all the faults in a fltset_t set. |
| 1762 | * |
| 1763 | * This function loops thru the fault table, |
| 1764 | * using the value field as the index to prismember. |
| 1765 | * The fault table had better not contain aliases, |
| 1766 | * for if it does they will both be printed. |
| 1767 | */ |
| 1768 | |
| 1769 | void |
| 1770 | proc_prettyfprint_faultset (file, fltset, verbose) |
| 1771 | FILE *file; |
| 1772 | fltset_t *fltset; |
| 1773 | int verbose; |
| 1774 | { |
| 1775 | int i; |
| 1776 | |
| 1777 | for (i = 0; i < sizeof (fault_table) / sizeof (fault_table[0]); i++) |
| 1778 | if (prismember (fltset, fault_table[i].value)) |
| 1779 | prettyfprint_faulttable_entry (file, i, verbose); |
| 1780 | |
| 1781 | if (!verbose) |
| 1782 | fprintf (file, "\n"); |
| 1783 | } |
| 1784 | |
| 1785 | void |
| 1786 | proc_prettyprint_faultset (fltset, verbose) |
| 1787 | fltset_t *fltset; |
| 1788 | int verbose; |
| 1789 | { |
| 1790 | proc_prettyfprint_faultset (stdout, fltset, verbose); |
| 1791 | } |
| 1792 | |
| 1793 | /* |
| 1794 | * Todo: actions, holds... |
| 1795 | */ |
| 1796 | |
| 1797 | void |
| 1798 | proc_prettyprint_actionset (struct sigaction *actions, int verbose) |
| 1799 | { |
| 1800 | } |
| 1801 | |
| 1802 | void |
| 1803 | _initialize_proc_events () |
| 1804 | { |
| 1805 | init_syscall_table (); |
| 1806 | } |