forked from Imagelibrary/binutils-gdb
* Makefile.in (ALLDEPFILES): Remove sparc-linux-nat.c and
sparcl-tdep.c. Add sparc-linux-tdep.c, sparc-sol2-nat.c, sparc-sol2-tdep.c, sparc-sol2-nat.c, sparc-sol2-tdep.c, sparc64-linux-nat.c, sparc64-linux-tdep.c, sparc64-nat.c, sparc64-sol2-tdep.c, sparc64-tdep.c, sparc64fbsd-nat.c, sparc64fbsd-tdep.c, sparcnbsd-nat.c, sparcnbsd-tdep.c. (sparc_nat_h): New variable. (sparcbsd_nat_h, sparcnbsd_tdep_h): Remove variables. (tm-sun4os4.h): Remove dependency. (sparcbsd-nat.o, sparc-linux-nat.o): Remove dependencies. (sparc64fbsd-nat.o, sparc64fbsd-tdep.o, sparc64nbsd-nat.o, sparc64-tdep.o, sparc-nat.o, sparcnbsd-nat.o, sparcnbsd-tdep.o, sparc-tdep.o): Update dependencies. (sparc-linux-tdep.o, sparc-sol2-nat.o, sparc-sol2-tdep.o, sparc64-linux-nat.o, sparc64-linux-tdep.o, sparc64-nat.o, sparc64-sol2-tdep.o, sparc64-tdep.o, sparc64nbsd-tdep.o): New dependencies. * configure.host: Remove existing sparc-*-lynxos*, sparc-*-solaris*, sparc-*-sunos4*, sparc-*-sunos5*, sparc-*-*, ultrasparc-*-freebsd, sparcv9-*-freebsd, sparc64-*-linux*, sparcv9-*-* and sparc64-*-* triplets. Add new sparc64-*-linux*, sparc-*-solaris2*, sparcv9-*-solaris2* and sparc64-*-solaris2* triplets. * configure.tgt: Remove exitsing sparc-*-aout*, sparc-*-coff*, sparc-*-elf*, sparc*-lynxos*, sparc-*-solars2*, sparc-*-sunos4*, sparc-*-sunos5*, sparc-*-vxworks*, sparc64-*linux*, sparc64-*-*, sparcv9-*-* and commented out sparc64-*-solars2* triplets. Add new sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*, sparc64-*-linux, sparc-*-solaris2*, sparcv9-*-solaris*, sparc64-*-solaris2* and sparc64-*-* triplets. * sparc64-tdep.c: Update copyright year. Include "inferior.h", "symtab.h" and "objfiles.h". (BIAS): Remove define. (X_OP, X_RD, X_A, X_COND, X_OP2, X_IMM22, X_OP3, X_I, X_DISP22) (X_DISP19): Remove macros. (sparc_fetch_instruction): Remove function. (struct gdbarch_tdep): Remove definition. (SPARC64_NUM_REGS, SPARC64_NUM_PSEUDO_REGS): Use ARRAY_SIZE. (sparc_breakpoint_from_pc): Remove function. (struct sparc64_frame_cache): Remove definition. (sparc64_alloc_frame_cache, sparc64_analyze_prologue, sparc64_unwind_pc): Remove functions. (sparc64_skip_prologue): Use `struct sparc_frame_cache' instead of `struct sparc64_frame_cache. Call sparc_analyze_prologue instead of sparc64_analyze_prologue. Mark constant as ULL instead of UL. (sparc64_frame_cache): Change return type to `struct sparc_frame_cache *'. Simply call sparc_frame_cache. (sparc64_frame_this_id, sparc64_frame_prev_register, sparc64_frame_base_address): Use `struct sparc_frame_cache' instead of `struct sparc64_frame_cache. (sparc_unwind_dummy_id, sparc_extract_struct_value_address, sparc_analyze_control_transfer, sparc_software_single_step, sparc64_gdbarch_init, sparc_supply_rwindow, sparc_fill_rwindow, _initialize_sparc64_tdep): Remove functions. (TSTATE_CWP, TSTATE_ICC, TSTATE_XCC): New macros. (PSR_S, PSR_ICC, PSR_VERS, PSR_IMPL, PSR_V8PLUS, PSR_XCC): New macros. (sparc64_supply_gregset, sparc64_collect_gregset, sparc64_supply_fpregset, sparc64_collect_fpregset): New functions. (sparc64_init_abi): New function. * sparc64-tdep.h: Update copyright year. Fix typo in multiple inclusion guard. Include "sparc-tdep.h". (BIAS): Define. (r_tstate_offset, r_fprs_offset): New defines. (enum sparc_regnum): Remove defenition. (enum sparc64_regnum): Reformat. (sparc_supply_rwindow, sparc_fill_rwindow): Remove prototypes. (sparc64_init_abi, sparc64_supply_gregset, sparc64_collect_gregset, sparc64_supply_fpregset, sparc64_collect_fpregset): New prototypes. (sparc64_sol2_gregset, sparc64nbsd_gregset, sparc64fbsd_gregset): Add extern declarations. (sparc64_sol2_init_abi): New prototype. (sparc64fbsd_supply_reg, sparc64fbsd_fill_reg) (sparc64fbsd_supply_fpreg, sparc64fbsd_fill_fpreg): Remove prototypes. * sparc64fbsd-nat.c: Include "sparc-nat.h", don't include "sparnbsd-nat.h". (sparc64fbsd_reg_supplies_p, sparc64fbsd_fpreg_supplies_p): Remove functions. (_initialize_sparc64fbsd_nat): Remove initialization of sparcbsd_supply_reg, sparcbsd_fill_reg, sparcbsd_supply_fpreg, sparcbsd_fill_fpreg, sparcbsd_reg_supplies_p, sparcbsd_fpreg_supplies_p. Initialize sparc_gregset. * sparc64fbsd-tdep.c: Update copyright year. Include "frame.h", "frame-unwind.h", "trad-frame.h" and "gdb_assert.h". (sparc64fbsd_r_global_offset, sparc64fbsd_r_out_offset) (sparc64fbsd_r_fprs_offset, sparc64fbsd_r_tnpc_offset) (sparc64fbsd_r_tpc_offset, sparc64fbsd_r_tstate_offset) (sparc64fbsd_r_y_offset): Remove variables. (sparc64fbsd_sizeof_struct_reg, sparc64fbsd_sizeof_struct_fpreg): Make static and const. (sparc64fbsd_supply_reg, sparc64fbsd_fill_reg) (sparc64fbsd_supply_fpreg, sparc64fbsd_fill_fpreg): Remove functions. (sparc64fbsd_gregset): New variable. (fetch_core_registers): Replace calls to sparc64fbsd_supply_reg and sparc64fbsd_supply_fpreg with calls to sparc64_supply_gregset and sparc64_supply_fpregset. (sparc64fbsd_pc_in_sigtramp, sparc64fbsd_sigtramp_frame_cache) (sparc64fbsd_sigtramp_frame_this_id) (sparc64fbsd_sigtramp_frame_prev_register): New functions. (sparc64fbsd_sigtramp_frame_unwind): New variable. (sparc64fbsd_sigtramp_frame_sniffer): New function. (sparc64fbsd_init_abi): Set pc_in_sigtramp, append sparc64fbsd_sigtramp_frame_sniffer. Call sparc64_init_abi. * sparcnbsd-tdep.c: Update copyright year. Include "floatformat.h", "frame.h", "frame-unwind.h", "symtab.h", "trad-frame.h" and "gdb_assert.h", don't include "target.h", "value.h" and "sparcnbsd-tdep.h". (REG32_OFFSET_PSR, REG32_OFFSET_PC, REG32_OFFSET_NPC) (REG32_OFFSET_Y, REG32_OFFSET_GLOBAL, REG32_OFFSET_OUT) (REG64_OFFSET_TSTATE, REG64_OFFSET_PC, REG64_OFFSET_NPC) (REG64_OFFSET_Y, REG64_OFFSET_GLOBAL, REG64_OFFSET_OUT): Remove defines. (sparcnbsd_gregset): New variable. (sparcnbsd_supply_reg32, sparcnbsd_supply_reg64) (sparcnbsd_fill_reg32, sparcnbsd_fill_reg64) (sparcnbsd_supply_fpreg32, sparcnbsd_supply_fpreg64) (sparcnbsd_fill_reg32, sparcnbsd_fill_reg64): Remove functions. (sparc32nbsd_sigtramp_start, sparc32nbsd_sigtramp_end): New variables. (sparc32nbsd_pc_in_sigtramp, sparc32nbsd_sigcontext_frame_cache) (sparc32nbsd_sigcontext_frame_this_id) (sparc32nbsd_sigcontext_frame_prev_register): New functions. (sparc32nbsd_sigcontext_frame_unwind): New variable. (sparc32nbsd_sigtramp_frame_sniffer): New function. (sparcnbsd_get_longjmp_target_32, sparcnbsd_get_longjmp_target_64): Remove functions. (sparcnbsd_aout_in_solib_call_trampoline): Rewrite. (sparcnbsd_init_abi_common, sparcnbsd_init_aout, sparcnbsd_init_elf): Remove. (sparcnbsd_init_abi, sparcnbsd_aout_init_abi) (sparcnbsd_elf_init_abi): New functions. (_initialize_sparcnbsd_tdep): New prototype. (_initialize_sparnbsd_tdep): Update. * config/sparc/fbsd.mh (NATDEPFILES): Remove sparcbsd-nat.o and corelow.o. Add sparc64-nat.o and sparc-nat.o. * config/sparc/fbsd.mt (TDEPFILES): Add sparc-tdep.o and corelow.o. * config/sparc/linux.mh: Update comment. (XM_FILE, HOST_IPC): Remove variables. (NATDEPFILES): Add sparc-sol2-nat.o and core-regset.o. Remove sparc-linux-nat.o. * config/sparc/linux.mt: Update comment. (TDEPFILES): Add sparc-sol2-tdep.o and sparc-linux-tdep.o. * config/sparc/nbsd.mt: Reformat. * config/sparc/nbsd64.mh: Update comment. (NATDEPFILES): Add sparc-nat.o. * config/sparc/nbsd64.mt: Update comment. (TDEPFILES): Add sparc64-tdep.o and sparc64nbsd-tdep.o. (TM_FILE): Set to tm-nbsd.h. * config/sparc/nbsdelf.mh: Update comment. (NATDEPFILES): Add sparc-nat.o. (XM_FILE): Delete. * config/sparc/nbsdaout.mh: Update comment. (NATDEPFILES): Add sparc-nat.o (XM_FILE): Delete. * config/sparc/nm-linux.h: Update copyright year. Don't include "config/nm-svr4.h" and "solib.h". Add protection against multiple inclusion. (KERNEL_U_SIZE): Remove define. (kernel_u_size): Remove prototype. (PTRACE_ARG3_TYPE, PTRACE_XFER_TYPE): Define. * config/sparc/nm-nbsd.h: Update copyright. Don't include "regcache.h". (CHILD_PREPARE_TO_STORE): Remove define. * config/sparc/nm-nbsdaout.h: Tweak some comments. * sparc-nat.c, sparc-tdep.c, sparc-tdep.h, sparc64nbsd-nat.c, sparcnbsd-nat.c: Rewrite files. * config/sparc/tm-linux.h, config/sparc/tm-nbsd.h: Rewrite files. * sparc-linux-nat.c, sparcbsd-nat.c, sparcbsd-nat.h, sparcnbsd-tdep.h: Remove files. * config/sparc/nm-sparclynx.h, config/sparc/nm-sun4os4.h, config/sparc/nm-sun4sol2.h, config/sparc/sp64.mt, config/sparc/sp64linux.mt, config/sparc/sp64sol2.mt, config/sparc/sparc-em.mt, config/sparc/sparclynx.mh, config/sparc/sparclynx.mt, config/sparc/sun4os4.mh, config/sparc/sun4os4.mt, config/sparc/sun4sol2.mh, config/sparc/sun4sol2.mt, config/sparc/tm-sp64.h, config/sparc/tm-sp64linux.h, config/sparc/tm-sparc.h, config/sparc/tm-sparclynx.h, config/sparc/tm-spc-em.h, config/sparc/tm-sun4os4.h, config/sparc/tm-sun4sol2.h, config/sparc/tm-vxsparc.h, config/sparc/vxsparc.mt, config/sparc/xm-linux.h, config/sparc/xm-sun4sol2.h: Remove files. * sparc-linux-tdep.c, sparc-nat.h, sparc-sol2-nat.c, sparc-sol2-tdep.c, sparc64-linux-nat.c, sparc64-linux-t dep.c, sparc64-nat.c, sparc64-sol2-tdep.c, sparc64nbsd-tdep.c: New files. * config/sparc/linux64.mh, config/sparc/linux64.mt, config/sparc/nm-sol2.h, config/sparc/sol2-64.mt, config/sparc/sol2.mh, config/sparc/sol2.mt, config/sparc/sparc.mt, config/sparc/sparc64.mt, config/sparc/tm-sol2.h: New files.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Host: FreeBSD/sparc64
|
||||
NATDEPFILES= sparc64fbsd-nat.o sparcbsd-nat.o \
|
||||
corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
NATDEPFILES= sparc64fbsd-nat.o sparc64-nat.o sparc-nat.o \
|
||||
fork-child.o infptrace.o inftarg.o \
|
||||
solib.o solib-svr4.o solib-legacy.o
|
||||
NAT_FILE= nm-fbsd.h
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Target: FreeBSD/sparc64
|
||||
TDEPFILES= sparc64-tdep.o sparc64fbsd-tdep.o
|
||||
TDEPFILES= sparc-tdep.o sparc64-tdep.o sparc64fbsd-tdep.o corelow.o
|
||||
TM_FILE= tm-fbsd.h
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
# Host: Sparcstation, running GNU/Linux.
|
||||
|
||||
XM_FILE= xm-linux.h
|
||||
|
||||
# Host: GNU/Linux SPARC
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o \
|
||||
proc-service.o thread-db.o lin-lwp.o sparc-linux-nat.o \
|
||||
NATDEPFILES= sparc-nat.o sparc-sol2-nat.o \
|
||||
corelow.o core-regset.o fork-child.o \
|
||||
infptrace.o inftarg.o \
|
||||
proc-service.o thread-db.o lin-lwp.o \
|
||||
linux-proc.o gcore.o linux-nat.o
|
||||
|
||||
# The dynamically loaded libthread_db needs access to symbols in the
|
||||
# gdb executable.
|
||||
LOADLIBES = -ldl -rdynamic
|
||||
|
||||
HOST_IPC=-DBSD_IPC
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# Target: Sparcstation, running Linux
|
||||
TDEPFILES= sparc-tdep.o solib.o solib-svr4.o solib-legacy.o
|
||||
# Target: GNU/Linux SPARC
|
||||
TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o sparc-linux-tdep.o \
|
||||
solib.o solib-svr4.o solib-legacy.o
|
||||
TM_FILE= tm-linux.h
|
||||
|
||||
11
gdb/config/sparc/linux64.mh
Normal file
11
gdb/config/sparc/linux64.mh
Normal file
@@ -0,0 +1,11 @@
|
||||
# Host: GNU/Linux UltraSPARC
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= sparc-nat.o sparc64-nat.o sparc-sol2-nat.o sparc64-linux-nat.o \
|
||||
corelow.o core-regset.o \
|
||||
fork-child.o infptrace.o inftarg.o \
|
||||
proc-service.o thread-db.o lin-lwp.o \
|
||||
linux-proc.o gcore.o linux-nat.o
|
||||
|
||||
# The dynamically loaded libthread_db needs access to symbols in the
|
||||
# gdb executable.
|
||||
LOADLIBES = -ldl -rdynamic
|
||||
5
gdb/config/sparc/linux64.mt
Normal file
5
gdb/config/sparc/linux64.mt
Normal file
@@ -0,0 +1,5 @@
|
||||
# Target: GNU/Linux UltraSPARC
|
||||
TDEPFILES= sparc64-tdep.o sparc64-sol2-tdep.o sparc64-linux-tdep.o \
|
||||
sparc-tdep.o sparc-sol2-tdep.o sparc-linux-tdep.o \
|
||||
solib.o solib-svr4.o solib-legacy.o
|
||||
TM_FILE= tm-linux.h
|
||||
@@ -1,4 +1,4 @@
|
||||
# Target: SPARC running NetBSD
|
||||
TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o corelow.o solib.o \
|
||||
solib-svr4.o
|
||||
# Target: NetBSD/sparc
|
||||
TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o \
|
||||
corelow.o solib.o solib-svr4.o
|
||||
TM_FILE= tm-nbsd.h
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# Host: UltraSPARC running NetBSD
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o sparc64nbsd-nat.o
|
||||
# Host: NetBSD/sparc64
|
||||
NATDEPFILES= sparc64nbsd-nat.o sparc-nat.o \
|
||||
fork-child.o infptrace.o inftarg.o
|
||||
NAT_FILE= nm-nbsd.h
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Target: UltraSPARC running NetBSD
|
||||
TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o corelow.o solib.o \
|
||||
solib-svr4.o
|
||||
TM_FILE= tm-nbsd64.h
|
||||
# Target: NetBSD/sparc64
|
||||
TDEPFILES= sparc64-tdep.o sparc64nbsd-tdep.o \
|
||||
sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o \
|
||||
corelow.o solib.o solib-svr4.o
|
||||
TM_FILE= tm-nbsd.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Host: Sun 4 or Sparcstation, running NetBSD
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o sparcnbsd-nat.o solib-sunos.o
|
||||
XM_FILE= xm-nbsd.h
|
||||
# Host: NetBSD/sparc a.out
|
||||
NATDEPFILES= sparc-nat.o sparcnbsd-nat.o \
|
||||
fork-child.o infptrace.o inftarg.o solib-sunos.o
|
||||
NAT_FILE= nm-nbsdaout.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Host: Sun 4 or Sparcstation, running NetBSD
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o sparcnbsd-nat.o
|
||||
XM_FILE= xm-nbsd.h
|
||||
# Host: NetBSD/sparc ELF
|
||||
NATDEPFILES= sparc-nat.o sparcnbsd-nat.o \
|
||||
fork-child.o infptrace.o inftarg.o
|
||||
NAT_FILE= nm-nbsd.h
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Macro definitions for running gdb on a Sparc running GNU/Linux.
|
||||
/* Native-dependent definitions for GNU/Linux SPARC.
|
||||
|
||||
Copyright 1989, 1992, 1996, 1998, 1999, 2000, 2002 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright 1989, 1992, 1996, 1998, 1999, 2000, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -20,13 +20,18 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "config/nm-sysv4.h"
|
||||
#include "config/nm-linux.h"
|
||||
#include "solib.h"
|
||||
#ifndef NM_LINUX_H
|
||||
#define NM_LINUX_H
|
||||
|
||||
#include "config/nm-linux.h"
|
||||
|
||||
/* Type of the third argument to the `ptrace' system call. */
|
||||
#define PTRACE_ARG3_TYPE long
|
||||
|
||||
/* Type of the fourth argument to the `ptrace' system call. */
|
||||
#define PTRACE_XFER_TYPE long
|
||||
|
||||
/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
|
||||
#define FETCH_INFERIOR_REGISTERS
|
||||
|
||||
/* Return sizeof user struct to callers in less machine dependent routines */
|
||||
|
||||
#define KERNEL_U_SIZE kernel_u_size()
|
||||
extern int kernel_u_size (void);
|
||||
#endif /* nm-linux.h */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* Native-dependent definitions for Sparc running NetBSD, for GDB.
|
||||
Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1999, 2000, 2002
|
||||
/* Native-dependent definitions for NetBSD/sparc.
|
||||
|
||||
Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1999, 2000, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
@@ -22,14 +23,7 @@
|
||||
#ifndef NM_NBSD_H
|
||||
#define NM_NBSD_H
|
||||
|
||||
#include "regcache.h"
|
||||
|
||||
/* Get generic NetBSD native definitions. */
|
||||
|
||||
/* Get generic NetBSD native definitions. */
|
||||
#include "config/nm-nbsd.h"
|
||||
|
||||
/* Before storing, we need to read all the registers. */
|
||||
|
||||
#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
|
||||
|
||||
#endif /* NM_NBSD_H */
|
||||
#endif /* nm-nbsd.h */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* Native-dependent definitions for Sparc running NetBSD a.out, for GDB.
|
||||
Copyright 1999 Free Software Foundation, Inc.
|
||||
/* Native-dependent definitions for NetBSD/sparc a.out.
|
||||
|
||||
Copyright 1999, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -23,8 +24,7 @@
|
||||
|
||||
#include "sparc/nm-nbsd.h"
|
||||
|
||||
/* Get generic NetBSD a.out native definitions. */
|
||||
|
||||
/* Get generic NetBSD a.out native definitions. */
|
||||
#include "config/nm-nbsdaout.h"
|
||||
|
||||
#endif /* NM_NBSDAOUT_H */
|
||||
#endif /* nm-nbsdaout.h */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* Native-dependent definitions for Sparc running SVR4.
|
||||
Copyright 1994, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
/* Native-dependent definitions for Solaris SPARC.
|
||||
|
||||
Copyright 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -15,50 +16,43 @@
|
||||
|
||||
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. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include "regcache.h"
|
||||
|
||||
/* Include the generic SVR4 definitions. */
|
||||
|
||||
#include "config/nm-sysv4.h"
|
||||
|
||||
/* Before storing, we need to read all the registers. */
|
||||
|
||||
#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
|
||||
|
||||
/* Solaris PSRVADDR support does not seem to include a place for nPC. */
|
||||
|
||||
#define PRSVADDR_BROKEN
|
||||
|
||||
/* gdb wants to use the prgregset_t interface rather than
|
||||
the gregset_t interface, partly because that's what's
|
||||
used in core-sol2.c */
|
||||
#ifndef NM_SOL2_H
|
||||
#define NM_SOL2_H
|
||||
|
||||
#define GDB_GREGSET_T prgregset_t
|
||||
#define GDB_FPREGSET_T prfpregset_t
|
||||
|
||||
#ifdef NEW_PROC_API /* Solaris 6 and above can do HW watchpoints */
|
||||
/* Shared library support. */
|
||||
|
||||
#include "solib.h"
|
||||
|
||||
/* Hardware wactchpoints. */
|
||||
|
||||
/* Solaris 2.6 and above can do HW watchpoints. */
|
||||
#ifdef NEW_PROC_API
|
||||
|
||||
#define TARGET_HAS_HARDWARE_WATCHPOINTS
|
||||
|
||||
/* The man page for proc4 on solaris 6 and 7 says that the system
|
||||
/* The man page for proc(4) on Solaris 2.6 and up says that the system
|
||||
can support "thousands" of hardware watchpoints, but gives no
|
||||
method for finding out how many. So just tell GDB 'yes'. */
|
||||
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(TYPE, CNT, OT) 1
|
||||
method for finding out how many; It doesn't say anything about the
|
||||
allowed size for the watched area either. So we just tell GDB
|
||||
'yes'. */
|
||||
#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
|
||||
|
||||
/* When a hardware watchpoint fires off the PC will be left at the
|
||||
instruction following the one which caused the watchpoint.
|
||||
It will *NOT* be necessary for GDB to step over the watchpoint. */
|
||||
instruction following the one which caused the watchpoint. It will
|
||||
*NOT* be necessary for GDB to step over the watchpoint. */
|
||||
#define HAVE_CONTINUABLE_WATCHPOINT 1
|
||||
|
||||
extern int procfs_stopped_by_watchpoint (ptid_t);
|
||||
#define STOPPED_BY_WATCHPOINT(W) \
|
||||
procfs_stopped_by_watchpoint(inferior_ptid)
|
||||
|
||||
/* Use these macros for watchpoint insertion/deletion. */
|
||||
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
|
||||
/* Use these macros for watchpoint insertion/deletion. TYPE can be 0
|
||||
(write watch), 1 (read watch), 2 (access watch (read/write). */
|
||||
|
||||
extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
|
||||
#define target_insert_watchpoint(ADDR, LEN, TYPE) \
|
||||
@@ -67,3 +61,5 @@ extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
|
||||
procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0)
|
||||
|
||||
#endif /* NEW_PROC_API */
|
||||
|
||||
#endif /* nm-sol2.h */
|
||||
@@ -1,26 +0,0 @@
|
||||
/* Native-dependent definitions for Sparc running LynxOS.
|
||||
Copyright 1993, 1994 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 NM_SPARCLYNX_H
|
||||
#define NM_SPARCLYNX_H
|
||||
|
||||
#include "config/nm-lynx.h"
|
||||
|
||||
#endif /* NM_SPARCLYNX_H */
|
||||
@@ -1,42 +0,0 @@
|
||||
/* Macro definitions for running gdb on a Sun 4 running sunos 4.
|
||||
Copyright 1989, 1992, 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. */
|
||||
|
||||
#include "regcache.h"
|
||||
|
||||
/* Do implement the attach and detach commands. */
|
||||
|
||||
#define ATTACH_DETACH
|
||||
|
||||
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
|
||||
|
||||
#define FETCH_INFERIOR_REGISTERS
|
||||
|
||||
/* Before storing, we need to read all the registers. */
|
||||
|
||||
#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
|
||||
|
||||
/* Return sizeof user struct to callers in less machine dependent routines */
|
||||
|
||||
#define KERNEL_U_SIZE kernel_u_size()
|
||||
extern int kernel_u_size (void);
|
||||
|
||||
/* SunOS 4.x uses nonstandard "char *" as type of third argument to ptrace() */
|
||||
|
||||
#define PTRACE_ARG3_TYPE char*
|
||||
3
gdb/config/sparc/sol2-64.mt
Normal file
3
gdb/config/sparc/sol2-64.mt
Normal file
@@ -0,0 +1,3 @@
|
||||
# Target: Solaris UltraSPARC
|
||||
TDEPFILES= sparc64-tdep.o sparc64-sol2-tdep.o sparc-tdep.o sparc-sol2-tdep.o
|
||||
TM_FILE= tm-sol2.h
|
||||
6
gdb/config/sparc/sol2.mh
Normal file
6
gdb/config/sparc/sol2.mh
Normal file
@@ -0,0 +1,6 @@
|
||||
# Host: Solaris SPARC & UltraSPARC
|
||||
NAT_FILE= nm-sol2.h
|
||||
NATDEPFILES= sparc-sol2-nat.o \
|
||||
corelow.o core-regset.o fork-child.o gcore.o \
|
||||
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o \
|
||||
solib.o solib-svr4.o solib-legacy.o
|
||||
3
gdb/config/sparc/sol2.mt
Normal file
3
gdb/config/sparc/sol2.mt
Normal file
@@ -0,0 +1,3 @@
|
||||
# Target: Solaris SPARC
|
||||
TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o
|
||||
TM_FILE= tm-sol2.h
|
||||
@@ -1,6 +0,0 @@
|
||||
# Target: SPARC64
|
||||
# solib.o and procfs.o taken out for now. We don't have shared libraries yet,
|
||||
# and the elf version requires procfs.o but the a.out version doesn't.
|
||||
# Then again, having procfs.o in a target makefile fragment seems wrong.
|
||||
TDEPFILES = sparc-tdep.o
|
||||
TM_FILE= tm-sp64.h
|
||||
@@ -1,3 +0,0 @@
|
||||
# Target: UltraSPARC, running Linux 64bit programs
|
||||
TDEPFILES= sparc-tdep.o solib.o solib-svr4.o solib-legacy.o
|
||||
TM_FILE= tm-sp64linux.h
|
||||
@@ -1,3 +0,0 @@
|
||||
# Target: Ultrasparc, running Solaris 2
|
||||
TDEPFILES= sparc-tdep.o
|
||||
TM_FILE= tm-sun4sol2.h
|
||||
@@ -1,3 +0,0 @@
|
||||
# Target: SPARC embedded
|
||||
TDEPFILES= sparc-tdep.o
|
||||
TM_FILE= tm-spc-em.h
|
||||
2
gdb/config/sparc/sparc.mt
Normal file
2
gdb/config/sparc/sparc.mt
Normal file
@@ -0,0 +1,2 @@
|
||||
# Target: SPARC
|
||||
TDEPFILES= sparc-tdep.o
|
||||
2
gdb/config/sparc/sparc64.mt
Normal file
2
gdb/config/sparc/sparc64.mt
Normal file
@@ -0,0 +1,2 @@
|
||||
# Target: UltraSPARC
|
||||
TDEPFILES= sparc-tdep.o sparc64-tdep.o
|
||||
@@ -1,6 +0,0 @@
|
||||
# Host: Sparc running LynxOS
|
||||
|
||||
XM_CLIBS= -lbsd
|
||||
|
||||
NAT_FILE= nm-sparclynx.h
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o
|
||||
@@ -1,3 +0,0 @@
|
||||
# Target: Sparc running LynxOS
|
||||
TDEPFILES= coff-solib.o sparc-tdep.o
|
||||
TM_FILE= tm-sparclynx.h
|
||||
@@ -1,9 +0,0 @@
|
||||
# Host: Sun 4 or Sparcstation, running SunOS 4
|
||||
NAT_FILE= nm-sun4os4.h
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o
|
||||
HOST_IPC=-DBSD_IPC
|
||||
|
||||
# Setting XM_CLIBS=-lresolv would let us use the DNS, but that would screw
|
||||
# anyone who wants to use NIS, which includes at least one Cygnus customer
|
||||
# (PR 3593). So leave it this way until/unless we find a resolver which can
|
||||
# get names from either DNS or NIS from the same GDB binary.
|
||||
@@ -1,3 +0,0 @@
|
||||
# Target: Sun 4 or Sparcstation, running SunOS 4
|
||||
TDEPFILES= sparc-tdep.o solib.o solib-sunos.o
|
||||
TM_FILE= tm-sun4os4.h
|
||||
@@ -1,22 +0,0 @@
|
||||
# Host: Sun 4 or Sparcstation, running Solaris 2
|
||||
|
||||
XM_FILE= xm-sun4sol2.h
|
||||
XM_CLIBS= -lsocket -lnsl
|
||||
|
||||
NAT_FILE= nm-sun4sol2.h
|
||||
NATDEPFILES= corelow.o core-sol2.o solib.o solib-svr4.o solib-legacy.o \
|
||||
fork-child.o procfs.o gcore.o \
|
||||
proc-api.o proc-events.o proc-flags.o proc-why.o
|
||||
|
||||
# /usr/include/v9 is needed only by core-sol2.c when including
|
||||
# v9/sys/privregs.h, or rather the headers it in turn includes.
|
||||
MH_CFLAGS=-I/usr/include/v9
|
||||
# If you are compiling with Sun's compiler, add the -xs option to CC
|
||||
# (e.g. `make CC="cc -xs"').
|
||||
# Sun's compilers require the -xs option to produce debug information
|
||||
# in the final linked executable. Otherwise they leave it in the .o
|
||||
# files only, with undocumented pointers to it in the linked executable.
|
||||
# This is commented out because we don't assume that the Sun compiler
|
||||
# is in use.
|
||||
#MH_CFLAGS=-xs -I/usr/include/v9
|
||||
HOST_IPC=-DBSD_IPC
|
||||
@@ -1,3 +0,0 @@
|
||||
# Target: Sun 4 or Sparcstation, running Solaris 2
|
||||
TDEPFILES= sparc-tdep.o
|
||||
TM_FILE= tm-sun4sol2.h
|
||||
@@ -1,7 +1,6 @@
|
||||
/* Macro definitions for GDB for a Sparc running GNU/Linux.
|
||||
/* Target-dependent definitions for GNU/Linux SPARC.
|
||||
|
||||
Copyright 1989, 1992, 1994, 1995, 1998, 1999, 2002 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -17,16 +16,14 @@
|
||||
|
||||
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. */
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef TM_SPARCLINUX_H
|
||||
#define TM_SPARCLINUX_H
|
||||
#ifndef TM_LINUX_H
|
||||
#define TM_LINUX_H
|
||||
|
||||
#include "sparc/tm-sparc.h"
|
||||
#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
|
||||
|
||||
#define SIGCONTEXT_PC_OFFSET 12
|
||||
/* Shared library support. */
|
||||
#include "solib.h"
|
||||
|
||||
#include "config/tm-linux.h"
|
||||
|
||||
#endif /* TM_SPARCLINUX_H */
|
||||
#endif /* tm-linux.h */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* Macro definitions for Sparc running under NetBSD.
|
||||
Copyright 1994, 2002 Free Software Foundation, Inc.
|
||||
/* Target-dependent definitions for NetBSD/sparc.
|
||||
|
||||
Copyright 1994, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@@ -21,7 +22,9 @@
|
||||
#ifndef TM_NBSD_H
|
||||
#define TM_NBSD_H
|
||||
|
||||
#include "sparc/tm-sparc.h"
|
||||
#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
|
||||
|
||||
/* Shared library support. */
|
||||
#include "solib.h"
|
||||
|
||||
#endif /* TM_NBSD_H */
|
||||
#endif /* tm-nbsd.h */
|
||||
|
||||
40
gdb/config/sparc/tm-sol2.h
Normal file
40
gdb/config/sparc/tm-sol2.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/* Target-dependent definitions for Solaris SPARC.
|
||||
|
||||
Copyright 2003 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef TM_SOL2_H
|
||||
#define TM_SOL2_H
|
||||
|
||||
#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
|
||||
|
||||
/* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop,
|
||||
SunPRO) compiler puts out 0 instead of the address in N_SO stabs.
|
||||
Starting with SunPRO 3.0, the compiler does this for N_FUN stabs
|
||||
too. */
|
||||
#define SOFUN_ADDRESS_MAYBE_MISSING
|
||||
|
||||
/* The Sun compilers also do "globalization"; see the comment in
|
||||
sparc-tdep.c for more information. */
|
||||
extern char *sparc_stabs_unglobalize_name (char *name);
|
||||
#define STATIC_TRANSFORM_NAME(name) \
|
||||
sparc_stabs_unglobalize_name (name)
|
||||
#define IS_STATIC_TRANSFORM_NAME(name) \
|
||||
((name) != sparc_stabs_unglobalize_name (name))
|
||||
|
||||
#endif /* tm-sol2.h */
|
||||
@@ -1,107 +0,0 @@
|
||||
/* Target machine sub-parameters for SPARC64, for GDB, the GNU debugger.
|
||||
This is included by other tm-*.h files to define SPARC64 cpu-related info.
|
||||
Copyright 1994, 1995, 1996, 1998, 1999, 2000
|
||||
Free Software Foundation, Inc.
|
||||
This is (obviously) based on the SPARC Vn (n<9) port.
|
||||
Contributed by Doug Evans (dje@cygnus.com).
|
||||
Further modified by Bob Manson (manson@cygnus.com).
|
||||
|
||||
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. */
|
||||
|
||||
struct type;
|
||||
|
||||
#ifndef GDB_TARGET_IS_SPARC64
|
||||
#define GDB_TARGET_IS_SPARC64 1
|
||||
#endif
|
||||
|
||||
#include "sparc/tm-sparc.h"
|
||||
|
||||
/* Eeeew. Ok, we have to assume (for now) that the processor really is
|
||||
in sparc64 mode. While this is the same instruction sequence as
|
||||
on the Sparc, the stack frames are offset by +2047 (and the arguments
|
||||
are 8 bytes instead of 4). */
|
||||
/* Instructions are:
|
||||
std %f10, [ %fp + 0x7a7 ]
|
||||
std %f8, [ %fp + 0x79f ]
|
||||
std %f6, [ %fp + 0x797 ]
|
||||
std %f4, [ %fp + 0x78f ]
|
||||
std %f2, [ %fp + 0x787 ]
|
||||
std %f0, [ %fp + 0x77f ]
|
||||
std %g6, [ %fp + 0x777 ]
|
||||
std %g4, [ %fp + 0x76f ]
|
||||
std %g2, [ %fp + 0x767 ]
|
||||
std %g0, [ %fp + 0x75f ]
|
||||
std %fp, [ %fp + 0x757 ]
|
||||
std %i4, [ %fp + 0x74f ]
|
||||
std %i2, [ %fp + 0x747 ]
|
||||
std %i0, [ %fp + 0x73f ]
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
rd %tbr, %o0
|
||||
st %o0, [ %fp + 0x72b ]
|
||||
rd %tpc, %o0
|
||||
st %o0, [ %fp + 0x727 ]
|
||||
rd %psr, %o0
|
||||
st %o0, [ %fp + 0x723 ]
|
||||
rd %y, %o0
|
||||
st %o0, [ %fp + 0x71f ]
|
||||
ldx [ %sp + 0x8a7 ], %o5
|
||||
ldx [ %sp + 0x89f ], %o4
|
||||
ldx [ %sp + 0x897 ], %o3
|
||||
ldx [ %sp + 0x88f ], %o2
|
||||
ldx [ %sp + 0x887 ], %o1
|
||||
call %g0
|
||||
ldx [ %sp + 0x87f ], %o0
|
||||
nop
|
||||
ta 1
|
||||
nop
|
||||
nop
|
||||
*/
|
||||
|
||||
/* Offsets into jmp_buf.
|
||||
FIXME: This was borrowed from the v8 stuff and will probably have to change
|
||||
for v9. */
|
||||
|
||||
#define JB_ELEMENT_SIZE 8 /* Size of each element in jmp_buf */
|
||||
|
||||
#define JB_ONSSTACK 0
|
||||
#define JB_SIGMASK 1
|
||||
#define JB_SP 2
|
||||
#define JB_PC 3
|
||||
#define JB_NPC 4
|
||||
#define JB_PSR 5
|
||||
#define JB_G1 6
|
||||
#define JB_O0 7
|
||||
#define JB_WBCNT 8
|
||||
|
||||
/* Figure out where the longjmp will land. We expect that we have
|
||||
just entered longjmp and haven't yet setup the stack frame, so the
|
||||
args are still in the output regs. %o0 (O0_REGNUM) points at 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 */
|
||||
|
||||
extern int get_longjmp_target (CORE_ADDR *);
|
||||
|
||||
#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
|
||||
|
||||
#undef TM_PRINT_INSN_MACH
|
||||
#define TM_PRINT_INSN_MACH bfd_mach_sparc_v9a
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/* Macro definitions for GDB for a UltraSparc running GNU/Linux.
|
||||
|
||||
Copyright 2001, 2002 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_SPARC_LIN64_H
|
||||
#define TM_SPARC_LIN64_H
|
||||
|
||||
#include "sparc/tm-sp64.h"
|
||||
|
||||
#define SIGCONTEXT_PC_OFFSET 16 /* See asm-sparc64/sigcontext.h */
|
||||
|
||||
/* We always want full V9 + Ultra VIS stuff... */
|
||||
#undef TM_PRINT_INSN_MACH
|
||||
#define TM_PRINT_INSN_MACH bfd_mach_sparc_v9a
|
||||
|
||||
#include "config/tm-sysv4.h"
|
||||
|
||||
#endif /* TM_SPARC_LIN64_H */
|
||||
@@ -1,354 +0,0 @@
|
||||
/* Target machine sub-parameters for SPARC, for GDB, the GNU debugger.
|
||||
This is included by other tm-*.h files to define SPARC cpu-related info.
|
||||
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
||||
1998, 1999, 2000, 2001, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Michael Tiemann (tiemann@mcc.com)
|
||||
|
||||
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. */
|
||||
|
||||
#include "regcache.h"
|
||||
|
||||
struct type;
|
||||
struct value;
|
||||
struct frame_info;
|
||||
|
||||
/*
|
||||
* The following enums are purely for the convenience of the GDB
|
||||
* developer, when debugging GDB.
|
||||
*/
|
||||
|
||||
enum { /* Sparc general registers, for all sparc versions. */
|
||||
G0_REGNUM, G1_REGNUM, G2_REGNUM, G3_REGNUM,
|
||||
G4_REGNUM, G5_REGNUM, G6_REGNUM, G7_REGNUM,
|
||||
O0_REGNUM, O1_REGNUM, O2_REGNUM, O3_REGNUM,
|
||||
O4_REGNUM, O5_REGNUM, O6_REGNUM, O7_REGNUM,
|
||||
L0_REGNUM, L1_REGNUM, L2_REGNUM, L3_REGNUM,
|
||||
L4_REGNUM, L5_REGNUM, L6_REGNUM, L7_REGNUM,
|
||||
I0_REGNUM, I1_REGNUM, I2_REGNUM, I3_REGNUM,
|
||||
I4_REGNUM, I5_REGNUM, I6_REGNUM, I7_REGNUM,
|
||||
FP0_REGNUM /* Floating point register 0 */
|
||||
};
|
||||
|
||||
enum { /* Sparc general registers, alternate names. */
|
||||
R0_REGNUM, R1_REGNUM, R2_REGNUM, R3_REGNUM,
|
||||
R4_REGNUM, R5_REGNUM, R6_REGNUM, R7_REGNUM,
|
||||
R8_REGNUM, R9_REGNUM, R10_REGNUM, R11_REGNUM,
|
||||
R12_REGNUM, R13_REGNUM, R14_REGNUM, R15_REGNUM,
|
||||
R16_REGNUM, R17_REGNUM, R18_REGNUM, R19_REGNUM,
|
||||
R20_REGNUM, R21_REGNUM, R22_REGNUM, R23_REGNUM,
|
||||
R24_REGNUM, R25_REGNUM, R26_REGNUM, R27_REGNUM,
|
||||
R28_REGNUM, R29_REGNUM, R30_REGNUM, R31_REGNUM
|
||||
};
|
||||
|
||||
enum { /* Sparc32 control registers. */
|
||||
PS_REGNUM = 65, /* PC, NPC, and Y are omitted because */
|
||||
WIM_REGNUM = 66, /* they have different values depending on */
|
||||
TBR_REGNUM = 67, /* 32-bit / 64-bit mode. */
|
||||
FPS_REGNUM = 70,
|
||||
CPS_REGNUM = 71
|
||||
};
|
||||
|
||||
/* v9 misc. and priv. regs */
|
||||
|
||||
/* Note: specifying values explicitly for documentation purposes. */
|
||||
enum { /* Sparc64 control registers, excluding Y, PC, and NPC. */
|
||||
CCR_REGNUM = 82, /* Condition Code Register (%xcc,%icc) */
|
||||
FSR_REGNUM = 83, /* Floating Point State */
|
||||
FPRS_REGNUM = 84, /* Floating Point Registers State */
|
||||
ASI_REGNUM = 86, /* Alternate Space Identifier */
|
||||
VER_REGNUM = 87, /* Version register */
|
||||
TICK_REGNUM = 88, /* Tick register */
|
||||
PIL_REGNUM = 89, /* Processor Interrupt Level */
|
||||
PSTATE_REGNUM = 90, /* Processor State */
|
||||
TSTATE_REGNUM = 91, /* Trap State */
|
||||
TBA_REGNUM = 92, /* Trap Base Address */
|
||||
TL_REGNUM = 93, /* Trap Level */
|
||||
TT_REGNUM = 94, /* Trap Type */
|
||||
TPC_REGNUM = 95, /* Trap pc */
|
||||
TNPC_REGNUM = 96, /* Trap npc */
|
||||
WSTATE_REGNUM = 97, /* Window State */
|
||||
CWP_REGNUM = 98, /* Current Window Pointer */
|
||||
CANSAVE_REGNUM = 99, /* Savable Windows */
|
||||
CANRESTORE_REGNUM = 100, /* Restorable Windows */
|
||||
CLEANWIN_REGNUM = 101, /* Clean Windows */
|
||||
OTHERWIN_REGNUM = 102, /* Other Windows */
|
||||
ASR16_REGNUM = 103, /* Ancillary State Registers */
|
||||
ASR17_REGNUM = 104,
|
||||
ASR18_REGNUM = 105,
|
||||
ASR19_REGNUM = 106,
|
||||
ASR20_REGNUM = 107,
|
||||
ASR21_REGNUM = 108,
|
||||
ASR22_REGNUM = 109,
|
||||
ASR23_REGNUM = 110,
|
||||
ASR24_REGNUM = 111,
|
||||
ASR25_REGNUM = 112,
|
||||
ASR26_REGNUM = 113,
|
||||
ASR27_REGNUM = 114,
|
||||
ASR28_REGNUM = 115,
|
||||
ASR29_REGNUM = 116,
|
||||
ASR30_REGNUM = 117,
|
||||
ASR31_REGNUM = 118,
|
||||
ICC_REGNUM = 119, /* 32 bit condition codes */
|
||||
XCC_REGNUM = 120, /* 64 bit condition codes */
|
||||
FCC0_REGNUM = 121, /* fp cc reg 0 */
|
||||
FCC1_REGNUM = 122, /* fp cc reg 1 */
|
||||
FCC2_REGNUM = 123, /* fp cc reg 2 */
|
||||
FCC3_REGNUM = 124 /* fp cc reg 3 */
|
||||
};
|
||||
|
||||
/*
|
||||
* Make sparc target multi-archable: April 2000
|
||||
*/
|
||||
|
||||
/* Multi-arch definition of TARGET_IS_SPARC64, TARGET_ELF64 */
|
||||
#undef GDB_TARGET_IS_SPARC64
|
||||
#define GDB_TARGET_IS_SPARC64 \
|
||||
(sparc_intreg_size () == 8)
|
||||
#undef TARGET_ELF64
|
||||
#define TARGET_ELF64 \
|
||||
(sparc_intreg_size () == 8)
|
||||
extern int sparc_intreg_size (void);
|
||||
|
||||
/*
|
||||
* The following defines should ONLY appear for MULTI_ARCH.
|
||||
*/
|
||||
|
||||
/* Multi-arch the nPC and Y registers. */
|
||||
#define Y_REGNUM (sparc_y_regnum ())
|
||||
|
||||
/* On the Sun 4 under SunOS, the compile will leave a fake insn which
|
||||
encodes the structure size being returned. If we detect such
|
||||
a fake insn, step past it. */
|
||||
|
||||
#define PC_ADJUST(PC) sparc_pc_adjust (PC)
|
||||
extern CORE_ADDR sparc_pc_adjust (CORE_ADDR);
|
||||
|
||||
/* If an argument is declared "register", Sun cc will keep it in a register,
|
||||
never saving it onto the stack. So we better not believe the "p" symbol
|
||||
descriptor stab. */
|
||||
|
||||
#define DEPRECATE_USE_REGISTER_NOT_ARG
|
||||
|
||||
/* For acc, there's no need to correct LBRAC entries by guessing how
|
||||
they should work. In fact, this is harmful because the LBRAC
|
||||
entries now all appear at the end of the function, not intermixed
|
||||
with the SLINE entries. n_opt_found detects acc for Solaris binaries;
|
||||
function_stab_type detects acc for SunOS4 binaries.
|
||||
|
||||
For binary from SunOS4 /bin/cc, need to correct LBRAC's.
|
||||
|
||||
For gcc, like acc, don't correct. */
|
||||
|
||||
#define SUN_FIXED_LBRAC_BUG \
|
||||
(n_opt_found \
|
||||
|| function_stab_type == N_STSYM \
|
||||
|| function_stab_type == N_GSYM \
|
||||
|| processing_gcc_compilation)
|
||||
|
||||
/* Do variables in the debug stabs occur after the N_LBRAC or before it?
|
||||
acc: after, gcc: before, SunOS4 /bin/cc: before. */
|
||||
|
||||
#define VARIABLES_INSIDE_BLOCK(desc, gcc_p) \
|
||||
(!(gcc_p) \
|
||||
&& (n_opt_found \
|
||||
|| function_stab_type == N_STSYM \
|
||||
|| function_stab_type == N_GSYM))
|
||||
|
||||
/* Sequence of bytes for breakpoint instruction (ta 1). */
|
||||
|
||||
extern const unsigned char *sparc_breakpoint_from_pc (CORE_ADDR *pc, int *len);
|
||||
#define BREAKPOINT_FROM_PC(PC,LEN) sparc_breakpoint_from_pc ((PC), (LEN))
|
||||
|
||||
/* Register numbers of various important registers.
|
||||
Note that some of these values are "real" register numbers,
|
||||
and correspond to the general registers of the machine,
|
||||
and some are "phony" register numbers which are too large
|
||||
to be actual register numbers as far as the user is concerned
|
||||
but do serve to get the desired values when passed to read_register. */
|
||||
|
||||
#define G0_REGNUM 0 /* %g0 */
|
||||
#define G1_REGNUM 1 /* %g1 */
|
||||
#define O0_REGNUM 8 /* %o0 */
|
||||
#define RP_REGNUM 15 /* Contains return address value, *before* \
|
||||
any windows get switched. */
|
||||
#define O7_REGNUM 15 /* Last local reg not saved on stack frame */
|
||||
#define L0_REGNUM 16 /* First local reg that's saved on stack frame
|
||||
rather than in machine registers */
|
||||
#define I0_REGNUM 24 /* %i0 */
|
||||
#define I7_REGNUM 31 /* Last local reg saved on stack frame */
|
||||
#define PS_REGNUM 65 /* Contains processor status */
|
||||
#define PS_FLAG_CARRY 0x100000 /* Carry bit in PS */
|
||||
#define WIM_REGNUM 66 /* Window Invalid Mask (not really supported) */
|
||||
#define TBR_REGNUM 67 /* Trap Base Register (not really supported) */
|
||||
#define FPS_REGNUM 70 /* Floating point status register */
|
||||
#define CPS_REGNUM 71 /* Coprocessor status register */
|
||||
|
||||
/* Writing to %g0 is a noop (not an error or exception or anything like
|
||||
that, however). */
|
||||
|
||||
#define CANNOT_STORE_REGISTER(regno) ((regno) == G0_REGNUM)
|
||||
|
||||
#define DEPRECATED_PRINT_EXTRA_FRAME_INFO(FI) \
|
||||
sparc_print_extra_frame_info (FI)
|
||||
extern void sparc_print_extra_frame_info (struct frame_info *);
|
||||
|
||||
/* DEPRECATED_INIT_EXTRA_FRAME_INFO needs the PC to detect flat
|
||||
frames. */
|
||||
|
||||
#define DEPRECATED_INIT_FRAME_PC_FIRST(FROMLEAF, PREV) \
|
||||
((FROMLEAF) ? DEPRECATED_SAVED_PC_AFTER_CALL ((PREV)->next) : \
|
||||
(PREV)->next ? DEPRECATED_FRAME_SAVED_PC ((PREV)->next) : read_pc ())
|
||||
|
||||
/* Define other aspects of the stack frame. */
|
||||
|
||||
/* The location of I0 w.r.t SP. This is actually dependent on how the
|
||||
system's window overflow/underflow routines are written. Most
|
||||
vendors save the L regs followed by the I regs (at the higher
|
||||
address). Some vendors get it wrong. */
|
||||
|
||||
#define FRAME_SAVED_L0 0
|
||||
#define FRAME_SAVED_I0 (8 * DEPRECATED_REGISTER_RAW_SIZE (L0_REGNUM))
|
||||
|
||||
/* Things needed for making the inferior call functions. */
|
||||
/*
|
||||
* First of all, let me give my opinion of what the DUMMY_FRAME
|
||||
* actually looks like.
|
||||
*
|
||||
* | |
|
||||
* | |
|
||||
* + - - - - - - - - - - - - - - - - +<-- fp (level 0)
|
||||
* | |
|
||||
* | |
|
||||
* | |
|
||||
* | |
|
||||
* | Frame of innermost program |
|
||||
* | function |
|
||||
* | |
|
||||
* | |
|
||||
* | |
|
||||
* | |
|
||||
* | |
|
||||
* |---------------------------------|<-- sp (level 0), fp (c)
|
||||
* | |
|
||||
* DUMMY | fp0-31 |
|
||||
* | |
|
||||
* | ------ |<-- fp - 0x80
|
||||
* FRAME | g0-7 |<-- fp - 0xa0
|
||||
* | i0-7 |<-- fp - 0xc0
|
||||
* | other |<-- fp - 0xe0
|
||||
* | ? |
|
||||
* | ? |
|
||||
* |---------------------------------|<-- sp' = fp - 0x140
|
||||
* | |
|
||||
* xcution start | |
|
||||
* sp' + 0x94 -->| CALL_DUMMY (x code) |
|
||||
* | |
|
||||
* | |
|
||||
* |---------------------------------|<-- sp'' = fp - 0x200
|
||||
* | align sp to 8 byte boundary |
|
||||
* | ==> args to fn <== |
|
||||
* Room for | |
|
||||
* i & l's + agg | CALL_DUMMY_STACK_ADJUST = 0x0x44|
|
||||
* |---------------------------------|<-- final sp (variable)
|
||||
* | |
|
||||
* | Where function called will |
|
||||
* | build frame. |
|
||||
* | |
|
||||
* | |
|
||||
*
|
||||
* I understand everything in this picture except what the space
|
||||
* between fp - 0xe0 and fp - 0x140 is used for. Oh, and I don't
|
||||
* understand why there's a large chunk of CALL_DUMMY that never gets
|
||||
* executed (its function is superceeded by
|
||||
* DEPRECATED_PUSH_DUMMY_FRAME; they are designed to do the same
|
||||
* thing).
|
||||
*
|
||||
* DEPRECATED_PUSH_DUMMY_FRAME saves the registers above sp' and
|
||||
* pushes the * register file stack down one.
|
||||
*
|
||||
* call_function then writes CALL_DUMMY, pushes the args onto the
|
||||
* stack, and adjusts the stack pointer.
|
||||
|
||||
call_function_by_hand then starts execution (in the middle of
|
||||
CALL_DUMMY, as directed by call_function). */
|
||||
|
||||
#ifndef CALL_DUMMY
|
||||
/* This sequence of words is the instructions
|
||||
|
||||
00: bc 10 00 01 mov %g1, %fp
|
||||
04: 9d e3 80 00 save %sp, %g0, %sp
|
||||
08: bc 10 00 02 mov %g2, %fp
|
||||
0c: be 10 00 03 mov %g3, %i7
|
||||
10: da 03 a0 58 ld [ %sp + 0x58 ], %o5
|
||||
14: d8 03 a0 54 ld [ %sp + 0x54 ], %o4
|
||||
18: d6 03 a0 50 ld [ %sp + 0x50 ], %o3
|
||||
1c: d4 03 a0 4c ld [ %sp + 0x4c ], %o2
|
||||
20: d2 03 a0 48 ld [ %sp + 0x48 ], %o1
|
||||
24: 40 00 00 00 call <fun>
|
||||
28: d0 03 a0 44 ld [ %sp + 0x44 ], %o0
|
||||
2c: 01 00 00 00 nop
|
||||
30: 91 d0 20 01 ta 1
|
||||
34: 01 00 00 00 nop
|
||||
|
||||
NOTES:
|
||||
* the first four instructions are necessary only on the simulator.
|
||||
* this is a multiple of 8 (not only 4) bytes.
|
||||
* the `call' insn is a relative, not an absolute call.
|
||||
* the `nop' at the end is needed to keep the trap from
|
||||
clobbering things (if NPC pointed to garbage instead).
|
||||
*/
|
||||
|
||||
#endif /* CALL_DUMMY */
|
||||
|
||||
/* Sparc has no reliable single step ptrace call */
|
||||
|
||||
#define SOFTWARE_SINGLE_STEP_P() 1
|
||||
extern void sparc_software_single_step (enum target_signal, int);
|
||||
#define SOFTWARE_SINGLE_STEP(sig,bp_p) sparc_software_single_step (sig,bp_p)
|
||||
|
||||
/* We need more arguments in a frame specification for the
|
||||
"frame" or "info frame" command. */
|
||||
|
||||
#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
|
||||
extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
|
||||
|
||||
extern void sparc_do_registers_info (int regnum, int all);
|
||||
#undef DEPRECATED_DO_REGISTERS_INFO
|
||||
#define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) sparc_do_registers_info (REGNUM, ALL)
|
||||
|
||||
/* Optimization for storing registers to the inferior. The hook
|
||||
DO_DEFERRED_STORES
|
||||
actually executes any deferred stores. It is called any time
|
||||
we are going to proceed the child, or read its registers.
|
||||
The hook CLEAR_DEFERRED_STORES is called when we want to throw
|
||||
away the inferior process, e.g. when it dies or we kill it.
|
||||
FIXME, this does not handle remote debugging cleanly. */
|
||||
|
||||
extern int deferred_stores;
|
||||
#define DO_DEFERRED_STORES \
|
||||
if (deferred_stores) \
|
||||
target_store_registers (-2);
|
||||
#define CLEAR_DEFERRED_STORES \
|
||||
deferred_stores = 0;
|
||||
|
||||
/* Select the sparc disassembler */
|
||||
|
||||
#define TM_PRINT_INSN_MACH bfd_mach_sparc
|
||||
|
||||
#define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED 1
|
||||
@@ -1,37 +0,0 @@
|
||||
/* Macro definitions for Sparc running under LynxOS.
|
||||
Copyright 1993, 1994 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_SPARCLYNX_H
|
||||
#define TM_SPARCLYNX_H
|
||||
|
||||
#include "config/tm-lynx.h"
|
||||
|
||||
/* Use generic Sparc definitions. */
|
||||
#include "sparc/tm-sparc.h"
|
||||
|
||||
/* Lynx does this backwards from everybody else */
|
||||
|
||||
#undef FRAME_SAVED_I0
|
||||
#undef FRAME_SAVED_L0
|
||||
|
||||
#define FRAME_SAVED_I0 0
|
||||
#define FRAME_SAVED_L0 (8 * DEPRECATED_REGISTER_RAW_SIZE (I0_REGNUM))
|
||||
|
||||
#endif /* TM_SPARCLYNX_H */
|
||||
@@ -1,46 +0,0 @@
|
||||
/* Target machine definitions for GDB for an embedded SPARC.
|
||||
Copyright 1989, 1992, 1993, 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. */
|
||||
|
||||
#include "sparc/tm-sparc.h"
|
||||
|
||||
/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
|
||||
comment in <machine/setjmp.h>! */
|
||||
|
||||
#define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
|
||||
|
||||
#define JB_ONSSTACK 0
|
||||
#define JB_SIGMASK 1
|
||||
#define JB_SP 2
|
||||
#define JB_PC 3
|
||||
#define JB_NPC 4
|
||||
#define JB_PSR 5
|
||||
#define JB_G1 6
|
||||
#define JB_O0 7
|
||||
#define JB_WBCNT 8
|
||||
|
||||
/* Figure out where the longjmp will land. We expect that we have just entered
|
||||
longjmp and haven't yet setup the stack frame, so the args are still in the
|
||||
output regs. %o0 (O0_REGNUM) points at 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 */
|
||||
|
||||
extern int get_longjmp_target (CORE_ADDR *);
|
||||
|
||||
#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
|
||||
@@ -1,59 +0,0 @@
|
||||
/* Macro definitions for GDB for a Sun 4 running sunos 4.
|
||||
Copyright 1989, 1992, 1994, 1995, 1998, 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. */
|
||||
|
||||
#include "sparc/tm-sparc.h"
|
||||
#include "config/tm-sunos.h"
|
||||
|
||||
/* Redefine SKIP_TRAMPOLINE_CODE to handle PIC compiled modules
|
||||
in main executables. */
|
||||
|
||||
#undef SKIP_TRAMPOLINE_CODE
|
||||
#define SKIP_TRAMPOLINE_CODE(pc) sunos4_skip_trampoline_code (pc)
|
||||
extern CORE_ADDR sunos4_skip_trampoline_code (CORE_ADDR);
|
||||
|
||||
/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
|
||||
comment in <machine/setjmp.h>! */
|
||||
|
||||
#define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
|
||||
|
||||
#define JB_ONSSTACK 0
|
||||
#define JB_SIGMASK 1
|
||||
#define JB_SP 2
|
||||
#define JB_PC 3
|
||||
#define JB_NPC 4
|
||||
#define JB_PSR 5
|
||||
#define JB_G1 6
|
||||
#define JB_O0 7
|
||||
#define JB_WBCNT 8
|
||||
|
||||
/* Figure out where the longjmp will land. We expect that we have just entered
|
||||
longjmp and haven't yet setup the stack frame, so the args are still in the
|
||||
output regs. %o0 (O0_REGNUM) points at 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 */
|
||||
|
||||
extern int get_longjmp_target (CORE_ADDR *);
|
||||
|
||||
#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
|
||||
|
||||
extern char *sunpro_static_transform_name (char *);
|
||||
#define STATIC_TRANSFORM_NAME(x) sunpro_static_transform_name (x)
|
||||
#define IS_STATIC_TRANSFORM_NAME(name) ((name)[0] == '$')
|
||||
@@ -1,78 +0,0 @@
|
||||
/* Macro definitions for GDB for a Sun 4 running Solaris 2
|
||||
Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 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. */
|
||||
|
||||
#include "sparc/tm-sparc.h"
|
||||
#include "config/tm-sysv4.h"
|
||||
|
||||
/* With Sol2 it is no longer necessary to enable software single-step,
|
||||
since the /proc interface can take care of it for us in hardware. */
|
||||
#undef SOFTWARE_SINGLE_STEP
|
||||
#undef SOFTWARE_SINGLE_STEP_P
|
||||
|
||||
/* There are two different signal handler trampolines in Solaris2. */
|
||||
#define IN_SIGTRAMP(pc, name) \
|
||||
((name) \
|
||||
&& (DEPRECATED_STREQ ("sigacthandler", name) || DEPRECATED_STREQ ("ucbsigvechandler", name)))
|
||||
|
||||
/* The signal handler gets a pointer to an ucontext as third argument
|
||||
if it is called from sigacthandler. This is the offset to the saved
|
||||
PC within it. sparc_frame_saved_pc knows how to deal with
|
||||
ucbsigvechandler. */
|
||||
#define SIGCONTEXT_PC_OFFSET 44
|
||||
|
||||
#if 0 /* FIXME Setjmp/longjmp are not as well doc'd in SunOS 5.x yet */
|
||||
|
||||
/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
|
||||
comment in <machine/setjmp.h>! */
|
||||
|
||||
#define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
|
||||
|
||||
#define JB_ONSSTACK 0
|
||||
#define JB_SIGMASK 1
|
||||
#define JB_SP 2
|
||||
#define JB_PC 3
|
||||
#define JB_NPC 4
|
||||
#define JB_PSR 5
|
||||
#define JB_G1 6
|
||||
#define JB_O0 7
|
||||
#define JB_WBCNT 8
|
||||
|
||||
/* Figure out where the longjmp will land. We expect that we have just entered
|
||||
longjmp and haven't yet setup the stack frame, so the args are still in the
|
||||
output regs. %o0 (O0_REGNUM) points at 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 */
|
||||
|
||||
extern int get_longjmp_target (CORE_ADDR *);
|
||||
|
||||
#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
|
||||
#endif /* 0 */
|
||||
|
||||
/* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
|
||||
and for SunPRO 3.0, N_FUN symbols too. */
|
||||
#define SOFUN_ADDRESS_MAYBE_MISSING
|
||||
|
||||
extern char *sunpro_static_transform_name (char *);
|
||||
#define STATIC_TRANSFORM_NAME(x) sunpro_static_transform_name (x)
|
||||
#define IS_STATIC_TRANSFORM_NAME(name) ((name)[0] == '$')
|
||||
|
||||
/* Enable handling of shared libraries for a.out executables. */
|
||||
#define HANDLE_SVR4_EXEC_EMULATORS
|
||||
@@ -1,27 +0,0 @@
|
||||
/* Target machine description for VxWorks sparc's, for GDB, the GNU debugger.
|
||||
Copyright 1993, 1999 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
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. */
|
||||
|
||||
#include "sparc/tm-spc-em.h"
|
||||
#include "config/tm-vxworks.h"
|
||||
|
||||
/* Number of registers in a ptrace_getfpregs call. */
|
||||
|
||||
/* #define VX_SIZE_FPREGS (don't know how many) */
|
||||
@@ -1,3 +0,0 @@
|
||||
# Target: SPARC running VxWorks
|
||||
TDEPFILES= sparc-tdep.o remote-vx.o remote-vxsparc.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
|
||||
TM_FILE= tm-vxsparc.h
|
||||
@@ -1,42 +0,0 @@
|
||||
/* Macro definitions for running gdb on a Sparc running GNU/Linux.
|
||||
|
||||
Copyright 1989, 1993, 1994, 1995, 1996, 1998, 2001, 2002 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 XM_SPARCLINUX_H
|
||||
#define XM_SPARCLINUX_H
|
||||
|
||||
/* This is the amount to subtract from u.u_ar0
|
||||
to get the offset in the core file of the register values. */
|
||||
#define KERNEL_U_ADDR 0x0
|
||||
|
||||
#define U_REGS_OFFSET 0
|
||||
|
||||
/* If you expect to use the mmalloc package to obtain mapped symbol files,
|
||||
for now you have to specify some parameters that determine how gdb places
|
||||
the mappings in it's address space. See the comments in map_to_address()
|
||||
for details. This is expected to only be a short term solution. Yes it
|
||||
is a kludge.
|
||||
FIXME: Make this more automatic. */
|
||||
|
||||
#define MMAP_BASE_ADDRESS 0xE0000000 /* First mapping here */
|
||||
#define MMAP_INCREMENT 0x01000000 /* Increment to next mapping */
|
||||
|
||||
#endif /* _XM_SPARCLINUX_H */
|
||||
@@ -1,37 +0,0 @@
|
||||
/* Macro definitions for running gdb on a Sun 4 running Solaris 2.
|
||||
Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1998, 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. */
|
||||
|
||||
/* Pick up more stuff from the generic SVR4 host include file. */
|
||||
|
||||
#include "config/xm-sysv4.h"
|
||||
|
||||
/* These are not currently used in SVR4 (but should be, FIXME!). */
|
||||
#undef DO_DEFERRED_STORES
|
||||
#undef CLEAR_DEFERRED_STORES
|
||||
|
||||
/* solaris doesn't have siginterrupt, though it has sigaction; however,
|
||||
in this case siginterrupt would just be setting the default. */
|
||||
#define NO_SIGINTERRUPT
|
||||
|
||||
/* On sol2.7, <curses.h> emits a bunch of 'macro redefined'
|
||||
warnings, which makes autoconf think curses.h doesn't
|
||||
exist. Compensate for that here. */
|
||||
#define HAVE_CURSES_H 1
|
||||
Reference in New Issue
Block a user