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