1e93f7393Sniklas /* IBM RS/6000 native-dependent macros for GDB, the GNU debugger.
2*b725ae77Skettenis    Copyright 1986, 1987, 1989, 1991, 1992, 1994, 1996, 1999, 2000, 2001
3*b725ae77Skettenis    Free Software Foundation, Inc.
4e93f7393Sniklas 
5e93f7393Sniklas    This file is part of GDB.
6e93f7393Sniklas 
7e93f7393Sniklas    This program is free software; you can redistribute it and/or modify
8e93f7393Sniklas    it under the terms of the GNU General Public License as published by
9e93f7393Sniklas    the Free Software Foundation; either version 2 of the License, or
10e93f7393Sniklas    (at your option) any later version.
11e93f7393Sniklas 
12e93f7393Sniklas    This program is distributed in the hope that it will be useful,
13e93f7393Sniklas    but WITHOUT ANY WARRANTY; without even the implied warranty of
14e93f7393Sniklas    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15e93f7393Sniklas    GNU General Public License for more details.
16e93f7393Sniklas 
17e93f7393Sniklas    You should have received a copy of the GNU General Public License
18e93f7393Sniklas    along with this program; if not, write to the Free Software
19*b725ae77Skettenis    Foundation, Inc., 59 Temple Place - Suite 330,
20*b725ae77Skettenis    Boston, MA 02111-1307, USA.  */
21e93f7393Sniklas 
22e93f7393Sniklas /* Override copies of {fetch,store}_inferior_registers in infptrace.c.  */
23e93f7393Sniklas 
24e93f7393Sniklas #define FETCH_INFERIOR_REGISTERS
25e93f7393Sniklas 
26*b725ae77Skettenis /* Override child_xfer_memory in infptrace.c. */
27*b725ae77Skettenis 
28*b725ae77Skettenis #define CHILD_XFER_MEMORY
29*b725ae77Skettenis 
30e93f7393Sniklas /* When a child process is just starting, we sneak in and relocate
31e93f7393Sniklas    the symbol table (and other stuff) after the dynamic linker has
32e93f7393Sniklas    figured out where they go.  */
33e93f7393Sniklas 
34e93f7393Sniklas #define	SOLIB_CREATE_INFERIOR_HOOK(PID)	\
35e93f7393Sniklas   do {					\
36e93f7393Sniklas     xcoff_relocate_symtab (PID);	\
37e93f7393Sniklas   } while (0)
38e93f7393Sniklas 
39e93f7393Sniklas /* When a target process or core-file has been attached, we sneak in
40e93f7393Sniklas    and figure out where the shared libraries have got to.  */
41e93f7393Sniklas 
42*b725ae77Skettenis #define	SOLIB_ADD(a, b, c, d)	\
43*b725ae77Skettenis   if (PIDGET (inferior_ptid))	\
44e93f7393Sniklas     /* Attach to process.  */  \
45*b725ae77Skettenis     xcoff_relocate_symtab (PIDGET (inferior_ptid)); \
46e93f7393Sniklas   else		\
47e93f7393Sniklas     /* Core file.  */ \
48e93f7393Sniklas     xcoff_relocate_core (c);
49e93f7393Sniklas 
50*b725ae77Skettenis extern void xcoff_relocate_symtab (unsigned int);
51e93f7393Sniklas struct target_ops;
52*b725ae77Skettenis extern void xcoff_relocate_core (struct target_ops *);
53*b725ae77Skettenis 
54*b725ae77Skettenis /* If ADDR lies in a shared library, return its name.  */
55*b725ae77Skettenis 
56*b725ae77Skettenis #define	PC_SOLIB(PC)	xcoff_solib_address(PC)
57*b725ae77Skettenis extern char *xcoff_solib_address (CORE_ADDR);
58e93f7393Sniklas 
59e93f7393Sniklas /* Return sizeof user struct to callers in less machine dependent routines */
60e93f7393Sniklas 
61e93f7393Sniklas #define KERNEL_U_SIZE kernel_u_size()
62*b725ae77Skettenis extern int kernel_u_size (void);
63*b725ae77Skettenis 
64*b725ae77Skettenis /* Flag for machine-specific stuff in shared files.  FIXME */
65*b725ae77Skettenis #define DEPRECATED_IBM6000_TARGET
66