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