Commit | Line | Data |
---|---|---|
c906108c | 1 | /* Parameters for hosting on an PowerPC, for GDB, the GNU debugger. |
46711df8 MK |
2 | Copyright 1995, 1996, 1998, 1999, 2000, 2001 |
3 | Free Software Foundation, Inc. | |
c906108c SS |
4 | Contributed by Cygnus Corporation. |
5 | ||
c5aa993b | 6 | This file is part of GDB. |
c906108c | 7 | |
c5aa993b JM |
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 2 of the License, or | |
11 | (at your option) any later version. | |
c906108c | 12 | |
c5aa993b JM |
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. | |
c906108c | 17 | |
c5aa993b JM |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software | |
20 | Foundation, Inc., 59 Temple Place - Suite 330, | |
21 | Boston, MA 02111-1307, USA. */ | |
c906108c SS |
22 | |
23 | /* The following text is taken from config/rs6000.mh: | |
24 | * # The IBM version of /usr/include/rpc/rpc.h has a bug -- it says | |
25 | * # `extern fd_set svc_fdset;' without ever defining the type fd_set. | |
26 | * # Unfortunately this occurs in the vx-share code, which is not configured | |
27 | * # like the rest of GDB (e.g. it doesn't include "defs.h"). | |
28 | * # We circumvent this bug by #define-ing fd_set here, but undefining it in | |
29 | * # the xm-rs6000.h file before ordinary modules try to use it. FIXME, IBM! | |
30 | * MH_CFLAGS='-Dfd_set=int' | |
31 | * So, here we do the undefine...which has to occur before we include | |
32 | * <sys/select.h> below. | |
33 | */ | |
34 | #undef fd_set | |
35 | ||
36 | #include <sys/select.h> | |
37 | ||
38 | /* Big end is at the low address */ | |
39 | ||
40 | #define HOST_BYTE_ORDER BIG_ENDIAN | |
41 | ||
42 | /* At least as of AIX 3.2, we have termios. */ | |
43 | #define HAVE_TERMIOS 1 | |
44 | /* #define HAVE_TERMIO 1 */ | |
45 | ||
46 | #define USG 1 | |
c906108c SS |
47 | |
48 | #define FIVE_ARG_PTRACE | |
49 | ||
c906108c SS |
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 | ||
c5aa993b | 66 | char *termdef (); |
c906108c SS |
67 | |
68 | /* Signal handler for SIGWINCH `window size changed'. */ | |
69 | ||
70 | #define SIGWINCH_HANDLER aix_resizewindow | |
a14ed312 | 71 | extern void aix_resizewindow (int); |
c906108c SS |
72 | |
73 | /* `lines_per_page' and `chars_per_line' are local to utils.c. Rectify this. */ | |
74 | ||
75 | #define SIGWINCH_HANDLER_BODY \ | |
76 | \ | |
77 | /* Respond to SIGWINCH `window size changed' signal, and reset GDB's \ | |
78 | window settings appropriately. */ \ | |
79 | \ | |
80 | void \ | |
81 | aix_resizewindow (signo) \ | |
82 | int signo; \ | |
83 | { \ | |
84 | int fd = fileno (stdout); \ | |
85 | if (isatty (fd)) { \ | |
86 | int val; \ | |
87 | \ | |
88 | val = atoi (termdef (fd, 'l')); \ | |
89 | if (val > 0) \ | |
90 | lines_per_page = val; \ | |
91 | val = atoi (termdef (fd, 'c')); \ | |
92 | if (val > 0) \ | |
93 | chars_per_line = val; \ | |
94 | } \ | |
95 | } |