GDB (API)
|
00001 /* Machine-independent support for SVR4 /proc (process file system) 00002 00003 Copyright (C) 1999-2013 Free Software Foundation, Inc. 00004 00005 Written by Michael Snyder at Cygnus Solutions. 00006 Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others. 00007 00008 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00020 00021 /* Pretty-print "events of interest". 00022 00023 This module includes pretty-print routines for: 00024 * faults (hardware exceptions) 00025 * signals (software interrupts) 00026 * syscalls 00027 00028 FIXME: At present, the syscall translation table must be 00029 initialized, which is not true of the other translation tables. */ 00030 00031 #include "defs.h" 00032 00033 #ifdef NEW_PROC_API 00034 #define _STRUCTURED_PROC 1 00035 #endif 00036 00037 #include <stdio.h> 00038 #include <sys/types.h> 00039 #include <sys/procfs.h> 00040 #ifdef HAVE_SYS_SYSCALL_H 00041 #include <sys/syscall.h> 00042 #endif 00043 #ifdef HAVE_SYS_FAULT_H 00044 #include <sys/fault.h> 00045 #endif 00046 00047 #include "proc-utils.h" 00048 00049 /* Much of the information used in the /proc interface, particularly 00050 for printing status information, is kept as tables of structures of 00051 the following form. These tables can be used to map numeric values 00052 to their symbolic names and to a string that describes their 00053 specific use. */ 00054 00055 struct trans 00056 { 00057 int value; /* The numeric value. */ 00058 char *name; /* The equivalent symbolic value. */ 00059 char *desc; /* Short description of value. */ 00060 }; 00061 00062 00063 /* Pretty print syscalls. */ 00064 00065 /* Syscall translation table. */ 00066 00067 #define MAX_SYSCALLS 262 /* Pretty arbitrary. */ 00068 static char *syscall_table[MAX_SYSCALLS]; 00069 00070 static void 00071 init_syscall_table (void) 00072 { 00073 #ifdef SYS_BSD_getime 00074 syscall_table[SYS_BSD_getime] = "BSD_getime"; 00075 #endif 00076 #ifdef SYS_BSDgetpgrp 00077 syscall_table[SYS_BSDgetpgrp] = "BSDgetpgrp"; 00078 #endif 00079 #ifdef SYS_BSDsetpgrp 00080 syscall_table[SYS_BSDsetpgrp] = "BSDsetpgrp"; 00081 #endif 00082 #ifdef SYS_acancel 00083 syscall_table[SYS_acancel] = "acancel"; 00084 #endif 00085 #ifdef SYS_accept 00086 syscall_table[SYS_accept] = "accept"; 00087 #endif 00088 #ifdef SYS_access 00089 syscall_table[SYS_access] = "access"; 00090 #endif 00091 #ifdef SYS_acct 00092 syscall_table[SYS_acct] = "acct"; 00093 #endif 00094 #ifdef SYS_acl 00095 syscall_table[SYS_acl] = "acl"; 00096 #endif 00097 #ifdef SYS_aclipc 00098 syscall_table[SYS_aclipc] = "aclipc"; 00099 #endif 00100 #ifdef SYS_adjtime 00101 syscall_table[SYS_adjtime] = "adjtime"; 00102 #endif 00103 #ifdef SYS_afs_syscall 00104 syscall_table[SYS_afs_syscall] = "afs_syscall"; 00105 #endif 00106 #ifdef SYS_alarm 00107 syscall_table[SYS_alarm] = "alarm"; 00108 #endif 00109 #ifdef SYS_alt_plock 00110 syscall_table[SYS_alt_plock] = "alt_plock"; 00111 #endif 00112 #ifdef SYS_alt_sigpending 00113 syscall_table[SYS_alt_sigpending] = "alt_sigpending"; 00114 #endif 00115 #ifdef SYS_async 00116 syscall_table[SYS_async] = "async"; 00117 #endif 00118 #ifdef SYS_async_daemon 00119 syscall_table[SYS_async_daemon] = "async_daemon"; 00120 #endif 00121 #ifdef SYS_audcntl 00122 syscall_table[SYS_audcntl] = "audcntl"; 00123 #endif 00124 #ifdef SYS_audgen 00125 syscall_table[SYS_audgen] = "audgen"; 00126 #endif 00127 #ifdef SYS_auditbuf 00128 syscall_table[SYS_auditbuf] = "auditbuf"; 00129 #endif 00130 #ifdef SYS_auditctl 00131 syscall_table[SYS_auditctl] = "auditctl"; 00132 #endif 00133 #ifdef SYS_auditdmp 00134 syscall_table[SYS_auditdmp] = "auditdmp"; 00135 #endif 00136 #ifdef SYS_auditevt 00137 syscall_table[SYS_auditevt] = "auditevt"; 00138 #endif 00139 #ifdef SYS_auditlog 00140 syscall_table[SYS_auditlog] = "auditlog"; 00141 #endif 00142 #ifdef SYS_auditsys 00143 syscall_table[SYS_auditsys] = "auditsys"; 00144 #endif 00145 #ifdef SYS_bind 00146 syscall_table[SYS_bind] = "bind"; 00147 #endif 00148 #ifdef SYS_block 00149 syscall_table[SYS_block] = "block"; 00150 #endif 00151 #ifdef SYS_brk 00152 syscall_table[SYS_brk] = "brk"; 00153 #endif 00154 #ifdef SYS_cachectl 00155 syscall_table[SYS_cachectl] = "cachectl"; 00156 #endif 00157 #ifdef SYS_cacheflush 00158 syscall_table[SYS_cacheflush] = "cacheflush"; 00159 #endif 00160 #ifdef SYS_cancelblock 00161 syscall_table[SYS_cancelblock] = "cancelblock"; 00162 #endif 00163 #ifdef SYS_cg_bind 00164 syscall_table[SYS_cg_bind] = "cg_bind"; 00165 #endif 00166 #ifdef SYS_cg_current 00167 syscall_table[SYS_cg_current] = "cg_current"; 00168 #endif 00169 #ifdef SYS_cg_ids 00170 syscall_table[SYS_cg_ids] = "cg_ids"; 00171 #endif 00172 #ifdef SYS_cg_info 00173 syscall_table[SYS_cg_info] = "cg_info"; 00174 #endif 00175 #ifdef SYS_cg_memloc 00176 syscall_table[SYS_cg_memloc] = "cg_memloc"; 00177 #endif 00178 #ifdef SYS_cg_processors 00179 syscall_table[SYS_cg_processors] = "cg_processors"; 00180 #endif 00181 #ifdef SYS_chdir 00182 syscall_table[SYS_chdir] = "chdir"; 00183 #endif 00184 #ifdef SYS_chflags 00185 syscall_table[SYS_chflags] = "chflags"; 00186 #endif 00187 #ifdef SYS_chmod 00188 syscall_table[SYS_chmod] = "chmod"; 00189 #endif 00190 #ifdef SYS_chown 00191 syscall_table[SYS_chown] = "chown"; 00192 #endif 00193 #ifdef SYS_chroot 00194 syscall_table[SYS_chroot] = "chroot"; 00195 #endif 00196 #ifdef SYS_clocal 00197 syscall_table[SYS_clocal] = "clocal"; 00198 #endif 00199 #ifdef SYS_clock_getres 00200 syscall_table[SYS_clock_getres] = "clock_getres"; 00201 #endif 00202 #ifdef SYS_clock_gettime 00203 syscall_table[SYS_clock_gettime] = "clock_gettime"; 00204 #endif 00205 #ifdef SYS_clock_settime 00206 syscall_table[SYS_clock_settime] = "clock_settime"; 00207 #endif 00208 #ifdef SYS_close 00209 syscall_table[SYS_close] = "close"; 00210 #endif 00211 #ifdef SYS_connect 00212 syscall_table[SYS_connect] = "connect"; 00213 #endif 00214 #ifdef SYS_context 00215 syscall_table[SYS_context] = "context"; 00216 #endif 00217 #ifdef SYS_creat 00218 syscall_table[SYS_creat] = "creat"; 00219 #endif 00220 #ifdef SYS_creat64 00221 syscall_table[SYS_creat64] = "creat64"; 00222 #endif 00223 #ifdef SYS_devstat 00224 syscall_table[SYS_devstat] = "devstat"; 00225 #endif 00226 #ifdef SYS_dmi 00227 syscall_table[SYS_dmi] = "dmi"; 00228 #endif 00229 #ifdef SYS_door 00230 syscall_table[SYS_door] = "door"; 00231 #endif 00232 #ifdef SYS_dshmsys 00233 syscall_table[SYS_dshmsys] = "dshmsys"; 00234 #endif 00235 #ifdef SYS_dup 00236 syscall_table[SYS_dup] = "dup"; 00237 #endif 00238 #ifdef SYS_dup2 00239 syscall_table[SYS_dup2] = "dup2"; 00240 #endif 00241 #ifdef SYS_evsys 00242 syscall_table[SYS_evsys] = "evsys"; 00243 #endif 00244 #ifdef SYS_evtrapret 00245 syscall_table[SYS_evtrapret] = "evtrapret"; 00246 #endif 00247 #ifdef SYS_exec 00248 syscall_table[SYS_exec] = "exec"; 00249 #endif 00250 #ifdef SYS_exec_with_loader 00251 syscall_table[SYS_exec_with_loader] = "exec_with_loader"; 00252 #endif 00253 #ifdef SYS_execv 00254 syscall_table[SYS_execv] = "execv"; 00255 #endif 00256 #ifdef SYS_execve 00257 syscall_table[SYS_execve] = "execve"; 00258 #endif 00259 #ifdef SYS_exit 00260 syscall_table[SYS_exit] = "exit"; 00261 #endif 00262 #ifdef SYS_exportfs 00263 syscall_table[SYS_exportfs] = "exportfs"; 00264 #endif 00265 #ifdef SYS_facl 00266 syscall_table[SYS_facl] = "facl"; 00267 #endif 00268 #ifdef SYS_fchdir 00269 syscall_table[SYS_fchdir] = "fchdir"; 00270 #endif 00271 #ifdef SYS_fchflags 00272 syscall_table[SYS_fchflags] = "fchflags"; 00273 #endif 00274 #ifdef SYS_fchmod 00275 syscall_table[SYS_fchmod] = "fchmod"; 00276 #endif 00277 #ifdef SYS_fchown 00278 syscall_table[SYS_fchown] = "fchown"; 00279 #endif 00280 #ifdef SYS_fchroot 00281 syscall_table[SYS_fchroot] = "fchroot"; 00282 #endif 00283 #ifdef SYS_fcntl 00284 syscall_table[SYS_fcntl] = "fcntl"; 00285 #endif 00286 #ifdef SYS_fdatasync 00287 syscall_table[SYS_fdatasync] = "fdatasync"; 00288 #endif 00289 #ifdef SYS_fdevstat 00290 syscall_table[SYS_fdevstat] = "fdevstat"; 00291 #endif 00292 #ifdef SYS_fdsync 00293 syscall_table[SYS_fdsync] = "fdsync"; 00294 #endif 00295 #ifdef SYS_filepriv 00296 syscall_table[SYS_filepriv] = "filepriv"; 00297 #endif 00298 #ifdef SYS_flock 00299 syscall_table[SYS_flock] = "flock"; 00300 #endif 00301 #ifdef SYS_flvlfile 00302 syscall_table[SYS_flvlfile] = "flvlfile"; 00303 #endif 00304 #ifdef SYS_fork 00305 syscall_table[SYS_fork] = "fork"; 00306 #endif 00307 #ifdef SYS_fork1 00308 syscall_table[SYS_fork1] = "fork1"; 00309 #endif 00310 #ifdef SYS_forkall 00311 syscall_table[SYS_forkall] = "forkall"; 00312 #endif 00313 #ifdef SYS_fpathconf 00314 syscall_table[SYS_fpathconf] = "fpathconf"; 00315 #endif 00316 #ifdef SYS_fstat 00317 syscall_table[SYS_fstat] = "fstat"; 00318 #endif 00319 #ifdef SYS_fstat64 00320 syscall_table[SYS_fstat64] = "fstat64"; 00321 #endif 00322 #ifdef SYS_fstatfs 00323 syscall_table[SYS_fstatfs] = "fstatfs"; 00324 #endif 00325 #ifdef SYS_fstatvfs 00326 syscall_table[SYS_fstatvfs] = "fstatvfs"; 00327 #endif 00328 #ifdef SYS_fstatvfs64 00329 syscall_table[SYS_fstatvfs64] = "fstatvfs64"; 00330 #endif 00331 #ifdef SYS_fsync 00332 syscall_table[SYS_fsync] = "fsync"; 00333 #endif 00334 #ifdef SYS_ftruncate 00335 syscall_table[SYS_ftruncate] = "ftruncate"; 00336 #endif 00337 #ifdef SYS_ftruncate64 00338 syscall_table[SYS_ftruncate64] = "ftruncate64"; 00339 #endif 00340 #ifdef SYS_fuser 00341 syscall_table[SYS_fuser] = "fuser"; 00342 #endif 00343 #ifdef SYS_fxstat 00344 syscall_table[SYS_fxstat] = "fxstat"; 00345 #endif 00346 #ifdef SYS_get_sysinfo 00347 syscall_table[SYS_get_sysinfo] = "get_sysinfo"; 00348 #endif 00349 #ifdef SYS_getaddressconf 00350 syscall_table[SYS_getaddressconf] = "getaddressconf"; 00351 #endif 00352 #ifdef SYS_getcontext 00353 syscall_table[SYS_getcontext] = "getcontext"; 00354 #endif 00355 #ifdef SYS_getdents 00356 syscall_table[SYS_getdents] = "getdents"; 00357 #endif 00358 #ifdef SYS_getdents64 00359 syscall_table[SYS_getdents64] = "getdents64"; 00360 #endif 00361 #ifdef SYS_getdirentries 00362 syscall_table[SYS_getdirentries] = "getdirentries"; 00363 #endif 00364 #ifdef SYS_getdomainname 00365 syscall_table[SYS_getdomainname] = "getdomainname"; 00366 #endif 00367 #ifdef SYS_getdtablesize 00368 syscall_table[SYS_getdtablesize] = "getdtablesize"; 00369 #endif 00370 #ifdef SYS_getfh 00371 syscall_table[SYS_getfh] = "getfh"; 00372 #endif 00373 #ifdef SYS_getfsstat 00374 syscall_table[SYS_getfsstat] = "getfsstat"; 00375 #endif 00376 #ifdef SYS_getgid 00377 syscall_table[SYS_getgid] = "getgid"; 00378 #endif 00379 #ifdef SYS_getgroups 00380 syscall_table[SYS_getgroups] = "getgroups"; 00381 #endif 00382 #ifdef SYS_gethostid 00383 syscall_table[SYS_gethostid] = "gethostid"; 00384 #endif 00385 #ifdef SYS_gethostname 00386 syscall_table[SYS_gethostname] = "gethostname"; 00387 #endif 00388 #ifdef SYS_getitimer 00389 syscall_table[SYS_getitimer] = "getitimer"; 00390 #endif 00391 #ifdef SYS_getksym 00392 syscall_table[SYS_getksym] = "getksym"; 00393 #endif 00394 #ifdef SYS_getlogin 00395 syscall_table[SYS_getlogin] = "getlogin"; 00396 #endif 00397 #ifdef SYS_getmnt 00398 syscall_table[SYS_getmnt] = "getmnt"; 00399 #endif 00400 #ifdef SYS_getmsg 00401 syscall_table[SYS_getmsg] = "getmsg"; 00402 #endif 00403 #ifdef SYS_getpagesize 00404 syscall_table[SYS_getpagesize] = "getpagesize"; 00405 #endif 00406 #ifdef SYS_getpeername 00407 syscall_table[SYS_getpeername] = "getpeername"; 00408 #endif 00409 #ifdef SYS_getpgid 00410 syscall_table[SYS_getpgid] = "getpgid"; 00411 #endif 00412 #ifdef SYS_getpgrp 00413 syscall_table[SYS_getpgrp] = "getpgrp"; 00414 #endif 00415 #ifdef SYS_getpid 00416 syscall_table[SYS_getpid] = "getpid"; 00417 #endif 00418 #ifdef SYS_getpmsg 00419 syscall_table[SYS_getpmsg] = "getpmsg"; 00420 #endif 00421 #ifdef SYS_getpriority 00422 syscall_table[SYS_getpriority] = "getpriority"; 00423 #endif 00424 #ifdef SYS_getrlimit 00425 syscall_table[SYS_getrlimit] = "getrlimit"; 00426 #endif 00427 #ifdef SYS_getrlimit64 00428 syscall_table[SYS_getrlimit64] = "getrlimit64"; 00429 #endif 00430 #ifdef SYS_getrusage 00431 syscall_table[SYS_getrusage] = "getrusage"; 00432 #endif 00433 #ifdef SYS_getsid 00434 syscall_table[SYS_getsid] = "getsid"; 00435 #endif 00436 #ifdef SYS_getsockname 00437 syscall_table[SYS_getsockname] = "getsockname"; 00438 #endif 00439 #ifdef SYS_getsockopt 00440 syscall_table[SYS_getsockopt] = "getsockopt"; 00441 #endif 00442 #ifdef SYS_gettimeofday 00443 syscall_table[SYS_gettimeofday] = "gettimeofday"; 00444 #endif 00445 #ifdef SYS_getuid 00446 syscall_table[SYS_getuid] = "getuid"; 00447 #endif 00448 #ifdef SYS_gtty 00449 syscall_table[SYS_gtty] = "gtty"; 00450 #endif 00451 #ifdef SYS_hrtsys 00452 syscall_table[SYS_hrtsys] = "hrtsys"; 00453 #endif 00454 #ifdef SYS_inst_sync 00455 syscall_table[SYS_inst_sync] = "inst_sync"; 00456 #endif 00457 #ifdef SYS_install_utrap 00458 syscall_table[SYS_install_utrap] = "install_utrap"; 00459 #endif 00460 #ifdef SYS_invlpg 00461 syscall_table[SYS_invlpg] = "invlpg"; 00462 #endif 00463 #ifdef SYS_ioctl 00464 syscall_table[SYS_ioctl] = "ioctl"; 00465 #endif 00466 #ifdef SYS_kaio 00467 syscall_table[SYS_kaio] = "kaio"; 00468 #endif 00469 #ifdef SYS_keyctl 00470 syscall_table[SYS_keyctl] = "keyctl"; 00471 #endif 00472 #ifdef SYS_kill 00473 syscall_table[SYS_kill] = "kill"; 00474 #endif 00475 #ifdef SYS_killpg 00476 syscall_table[SYS_killpg] = "killpg"; 00477 #endif 00478 #ifdef SYS_kloadcall 00479 syscall_table[SYS_kloadcall] = "kloadcall"; 00480 #endif 00481 #ifdef SYS_kmodcall 00482 syscall_table[SYS_kmodcall] = "kmodcall"; 00483 #endif 00484 #ifdef SYS_ksigaction 00485 syscall_table[SYS_ksigaction] = "ksigaction"; 00486 #endif 00487 #ifdef SYS_ksigprocmask 00488 syscall_table[SYS_ksigprocmask] = "ksigprocmask"; 00489 #endif 00490 #ifdef SYS_ksigqueue 00491 syscall_table[SYS_ksigqueue] = "ksigqueue"; 00492 #endif 00493 #ifdef SYS_lchown 00494 syscall_table[SYS_lchown] = "lchown"; 00495 #endif 00496 #ifdef SYS_link 00497 syscall_table[SYS_link] = "link"; 00498 #endif 00499 #ifdef SYS_listen 00500 syscall_table[SYS_listen] = "listen"; 00501 #endif 00502 #ifdef SYS_llseek 00503 syscall_table[SYS_llseek] = "llseek"; 00504 #endif 00505 #ifdef SYS_lseek 00506 syscall_table[SYS_lseek] = "lseek"; 00507 #endif 00508 #ifdef SYS_lseek64 00509 syscall_table[SYS_lseek64] = "lseek64"; 00510 #endif 00511 #ifdef SYS_lstat 00512 syscall_table[SYS_lstat] = "lstat"; 00513 #endif 00514 #ifdef SYS_lstat64 00515 syscall_table[SYS_lstat64] = "lstat64"; 00516 #endif 00517 #ifdef SYS_lvldom 00518 syscall_table[SYS_lvldom] = "lvldom"; 00519 #endif 00520 #ifdef SYS_lvlequal 00521 syscall_table[SYS_lvlequal] = "lvlequal"; 00522 #endif 00523 #ifdef SYS_lvlfile 00524 syscall_table[SYS_lvlfile] = "lvlfile"; 00525 #endif 00526 #ifdef SYS_lvlipc 00527 syscall_table[SYS_lvlipc] = "lvlipc"; 00528 #endif 00529 #ifdef SYS_lvlproc 00530 syscall_table[SYS_lvlproc] = "lvlproc"; 00531 #endif 00532 #ifdef SYS_lvlvfs 00533 syscall_table[SYS_lvlvfs] = "lvlvfs"; 00534 #endif 00535 #ifdef SYS_lwp_alarm 00536 syscall_table[SYS_lwp_alarm] = "lwp_alarm"; 00537 #endif 00538 #ifdef SYS_lwp_cond_broadcast 00539 syscall_table[SYS_lwp_cond_broadcast] = "lwp_cond_broadcast"; 00540 #endif 00541 #ifdef SYS_lwp_cond_signal 00542 syscall_table[SYS_lwp_cond_signal] = "lwp_cond_signal"; 00543 #endif 00544 #ifdef SYS_lwp_cond_wait 00545 syscall_table[SYS_lwp_cond_wait] = "lwp_cond_wait"; 00546 #endif 00547 #ifdef SYS_lwp_continue 00548 syscall_table[SYS_lwp_continue] = "lwp_continue"; 00549 #endif 00550 #ifdef SYS_lwp_create 00551 syscall_table[SYS_lwp_create] = "lwp_create"; 00552 #endif 00553 #ifdef SYS_lwp_exit 00554 syscall_table[SYS_lwp_exit] = "lwp_exit"; 00555 #endif 00556 #ifdef SYS_lwp_getprivate 00557 syscall_table[SYS_lwp_getprivate] = "lwp_getprivate"; 00558 #endif 00559 #ifdef SYS_lwp_info 00560 syscall_table[SYS_lwp_info] = "lwp_info"; 00561 #endif 00562 #ifdef SYS_lwp_kill 00563 syscall_table[SYS_lwp_kill] = "lwp_kill"; 00564 #endif 00565 #ifdef SYS_lwp_mutex_init 00566 syscall_table[SYS_lwp_mutex_init] = "lwp_mutex_init"; 00567 #endif 00568 #ifdef SYS_lwp_mutex_lock 00569 syscall_table[SYS_lwp_mutex_lock] = "lwp_mutex_lock"; 00570 #endif 00571 #ifdef SYS_lwp_mutex_trylock 00572 syscall_table[SYS_lwp_mutex_trylock] = "lwp_mutex_trylock"; 00573 #endif 00574 #ifdef SYS_lwp_mutex_unlock 00575 syscall_table[SYS_lwp_mutex_unlock] = "lwp_mutex_unlock"; 00576 #endif 00577 #ifdef SYS_lwp_private 00578 syscall_table[SYS_lwp_private] = "lwp_private"; 00579 #endif 00580 #ifdef SYS_lwp_self 00581 syscall_table[SYS_lwp_self] = "lwp_self"; 00582 #endif 00583 #ifdef SYS_lwp_sema_post 00584 syscall_table[SYS_lwp_sema_post] = "lwp_sema_post"; 00585 #endif 00586 #ifdef SYS_lwp_sema_trywait 00587 syscall_table[SYS_lwp_sema_trywait] = "lwp_sema_trywait"; 00588 #endif 00589 #ifdef SYS_lwp_sema_wait 00590 syscall_table[SYS_lwp_sema_wait] = "lwp_sema_wait"; 00591 #endif 00592 #ifdef SYS_lwp_setprivate 00593 syscall_table[SYS_lwp_setprivate] = "lwp_setprivate"; 00594 #endif 00595 #ifdef SYS_lwp_sigredirect 00596 syscall_table[SYS_lwp_sigredirect] = "lwp_sigredirect"; 00597 #endif 00598 #ifdef SYS_lwp_suspend 00599 syscall_table[SYS_lwp_suspend] = "lwp_suspend"; 00600 #endif 00601 #ifdef SYS_lwp_wait 00602 syscall_table[SYS_lwp_wait] = "lwp_wait"; 00603 #endif 00604 #ifdef SYS_lxstat 00605 syscall_table[SYS_lxstat] = "lxstat"; 00606 #endif 00607 #ifdef SYS_madvise 00608 syscall_table[SYS_madvise] = "madvise"; 00609 #endif 00610 #ifdef SYS_memcntl 00611 syscall_table[SYS_memcntl] = "memcntl"; 00612 #endif 00613 #ifdef SYS_mincore 00614 syscall_table[SYS_mincore] = "mincore"; 00615 #endif 00616 #ifdef SYS_mincore 00617 syscall_table[SYS_mincore] = "mincore"; 00618 #endif 00619 #ifdef SYS_mkdir 00620 syscall_table[SYS_mkdir] = "mkdir"; 00621 #endif 00622 #ifdef SYS_mkmld 00623 syscall_table[SYS_mkmld] = "mkmld"; 00624 #endif 00625 #ifdef SYS_mknod 00626 syscall_table[SYS_mknod] = "mknod"; 00627 #endif 00628 #ifdef SYS_mldmode 00629 syscall_table[SYS_mldmode] = "mldmode"; 00630 #endif 00631 #ifdef SYS_mmap 00632 syscall_table[SYS_mmap] = "mmap"; 00633 #endif 00634 #ifdef SYS_mmap64 00635 syscall_table[SYS_mmap64] = "mmap64"; 00636 #endif 00637 #ifdef SYS_modadm 00638 syscall_table[SYS_modadm] = "modadm"; 00639 #endif 00640 #ifdef SYS_modctl 00641 syscall_table[SYS_modctl] = "modctl"; 00642 #endif 00643 #ifdef SYS_modload 00644 syscall_table[SYS_modload] = "modload"; 00645 #endif 00646 #ifdef SYS_modpath 00647 syscall_table[SYS_modpath] = "modpath"; 00648 #endif 00649 #ifdef SYS_modstat 00650 syscall_table[SYS_modstat] = "modstat"; 00651 #endif 00652 #ifdef SYS_moduload 00653 syscall_table[SYS_moduload] = "moduload"; 00654 #endif 00655 #ifdef SYS_mount 00656 syscall_table[SYS_mount] = "mount"; 00657 #endif 00658 #ifdef SYS_mprotect 00659 syscall_table[SYS_mprotect] = "mprotect"; 00660 #endif 00661 #ifdef SYS_mremap 00662 syscall_table[SYS_mremap] = "mremap"; 00663 #endif 00664 #ifdef SYS_msfs_syscall 00665 syscall_table[SYS_msfs_syscall] = "msfs_syscall"; 00666 #endif 00667 #ifdef SYS_msgctl 00668 syscall_table[SYS_msgctl] = "msgctl"; 00669 #endif 00670 #ifdef SYS_msgget 00671 syscall_table[SYS_msgget] = "msgget"; 00672 #endif 00673 #ifdef SYS_msgrcv 00674 syscall_table[SYS_msgrcv] = "msgrcv"; 00675 #endif 00676 #ifdef SYS_msgsnd 00677 syscall_table[SYS_msgsnd] = "msgsnd"; 00678 #endif 00679 #ifdef SYS_msgsys 00680 syscall_table[SYS_msgsys] = "msgsys"; 00681 #endif 00682 #ifdef SYS_msleep 00683 syscall_table[SYS_msleep] = "msleep"; 00684 #endif 00685 #ifdef SYS_msync 00686 syscall_table[SYS_msync] = "msync"; 00687 #endif 00688 #ifdef SYS_munmap 00689 syscall_table[SYS_munmap] = "munmap"; 00690 #endif 00691 #ifdef SYS_mvalid 00692 syscall_table[SYS_mvalid] = "mvalid"; 00693 #endif 00694 #ifdef SYS_mwakeup 00695 syscall_table[SYS_mwakeup] = "mwakeup"; 00696 #endif 00697 #ifdef SYS_naccept 00698 syscall_table[SYS_naccept] = "naccept"; 00699 #endif 00700 #ifdef SYS_nanosleep 00701 syscall_table[SYS_nanosleep] = "nanosleep"; 00702 #endif 00703 #ifdef SYS_nfssvc 00704 syscall_table[SYS_nfssvc] = "nfssvc"; 00705 #endif 00706 #ifdef SYS_nfssys 00707 syscall_table[SYS_nfssys] = "nfssys"; 00708 #endif 00709 #ifdef SYS_ngetpeername 00710 syscall_table[SYS_ngetpeername] = "ngetpeername"; 00711 #endif 00712 #ifdef SYS_ngetsockname 00713 syscall_table[SYS_ngetsockname] = "ngetsockname"; 00714 #endif 00715 #ifdef SYS_nice 00716 syscall_table[SYS_nice] = "nice"; 00717 #endif 00718 #ifdef SYS_nrecvfrom 00719 syscall_table[SYS_nrecvfrom] = "nrecvfrom"; 00720 #endif 00721 #ifdef SYS_nrecvmsg 00722 syscall_table[SYS_nrecvmsg] = "nrecvmsg"; 00723 #endif 00724 #ifdef SYS_nsendmsg 00725 syscall_table[SYS_nsendmsg] = "nsendmsg"; 00726 #endif 00727 #ifdef SYS_ntp_adjtime 00728 syscall_table[SYS_ntp_adjtime] = "ntp_adjtime"; 00729 #endif 00730 #ifdef SYS_ntp_gettime 00731 syscall_table[SYS_ntp_gettime] = "ntp_gettime"; 00732 #endif 00733 #ifdef SYS_nuname 00734 syscall_table[SYS_nuname] = "nuname"; 00735 #endif 00736 #ifdef SYS_obreak 00737 syscall_table[SYS_obreak] = "obreak"; 00738 #endif 00739 #ifdef SYS_old_accept 00740 syscall_table[SYS_old_accept] = "old_accept"; 00741 #endif 00742 #ifdef SYS_old_fstat 00743 syscall_table[SYS_old_fstat] = "old_fstat"; 00744 #endif 00745 #ifdef SYS_old_getpeername 00746 syscall_table[SYS_old_getpeername] = "old_getpeername"; 00747 #endif 00748 #ifdef SYS_old_getpgrp 00749 syscall_table[SYS_old_getpgrp] = "old_getpgrp"; 00750 #endif 00751 #ifdef SYS_old_getsockname 00752 syscall_table[SYS_old_getsockname] = "old_getsockname"; 00753 #endif 00754 #ifdef SYS_old_killpg 00755 syscall_table[SYS_old_killpg] = "old_killpg"; 00756 #endif 00757 #ifdef SYS_old_lstat 00758 syscall_table[SYS_old_lstat] = "old_lstat"; 00759 #endif 00760 #ifdef SYS_old_recv 00761 syscall_table[SYS_old_recv] = "old_recv"; 00762 #endif 00763 #ifdef SYS_old_recvfrom 00764 syscall_table[SYS_old_recvfrom] = "old_recvfrom"; 00765 #endif 00766 #ifdef SYS_old_recvmsg 00767 syscall_table[SYS_old_recvmsg] = "old_recvmsg"; 00768 #endif 00769 #ifdef SYS_old_send 00770 syscall_table[SYS_old_send] = "old_send"; 00771 #endif 00772 #ifdef SYS_old_sendmsg 00773 syscall_table[SYS_old_sendmsg] = "old_sendmsg"; 00774 #endif 00775 #ifdef SYS_old_sigblock 00776 syscall_table[SYS_old_sigblock] = "old_sigblock"; 00777 #endif 00778 #ifdef SYS_old_sigsetmask 00779 syscall_table[SYS_old_sigsetmask] = "old_sigsetmask"; 00780 #endif 00781 #ifdef SYS_old_sigvec 00782 syscall_table[SYS_old_sigvec] = "old_sigvec"; 00783 #endif 00784 #ifdef SYS_old_stat 00785 syscall_table[SYS_old_stat] = "old_stat"; 00786 #endif 00787 #ifdef SYS_old_vhangup 00788 syscall_table[SYS_old_vhangup] = "old_vhangup"; 00789 #endif 00790 #ifdef SYS_old_wait 00791 syscall_table[SYS_old_wait] = "old_wait"; 00792 #endif 00793 #ifdef SYS_oldquota 00794 syscall_table[SYS_oldquota] = "oldquota"; 00795 #endif 00796 #ifdef SYS_online 00797 syscall_table[SYS_online] = "online"; 00798 #endif 00799 #ifdef SYS_open 00800 syscall_table[SYS_open] = "open"; 00801 #endif 00802 #ifdef SYS_open64 00803 syscall_table[SYS_open64] = "open64"; 00804 #endif 00805 #ifdef SYS_ovadvise 00806 syscall_table[SYS_ovadvise] = "ovadvise"; 00807 #endif 00808 #ifdef SYS_p_online 00809 syscall_table[SYS_p_online] = "p_online"; 00810 #endif 00811 #ifdef SYS_pagelock 00812 syscall_table[SYS_pagelock] = "pagelock"; 00813 #endif 00814 #ifdef SYS_pathconf 00815 syscall_table[SYS_pathconf] = "pathconf"; 00816 #endif 00817 #ifdef SYS_pause 00818 syscall_table[SYS_pause] = "pause"; 00819 #endif 00820 #ifdef SYS_pgrpsys 00821 syscall_table[SYS_pgrpsys] = "pgrpsys"; 00822 #endif 00823 #ifdef SYS_pid_block 00824 syscall_table[SYS_pid_block] = "pid_block"; 00825 #endif 00826 #ifdef SYS_pid_unblock 00827 syscall_table[SYS_pid_unblock] = "pid_unblock"; 00828 #endif 00829 #ifdef SYS_pipe 00830 syscall_table[SYS_pipe] = "pipe"; 00831 #endif 00832 #ifdef SYS_plock 00833 syscall_table[SYS_plock] = "plock"; 00834 #endif 00835 #ifdef SYS_poll 00836 syscall_table[SYS_poll] = "poll"; 00837 #endif 00838 #ifdef SYS_prctl 00839 syscall_table[SYS_prctl] = "prctl"; 00840 #endif 00841 #ifdef SYS_pread 00842 syscall_table[SYS_pread] = "pread"; 00843 #endif 00844 #ifdef SYS_pread64 00845 syscall_table[SYS_pread64] = "pread64"; 00846 #endif 00847 #ifdef SYS_pread64 00848 syscall_table[SYS_pread64] = "pread64"; 00849 #endif 00850 #ifdef SYS_prepblock 00851 syscall_table[SYS_prepblock] = "prepblock"; 00852 #endif 00853 #ifdef SYS_priocntl 00854 syscall_table[SYS_priocntl] = "priocntl"; 00855 #endif 00856 #ifdef SYS_priocntllst 00857 syscall_table[SYS_priocntllst] = "priocntllst"; 00858 #endif 00859 #ifdef SYS_priocntlset 00860 syscall_table[SYS_priocntlset] = "priocntlset"; 00861 #endif 00862 #ifdef SYS_priocntlsys 00863 syscall_table[SYS_priocntlsys] = "priocntlsys"; 00864 #endif 00865 #ifdef SYS_procblk 00866 syscall_table[SYS_procblk] = "procblk"; 00867 #endif 00868 #ifdef SYS_processor_bind 00869 syscall_table[SYS_processor_bind] = "processor_bind"; 00870 #endif 00871 #ifdef SYS_processor_exbind 00872 syscall_table[SYS_processor_exbind] = "processor_exbind"; 00873 #endif 00874 #ifdef SYS_processor_info 00875 syscall_table[SYS_processor_info] = "processor_info"; 00876 #endif 00877 #ifdef SYS_procpriv 00878 syscall_table[SYS_procpriv] = "procpriv"; 00879 #endif 00880 #ifdef SYS_profil 00881 syscall_table[SYS_profil] = "profil"; 00882 #endif 00883 #ifdef SYS_proplist_syscall 00884 syscall_table[SYS_proplist_syscall] = "proplist_syscall"; 00885 #endif 00886 #ifdef SYS_pset 00887 syscall_table[SYS_pset] = "pset"; 00888 #endif 00889 #ifdef SYS_ptrace 00890 syscall_table[SYS_ptrace] = "ptrace"; 00891 #endif 00892 #ifdef SYS_putmsg 00893 syscall_table[SYS_putmsg] = "putmsg"; 00894 #endif 00895 #ifdef SYS_putpmsg 00896 syscall_table[SYS_putpmsg] = "putpmsg"; 00897 #endif 00898 #ifdef SYS_pwrite 00899 syscall_table[SYS_pwrite] = "pwrite"; 00900 #endif 00901 #ifdef SYS_pwrite64 00902 syscall_table[SYS_pwrite64] = "pwrite64"; 00903 #endif 00904 #ifdef SYS_quotactl 00905 syscall_table[SYS_quotactl] = "quotactl"; 00906 #endif 00907 #ifdef SYS_rdblock 00908 syscall_table[SYS_rdblock] = "rdblock"; 00909 #endif 00910 #ifdef SYS_read 00911 syscall_table[SYS_read] = "read"; 00912 #endif 00913 #ifdef SYS_readlink 00914 syscall_table[SYS_readlink] = "readlink"; 00915 #endif 00916 #ifdef SYS_readv 00917 syscall_table[SYS_readv] = "readv"; 00918 #endif 00919 #ifdef SYS_reboot 00920 syscall_table[SYS_reboot] = "reboot"; 00921 #endif 00922 #ifdef SYS_recv 00923 syscall_table[SYS_recv] = "recv"; 00924 #endif 00925 #ifdef SYS_recvfrom 00926 syscall_table[SYS_recvfrom] = "recvfrom"; 00927 #endif 00928 #ifdef SYS_recvmsg 00929 syscall_table[SYS_recvmsg] = "recvmsg"; 00930 #endif 00931 #ifdef SYS_rename 00932 syscall_table[SYS_rename] = "rename"; 00933 #endif 00934 #ifdef SYS_resolvepath 00935 syscall_table[SYS_resolvepath] = "resolvepath"; 00936 #endif 00937 #ifdef SYS_revoke 00938 syscall_table[SYS_revoke] = "revoke"; 00939 #endif 00940 #ifdef SYS_rfsys 00941 syscall_table[SYS_rfsys] = "rfsys"; 00942 #endif 00943 #ifdef SYS_rmdir 00944 syscall_table[SYS_rmdir] = "rmdir"; 00945 #endif 00946 #ifdef SYS_rpcsys 00947 syscall_table[SYS_rpcsys] = "rpcsys"; 00948 #endif 00949 #ifdef SYS_sbrk 00950 syscall_table[SYS_sbrk] = "sbrk"; 00951 #endif 00952 #ifdef SYS_schedctl 00953 syscall_table[SYS_schedctl] = "schedctl"; 00954 #endif 00955 #ifdef SYS_secadvise 00956 syscall_table[SYS_secadvise] = "secadvise"; 00957 #endif 00958 #ifdef SYS_secsys 00959 syscall_table[SYS_secsys] = "secsys"; 00960 #endif 00961 #ifdef SYS_security 00962 syscall_table[SYS_security] = "security"; 00963 #endif 00964 #ifdef SYS_select 00965 syscall_table[SYS_select] = "select"; 00966 #endif 00967 #ifdef SYS_semctl 00968 syscall_table[SYS_semctl] = "semctl"; 00969 #endif 00970 #ifdef SYS_semget 00971 syscall_table[SYS_semget] = "semget"; 00972 #endif 00973 #ifdef SYS_semop 00974 syscall_table[SYS_semop] = "semop"; 00975 #endif 00976 #ifdef SYS_semsys 00977 syscall_table[SYS_semsys] = "semsys"; 00978 #endif 00979 #ifdef SYS_send 00980 syscall_table[SYS_send] = "send"; 00981 #endif 00982 #ifdef SYS_sendmsg 00983 syscall_table[SYS_sendmsg] = "sendmsg"; 00984 #endif 00985 #ifdef SYS_sendto 00986 syscall_table[SYS_sendto] = "sendto"; 00987 #endif 00988 #ifdef SYS_set_program_attributes 00989 syscall_table[SYS_set_program_attributes] = "set_program_attributes"; 00990 #endif 00991 #ifdef SYS_set_speculative 00992 syscall_table[SYS_set_speculative] = "set_speculative"; 00993 #endif 00994 #ifdef SYS_set_sysinfo 00995 syscall_table[SYS_set_sysinfo] = "set_sysinfo"; 00996 #endif 00997 #ifdef SYS_setcontext 00998 syscall_table[SYS_setcontext] = "setcontext"; 00999 #endif 01000 #ifdef SYS_setdomainname 01001 syscall_table[SYS_setdomainname] = "setdomainname"; 01002 #endif 01003 #ifdef SYS_setegid 01004 syscall_table[SYS_setegid] = "setegid"; 01005 #endif 01006 #ifdef SYS_seteuid 01007 syscall_table[SYS_seteuid] = "seteuid"; 01008 #endif 01009 #ifdef SYS_setgid 01010 syscall_table[SYS_setgid] = "setgid"; 01011 #endif 01012 #ifdef SYS_setgroups 01013 syscall_table[SYS_setgroups] = "setgroups"; 01014 #endif 01015 #ifdef SYS_sethostid 01016 syscall_table[SYS_sethostid] = "sethostid"; 01017 #endif 01018 #ifdef SYS_sethostname 01019 syscall_table[SYS_sethostname] = "sethostname"; 01020 #endif 01021 #ifdef SYS_setitimer 01022 syscall_table[SYS_setitimer] = "setitimer"; 01023 #endif 01024 #ifdef SYS_setlogin 01025 syscall_table[SYS_setlogin] = "setlogin"; 01026 #endif 01027 #ifdef SYS_setpgid 01028 syscall_table[SYS_setpgid] = "setpgid"; 01029 #endif 01030 #ifdef SYS_setpgrp 01031 syscall_table[SYS_setpgrp] = "setpgrp"; 01032 #endif 01033 #ifdef SYS_setpriority 01034 syscall_table[SYS_setpriority] = "setpriority"; 01035 #endif 01036 #ifdef SYS_setregid 01037 syscall_table[SYS_setregid] = "setregid"; 01038 #endif 01039 #ifdef SYS_setreuid 01040 syscall_table[SYS_setreuid] = "setreuid"; 01041 #endif 01042 #ifdef SYS_setrlimit 01043 syscall_table[SYS_setrlimit] = "setrlimit"; 01044 #endif 01045 #ifdef SYS_setrlimit64 01046 syscall_table[SYS_setrlimit64] = "setrlimit64"; 01047 #endif 01048 #ifdef SYS_setsid 01049 syscall_table[SYS_setsid] = "setsid"; 01050 #endif 01051 #ifdef SYS_setsockopt 01052 syscall_table[SYS_setsockopt] = "setsockopt"; 01053 #endif 01054 #ifdef SYS_settimeofday 01055 syscall_table[SYS_settimeofday] = "settimeofday"; 01056 #endif 01057 #ifdef SYS_setuid 01058 syscall_table[SYS_setuid] = "setuid"; 01059 #endif 01060 #ifdef SYS_sgi 01061 syscall_table[SYS_sgi] = "sgi"; 01062 #endif 01063 #ifdef SYS_sgifastpath 01064 syscall_table[SYS_sgifastpath] = "sgifastpath"; 01065 #endif 01066 #ifdef SYS_sgikopt 01067 syscall_table[SYS_sgikopt] = "sgikopt"; 01068 #endif 01069 #ifdef SYS_sginap 01070 syscall_table[SYS_sginap] = "sginap"; 01071 #endif 01072 #ifdef SYS_shmat 01073 syscall_table[SYS_shmat] = "shmat"; 01074 #endif 01075 #ifdef SYS_shmctl 01076 syscall_table[SYS_shmctl] = "shmctl"; 01077 #endif 01078 #ifdef SYS_shmdt 01079 syscall_table[SYS_shmdt] = "shmdt"; 01080 #endif 01081 #ifdef SYS_shmget 01082 syscall_table[SYS_shmget] = "shmget"; 01083 #endif 01084 #ifdef SYS_shmsys 01085 syscall_table[SYS_shmsys] = "shmsys"; 01086 #endif 01087 #ifdef SYS_shutdown 01088 syscall_table[SYS_shutdown] = "shutdown"; 01089 #endif 01090 #ifdef SYS_sigaction 01091 syscall_table[SYS_sigaction] = "sigaction"; 01092 #endif 01093 #ifdef SYS_sigaltstack 01094 syscall_table[SYS_sigaltstack] = "sigaltstack"; 01095 #endif 01096 #ifdef SYS_sigaltstack 01097 syscall_table[SYS_sigaltstack] = "sigaltstack"; 01098 #endif 01099 #ifdef SYS_sigblock 01100 syscall_table[SYS_sigblock] = "sigblock"; 01101 #endif 01102 #ifdef SYS_signal 01103 syscall_table[SYS_signal] = "signal"; 01104 #endif 01105 #ifdef SYS_signotify 01106 syscall_table[SYS_signotify] = "signotify"; 01107 #endif 01108 #ifdef SYS_signotifywait 01109 syscall_table[SYS_signotifywait] = "signotifywait"; 01110 #endif 01111 #ifdef SYS_sigpending 01112 syscall_table[SYS_sigpending] = "sigpending"; 01113 #endif 01114 #ifdef SYS_sigpoll 01115 syscall_table[SYS_sigpoll] = "sigpoll"; 01116 #endif 01117 #ifdef SYS_sigprocmask 01118 syscall_table[SYS_sigprocmask] = "sigprocmask"; 01119 #endif 01120 #ifdef SYS_sigqueue 01121 syscall_table[SYS_sigqueue] = "sigqueue"; 01122 #endif 01123 #ifdef SYS_sigreturn 01124 syscall_table[SYS_sigreturn] = "sigreturn"; 01125 #endif 01126 #ifdef SYS_sigsendset 01127 syscall_table[SYS_sigsendset] = "sigsendset"; 01128 #endif 01129 #ifdef SYS_sigsendsys 01130 syscall_table[SYS_sigsendsys] = "sigsendsys"; 01131 #endif 01132 #ifdef SYS_sigsetmask 01133 syscall_table[SYS_sigsetmask] = "sigsetmask"; 01134 #endif 01135 #ifdef SYS_sigstack 01136 syscall_table[SYS_sigstack] = "sigstack"; 01137 #endif 01138 #ifdef SYS_sigsuspend 01139 syscall_table[SYS_sigsuspend] = "sigsuspend"; 01140 #endif 01141 #ifdef SYS_sigvec 01142 syscall_table[SYS_sigvec] = "sigvec"; 01143 #endif 01144 #ifdef SYS_sigwait 01145 syscall_table[SYS_sigwait] = "sigwait"; 01146 #endif 01147 #ifdef SYS_sigwaitprim 01148 syscall_table[SYS_sigwaitprim] = "sigwaitprim"; 01149 #endif 01150 #ifdef SYS_sleep 01151 syscall_table[SYS_sleep] = "sleep"; 01152 #endif 01153 #ifdef SYS_so_socket 01154 syscall_table[SYS_so_socket] = "so_socket"; 01155 #endif 01156 #ifdef SYS_so_socketpair 01157 syscall_table[SYS_so_socketpair] = "so_socketpair"; 01158 #endif 01159 #ifdef SYS_sockconfig 01160 syscall_table[SYS_sockconfig] = "sockconfig"; 01161 #endif 01162 #ifdef SYS_socket 01163 syscall_table[SYS_socket] = "socket"; 01164 #endif 01165 #ifdef SYS_socketpair 01166 syscall_table[SYS_socketpair] = "socketpair"; 01167 #endif 01168 #ifdef SYS_sproc 01169 syscall_table[SYS_sproc] = "sproc"; 01170 #endif 01171 #ifdef SYS_sprocsp 01172 syscall_table[SYS_sprocsp] = "sprocsp"; 01173 #endif 01174 #ifdef SYS_sstk 01175 syscall_table[SYS_sstk] = "sstk"; 01176 #endif 01177 #ifdef SYS_stat 01178 syscall_table[SYS_stat] = "stat"; 01179 #endif 01180 #ifdef SYS_stat64 01181 syscall_table[SYS_stat64] = "stat64"; 01182 #endif 01183 #ifdef SYS_statfs 01184 syscall_table[SYS_statfs] = "statfs"; 01185 #endif 01186 #ifdef SYS_statvfs 01187 syscall_table[SYS_statvfs] = "statvfs"; 01188 #endif 01189 #ifdef SYS_statvfs64 01190 syscall_table[SYS_statvfs64] = "statvfs64"; 01191 #endif 01192 #ifdef SYS_stime 01193 syscall_table[SYS_stime] = "stime"; 01194 #endif 01195 #ifdef SYS_stty 01196 syscall_table[SYS_stty] = "stty"; 01197 #endif 01198 #ifdef SYS_subsys_info 01199 syscall_table[SYS_subsys_info] = "subsys_info"; 01200 #endif 01201 #ifdef SYS_swapctl 01202 syscall_table[SYS_swapctl] = "swapctl"; 01203 #endif 01204 #ifdef SYS_swapon 01205 syscall_table[SYS_swapon] = "swapon"; 01206 #endif 01207 #ifdef SYS_symlink 01208 syscall_table[SYS_symlink] = "symlink"; 01209 #endif 01210 #ifdef SYS_sync 01211 syscall_table[SYS_sync] = "sync"; 01212 #endif 01213 #ifdef SYS_sys3b 01214 syscall_table[SYS_sys3b] = "sys3b"; 01215 #endif 01216 #ifdef SYS_syscall 01217 syscall_table[SYS_syscall] = "syscall"; 01218 #endif 01219 #ifdef SYS_sysconfig 01220 syscall_table[SYS_sysconfig] = "sysconfig"; 01221 #endif 01222 #ifdef SYS_sysfs 01223 syscall_table[SYS_sysfs] = "sysfs"; 01224 #endif 01225 #ifdef SYS_sysi86 01226 syscall_table[SYS_sysi86] = "sysi86"; 01227 #endif 01228 #ifdef SYS_sysinfo 01229 syscall_table[SYS_sysinfo] = "sysinfo"; 01230 #endif 01231 #ifdef SYS_sysmips 01232 syscall_table[SYS_sysmips] = "sysmips"; 01233 #endif 01234 #ifdef SYS_syssun 01235 syscall_table[SYS_syssun] = "syssun"; 01236 #endif 01237 #ifdef SYS_systeminfo 01238 syscall_table[SYS_systeminfo] = "systeminfo"; 01239 #endif 01240 #ifdef SYS_table 01241 syscall_table[SYS_table] = "table"; 01242 #endif 01243 #ifdef SYS_time 01244 syscall_table[SYS_time] = "time"; 01245 #endif 01246 #ifdef SYS_timedwait 01247 syscall_table[SYS_timedwait] = "timedwait"; 01248 #endif 01249 #ifdef SYS_timer_create 01250 syscall_table[SYS_timer_create] = "timer_create"; 01251 #endif 01252 #ifdef SYS_timer_delete 01253 syscall_table[SYS_timer_delete] = "timer_delete"; 01254 #endif 01255 #ifdef SYS_timer_getoverrun 01256 syscall_table[SYS_timer_getoverrun] = "timer_getoverrun"; 01257 #endif 01258 #ifdef SYS_timer_gettime 01259 syscall_table[SYS_timer_gettime] = "timer_gettime"; 01260 #endif 01261 #ifdef SYS_timer_settime 01262 syscall_table[SYS_timer_settime] = "timer_settime"; 01263 #endif 01264 #ifdef SYS_times 01265 syscall_table[SYS_times] = "times"; 01266 #endif 01267 #ifdef SYS_truncate 01268 syscall_table[SYS_truncate] = "truncate"; 01269 #endif 01270 #ifdef SYS_truncate64 01271 syscall_table[SYS_truncate64] = "truncate64"; 01272 #endif 01273 #ifdef SYS_tsolsys 01274 syscall_table[SYS_tsolsys] = "tsolsys"; 01275 #endif 01276 #ifdef SYS_uadmin 01277 syscall_table[SYS_uadmin] = "uadmin"; 01278 #endif 01279 #ifdef SYS_ulimit 01280 syscall_table[SYS_ulimit] = "ulimit"; 01281 #endif 01282 #ifdef SYS_umask 01283 syscall_table[SYS_umask] = "umask"; 01284 #endif 01285 #ifdef SYS_umount 01286 syscall_table[SYS_umount] = "umount"; 01287 #endif 01288 #ifdef SYS_uname 01289 syscall_table[SYS_uname] = "uname"; 01290 #endif 01291 #ifdef SYS_unblock 01292 syscall_table[SYS_unblock] = "unblock"; 01293 #endif 01294 #ifdef SYS_unlink 01295 syscall_table[SYS_unlink] = "unlink"; 01296 #endif 01297 #ifdef SYS_unmount 01298 syscall_table[SYS_unmount] = "unmount"; 01299 #endif 01300 #ifdef SYS_usleep_thread 01301 syscall_table[SYS_usleep_thread] = "usleep_thread"; 01302 #endif 01303 #ifdef SYS_uswitch 01304 syscall_table[SYS_uswitch] = "uswitch"; 01305 #endif 01306 #ifdef SYS_utc_adjtime 01307 syscall_table[SYS_utc_adjtime] = "utc_adjtime"; 01308 #endif 01309 #ifdef SYS_utc_gettime 01310 syscall_table[SYS_utc_gettime] = "utc_gettime"; 01311 #endif 01312 #ifdef SYS_utime 01313 syscall_table[SYS_utime] = "utime"; 01314 #endif 01315 #ifdef SYS_utimes 01316 syscall_table[SYS_utimes] = "utimes"; 01317 #endif 01318 #ifdef SYS_utssys 01319 syscall_table[SYS_utssys] = "utssys"; 01320 #endif 01321 #ifdef SYS_vfork 01322 syscall_table[SYS_vfork] = "vfork"; 01323 #endif 01324 #ifdef SYS_vhangup 01325 syscall_table[SYS_vhangup] = "vhangup"; 01326 #endif 01327 #ifdef SYS_vtrace 01328 syscall_table[SYS_vtrace] = "vtrace"; 01329 #endif 01330 #ifdef SYS_wait 01331 syscall_table[SYS_wait] = "wait"; 01332 #endif 01333 #ifdef SYS_waitid 01334 syscall_table[SYS_waitid] = "waitid"; 01335 #endif 01336 #ifdef SYS_waitsys 01337 syscall_table[SYS_waitsys] = "waitsys"; 01338 #endif 01339 #ifdef SYS_write 01340 syscall_table[SYS_write] = "write"; 01341 #endif 01342 #ifdef SYS_writev 01343 syscall_table[SYS_writev] = "writev"; 01344 #endif 01345 #ifdef SYS_xenix 01346 syscall_table[SYS_xenix] = "xenix"; 01347 #endif 01348 #ifdef SYS_xmknod 01349 syscall_table[SYS_xmknod] = "xmknod"; 01350 #endif 01351 #ifdef SYS_xstat 01352 syscall_table[SYS_xstat] = "xstat"; 01353 #endif 01354 #ifdef SYS_yield 01355 syscall_table[SYS_yield] = "yield"; 01356 #endif 01357 } 01358 01359 /* Prettyprint syscall NUM. */ 01360 01361 void 01362 proc_prettyfprint_syscall (FILE *file, int num, int verbose) 01363 { 01364 if (syscall_table[num]) 01365 fprintf (file, "SYS_%s ", syscall_table[num]); 01366 else 01367 fprintf (file, "<Unknown syscall %d> ", num); 01368 } 01369 01370 void 01371 proc_prettyprint_syscall (int num, int verbose) 01372 { 01373 proc_prettyfprint_syscall (stdout, num, verbose); 01374 } 01375 01376 /* Prettyprint all syscalls in SYSSET. */ 01377 01378 void 01379 proc_prettyfprint_syscalls (FILE *file, sysset_t *sysset, int verbose) 01380 { 01381 int i; 01382 01383 for (i = 0; i < MAX_SYSCALLS; i++) 01384 if (prismember (sysset, i)) 01385 { 01386 proc_prettyfprint_syscall (file, i, verbose); 01387 } 01388 fprintf (file, "\n"); 01389 } 01390 01391 void 01392 proc_prettyprint_syscalls (sysset_t *sysset, int verbose) 01393 { 01394 proc_prettyfprint_syscalls (stdout, sysset, verbose); 01395 } 01396 01397 /* Prettyprint signals. */ 01398 01399 /* Signal translation table. */ 01400 01401 static struct trans signal_table[] = 01402 { 01403 { 0, "<no signal>", "no signal" }, 01404 #ifdef SIGHUP 01405 { SIGHUP, "SIGHUP", "Hangup" }, 01406 #endif 01407 #ifdef SIGINT 01408 { SIGINT, "SIGINT", "Interrupt (rubout)" }, 01409 #endif 01410 #ifdef SIGQUIT 01411 { SIGQUIT, "SIGQUIT", "Quit (ASCII FS)" }, 01412 #endif 01413 #ifdef SIGILL 01414 { SIGILL, "SIGILL", "Illegal instruction" }, /* not reset when caught */ 01415 #endif 01416 #ifdef SIGTRAP 01417 { SIGTRAP, "SIGTRAP", "Trace trap" }, /* not reset when caught */ 01418 #endif 01419 #ifdef SIGABRT 01420 { SIGABRT, "SIGABRT", "used by abort()" }, /* replaces SIGIOT */ 01421 #endif 01422 #ifdef SIGIOT 01423 { SIGIOT, "SIGIOT", "IOT instruction" }, 01424 #endif 01425 #ifdef SIGEMT 01426 { SIGEMT, "SIGEMT", "EMT instruction" }, 01427 #endif 01428 #ifdef SIGFPE 01429 { SIGFPE, "SIGFPE", "Floating point exception" }, 01430 #endif 01431 #ifdef SIGKILL 01432 { SIGKILL, "SIGKILL", "Kill" }, /* Solaris: cannot be caught/ignored */ 01433 #endif 01434 #ifdef SIGBUS 01435 { SIGBUS, "SIGBUS", "Bus error" }, 01436 #endif 01437 #ifdef SIGSEGV 01438 { SIGSEGV, "SIGSEGV", "Segmentation violation" }, 01439 #endif 01440 #ifdef SIGSYS 01441 { SIGSYS, "SIGSYS", "Bad argument to system call" }, 01442 #endif 01443 #ifdef SIGPIPE 01444 { SIGPIPE, "SIGPIPE", "Write to pipe with no one to read it" }, 01445 #endif 01446 #ifdef SIGALRM 01447 { SIGALRM, "SIGALRM", "Alarm clock" }, 01448 #endif 01449 #ifdef SIGTERM 01450 { SIGTERM, "SIGTERM", "Software termination signal from kill" }, 01451 #endif 01452 #ifdef SIGUSR1 01453 { SIGUSR1, "SIGUSR1", "User defined signal 1" }, 01454 #endif 01455 #ifdef SIGUSR2 01456 { SIGUSR2, "SIGUSR2", "User defined signal 2" }, 01457 #endif 01458 #ifdef SIGCHLD 01459 { SIGCHLD, "SIGCHLD", "Child status changed" }, /* Posix version */ 01460 #endif 01461 #ifdef SIGCLD 01462 { SIGCLD, "SIGCLD", "Child status changed" }, /* Solaris version */ 01463 #endif 01464 #ifdef SIGPWR 01465 { SIGPWR, "SIGPWR", "Power-fail restart" }, 01466 #endif 01467 #ifdef SIGWINCH 01468 { SIGWINCH, "SIGWINCH", "Window size change" }, 01469 #endif 01470 #ifdef SIGURG 01471 { SIGURG, "SIGURG", "Urgent socket condition" }, 01472 #endif 01473 #ifdef SIGPOLL 01474 { SIGPOLL, "SIGPOLL", "Pollable event" }, 01475 #endif 01476 #ifdef SIGIO 01477 { SIGIO, "SIGIO", "Socket I/O possible" }, /* alias for SIGPOLL */ 01478 #endif 01479 #ifdef SIGSTOP 01480 { SIGSTOP, "SIGSTOP", "Stop, not from tty" }, /* cannot be caught or 01481 ignored */ 01482 #endif 01483 #ifdef SIGTSTP 01484 { SIGTSTP, "SIGTSTP", "User stop from tty" }, 01485 #endif 01486 #ifdef SIGCONT 01487 { SIGCONT, "SIGCONT", "Stopped process has been continued" }, 01488 #endif 01489 #ifdef SIGTTIN 01490 { SIGTTIN, "SIGTTIN", "Background tty read attempted" }, 01491 #endif 01492 #ifdef SIGTTOU 01493 { SIGTTOU, "SIGTTOU", "Background tty write attempted" }, 01494 #endif 01495 #ifdef SIGVTALRM 01496 { SIGVTALRM, "SIGVTALRM", "Virtual timer expired" }, 01497 #endif 01498 #ifdef SIGPROF 01499 { SIGPROF, "SIGPROF", "Profiling timer expired" }, 01500 #endif 01501 #ifdef SIGXCPU 01502 { SIGXCPU, "SIGXCPU", "Exceeded CPU limit" }, 01503 #endif 01504 #ifdef SIGXFSZ 01505 { SIGXFSZ, "SIGXFSZ", "Exceeded file size limit" }, 01506 #endif 01507 #ifdef SIGWAITING 01508 { SIGWAITING, "SIGWAITING", "Process's LWPs are blocked" }, 01509 #endif 01510 #ifdef SIGLWP 01511 { SIGLWP, "SIGLWP", "Used by thread library" }, 01512 #endif 01513 #ifdef SIGFREEZE 01514 { SIGFREEZE, "SIGFREEZE", "Used by CPR" }, 01515 #endif 01516 #ifdef SIGTHAW 01517 { SIGTHAW, "SIGTHAW", "Used by CPR" }, 01518 #endif 01519 #ifdef SIGCANCEL 01520 { SIGCANCEL, "SIGCANCEL", "Used by libthread" }, 01521 #endif 01522 #ifdef SIGLOST 01523 { SIGLOST, "SIGLOST", "Resource lost" }, 01524 #endif 01525 #ifdef SIG32 01526 { SIG32, "SIG32", "Reserved for kernel usage (Irix)" }, 01527 #endif 01528 #ifdef SIGPTINTR 01529 { SIGPTINTR, "SIGPTINTR", "Posix 1003.1b" }, 01530 #endif 01531 #ifdef SIGTRESCHED 01532 { SIGTRESCHED, "SIGTRESCHED", "Posix 1003.1b" }, 01533 #endif 01534 #ifdef SIGINFO 01535 { SIGINFO, "SIGINFO", "Information request" }, 01536 #endif 01537 #ifdef SIGRESV 01538 { SIGRESV, "SIGRESV", "Reserved by Digital for future use" }, 01539 #endif 01540 #ifdef SIGAIO 01541 { SIGAIO, "SIGAIO", "Asynchronous I/O signal" }, 01542 #endif 01543 01544 /* FIXME: add real-time signals. */ 01545 }; 01546 01547 /* Prettyprint signal number SIGNO. */ 01548 01549 void 01550 proc_prettyfprint_signal (FILE *file, int signo, int verbose) 01551 { 01552 int i; 01553 01554 for (i = 0; i < sizeof (signal_table) / sizeof (signal_table[0]); i++) 01555 if (signo == signal_table[i].value) 01556 { 01557 fprintf (file, "%s", signal_table[i].name); 01558 if (verbose) 01559 fprintf (file, ": %s\n", signal_table[i].desc); 01560 else 01561 fprintf (file, " "); 01562 return; 01563 } 01564 fprintf (file, "Unknown signal %d%c", signo, verbose ? '\n' : ' '); 01565 } 01566 01567 void 01568 proc_prettyprint_signal (int signo, int verbose) 01569 { 01570 proc_prettyfprint_signal (stdout, signo, verbose); 01571 } 01572 01573 /* Prettyprint all signals in SIGSET. */ 01574 01575 void 01576 proc_prettyfprint_signalset (FILE *file, sigset_t *sigset, int verbose) 01577 { 01578 int i; 01579 01580 /* Loop over all signal numbers from 0 to NSIG, using them as the 01581 index to prismember. The signal table had better not contain 01582 aliases, for if it does they will both be printed. */ 01583 01584 for (i = 0; i < NSIG; i++) 01585 if (prismember (sigset, i)) 01586 proc_prettyfprint_signal (file, i, verbose); 01587 01588 if (!verbose) 01589 fprintf (file, "\n"); 01590 } 01591 01592 void 01593 proc_prettyprint_signalset (sigset_t *sigset, int verbose) 01594 { 01595 proc_prettyfprint_signalset (stdout, sigset, verbose); 01596 } 01597 01598 01599 /* Prettyprint faults. */ 01600 01601 /* Fault translation table. */ 01602 01603 static struct trans fault_table[] = 01604 { 01605 #ifdef FLTILL 01606 { FLTILL, "FLTILL", "Illegal instruction" }, 01607 #endif 01608 #ifdef FLTPRIV 01609 { FLTPRIV, "FLTPRIV", "Privileged instruction" }, 01610 #endif 01611 #ifdef FLTBPT 01612 { FLTBPT, "FLTBPT", "Breakpoint trap" }, 01613 #endif 01614 #ifdef FLTTRACE 01615 { FLTTRACE, "FLTTRACE", "Trace trap" }, 01616 #endif 01617 #ifdef FLTACCESS 01618 { FLTACCESS, "FLTACCESS", "Memory access fault" }, 01619 #endif 01620 #ifdef FLTBOUNDS 01621 { FLTBOUNDS, "FLTBOUNDS", "Memory bounds violation" }, 01622 #endif 01623 #ifdef FLTIOVF 01624 { FLTIOVF, "FLTIOVF", "Integer overflow" }, 01625 #endif 01626 #ifdef FLTIZDIV 01627 { FLTIZDIV, "FLTIZDIV", "Integer zero divide" }, 01628 #endif 01629 #ifdef FLTFPE 01630 { FLTFPE, "FLTFPE", "Floating-point exception" }, 01631 #endif 01632 #ifdef FLTSTACK 01633 { FLTSTACK, "FLTSTACK", "Unrecoverable stack fault" }, 01634 #endif 01635 #ifdef FLTPAGE 01636 { FLTPAGE, "FLTPAGE", "Recoverable page fault" }, 01637 #endif 01638 #ifdef FLTPCINVAL 01639 { FLTPCINVAL, "FLTPCINVAL", "Invalid PC exception" }, 01640 #endif 01641 #ifdef FLTWATCH 01642 { FLTWATCH, "FLTWATCH", "User watchpoint" }, 01643 #endif 01644 #ifdef FLTKWATCH 01645 { FLTKWATCH, "FLTKWATCH", "Kernel watchpoint" }, 01646 #endif 01647 #ifdef FLTSCWATCH 01648 { FLTSCWATCH, "FLTSCWATCH", "Hit a store conditional on a watched page" }, 01649 #endif 01650 }; 01651 01652 /* Work horse. Accepts an index into the fault table, prints it 01653 pretty. */ 01654 01655 static void 01656 prettyfprint_faulttable_entry (FILE *file, int i, int verbose) 01657 { 01658 fprintf (file, "%s", fault_table[i].name); 01659 if (verbose) 01660 fprintf (file, ": %s\n", fault_table[i].desc); 01661 else 01662 fprintf (file, " "); 01663 } 01664 01665 /* Prettyprint hardware fault number FAULTNO. */ 01666 01667 void 01668 proc_prettyfprint_fault (FILE *file, int faultno, int verbose) 01669 { 01670 int i; 01671 01672 for (i = 0; i < ARRAY_SIZE (fault_table); i++) 01673 if (faultno == fault_table[i].value) 01674 { 01675 prettyfprint_faulttable_entry (file, i, verbose); 01676 return; 01677 } 01678 01679 fprintf (file, "Unknown hardware fault %d%c", 01680 faultno, verbose ? '\n' : ' '); 01681 } 01682 01683 void 01684 proc_prettyprint_fault (int faultno, int verbose) 01685 { 01686 proc_prettyfprint_fault (stdout, faultno, verbose); 01687 } 01688 01689 /* Prettyprint all faults in FLTSET. */ 01690 01691 void 01692 proc_prettyfprint_faultset (FILE *file, fltset_t *fltset, int verbose) 01693 { 01694 int i; 01695 01696 /* Loop through the fault table, using the value field as the index 01697 to prismember. The fault table had better not contain aliases, 01698 for if it does they will both be printed. */ 01699 01700 for (i = 0; i < ARRAY_SIZE (fault_table); i++) 01701 if (prismember (fltset, fault_table[i].value)) 01702 prettyfprint_faulttable_entry (file, i, verbose); 01703 01704 if (!verbose) 01705 fprintf (file, "\n"); 01706 } 01707 01708 void 01709 proc_prettyprint_faultset (fltset_t *fltset, int verbose) 01710 { 01711 proc_prettyfprint_faultset (stdout, fltset, verbose); 01712 } 01713 01714 /* TODO: actions, holds... */ 01715 01716 void 01717 proc_prettyprint_actionset (struct sigaction *actions, int verbose) 01718 { 01719 } 01720 01721 01722 /* Provide a prototype to silence -Wmissing-prototypes. */ 01723 void _initialize_proc_events (void); 01724 01725 void 01726 _initialize_proc_events (void) 01727 { 01728 init_syscall_table (); 01729 }