1 /* OBSOLETE /* Host-dependent code for GDB, for NYU Ultra3 running Sym1 OS. */
2 /* OBSOLETE Copyright 1988, 1989, 1991, 1992, 1993, 1995, 2000 */
3 /* OBSOLETE Free Software Foundation, Inc. */
4 /* OBSOLETE Contributed by David Wood (wood@nyu.edu) at New York University. */
6 /* OBSOLETE This file is part of GDB. */
8 /* OBSOLETE This program is free software; you can redistribute it and/or modify */
9 /* OBSOLETE it under the terms of the GNU General Public License as published by */
10 /* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
11 /* OBSOLETE (at your option) any later version. */
13 /* OBSOLETE This program is distributed in the hope that it will be useful, */
14 /* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
15 /* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
16 /* OBSOLETE GNU General Public License for more details. */
18 /* OBSOLETE You should have received a copy of the GNU General Public License */
19 /* OBSOLETE along with this program; if not, write to the Free Software */
20 /* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
21 /* OBSOLETE Boston, MA 02111-1307, USA. */ */
23 /* OBSOLETE #define DEBUG */
24 /* OBSOLETE #include "defs.h" */
25 /* OBSOLETE #include "frame.h" */
26 /* OBSOLETE #include "inferior.h" */
27 /* OBSOLETE #include "symtab.h" */
28 /* OBSOLETE #include "value.h" */
30 /* OBSOLETE #include <sys/types.h> */
31 /* OBSOLETE #include <sys/param.h> */
32 /* OBSOLETE #include <signal.h> */
33 /* OBSOLETE #include <sys/ioctl.h> */
34 /* OBSOLETE #include <fcntl.h> */
36 /* OBSOLETE #include "gdbcore.h" */
38 /* OBSOLETE #include <sys/file.h> */
39 /* OBSOLETE #include "gdb_stat.h" */
41 /* OBSOLETE /* Assorted operating system circumventions */ */
43 /* OBSOLETE #ifdef SYM1 */
45 /* OBSOLETE /* FIXME: Kludge this for now. It really should be system call. */ */
47 /* OBSOLETE getpagesize (void) */
49 /* OBSOLETE return (8192); */
52 /* OBSOLETE /* FIXME: Fake out the fcntl() call, which we don't have. */ */
53 /* OBSOLETE fcntl (int fd, int cmd, int arg) */
56 /* OBSOLETE switch (cmd) */
58 /* OBSOLETE case F_GETFL: */
59 /* OBSOLETE return (O_RDONLY); */
61 /* OBSOLETE default: */
62 /* OBSOLETE printf_unfiltered ("Ultra3's fcntl() failing, cmd = %d.\n", cmd); */
63 /* OBSOLETE return (-1); */
69 /* OBSOLETE * 4.2 Signal support, requires linking with libjobs. */
71 /* OBSOLETE static int _SigMask; */
72 /* OBSOLETE #define sigbit(s) (1L << ((s)-1)) */
74 /* OBSOLETE init_SigMask (void) */
76 /* OBSOLETE /* Taken from the sym1 kernel in machdep.c:startup() */ */
77 /* OBSOLETE _SigMask = sigbit (SIGTSTP) | sigbit (SIGTTOU) | sigbit (SIGTTIN) | */
78 /* OBSOLETE sigbit (SIGCHLD) | sigbit (SIGTINT); */
81 /* OBSOLETE sigmask (int signo) */
83 /* OBSOLETE return (1 << (signo - 1)); */
86 /* OBSOLETE sigsetmask (unsigned int sigmask) */
88 /* OBSOLETE int i, mask = 1; */
89 /* OBSOLETE int lastmask = _SigMask; */
91 /* OBSOLETE for (i = 0; i < NSIG; i++) */
93 /* OBSOLETE if (sigmask & mask) */
95 /* OBSOLETE if (!(_SigMask & mask)) */
97 /* OBSOLETE sighold (i + 1); */
98 /* OBSOLETE _SigMask |= mask; */
101 /* OBSOLETE else if (_SigMask & mask) */
103 /* OBSOLETE sigrelse (i + 1); */
104 /* OBSOLETE _SigMask &= ~mask; */
106 /* OBSOLETE mask <<= 1; */
108 /* OBSOLETE return (lastmask); */
111 /* OBSOLETE sigblock (unsigned int sigmask) */
113 /* OBSOLETE int i, mask = 1; */
114 /* OBSOLETE int lastmask = _SigMask; */
116 /* OBSOLETE for (i = 0; i < NSIG; i++) */
118 /* OBSOLETE if ((sigmask & mask) && !(_SigMask & mask)) */
120 /* OBSOLETE sighold (i + 1); */
121 /* OBSOLETE _SigMask |= mask; */
123 /* OBSOLETE mask <<= 1; */
125 /* OBSOLETE return (lastmask); */
127 /* OBSOLETE #endif /* SYM1 */ */
130 /* OBSOLETE /* Initialization code for this module. */ */
133 /* OBSOLETE _initialize_ultra3 (void) */
135 /* OBSOLETE #ifdef SYM1 */
136 /* OBSOLETE init_SigMask (); */
137 /* OBSOLETE #endif */
This page took 0.031985 seconds and 4 git commands to generate.