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