Commit | Line | Data |
---|---|---|
c906108c | 1 | /* Parameters for target execution on an RS6000, for GDB, the GNU debugger. |
b6ba6518 KB |
2 | Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, |
3 | 1998, 1999, 2000 | |
c906108c SS |
4 | Free Software Foundation, Inc. |
5 | Contributed by IBM Corporation. | |
6 | ||
c5aa993b | 7 | This file is part of GDB. |
c906108c | 8 | |
c5aa993b JM |
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 2 of the License, or | |
12 | (at your option) any later version. | |
c906108c | 13 | |
c5aa993b JM |
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. | |
c906108c | 18 | |
c5aa993b JM |
19 | You should have received a copy of the GNU General Public License |
20 | along with this program; if not, write to the Free Software | |
21 | Foundation, Inc., 59 Temple Place - Suite 330, | |
22 | Boston, MA 02111-1307, USA. */ | |
c906108c | 23 | |
7a78ae4e | 24 | #define GDB_MULTI_ARCH 1 |
c906108c SS |
25 | |
26 | /* Minimum possible text address in AIX */ | |
27 | ||
28 | #define TEXT_SEGMENT_BASE 0x10000000 | |
29 | ||
977adac5 ND |
30 | /* Return whether PC in function NAME is in code that should be skipped when |
31 | single-stepping. */ | |
32 | ||
33 | #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) \ | |
34 | rs6000_in_solib_return_trampoline (pc, name) | |
35 | extern int rs6000_in_solib_return_trampoline (CORE_ADDR, char *); | |
36 | ||
c906108c SS |
37 | /* If PC is in some function-call trampoline code, return the PC |
38 | where the function itself actually starts. If not, return NULL. */ | |
39 | ||
7a78ae4e ND |
40 | #define SKIP_TRAMPOLINE_CODE(pc) rs6000_skip_trampoline_code (pc) |
41 | extern CORE_ADDR rs6000_skip_trampoline_code (CORE_ADDR); | |
c906108c SS |
42 | |
43 | /* Number of trap signals we need to skip over, once the inferior process | |
44 | starts running. */ | |
45 | ||
46 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
47 | ||
48 | /* AIX has a couple of strange returns from wait(). */ | |
49 | ||
50 | #define CHILD_SPECIAL_WAITSTATUS(ourstatus, hoststatus) ( \ | |
51 | /* "stop after load" status. */ \ | |
52 | (hoststatus) == 0x57c ? (ourstatus)->kind = TARGET_WAITKIND_LOADED, 1 : \ | |
53 | \ | |
54 | /* signal 0. I have no idea why wait(2) returns with this status word. */ \ | |
55 | /* It looks harmless. */ \ | |
56 | (hoststatus) == 0x7f ? (ourstatus)->kind = TARGET_WAITKIND_SPURIOUS, 1 : \ | |
57 | \ | |
58 | /* A normal waitstatus. Let the usual macros deal with it. */ \ | |
59 | 0) | |
60 | ||
61 | /* In xcoff, we cannot process line numbers when we see them. This is | |
62 | mainly because we don't know the boundaries of the include files. So, | |
63 | we postpone that, and then enter and sort(?) the whole line table at | |
64 | once, when we are closing the current symbol table in end_symtab(). */ | |
65 | ||
66 | #define PROCESS_LINENUMBER_HOOK() aix_process_linenos () | |
a14ed312 | 67 | extern void aix_process_linenos (void); |
c5aa993b | 68 | |
c906108c SS |
69 | /* Register numbers of various important registers. |
70 | Note that some of these values are "real" register numbers, | |
71 | and correspond to the general registers of the machine, | |
72 | and some are "phony" register numbers which are too large | |
73 | to be actual register numbers as far as the user is concerned | |
74 | but do serve to get the desired values when passed to read_register. */ | |
75 | ||
c906108c | 76 | #define FP0_REGNUM 32 /* Floating point register 0 */ |
c5aa993b | 77 | #define FPLAST_REGNUM 63 /* Last floating point register */ |
c906108c | 78 | |
c906108c SS |
79 | /* Define other aspects of the stack frame. */ |
80 | ||
2ca6c561 | 81 | #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) \ |
97f46953 | 82 | (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \ |
8bedc050 | 83 | prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ()) |
408400e7 AC |
84 | /* NOTE: cagney/2002-12-08: Add local declaration of |
85 | init_frame_pc_noop() because it isn't possible to include | |
86 | "arch-utils.h" here. Not too bad as this entire file is going away | |
87 | anyway. */ | |
88 | extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev); | |
a5afb99f | 89 | #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev)) |
c906108c | 90 | |
c906108c SS |
91 | /* Flag for machine-specific stuff in shared files. FIXME */ |
92 | #define IBM6000_TARGET | |
93 | ||
94 | /* RS6000/AIX does not support PT_STEP. Has to be simulated. */ | |
95 | ||
b0ed3589 | 96 | #define SOFTWARE_SINGLE_STEP_P() 1 |
379d08a1 | 97 | extern void rs6000_software_single_step (enum target_signal, int); |
c906108c SS |
98 | #define SOFTWARE_SINGLE_STEP(sig,bp_p) rs6000_software_single_step (sig, bp_p) |
99 | ||
7a78ae4e ND |
100 | /* Notice when a new child process is started. */ |
101 | ||
102 | #define TARGET_CREATE_INFERIOR_HOOK rs6000_create_inferior | |
103 | extern void rs6000_create_inferior (int); | |
104 | ||
105 | /* Hook in rs6000-tdep.c for determining the TOC address when | |
106 | calling functions in the inferior. */ | |
107 | ||
108 | extern CORE_ADDR (*rs6000_find_toc_address_hook) (CORE_ADDR); | |
c906108c | 109 | |
7a78ae4e ND |
110 | /* Hook in rs6000-tdep.c to set the current architecture when starting a |
111 | child process. */ | |
c906108c | 112 | |
7a78ae4e | 113 | extern void (*rs6000_set_host_arch_hook) (int); |
2d5177f3 KB |
114 | |
115 | /* We need solib.h for building cross debuggers. However, we don't want | |
116 | to clobber any special solib support required by native debuggers, so | |
117 | only include solib.h if SOLIB_ADD is not defined. */ | |
118 | #ifndef SOLIB_ADD | |
119 | #include "solib.h" | |
120 | #endif |