b8b527c5a9
* gdbarch.sh (DEPRECATED_REGISTER_BYTES): Rename REGISTER_BYTES. * gdbarch.h, gdbarch.c: Re-generate. * arm-linux-tdep.c (arm_linux_extract_return_value): Delete reference. * TODO (REGISTER_BYTES): Delete reference. * alpha-tdep.c (alpha_gdbarch_init): Update. * xstormy16-tdep.c (xstormy16_gdbarch_init): Update. * x86-64-tdep.c (x86_64_init_abi): Update. * vax-tdep.c (vax_gdbarch_init): Update. * v850-tdep.c (v850_gdbarch_init): Update. * sparc-tdep.c (sparc_gdbarch_init): Update. * sh-tdep.c (sh_gdbarch_init): Update. * s390-tdep.c (s390_gdbarch_init): Update. * rs6000-tdep.c (rs6000_gdbarch_init): Update. * ns32k-tdep.c (ns32k_gdbarch_init_32082): Update. (ns32k_gdbarch_init_32382): Update. * mn10300-tdep.c (mn10300_gdbarch_init): Update. * mcore-tdep.c (mcore_gdbarch_init): Update. * m68k-tdep.c (m68k_gdbarch_init): Update. * m68hc11-tdep.c (m68hc11_gdbarch_init): Update. * ia64-tdep.c (ia64_gdbarch_init): Update. * i386-tdep.c (i386_gdbarch_init): Update. * i386-linux-tdep.c (i386_linux_init_abi): Update. * hppa-tdep.c (hppa_gdbarch_init): Update. * h8300-tdep.c (h8300_gdbarch_init): Update. * frv-tdep.c (frv_gdbarch_init): Update. * cris-tdep.c (cris_gdbarch_init): Update. * avr-tdep.c (avr_gdbarch_init): Update. * arm-tdep.c (arm_gdbarch_init): Update. * sparc-tdep.c (sparc_pop_frame): Update. * rs6000-tdep.c (rs6000_pop_frame): Update. * remote.c (init_remote_state): Update. (remote_prepare_to_store): Update. * remote-vx.c (vx_prepare_to_store): Update. * remote-sds.c (sds_fetch_registers): Update. (sds_prepare_to_store): Update. * remote-array.c: Update. * regcache.c (init_legacy_regcache_descr): Update. (init_regcache_descr): Update. * mips-tdep.c (mips_eabi_extract_return_value): Update. (mips_o64_extract_return_value): Update. * irix5-nat.c (fetch_core_registers): Update. * irix4-nat.c (fetch_core_registers): Update. * i386-tdep.h: Update. * hppa-tdep.c (pa_do_registers_info): Update. (pa_do_strcat_registers_info): Update. * cris-tdep.c (cris_register_bytes_ok): Update. * config/nm-gnu.h (CHILD_PREPARE_TO_STORE): Update. * config/sparc/tm-sparc.h (DEPRECATED_REGISTER_BYTES): Update. * config/sparc/nm-sun4sol2.h (CHILD_PREPARE_TO_STORE): Update. * config/sparc/nm-sun4os4.h (CHILD_PREPARE_TO_STORE): Update. * config/sparc/nm-nbsd.h (CHILD_PREPARE_TO_STORE): Update. * config/sparc/tm-sp64.h (DEPRECATED_REGISTER_BYTES): Update. * config/s390/tm-s390.h (DEPRECATED_REGISTER_BYTES): Update. * config/pa/tm-hppa64.h (DEPRECATED_REGISTER_BYTES): Update. * config/mips/tm-mips.h (DEPRECATED_REGISTER_BYTES): Update. * config/mips/tm-irix6.h (DEPRECATED_REGISTER_BYTES): Update. * config/mips/tm-irix5.h (DEPRECATED_REGISTER_BYTES): Update. * config/m68k/tm-sun3.h (DEPRECATED_REGISTER_BYTES): Update. (REGISTER_BYTES_OK): Update. * config/m68k/nm-sun3.h (CHILD_PREPARE_TO_STORE): Update. * config/ia64/tm-ia64.h (DEPRECATED_REGISTER_BYTES): Update. Index: doc/ChangeLog 2003-05-16 Andrew Cagney <cagney@redhat.com> * gdbint.texinfo (Target Architecture Definition): Replace REGISTER_BYTES with DEPRECATED_REGISTER_BYTES. Fix typo, DEPRECATED_REGISTER_SIZE instead of REGISTER_BYTE. Index: mi/ChangeLog 2003-05-16 Andrew Cagney <cagney@redhat.com> * mi-main.c (mi_setup_architecture_data):
109 lines
3.9 KiB
C
109 lines
3.9 KiB
C
/* Parameters for execution on a Sun, for GDB, the GNU debugger.
|
|
Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1996, 2000
|
|
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. */
|
|
|
|
#ifndef TM_SUN3_H
|
|
#define TM_SUN3_H
|
|
|
|
/* Sun3 status includes fpflags, which shows whether the FPU has been used
|
|
by the process, and whether the FPU was done with an instruction or
|
|
was interrupted in the middle of a long instruction. See
|
|
<machine/reg.h>. */
|
|
/* a&d, pc,sr, fp, fpstat, fpflags */
|
|
|
|
#define DEPRECATED_REGISTER_BYTES (16*4 + 8 + 8*12 + 3*4 + 4)
|
|
|
|
#define NUM_REGS 31
|
|
|
|
#define REGISTER_BYTES_OK(b) \
|
|
((b) == DEPRECATED_REGISTER_BYTES \
|
|
|| (b) == REGISTER_BYTES_FP \
|
|
|| (b) == REGISTER_BYTES_NOFP)
|
|
|
|
/* If PC contains this instruction, then we know what we are in a system
|
|
call stub, and the return PC is is at SP+4, instead of SP. */
|
|
|
|
#define SYSCALL_TRAP 0x4e40 /* trap #0 */
|
|
#define SYSCALL_TRAP_OFFSET 0 /* PC points at trap instruction */
|
|
|
|
#include "m68k/tm-m68k.h"
|
|
|
|
/* Disable alternate breakpoint mechanism needed by 68k stub. */
|
|
#undef REMOTE_BREAKPOINT
|
|
|
|
/* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
|
|
documented in a comment in <machine/setjmp.h>! */
|
|
|
|
#define JB_ELEMENT_SIZE 4
|
|
|
|
#define JB_ONSSTACK 0
|
|
#define JB_SIGMASK 1
|
|
#define JB_SP 2
|
|
#define JB_PC 3
|
|
#define JB_PSL 4
|
|
#define JB_D2 5
|
|
#define JB_D3 6
|
|
#define JB_D4 7
|
|
#define JB_D5 8
|
|
#define JB_D6 9
|
|
#define JB_D7 10
|
|
#define JB_A2 11
|
|
#define JB_A3 12
|
|
#define JB_A4 13
|
|
#define JB_A5 14
|
|
#define JB_A6 15
|
|
|
|
/* Figure out where the longjmp will land. Slurp the args out of the stack.
|
|
We expect the first arg to be a pointer to the jmp_buf structure from which
|
|
we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
|
|
This routine returns true on success */
|
|
|
|
#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
|
|
|
|
/* If sun3 pcc says that a parameter is a short, it's a short. */
|
|
#define BELIEVE_PCC_PROMOTION_TYPE 1
|
|
|
|
/* Can't define BELIEVE_PCC_PROMOTION for SunOS /bin/cc of SunOS 4.1.1.
|
|
Apparently Sun fixed this for the sparc but not the sun3. */
|
|
|
|
/* The code which tries to deal with this bug is never harmful on a sun3. */
|
|
#define SUN_FIXED_LBRAC_BUG (0)
|
|
|
|
/* On the sun3 the kernel pushes a sigcontext on the user stack and
|
|
then `calls' _sigtramp in user code. _sigtramp saves the floating
|
|
point status on the stack and calls the signal handler
|
|
function. The stack does not contain enough information to allow a
|
|
normal backtrace, but sigcontext contains the saved user
|
|
pc/sp. DEPRECATED_FRAME_CHAIN and friends in tm-m68k.h and
|
|
m68k_find_saved_regs deal with this situation by manufacturing a
|
|
fake frame for _sigtramp. SIG_PC_FP_OFFSET is the offset from the
|
|
signal handler frame to the saved pc in sigcontext.
|
|
SIG_SP_FP_OFFSET is the offset from the signal handler frame to the
|
|
end of sigcontext which is identical to the saved sp at
|
|
SIG_PC_FP_OFFSET - 4.
|
|
|
|
Please note that it is impossible to correctly backtrace from a breakpoint
|
|
in _sigtramp as _sigtramp modifies the stack pointer a few times. */
|
|
|
|
#undef SIG_PC_FP_OFFSET
|
|
#define SIG_PC_FP_OFFSET 324
|
|
#define SIG_SP_FP_OFFSET 332
|
|
|
|
#endif /* TM_SUN3_H */
|