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