2000-07-31 20:56:44 +00:00
|
|
|
/* Target-dependent code for GDB, the GNU debugger.
|
2003-01-04 23:38:46 +00:00
|
|
|
Copyright 2000, 2001, 2002, 2003
|
2000-07-31 20:56:44 +00:00
|
|
|
Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
|
2001-11-01 01:07:35 +00:00
|
|
|
#ifndef PPC_TDEP_H
|
|
|
|
#define PPC_TDEP_H
|
|
|
|
|
2003-04-12 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Add missing opaque declarations.
* gdbarch.h: Regnerate.
* symtab.h: Add missing opaque declarations.
* value.h, target.h, symfile.h, stabsread.h: Ditto.
* x86-64-tdep.h, xmodem.h, monitor.h, typeprint.h: Ditto.
* srec.h, solib-svr4.h, source.h, inferior.h: Ditto.
* ser-unix.h, serial.h, remote-utils.h, gdbcore.h: Ditto.
* ppc-tdep.h, ocd.h, mips-tdep.h, gdbtypes.h: Ditto.
* buildsym.h, builtin-regs.h, linespec.h, language.h: Ditto.
* i387-tdep.h, gdbthread.h, event-top.h, gdb.h: Ditto.
* dwarf2cfi.h, doublest.h, disasm.h, cp-abi.h: Ditto.
* cli-out.h, c-lang.h, ax-gdb.h, arch-utils.h: Ditto.
* ada-lang.h, config/nm-lynx.h, config/nm-linux.h: Ditto.
* config/sparc/tm-sp64.h, config/rs6000/tm-rs6000.h: Ditto.
* config/pa/tm-hppah.h, config/m68k/tm-delta68.h: Ditto.
* cli/cli-setshow.h, cli/cli-script.h: Ditto.
2003-04-12 17:41:26 +00:00
|
|
|
struct gdbarch;
|
2001-11-01 01:07:35 +00:00
|
|
|
struct frame_info;
|
|
|
|
struct value;
|
2003-09-14 02:04:44 +00:00
|
|
|
struct regcache;
|
2003-10-10 03:14:08 +00:00
|
|
|
struct type;
|
2001-11-01 01:07:35 +00:00
|
|
|
|
2000-07-31 20:56:44 +00:00
|
|
|
/* From ppc-linux-tdep.c... */
|
|
|
|
CORE_ADDR ppc_linux_frame_saved_pc (struct frame_info *fi);
|
|
|
|
void ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *);
|
|
|
|
int ppc_linux_frameless_function_invocation (struct frame_info *);
|
|
|
|
void ppc_linux_frame_init_saved_regs (struct frame_info *);
|
|
|
|
CORE_ADDR ppc_linux_frame_chain (struct frame_info *);
|
2003-11-07 20:44:51 +00:00
|
|
|
enum return_value_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch,
|
|
|
|
struct type *valtype,
|
|
|
|
struct regcache *regcache,
|
2003-11-10 22:47:31 +00:00
|
|
|
void *readbuf,
|
|
|
|
const void *writebuf);
|
2003-11-07 20:44:51 +00:00
|
|
|
enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
|
|
|
|
struct type *valtype,
|
|
|
|
struct regcache *regcache,
|
2003-11-10 22:47:31 +00:00
|
|
|
void *readbuf,
|
|
|
|
const void *writebuf);
|
2003-09-09 18:29:27 +00:00
|
|
|
CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
|
|
|
|
CORE_ADDR func_addr,
|
|
|
|
struct regcache *regcache,
|
|
|
|
CORE_ADDR bp_addr, int nargs,
|
|
|
|
struct value **args, CORE_ADDR sp,
|
|
|
|
int struct_return,
|
|
|
|
CORE_ADDR struct_addr);
|
2003-10-10 18:29:13 +00:00
|
|
|
CORE_ADDR ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
|
|
|
|
CORE_ADDR func_addr,
|
|
|
|
struct regcache *regcache,
|
|
|
|
CORE_ADDR bp_addr, int nargs,
|
|
|
|
struct value **args, CORE_ADDR sp,
|
|
|
|
int struct_return,
|
|
|
|
CORE_ADDR struct_addr);
|
2003-10-31 16:37:03 +00:00
|
|
|
CORE_ADDR ppc64_sysv_abi_adjust_breakpoint_address (struct gdbarch *gdbarch,
|
|
|
|
CORE_ADDR bpaddr);
|
2000-07-31 20:56:44 +00:00
|
|
|
int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
|
2001-12-01 00:25:08 +00:00
|
|
|
struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void);
|
2002-07-30 19:03:49 +00:00
|
|
|
void ppc_linux_supply_gregset (char *buf);
|
|
|
|
void ppc_linux_supply_fpregset (char *buf);
|
2000-07-31 20:56:44 +00:00
|
|
|
|
2003-11-07 20:44:51 +00:00
|
|
|
enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch,
|
|
|
|
struct type *valtype,
|
|
|
|
struct regcache *regcache,
|
2003-11-10 22:47:31 +00:00
|
|
|
void *readbuf,
|
|
|
|
const void *writebuf);
|
2000-07-31 20:56:44 +00:00
|
|
|
|
|
|
|
/* From rs6000-tdep.c... */
|
|
|
|
CORE_ADDR rs6000_frame_saved_pc (struct frame_info *fi);
|
|
|
|
void rs6000_init_extra_frame_info (int fromleaf, struct frame_info *);
|
|
|
|
int rs6000_frameless_function_invocation (struct frame_info *);
|
|
|
|
void rs6000_frame_init_saved_regs (struct frame_info *);
|
|
|
|
CORE_ADDR rs6000_frame_chain (struct frame_info *);
|
2001-12-30 00:14:50 +00:00
|
|
|
int altivec_register_p (int regno);
|
2000-07-31 20:56:44 +00:00
|
|
|
|
2003-03-17 18:27:07 +00:00
|
|
|
|
|
|
|
/* Return non-zero when the architecture has an FPU (or at least when
|
|
|
|
the ABI is using the FPU). */
|
|
|
|
int ppc_floating_point_unit_p (struct gdbarch *gdbarch);
|
|
|
|
|
2001-12-09 Elena Zannoni <ezannoni@redhat.com>
* config/rs6000/tm-rs6000.h (STAB_REG_TO_REGNUM): Remove
definition, it is now multiarched.
* ppc-tdep.h (struct gdbarch_tdep): Move from rs6000-tdep.c. Add
fields for special register numbers.
* rs6000-tdep.c (rs6000_gdbarch_init): Initialize new tdep special
regnum fields.
(rs6000_saved_pc_after_call): Use gdbarch_tdep registers fields
instead of hardcoded macros.
(branch_dest, rs6000_pop_frame, rs6000_fix_call_dummy,
ppc_push_return_address, rs6000_frame_saved_pc,
frame_get_saved_regs, rs6000_frame_chain,
rs6000_store_return_value): Ditto.
(rs6000_stab_reg_to_regnum): New function.
* ppcnbsd-nat.c (fetch_inferior_registers,
store_inferior_registers, fetch_core_registers): Ditto.
* ppc-linux-tdep.c (ppc_linux_in_sigtramp,
ppc_linux_frame_init_saved_regs): Ditto.
* ppc-linux-nat.c (ppc_register_u_addr, supply_gregset,
fill_gregset): Ditto.
* ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_store_registers):
Ditto.
2001-12-09 21:39:53 +00:00
|
|
|
/* Private data that this module attaches to struct gdbarch. */
|
|
|
|
|
|
|
|
struct gdbarch_tdep
|
|
|
|
{
|
|
|
|
int wordsize; /* size in bytes of fixed-point word */
|
|
|
|
int *regoff; /* byte offsets in register arrays */
|
|
|
|
const struct reg *regs; /* from current variant */
|
|
|
|
int ppc_gp0_regnum; /* GPR register 0 */
|
|
|
|
int ppc_gplast_regnum; /* GPR register 31 */
|
|
|
|
int ppc_toc_regnum; /* TOC register */
|
|
|
|
int ppc_ps_regnum; /* Processor (or machine) status (%msr) */
|
|
|
|
int ppc_cr_regnum; /* Condition register */
|
|
|
|
int ppc_lr_regnum; /* Link register */
|
|
|
|
int ppc_ctr_regnum; /* Count register */
|
|
|
|
int ppc_xer_regnum; /* Integer exception register */
|
2002-04-11 19:08:56 +00:00
|
|
|
int ppc_fpscr_regnum; /* Floating point status and condition
|
|
|
|
register */
|
2001-12-09 Elena Zannoni <ezannoni@redhat.com>
* config/rs6000/tm-rs6000.h (STAB_REG_TO_REGNUM): Remove
definition, it is now multiarched.
* ppc-tdep.h (struct gdbarch_tdep): Move from rs6000-tdep.c. Add
fields for special register numbers.
* rs6000-tdep.c (rs6000_gdbarch_init): Initialize new tdep special
regnum fields.
(rs6000_saved_pc_after_call): Use gdbarch_tdep registers fields
instead of hardcoded macros.
(branch_dest, rs6000_pop_frame, rs6000_fix_call_dummy,
ppc_push_return_address, rs6000_frame_saved_pc,
frame_get_saved_regs, rs6000_frame_chain,
rs6000_store_return_value): Ditto.
(rs6000_stab_reg_to_regnum): New function.
* ppcnbsd-nat.c (fetch_inferior_registers,
store_inferior_registers, fetch_core_registers): Ditto.
* ppc-linux-tdep.c (ppc_linux_in_sigtramp,
ppc_linux_frame_init_saved_regs): Ditto.
* ppc-linux-nat.c (ppc_register_u_addr, supply_gregset,
fill_gregset): Ditto.
* ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_store_registers):
Ditto.
2001-12-09 21:39:53 +00:00
|
|
|
int ppc_mq_regnum; /* Multiply/Divide extension register */
|
2001-12-30 00:14:50 +00:00
|
|
|
int ppc_vr0_regnum; /* First AltiVec register */
|
|
|
|
int ppc_vrsave_regnum; /* Last AltiVec register */
|
2002-08-20 22:24:29 +00:00
|
|
|
int ppc_ev0_regnum; /* First ev register */
|
|
|
|
int ppc_ev31_regnum; /* Last ev register */
|
2002-04-12 19:48:37 +00:00
|
|
|
int lr_frame_offset; /* Offset to ABI specific location where
|
|
|
|
link register is saved. */
|
2001-12-09 Elena Zannoni <ezannoni@redhat.com>
* config/rs6000/tm-rs6000.h (STAB_REG_TO_REGNUM): Remove
definition, it is now multiarched.
* ppc-tdep.h (struct gdbarch_tdep): Move from rs6000-tdep.c. Add
fields for special register numbers.
* rs6000-tdep.c (rs6000_gdbarch_init): Initialize new tdep special
regnum fields.
(rs6000_saved_pc_after_call): Use gdbarch_tdep registers fields
instead of hardcoded macros.
(branch_dest, rs6000_pop_frame, rs6000_fix_call_dummy,
ppc_push_return_address, rs6000_frame_saved_pc,
frame_get_saved_regs, rs6000_frame_chain,
rs6000_store_return_value): Ditto.
(rs6000_stab_reg_to_regnum): New function.
* ppcnbsd-nat.c (fetch_inferior_registers,
store_inferior_registers, fetch_core_registers): Ditto.
* ppc-linux-tdep.c (ppc_linux_in_sigtramp,
ppc_linux_frame_init_saved_regs): Ditto.
* ppc-linux-nat.c (ppc_register_u_addr, supply_gregset,
fill_gregset): Ditto.
* ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_store_registers):
Ditto.
2001-12-09 21:39:53 +00:00
|
|
|
};
|
2001-11-01 01:07:35 +00:00
|
|
|
|
|
|
|
#endif
|