OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [gdb/] [proc-events.c] - Blame information for rev 280

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.