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