1 |
106 |
markom |
/* Parameters for hosting on an RS6000, for GDB, the GNU debugger.
|
2 |
|
|
Copyright 1986-87, 1989, 1991-96, 1998 Free Software Foundation, Inc.
|
3 |
|
|
Contributed by IBM Corporation.
|
4 |
|
|
|
5 |
|
|
This file is part of GDB.
|
6 |
|
|
|
7 |
|
|
This program is free software; you can redistribute it and/or modify
|
8 |
|
|
it under the terms of the GNU General Public License as published by
|
9 |
|
|
the Free Software Foundation; either version 2 of the License, or
|
10 |
|
|
(at your option) any later version.
|
11 |
|
|
|
12 |
|
|
This program is distributed in the hope that it will be useful,
|
13 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
|
|
GNU General Public License for more details.
|
16 |
|
|
|
17 |
|
|
You should have received a copy of the GNU General Public License
|
18 |
|
|
along with this program; if not, write to the Free Software
|
19 |
|
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
20 |
|
|
Boston, MA 02111-1307, USA. */
|
21 |
|
|
|
22 |
|
|
/* The following text is taken from config/rs6000.mh:
|
23 |
|
|
* # The IBM version of /usr/include/rpc/rpc.h has a bug -- it says
|
24 |
|
|
* # `extern fd_set svc_fdset;' without ever defining the type fd_set.
|
25 |
|
|
* # Unfortunately this occurs in the vx-share code, which is not configured
|
26 |
|
|
* # like the rest of GDB (e.g. it doesn't include "defs.h").
|
27 |
|
|
* # We circumvent this bug by #define-ing fd_set here, but undefining it in
|
28 |
|
|
* # the xm-rs6000.h file before ordinary modules try to use it. FIXME, IBM!
|
29 |
|
|
* MH_CFLAGS='-Dfd_set=int'
|
30 |
|
|
* So, here we do the undefine...which has to occur before we include
|
31 |
|
|
* <sys/select.h> below.
|
32 |
|
|
*/
|
33 |
|
|
#undef fd_set
|
34 |
|
|
|
35 |
|
|
#include <sys/select.h>
|
36 |
|
|
|
37 |
|
|
/* Big end is at the low address */
|
38 |
|
|
|
39 |
|
|
#define HOST_BYTE_ORDER BIG_ENDIAN
|
40 |
|
|
|
41 |
|
|
/* At least as of AIX 3.2, we have termios. */
|
42 |
|
|
#define HAVE_TERMIOS 1
|
43 |
|
|
/* #define HAVE_TERMIO 1 */
|
44 |
|
|
|
45 |
|
|
#define USG 1
|
46 |
|
|
#define HAVE_SIGSETMASK 1
|
47 |
|
|
|
48 |
|
|
#define FIVE_ARG_PTRACE
|
49 |
|
|
|
50 |
|
|
/* This system requires that we open a terminal with O_NOCTTY for it to
|
51 |
|
|
not become our controlling terminal. */
|
52 |
|
|
|
53 |
|
|
#define USE_O_NOCTTY
|
54 |
|
|
|
55 |
|
|
/* Brain death inherited from PC's pervades. */
|
56 |
|
|
#undef NULL
|
57 |
|
|
#define NULL 0
|
58 |
|
|
|
59 |
|
|
/* The IBM compiler requires this in order to properly compile alloca(). */
|
60 |
|
|
#pragma alloca
|
61 |
|
|
|
62 |
|
|
/* There is no vfork. */
|
63 |
|
|
|
64 |
|
|
#define vfork fork
|
65 |
|
|
|
66 |
|
|
/* Setpgrp() takes arguments, unlike ordinary Sys V's. */
|
67 |
|
|
|
68 |
|
|
#define SETPGRP_ARGS 1
|
69 |
|
|
|
70 |
|
|
/* AIX doesn't have strdup, so we need to declare it for libiberty */
|
71 |
|
|
extern char *strdup PARAMS ((char *));
|
72 |
|
|
|
73 |
|
|
/* Signal handler for SIGWINCH `window size changed'. */
|
74 |
|
|
|
75 |
|
|
#define SIGWINCH_HANDLER aix_resizewindow
|
76 |
|
|
extern void aix_resizewindow PARAMS ((int));
|
77 |
|
|
|
78 |
|
|
/* This doesn't seem to be declared in any header file I can find. */
|
79 |
|
|
char *termdef PARAMS ((int, int));
|
80 |
|
|
|
81 |
|
|
/* `lines_per_page' and `chars_per_line' are local to utils.c. Rectify this. */
|
82 |
|
|
|
83 |
|
|
#define SIGWINCH_HANDLER_BODY \
|
84 |
|
|
\
|
85 |
|
|
/* Respond to SIGWINCH `window size changed' signal, and reset GDB's \
|
86 |
|
|
window settings appropriately. */ \
|
87 |
|
|
\
|
88 |
|
|
void \
|
89 |
|
|
aix_resizewindow (signo) \
|
90 |
|
|
int signo; \
|
91 |
|
|
{ \
|
92 |
|
|
int fd = fileno (stdout); \
|
93 |
|
|
if (isatty (fd)) { \
|
94 |
|
|
int val; \
|
95 |
|
|
\
|
96 |
|
|
val = atoi (termdef (fd, 'l')); \
|
97 |
|
|
if (val > 0) \
|
98 |
|
|
lines_per_page = val; \
|
99 |
|
|
val = atoi (termdef (fd, 'c')); \
|
100 |
|
|
if (val > 0) \
|
101 |
|
|
chars_per_line = val; \
|
102 |
|
|
} \
|
103 |
|
|
}
|
104 |
|
|
|
105 |
|
|
/* setpgrp() messes up controling terminal. The other version of it
|
106 |
|
|
requires libbsd.a. */
|
107 |
|
|
#define setpgrp(XX,YY) setpgid (XX, YY)
|