2003-04-16 Andrew Cagney <cagney@redhat.com>

* NEWS: Mention that sparclet-*-* and sparclite-*-* have been made
	obsolete.
	* sparc-tdep.c: Obsolete SPARCLET and SPARCLITE code.
	* sparcl-stub.c: Obsolete file.
	* config/sparc/tm-sparclet.h: Obsolete file.
	* sparclet-stub.c: Obsolete file.
	* sparclet-rom.c: Obsolete file.
	* sparcl-tdep.c: Obsolete file.
	* config/sparc/tm-sparclite.h: Obsolete file.
	* config/sparc/sparclite.mt: Obsolete file.
	* config/sparc/sparclet.mt: Obsolete file.
	* configure.tgt: Make sparclet-*-*, sparclite-*-*, and
	sparc86x-*-* obsolete.
This commit is contained in:
Andrew Cagney
2003-04-16 14:32:21 +00:00
parent 39f1ebed0b
commit f81824a9ed
12 changed files with 3823 additions and 3764 deletions

View File

@ -1,3 +1,19 @@
2003-04-16 Andrew Cagney <cagney@redhat.com>
* NEWS: Mention that sparclet-*-* and sparclite-*-* have been made
obsolete.
* sparc-tdep.c: Obsolete SPARCLET and SPARCLITE code.
* sparcl-stub.c: Obsolete file.
* config/sparc/tm-sparclet.h: Obsolete file.
* sparclet-stub.c: Obsolete file.
* sparclet-rom.c: Obsolete file.
* sparcl-tdep.c: Obsolete file.
* config/sparc/tm-sparclite.h: Obsolete file.
* config/sparc/sparclite.mt: Obsolete file.
* config/sparc/sparclet.mt: Obsolete file.
* configure.tgt: Make sparclet-*-*, sparclite-*-*, and
sparc86x-*-* obsolete.
2003-04-15 David Carlton <carlton@math.stanford.edu> 2003-04-15 David Carlton <carlton@math.stanford.edu>
* Makefile.in (SFILES): Add cp-namespace.c. * Makefile.in (SFILES): Add cp-namespace.c.

View File

@ -48,6 +48,8 @@ PMAX (MIPS) running Mach 3.0 mips*-*-mach3*
Sequent family i[3456]86-sequent-sysv4* Sequent family i[3456]86-sequent-sysv4*
i[3456]86-sequent-sysv* i[3456]86-sequent-sysv*
i[3456]86-sequent-bsd* i[3456]86-sequent-bsd*
Tsqware Sparclet sparclet-*-*
Fujitsu SPARClite sparclite-fujitsu-none or sparclite
* REMOVED configurations and files * REMOVED configurations and files

View File

@ -1,3 +1,3 @@
# Target: SPARC embedded Sparclet monitor # OBSOLETE # Target: SPARC embedded Sparclet monitor
TDEPFILES= sparc-tdep.o monitor.o sparclet-rom.o dsrec.o # OBSOLETE TDEPFILES= sparc-tdep.o monitor.o sparclet-rom.o dsrec.o
TM_FILE= tm-sparclet.h # OBSOLETE TM_FILE= tm-sparclet.h

View File

@ -1,5 +1,5 @@
# Target: Fujitsu SPARClite processor # OBSOLETE # Target: Fujitsu SPARClite processor
TDEPFILES= sparc-tdep.o sparcl-tdep.o # OBSOLETE TDEPFILES= sparc-tdep.o sparcl-tdep.o
TM_FILE= tm-sparclite.h # OBSOLETE TM_FILE= tm-sparclite.h
SIM_OBS = remote-sim.o # OBSOLETE SIM_OBS = remote-sim.o
SIM = ../sim/erc32/libsim.a # OBSOLETE SIM = ../sim/erc32/libsim.a

View File

@ -1,158 +1,158 @@
/* Target machine definitions for GDB for an embedded SPARC. // OBSOLETE /* Target machine definitions for GDB for an embedded SPARC.
Copyright 1996, 1997, 2000 Free Software Foundation, Inc. // OBSOLETE Copyright 1996, 1997, 2000 Free Software Foundation, Inc.
// OBSOLETE
This file is part of GDB. // OBSOLETE This file is part of GDB.
// OBSOLETE
This program is free software; you can redistribute it and/or modify // OBSOLETE 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 // OBSOLETE it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or // OBSOLETE the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. // OBSOLETE (at your option) any later version.
// OBSOLETE
This program is distributed in the hope that it will be useful, // OBSOLETE This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of // OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. // OBSOLETE GNU General Public License for more details.
// OBSOLETE
You should have received a copy of the GNU General Public License // OBSOLETE You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software // OBSOLETE along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, // OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ // OBSOLETE Boston, MA 02111-1307, USA. */
// OBSOLETE
#include "regcache.h" // OBSOLETE #include "regcache.h"
// OBSOLETE
#define TARGET_SPARCLET 1 /* Still needed for non-multi-arch case */ // OBSOLETE #define TARGET_SPARCLET 1 /* Still needed for non-multi-arch case */
// OBSOLETE
#include "sparc/tm-sparc.h" // OBSOLETE #include "sparc/tm-sparc.h"
// OBSOLETE
/* Note: we are not defining GDB_MULTI_ARCH for the sparclet target // OBSOLETE /* Note: we are not defining GDB_MULTI_ARCH for the sparclet target
at this time, because we have not figured out how to detect the // OBSOLETE at this time, because we have not figured out how to detect the
sparclet target from the bfd structure. */ // OBSOLETE sparclet target from the bfd structure. */
// OBSOLETE
/* Sparclet regs, for debugging purposes. */ // OBSOLETE /* Sparclet regs, for debugging purposes. */
// OBSOLETE
enum { // OBSOLETE enum {
CCSR_REGNUM = 72, // OBSOLETE CCSR_REGNUM = 72,
CCPR_REGNUM = 73, // OBSOLETE CCPR_REGNUM = 73,
CCCRCR_REGNUM = 74, // OBSOLETE CCCRCR_REGNUM = 74,
CCOR_REGNUM = 75, // OBSOLETE CCOR_REGNUM = 75,
CCOBR_REGNUM = 76, // OBSOLETE CCOBR_REGNUM = 76,
CCIBR_REGNUM = 77, // OBSOLETE CCIBR_REGNUM = 77,
CCIR_REGNUM = 78 // OBSOLETE CCIR_REGNUM = 78
}; // OBSOLETE };
// OBSOLETE
/* Select the sparclet disassembler. Slightly different instruction set from // OBSOLETE /* Select the sparclet disassembler. Slightly different instruction set from
the V8 sparc. */ // OBSOLETE the V8 sparc. */
// OBSOLETE
#undef TM_PRINT_INSN_MACH // OBSOLETE #undef TM_PRINT_INSN_MACH
#define TM_PRINT_INSN_MACH bfd_mach_sparc_sparclet // OBSOLETE #define TM_PRINT_INSN_MACH bfd_mach_sparc_sparclet
// OBSOLETE
/* overrides of tm-sparc.h */ // OBSOLETE /* overrides of tm-sparc.h */
// OBSOLETE
#undef TARGET_BYTE_ORDER // OBSOLETE #undef TARGET_BYTE_ORDER
// OBSOLETE
/* Sequence of bytes for breakpoint instruction (ta 1). */ // OBSOLETE /* Sequence of bytes for breakpoint instruction (ta 1). */
#undef BREAKPOINT // OBSOLETE #undef BREAKPOINT
#define BIG_BREAKPOINT {0x91, 0xd0, 0x20, 0x01} // OBSOLETE #define BIG_BREAKPOINT {0x91, 0xd0, 0x20, 0x01}
#define LITTLE_BREAKPOINT {0x01, 0x20, 0xd0, 0x91} // OBSOLETE #define LITTLE_BREAKPOINT {0x01, 0x20, 0xd0, 0x91}
// OBSOLETE
#if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0) // OBSOLETE #if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0)
/* // OBSOLETE /*
* The following defines must go away for MULTI_ARCH. // OBSOLETE * The following defines must go away for MULTI_ARCH.
*/ // OBSOLETE */
// OBSOLETE
#undef NUM_REGS /* formerly "72" */ // OBSOLETE #undef NUM_REGS /* formerly "72" */
/* WIN FP CPU CCP ASR AWR APSR */ // OBSOLETE /* WIN FP CPU CCP ASR AWR APSR */
#define NUM_REGS (32 + 32 + 8 + 8 + 8/*+ 32 + 1*/) // OBSOLETE #define NUM_REGS (32 + 32 + 8 + 8 + 8/*+ 32 + 1*/)
// OBSOLETE
#undef REGISTER_BYTES /* formerly "(32*4 + 32*4 + 8*4)" */ // OBSOLETE #undef REGISTER_BYTES /* formerly "(32*4 + 32*4 + 8*4)" */
#define REGISTER_BYTES (32*4 + 32*4 + 8*4 + 8*4 + 8*4/* + 32*4 + 1*4*/) // OBSOLETE #define REGISTER_BYTES (32*4 + 32*4 + 8*4 + 8*4 + 8*4/* + 32*4 + 1*4*/)
// OBSOLETE
/* Initializer for an array of names of registers. // OBSOLETE /* Initializer for an array of names of registers.
There should be NUM_REGS strings in this initializer. */ // OBSOLETE There should be NUM_REGS strings in this initializer. */
/* Sparclet has no fp! */ // OBSOLETE /* Sparclet has no fp! */
/* Compiler maps types for floats by number, so can't // OBSOLETE /* Compiler maps types for floats by number, so can't
change the numbers here. */ // OBSOLETE change the numbers here. */
// OBSOLETE
#undef REGISTER_NAMES // OBSOLETE #undef REGISTER_NAMES
#define REGISTER_NAMES \ // OBSOLETE #define REGISTER_NAMES \
{ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \ // OBSOLETE { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
"o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", \ // OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", \
"l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \ // OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
"i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", \ // OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", \
\ // OBSOLETE \
"", "", "", "", "", "", "", "", /* no FPU regs */ \ // OBSOLETE "", "", "", "", "", "", "", "", /* no FPU regs */ \
"", "", "", "", "", "", "", "", \ // OBSOLETE "", "", "", "", "", "", "", "", \
"", "", "", "", "", "", "", "", \ // OBSOLETE "", "", "", "", "", "", "", "", \
"", "", "", "", "", "", "", "", \ // OBSOLETE "", "", "", "", "", "", "", "", \
/* no CPSR, FPSR */ \ // OBSOLETE /* no CPSR, FPSR */ \
"y", "psr", "wim", "tbr", "pc", "npc", "", "", \ // OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "", "", \
\ // OBSOLETE \
"ccsr", "ccpr", "cccrcr", "ccor", "ccobr", "ccibr", "ccir", "", \ // OBSOLETE "ccsr", "ccpr", "cccrcr", "ccor", "ccobr", "ccibr", "ccir", "", \
\ // OBSOLETE \
/* ASR15 ASR19 (don't display them) */ \ // OBSOLETE /* ASR15 ASR19 (don't display them) */ \
"asr1", "", "asr17", "asr18", "", "asr20", "asr21", "asr22", \ // OBSOLETE "asr1", "", "asr17", "asr18", "", "asr20", "asr21", "asr22", \
/* \ // OBSOLETE /* \
"awr0", "awr1", "awr2", "awr3", "awr4", "awr5", "awr6", "awr7", \ // OBSOLETE "awr0", "awr1", "awr2", "awr3", "awr4", "awr5", "awr6", "awr7", \
"awr8", "awr9", "awr10", "awr11", "awr12", "awr13", "awr14", "awr15", \ // OBSOLETE "awr8", "awr9", "awr10", "awr11", "awr12", "awr13", "awr14", "awr15", \
"awr16", "awr17", "awr18", "awr19", "awr20", "awr21", "awr22", "awr23", \ // OBSOLETE "awr16", "awr17", "awr18", "awr19", "awr20", "awr21", "awr22", "awr23", \
"awr24", "awr25", "awr26", "awr27", "awr28", "awr29", "awr30", "awr31", \ // OBSOLETE "awr24", "awr25", "awr26", "awr27", "awr28", "awr29", "awr30", "awr31", \
"apsr", \ // OBSOLETE "apsr", \
*/ \ // OBSOLETE */ \
} // OBSOLETE }
// OBSOLETE
/* Remove FP dependant code which was defined in tm-sparc.h */ // OBSOLETE /* Remove FP dependant code which was defined in tm-sparc.h */
#undef FP0_REGNUM /* Floating point register 0 */ // OBSOLETE #undef FP0_REGNUM /* Floating point register 0 */
#undef FPS_REGNUM /* Floating point status register */ // OBSOLETE #undef FPS_REGNUM /* Floating point status register */
#undef CPS_REGNUM /* Coprocessor status register */ // OBSOLETE #undef CPS_REGNUM /* Coprocessor status register */
// OBSOLETE
/* sparclet register numbers */ // OBSOLETE /* sparclet register numbers */
#define CCSR_REGNUM 72 // OBSOLETE #define CCSR_REGNUM 72
// OBSOLETE
#undef DEPRECATED_EXTRACT_RETURN_VALUE // OBSOLETE #undef DEPRECATED_EXTRACT_RETURN_VALUE
#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ // OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
{ \ // OBSOLETE { \
memcpy ((VALBUF), \ // OBSOLETE memcpy ((VALBUF), \
(char *)(REGBUF) + REGISTER_RAW_SIZE (O0_REGNUM) * 8 + \ // OBSOLETE (char *)(REGBUF) + REGISTER_RAW_SIZE (O0_REGNUM) * 8 + \
(TYPE_LENGTH(TYPE) >= REGISTER_RAW_SIZE (O0_REGNUM) \ // OBSOLETE (TYPE_LENGTH(TYPE) >= REGISTER_RAW_SIZE (O0_REGNUM) \
? 0 : REGISTER_RAW_SIZE (O0_REGNUM) - TYPE_LENGTH(TYPE)), \ // OBSOLETE ? 0 : REGISTER_RAW_SIZE (O0_REGNUM) - TYPE_LENGTH(TYPE)), \
TYPE_LENGTH(TYPE)); \ // OBSOLETE TYPE_LENGTH(TYPE)); \
} // OBSOLETE }
#undef DEPRECATED_STORE_RETURN_VALUE // OBSOLETE #undef DEPRECATED_STORE_RETURN_VALUE
#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \ // OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
{ \ // OBSOLETE { \
/* Other values are returned in register %o0. */ \ // OBSOLETE /* Other values are returned in register %o0. */ \
deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF), \ // OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF), \
TYPE_LENGTH (TYPE)); \ // OBSOLETE TYPE_LENGTH (TYPE)); \
} // OBSOLETE }
// OBSOLETE
#endif /* GDB_MULTI_ARCH */ // OBSOLETE #endif /* GDB_MULTI_ARCH */
// OBSOLETE
extern void sparclet_do_registers_info (int regnum, int all); // OBSOLETE extern void sparclet_do_registers_info (int regnum, int all);
#undef DEPRECATED_DO_REGISTERS_INFO // OBSOLETE #undef DEPRECATED_DO_REGISTERS_INFO
#define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) sparclet_do_registers_info (REGNUM, ALL) // OBSOLETE #define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) sparclet_do_registers_info (REGNUM, ALL)
// OBSOLETE
// OBSOLETE
/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a // OBSOLETE /* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
comment in <machine/setjmp.h>! */ // OBSOLETE comment in <machine/setjmp.h>! */
// OBSOLETE
#define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */ // OBSOLETE #define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
// OBSOLETE
#define JB_ONSSTACK 0 // OBSOLETE #define JB_ONSSTACK 0
#define JB_SIGMASK 1 // OBSOLETE #define JB_SIGMASK 1
#define JB_SP 2 // OBSOLETE #define JB_SP 2
#define JB_PC 3 // OBSOLETE #define JB_PC 3
#define JB_NPC 4 // OBSOLETE #define JB_NPC 4
#define JB_PSR 5 // OBSOLETE #define JB_PSR 5
#define JB_G1 6 // OBSOLETE #define JB_G1 6
#define JB_O0 7 // OBSOLETE #define JB_O0 7
#define JB_WBCNT 8 // OBSOLETE #define JB_WBCNT 8
// OBSOLETE
/* Figure out where the longjmp will land. We expect that we have just entered // OBSOLETE /* 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 // OBSOLETE 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 // OBSOLETE 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. // OBSOLETE extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
This routine returns true on success */ // OBSOLETE This routine returns true on success */
// OBSOLETE
extern int get_longjmp_target (CORE_ADDR *); // OBSOLETE extern int get_longjmp_target (CORE_ADDR *);
// OBSOLETE
#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR) // OBSOLETE #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)

View File

@ -1,123 +1,123 @@
/* Macro definitions for GDB for a Fujitsu SPARClite. // OBSOLETE /* Macro definitions for GDB for a Fujitsu SPARClite.
Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003 // OBSOLETE Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc. // OBSOLETE Free Software Foundation, Inc.
// OBSOLETE
This file is part of GDB. // OBSOLETE This file is part of GDB.
// OBSOLETE
This program is free software; you can redistribute it and/or modify // OBSOLETE 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 // OBSOLETE it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or // OBSOLETE the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. // OBSOLETE (at your option) any later version.
// OBSOLETE
This program is distributed in the hope that it will be useful, // OBSOLETE This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of // OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. // OBSOLETE GNU General Public License for more details.
// OBSOLETE
You should have received a copy of the GNU General Public License // OBSOLETE You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software // OBSOLETE along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, // OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ // OBSOLETE Boston, MA 02111-1307, USA. */
// OBSOLETE
#include "regcache.h" // OBSOLETE #include "regcache.h"
// OBSOLETE
#define TARGET_SPARCLITE 1 /* Still needed for non-multi-arch case */ // OBSOLETE #define TARGET_SPARCLITE 1 /* Still needed for non-multi-arch case */
// OBSOLETE
#include "sparc/tm-sparc.h" // OBSOLETE #include "sparc/tm-sparc.h"
// OBSOLETE
/* Note: we are not defining GDB_MULTI_ARCH for the sparclet target // OBSOLETE /* Note: we are not defining GDB_MULTI_ARCH for the sparclet target
at this time, because we have not figured out how to detect the // OBSOLETE at this time, because we have not figured out how to detect the
sparclet target from the bfd structure. */ // OBSOLETE sparclet target from the bfd structure. */
// OBSOLETE
/* Sparclite regs, for debugging purposes */ // OBSOLETE /* Sparclite regs, for debugging purposes */
// OBSOLETE
enum { // OBSOLETE enum {
DIA1_REGNUM = 72, /* debug instr address register 1 */ // OBSOLETE DIA1_REGNUM = 72, /* debug instr address register 1 */
DIA2_REGNUM = 73, /* debug instr address register 2 */ // OBSOLETE DIA2_REGNUM = 73, /* debug instr address register 2 */
DDA1_REGNUM = 74, /* debug data address register 1 */ // OBSOLETE DDA1_REGNUM = 74, /* debug data address register 1 */
DDA2_REGNUM = 75, /* debug data address register 2 */ // OBSOLETE DDA2_REGNUM = 75, /* debug data address register 2 */
DDV1_REGNUM = 76, /* debug data value register 1 */ // OBSOLETE DDV1_REGNUM = 76, /* debug data value register 1 */
DDV2_REGNUM = 77, /* debug data value register 2 */ // OBSOLETE DDV2_REGNUM = 77, /* debug data value register 2 */
DCR_REGNUM = 78, /* debug control register */ // OBSOLETE DCR_REGNUM = 78, /* debug control register */
DSR_REGNUM = 79 /* debug status regsiter */ // OBSOLETE DSR_REGNUM = 79 /* debug status regsiter */
}; // OBSOLETE };
// OBSOLETE
/* overrides of tm-sparc.h */ // OBSOLETE /* overrides of tm-sparc.h */
// OBSOLETE
#undef TARGET_BYTE_ORDER // OBSOLETE #undef TARGET_BYTE_ORDER
// OBSOLETE
/* Select the sparclite disassembler. Slightly different instruction set from // OBSOLETE /* Select the sparclite disassembler. Slightly different instruction set from
the V8 sparc. */ // OBSOLETE the V8 sparc. */
// OBSOLETE
#undef TM_PRINT_INSN_MACH // OBSOLETE #undef TM_PRINT_INSN_MACH
#define TM_PRINT_INSN_MACH bfd_mach_sparc_sparclite // OBSOLETE #define TM_PRINT_INSN_MACH bfd_mach_sparc_sparclite
// OBSOLETE
/* Amount PC must be decremented by after a hardware instruction breakpoint. // OBSOLETE /* Amount PC must be decremented by after a hardware instruction breakpoint.
This is often the number of bytes in BREAKPOINT // OBSOLETE This is often the number of bytes in BREAKPOINT
but not always. */ // OBSOLETE but not always. */
// OBSOLETE
#define DECR_PC_AFTER_HW_BREAK 4 // OBSOLETE #define DECR_PC_AFTER_HW_BREAK 4
// OBSOLETE
#if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0) // OBSOLETE #if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0)
/* // OBSOLETE /*
* The following defines must go away for MULTI_ARCH. // OBSOLETE * The following defines must go away for MULTI_ARCH.
*/ // OBSOLETE */
// OBSOLETE
#undef NUM_REGS // OBSOLETE #undef NUM_REGS
#define NUM_REGS 80 // OBSOLETE #define NUM_REGS 80
// OBSOLETE
#undef REGISTER_BYTES // OBSOLETE #undef REGISTER_BYTES
#define REGISTER_BYTES (32*4+32*4+8*4+8*4) // OBSOLETE #define REGISTER_BYTES (32*4+32*4+8*4+8*4)
// OBSOLETE
#undef REGISTER_NAMES // OBSOLETE #undef REGISTER_NAMES
#define REGISTER_NAMES \ // OBSOLETE #define REGISTER_NAMES \
{ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \ // OBSOLETE { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
"o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7", \ // OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7", \
"l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \ // OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
"i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7", \ // OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7", \
\ // OBSOLETE \
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \ // OBSOLETE "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \ // OBSOLETE "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \ // OBSOLETE "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \ // OBSOLETE "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
\ // OBSOLETE \
"y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr", \ // OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr", \
"dia1", "dia2", "dda1", "dda2", "ddv1", "ddv2", "dcr", "dsr" } // OBSOLETE "dia1", "dia2", "dda1", "dda2", "ddv1", "ddv2", "dcr", "dsr" }
// OBSOLETE
#define DIA1_REGNUM 72 /* debug instr address register 1 */ // OBSOLETE #define DIA1_REGNUM 72 /* debug instr address register 1 */
#define DIA2_REGNUM 73 /* debug instr address register 2 */ // OBSOLETE #define DIA2_REGNUM 73 /* debug instr address register 2 */
#define DDA1_REGNUM 74 /* debug data address register 1 */ // OBSOLETE #define DDA1_REGNUM 74 /* debug data address register 1 */
#define DDA2_REGNUM 75 /* debug data address register 2 */ // OBSOLETE #define DDA2_REGNUM 75 /* debug data address register 2 */
#define DDV1_REGNUM 76 /* debug data value register 1 */ // OBSOLETE #define DDV1_REGNUM 76 /* debug data value register 1 */
#define DDV2_REGNUM 77 /* debug data value register 2 */ // OBSOLETE #define DDV2_REGNUM 77 /* debug data value register 2 */
#define DCR_REGNUM 78 /* debug control register */ // OBSOLETE #define DCR_REGNUM 78 /* debug control register */
#define DSR_REGNUM 79 /* debug status regsiter */ // OBSOLETE #define DSR_REGNUM 79 /* debug status regsiter */
// OBSOLETE
#endif /* GDB_MULTI_ARCH */ // OBSOLETE #endif /* GDB_MULTI_ARCH */
// OBSOLETE
#define TARGET_HW_BREAK_LIMIT 2 // OBSOLETE #define TARGET_HW_BREAK_LIMIT 2
#define TARGET_HW_WATCH_LIMIT 2 // OBSOLETE #define TARGET_HW_WATCH_LIMIT 2
// OBSOLETE
/* Enable watchpoint macro's */ // OBSOLETE /* Enable watchpoint macro's */
// OBSOLETE
#define TARGET_HAS_HARDWARE_WATCHPOINTS // OBSOLETE #define TARGET_HAS_HARDWARE_WATCHPOINTS
// OBSOLETE
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \ // OBSOLETE #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
sparclite_check_watch_resources (type, cnt, ot) // OBSOLETE sparclite_check_watch_resources (type, cnt, ot)
// OBSOLETE
/* When a hardware watchpoint fires off the PC will be left at the // OBSOLETE /* When a hardware watchpoint fires off the PC will be left at the
instruction which caused the watchpoint. It will be necessary for // OBSOLETE instruction which caused the watchpoint. It will be necessary for
GDB to step over the watchpoint. *** // OBSOLETE GDB to step over the watchpoint. ***
// OBSOLETE
#define STOPPED_BY_WATCHPOINT(W) \ // OBSOLETE #define STOPPED_BY_WATCHPOINT(W) \
((W).kind == TARGET_WAITKIND_STOPPED \ // OBSOLETE ((W).kind == TARGET_WAITKIND_STOPPED \
&& (W).value.sig == TARGET_SIGNAL_TRAP \ // OBSOLETE && (W).value.sig == TARGET_SIGNAL_TRAP \
&& ((int) read_register (IPSW_REGNUM) & 0x00100000)) // OBSOLETE && ((int) read_register (IPSW_REGNUM) & 0x00100000))
*/ // OBSOLETE */
// OBSOLETE
/* Use these macros for watchpoint insertion/deletion. */ // OBSOLETE /* Use these macros for watchpoint insertion/deletion. */
#define target_insert_watchpoint(addr, len, type) sparclite_insert_watchpoint (addr, len, type) // OBSOLETE #define target_insert_watchpoint(addr, len, type) sparclite_insert_watchpoint (addr, len, type)
#define target_remove_watchpoint(addr, len, type) sparclite_remove_watchpoint (addr, len, type) // OBSOLETE #define target_remove_watchpoint(addr, len, type) sparclite_remove_watchpoint (addr, len, type)
#define target_insert_hw_breakpoint(addr, len) sparclite_insert_hw_breakpoint (addr, len) // OBSOLETE #define target_insert_hw_breakpoint(addr, len) sparclite_insert_hw_breakpoint (addr, len)
#define target_remove_hw_breakpoint(addr, len) sparclite_remove_hw_breakpoint (addr, len) // OBSOLETE #define target_remove_hw_breakpoint(addr, len) sparclite_remove_hw_breakpoint (addr, len)
#define target_stopped_data_address() sparclite_stopped_data_address() // OBSOLETE #define target_stopped_data_address() sparclite_stopped_data_address()

View File

@ -229,9 +229,9 @@ sparc-*-sunos4*) gdb_target=sun4os4 ;;
sparc-*-sunos5*) gdb_target=sun4sol2 ;; sparc-*-sunos5*) gdb_target=sun4sol2 ;;
sparc-*-vxworks*) gdb_target=vxsparc ;; sparc-*-vxworks*) gdb_target=vxsparc ;;
sparc-*-*) gdb_target=sun4os4 ;; sparc-*-*) gdb_target=sun4os4 ;;
sparclet-*-*) gdb_target=sparclet;; # OBSOLETE sparclet-*-*) gdb_target=sparclet;;
sparclite-*-*) gdb_target=sparclite ;; # OBSOLETE sparclite-*-*) gdb_target=sparclite ;;
sparc86x-*-*) gdb_target=sparclite ;; # OBSOLETE sparc86x-*-*) gdb_target=sparclite ;;
# It's not clear what the right solution for "v8plus" systems is yet. # It's not clear what the right solution for "v8plus" systems is yet.
# For now, stick with sparc-sun-solaris2 since that's what config.guess # For now, stick with sparc-sun-solaris2 since that's what config.guess
# should return. Work is still needed to get gdb to print the 64 bit # should return. Work is still needed to get gdb to print the 64 bit

View File

@ -66,11 +66,14 @@
/* Does the target have Floating Point registers? */ /* Does the target have Floating Point registers? */
#if defined(TARGET_SPARCLET) || defined(TARGET_SPARCLITE) #if 0
#define SPARC_HAS_FPU 0 // OBSOLETE #if defined(TARGET_SPARCLET) || defined(TARGET_SPARCLITE)
#else // OBSOLETE #define SPARC_HAS_FPU 0
#define SPARC_HAS_FPU 1 // OBSOLETE #else
// OBSOLETE #define SPARC_HAS_FPU 1
// OBSOLETE #endif
#endif #endif
#define SPARC_HAS_FPU 1
/* Number of bytes devoted to Floating Point registers: */ /* Number of bytes devoted to Floating Point registers: */
#if (GDB_TARGET_IS_SPARC64) #if (GDB_TARGET_IS_SPARC64)
@ -104,7 +107,9 @@
struct gdbarch_tdep struct gdbarch_tdep
{ {
int has_fpu; #if 0
// OBSOLETE int has_fpu;
#endif
int fp_register_bytes; int fp_register_bytes;
int y_regnum; int y_regnum;
int fp_max_regnum; int fp_max_regnum;
@ -134,11 +139,13 @@ extern int stop_after_trap;
int deferred_stores = 0; /* Accumulated stores we want to do eventually. */ int deferred_stores = 0; /* Accumulated stores we want to do eventually. */
/* Some machines, such as Fujitsu SPARClite 86x, have a bi-endian mode #if 0
where instructions are big-endian and data are little-endian. // OBSOLETE /* Some machines, such as Fujitsu SPARClite 86x, have a bi-endian mode
This flag is set when we detect that the target is of this type. */ // OBSOLETE where instructions are big-endian and data are little-endian.
// OBSOLETE This flag is set when we detect that the target is of this type. */
int bi_endian = 0; // OBSOLETE
// OBSOLETE int bi_endian = 0;
#endif
/* Fetch a single instruction. Even on bi-endian machines /* Fetch a single instruction. Even on bi-endian machines
@ -2174,21 +2181,23 @@ sparc_do_registers_info (int regnum, int all)
regnum, all); regnum, all);
} }
static void #if 0
sparclet_print_registers_info (struct gdbarch *gdbarch, // OBSOLETE static void
struct ui_file *file, // OBSOLETE sparclet_print_registers_info (struct gdbarch *gdbarch,
struct frame_info *frame, // OBSOLETE struct ui_file *file,
int regnum, int print_all) // OBSOLETE struct frame_info *frame,
{ // OBSOLETE int regnum, int print_all)
sparc_print_registers (gdbarch, file, frame, regnum, print_all, NULL); // OBSOLETE {
} // OBSOLETE sparc_print_registers (gdbarch, file, frame, regnum, print_all, NULL);
// OBSOLETE }
void // OBSOLETE
sparclet_do_registers_info (int regnum, int all) // OBSOLETE void
{ // OBSOLETE sparclet_do_registers_info (int regnum, int all)
sparclet_print_registers_info (current_gdbarch, gdb_stdout, // OBSOLETE {
deprecated_selected_frame, regnum, all); // OBSOLETE sparclet_print_registers_info (current_gdbarch, gdb_stdout,
} // OBSOLETE deprecated_selected_frame, regnum, all);
// OBSOLETE }
#endif
int int
@ -2324,13 +2333,15 @@ sparc_store_return_value (struct type *type, char *valbuf)
TYPE_LENGTH (type)); TYPE_LENGTH (type));
} }
extern void #if 0
sparclet_store_return_value (struct type *type, char *valbuf) // OBSOLETE extern void
{ // OBSOLETE sparclet_store_return_value (struct type *type, char *valbuf)
/* Other values are returned in register %o0. */ // OBSOLETE {
deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), valbuf, // OBSOLETE /* Other values are returned in register %o0. */
TYPE_LENGTH (type)); // OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), valbuf,
} // OBSOLETE TYPE_LENGTH (type));
// OBSOLETE }
#endif
#ifndef CALL_DUMMY_CALL_OFFSET #ifndef CALL_DUMMY_CALL_OFFSET
@ -2396,40 +2407,43 @@ sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
} }
} }
/* If this is a bi-endian target, GDB has written the call dummy #if 0
in little-endian order. We must byte-swap it back to big-endian. */ // OBSOLETE /* If this is a bi-endian target, GDB has written the call dummy
if (bi_endian) // OBSOLETE in little-endian order. We must byte-swap it back to big-endian. */
{ // OBSOLETE if (bi_endian)
for (i = 0; i < CALL_DUMMY_LENGTH; i += 4) // OBSOLETE {
{ // OBSOLETE for (i = 0; i < CALL_DUMMY_LENGTH; i += 4)
char tmp = dummy[i]; // OBSOLETE {
dummy[i] = dummy[i + 3]; // OBSOLETE char tmp = dummy[i];
dummy[i + 3] = tmp; // OBSOLETE dummy[i] = dummy[i + 3];
tmp = dummy[i + 1]; // OBSOLETE dummy[i + 3] = tmp;
dummy[i + 1] = dummy[i + 2]; // OBSOLETE tmp = dummy[i + 1];
dummy[i + 2] = tmp; // OBSOLETE dummy[i + 1] = dummy[i + 2];
} // OBSOLETE dummy[i + 2] = tmp;
} // OBSOLETE }
// OBSOLETE }
#endif
} }
/* Set target byte order based on machine type. */ #if 0
// OBSOLETE /* Set target byte order based on machine type. */
static int // OBSOLETE
sparc_target_architecture_hook (const bfd_arch_info_type *ap) // OBSOLETE static int
{ // OBSOLETE sparc_target_architecture_hook (const bfd_arch_info_type *ap)
int i, j; // OBSOLETE {
// OBSOLETE int i, j;
if (ap->mach == bfd_mach_sparc_sparclite_le) // OBSOLETE
{ // OBSOLETE if (ap->mach == bfd_mach_sparc_sparclite_le)
target_byte_order = BFD_ENDIAN_LITTLE; // OBSOLETE {
bi_endian = 1; // OBSOLETE target_byte_order = BFD_ENDIAN_LITTLE;
} // OBSOLETE bi_endian = 1;
else // OBSOLETE }
bi_endian = 0; // OBSOLETE else
return 1; // OBSOLETE bi_endian = 0;
} // OBSOLETE return 1;
// OBSOLETE }
#endif
/* /*
* Module "constructor" function. * Module "constructor" function.
@ -2447,7 +2461,7 @@ _initialize_sparc_tdep (void)
tm_print_insn = gdb_print_insn_sparc; tm_print_insn = gdb_print_insn_sparc;
tm_print_insn_info.mach = TM_PRINT_INSN_MACH; /* Selects sparc/sparclite */ tm_print_insn_info.mach = TM_PRINT_INSN_MACH; /* Selects sparc/sparclite */
target_architecture_hook = sparc_target_architecture_hook; /* OBSOLETE target_architecture_hook = sparc_target_architecture_hook; */
} }
/* Compensate for stack bias. Note that we currently don't handle /* Compensate for stack bias. Note that we currently don't handle
@ -2677,18 +2691,19 @@ sparc64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
sp64_extract_return_value (type, regbuf, valbuf, 0); sp64_extract_return_value (type, regbuf, valbuf, 0);
} }
extern void #if 0
sparclet_extract_return_value (struct type *type, // OBSOLETE extern void
char *regbuf, // OBSOLETE sparclet_extract_return_value (struct type *type,
char *valbuf) // OBSOLETE char *regbuf,
{ // OBSOLETE char *valbuf)
regbuf += REGISTER_RAW_SIZE (O0_REGNUM) * 8; // OBSOLETE {
if (TYPE_LENGTH (type) < REGISTER_RAW_SIZE (O0_REGNUM)) // OBSOLETE regbuf += REGISTER_RAW_SIZE (O0_REGNUM) * 8;
regbuf += REGISTER_RAW_SIZE (O0_REGNUM) - TYPE_LENGTH (type); // OBSOLETE if (TYPE_LENGTH (type) < REGISTER_RAW_SIZE (O0_REGNUM))
// OBSOLETE regbuf += REGISTER_RAW_SIZE (O0_REGNUM) - TYPE_LENGTH (type);
memcpy ((void *) valbuf, regbuf, TYPE_LENGTH (type)); // OBSOLETE
} // OBSOLETE memcpy ((void *) valbuf, regbuf, TYPE_LENGTH (type));
// OBSOLETE }
#endif
extern CORE_ADDR extern CORE_ADDR
sparc32_stack_align (CORE_ADDR addr) sparc32_stack_align (CORE_ADDR addr)
@ -2769,66 +2784,70 @@ sparc64_register_name (int regno)
return register_names[regno]; return register_names[regno];
} }
static const char *
sparclite_register_name (int regno)
{
static char *register_names[] =
{ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
"o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
"l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
"i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
"y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr",
"dia1", "dia2", "dda1", "dda2", "ddv1", "ddv2", "dcr", "dsr"
};
if (regno < 0 ||
regno >= (sizeof (register_names) / sizeof (register_names[0])))
return NULL;
else
return register_names[regno];
}
static const char *
sparclet_register_name (int regno)
{
static char *register_names[] =
{ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
"o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
"l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
"i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
"", "", "", "", "", "", "", "", /* no floating point registers */
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"y", "psr", "wim", "tbr", "pc", "npc", "", "", /* no FPSR or CPSR */
"ccsr", "ccpr", "cccrcr", "ccor", "ccobr", "ccibr", "ccir", "",
/* ASR15 ASR19 (don't display them) */
"asr1", "", "asr17", "asr18", "", "asr20", "asr21", "asr22"
/* None of the rest get displayed */
#if 0 #if 0
"awr0", "awr1", "awr2", "awr3", "awr4", "awr5", "awr6", "awr7", // OBSOLETE static const char *
"awr8", "awr9", "awr10", "awr11", "awr12", "awr13", "awr14", "awr15", // OBSOLETE sparclite_register_name (int regno)
"awr16", "awr17", "awr18", "awr19", "awr20", "awr21", "awr22", "awr23", // OBSOLETE {
"awr24", "awr25", "awr26", "awr27", "awr28", "awr29", "awr30", "awr31", // OBSOLETE static char *register_names[] =
"apsr" // OBSOLETE { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
#endif /* 0 */ // OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
}; // OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
// OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
// OBSOLETE
// OBSOLETE "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
// OBSOLETE "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
// OBSOLETE "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
// OBSOLETE "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
// OBSOLETE
// OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr",
// OBSOLETE "dia1", "dia2", "dda1", "dda2", "ddv1", "ddv2", "dcr", "dsr"
// OBSOLETE };
// OBSOLETE
// OBSOLETE if (regno < 0 ||
// OBSOLETE regno >= (sizeof (register_names) / sizeof (register_names[0])))
// OBSOLETE return NULL;
// OBSOLETE else
// OBSOLETE return register_names[regno];
// OBSOLETE }
#endif
if (regno < 0 || #if 0
regno >= (sizeof (register_names) / sizeof (register_names[0]))) // OBSOLETE static const char *
return NULL; // OBSOLETE sparclet_register_name (int regno)
else // OBSOLETE {
return register_names[regno]; // OBSOLETE static char *register_names[] =
} // OBSOLETE { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
// OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
// OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
// OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
// OBSOLETE
// OBSOLETE "", "", "", "", "", "", "", "", /* no floating point registers */
// OBSOLETE "", "", "", "", "", "", "", "",
// OBSOLETE "", "", "", "", "", "", "", "",
// OBSOLETE "", "", "", "", "", "", "", "",
// OBSOLETE
// OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "", "", /* no FPSR or CPSR */
// OBSOLETE "ccsr", "ccpr", "cccrcr", "ccor", "ccobr", "ccibr", "ccir", "",
// OBSOLETE
// OBSOLETE /* ASR15 ASR19 (don't display them) */
// OBSOLETE "asr1", "", "asr17", "asr18", "", "asr20", "asr21", "asr22"
// OBSOLETE /* None of the rest get displayed */
// OBSOLETE #if 0
// OBSOLETE "awr0", "awr1", "awr2", "awr3", "awr4", "awr5", "awr6", "awr7",
// OBSOLETE "awr8", "awr9", "awr10", "awr11", "awr12", "awr13", "awr14", "awr15",
// OBSOLETE "awr16", "awr17", "awr18", "awr19", "awr20", "awr21", "awr22", "awr23",
// OBSOLETE "awr24", "awr25", "awr26", "awr27", "awr28", "awr29", "awr30", "awr31",
// OBSOLETE "apsr"
// OBSOLETE #endif /* 0 */
// OBSOLETE };
// OBSOLETE
// OBSOLETE if (regno < 0 ||
// OBSOLETE regno >= (sizeof (register_names) / sizeof (register_names[0])))
// OBSOLETE return NULL;
// OBSOLETE else
// OBSOLETE return register_names[regno];
// OBSOLETE }
#endif
CORE_ADDR CORE_ADDR
sparc_push_return_address (CORE_ADDR pc_unused, CORE_ADDR sp) sparc_push_return_address (CORE_ADDR pc_unused, CORE_ADDR sp)
@ -3184,11 +3203,15 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
switch (info.bfd_arch_info->mach) switch (info.bfd_arch_info->mach)
{ {
case bfd_mach_sparc: case bfd_mach_sparc:
case bfd_mach_sparc_sparclet: #if 0
case bfd_mach_sparc_sparclite: // OBSOLETE case bfd_mach_sparc_sparclet:
// OBSOLETE case bfd_mach_sparc_sparclite:
#endif
case bfd_mach_sparc_v8plus: case bfd_mach_sparc_v8plus:
case bfd_mach_sparc_v8plusa: case bfd_mach_sparc_v8plusa:
case bfd_mach_sparc_sparclite_le: #if 0
// OBSOLETE case bfd_mach_sparc_sparclite_le:
#endif
/* 32-bit machine types: */ /* 32-bit machine types: */
#ifdef SPARC32_CALL_DUMMY_ON_STACK #ifdef SPARC32_CALL_DUMMY_ON_STACK
@ -3348,30 +3371,36 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4); set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name); set_gdbarch_register_name (gdbarch, sparc32_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value); set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
tdep->has_fpu = 1; /* (all but sparclet and sparclite) */ #if 0
// OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
#endif
tdep->fp_register_bytes = 32 * 4; tdep->fp_register_bytes = 32 * 4;
tdep->print_insn_mach = bfd_mach_sparc; tdep->print_insn_mach = bfd_mach_sparc;
break; break;
case bfd_mach_sparc_sparclet: #if 0
set_gdbarch_deprecated_extract_return_value (gdbarch, sparclet_extract_return_value); // OBSOLETE case bfd_mach_sparc_sparclet:
set_gdbarch_num_regs (gdbarch, 32 + 32 + 8 + 8 + 8); // OBSOLETE set_gdbarch_deprecated_extract_return_value (gdbarch, sparclet_extract_return_value);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4 + 8*4); // OBSOLETE set_gdbarch_num_regs (gdbarch, 32 + 32 + 8 + 8 + 8);
set_gdbarch_register_name (gdbarch, sparclet_register_name); // OBSOLETE set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4 + 8*4);
set_gdbarch_deprecated_store_return_value (gdbarch, sparclet_store_return_value); // OBSOLETE set_gdbarch_register_name (gdbarch, sparclet_register_name);
tdep->has_fpu = 0; /* (all but sparclet and sparclite) */ // OBSOLETE set_gdbarch_deprecated_store_return_value (gdbarch, sparclet_store_return_value);
tdep->fp_register_bytes = 0; // OBSOLETE tdep->has_fpu = 0; /* (all but sparclet and sparclite) */
tdep->print_insn_mach = bfd_mach_sparc_sparclet; // OBSOLETE tdep->fp_register_bytes = 0;
break; // OBSOLETE tdep->print_insn_mach = bfd_mach_sparc_sparclet;
case bfd_mach_sparc_sparclite: // OBSOLETE break;
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value); #endif
set_gdbarch_num_regs (gdbarch, 80); #if 0
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4); // OBSOLETE case bfd_mach_sparc_sparclite:
set_gdbarch_register_name (gdbarch, sparclite_register_name); // OBSOLETE set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value); // OBSOLETE set_gdbarch_num_regs (gdbarch, 80);
tdep->has_fpu = 0; /* (all but sparclet and sparclite) */ // OBSOLETE set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
tdep->fp_register_bytes = 0; // OBSOLETE set_gdbarch_register_name (gdbarch, sparclite_register_name);
tdep->print_insn_mach = bfd_mach_sparc_sparclite; // OBSOLETE set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
break; // OBSOLETE tdep->has_fpu = 0; /* (all but sparclet and sparclite) */
// OBSOLETE tdep->fp_register_bytes = 0;
// OBSOLETE tdep->print_insn_mach = bfd_mach_sparc_sparclite;
// OBSOLETE break;
#endif
case bfd_mach_sparc_v8plus: case bfd_mach_sparc_v8plus:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value); set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_num_regs (gdbarch, 72); set_gdbarch_num_regs (gdbarch, 72);
@ -3380,7 +3409,9 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value); set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
tdep->print_insn_mach = bfd_mach_sparc; tdep->print_insn_mach = bfd_mach_sparc;
tdep->fp_register_bytes = 32 * 4; tdep->fp_register_bytes = 32 * 4;
tdep->has_fpu = 1; /* (all but sparclet and sparclite) */ #if 0
// OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
#endif
break; break;
case bfd_mach_sparc_v8plusa: case bfd_mach_sparc_v8plusa:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value); set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
@ -3388,27 +3419,33 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4); set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name); set_gdbarch_register_name (gdbarch, sparc32_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value); set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
tdep->has_fpu = 1; /* (all but sparclet and sparclite) */ #if 0
// OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
#endif
tdep->fp_register_bytes = 32 * 4; tdep->fp_register_bytes = 32 * 4;
tdep->print_insn_mach = bfd_mach_sparc; tdep->print_insn_mach = bfd_mach_sparc;
break; break;
case bfd_mach_sparc_sparclite_le: #if 0
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value); // OBSOLETE case bfd_mach_sparc_sparclite_le:
set_gdbarch_num_regs (gdbarch, 80); // OBSOLETE set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4); // OBSOLETE set_gdbarch_num_regs (gdbarch, 80);
set_gdbarch_register_name (gdbarch, sparclite_register_name); // OBSOLETE set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value); // OBSOLETE set_gdbarch_register_name (gdbarch, sparclite_register_name);
tdep->has_fpu = 0; /* (all but sparclet and sparclite) */ // OBSOLETE set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
tdep->fp_register_bytes = 0; // OBSOLETE tdep->has_fpu = 0; /* (all but sparclet and sparclite) */
tdep->print_insn_mach = bfd_mach_sparc_sparclite; // OBSOLETE tdep->fp_register_bytes = 0;
break; // OBSOLETE tdep->print_insn_mach = bfd_mach_sparc_sparclite;
// OBSOLETE break;
#endif
case bfd_mach_sparc_v9: case bfd_mach_sparc_v9:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value); set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
set_gdbarch_num_regs (gdbarch, 125); set_gdbarch_num_regs (gdbarch, 125);
set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8); set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
set_gdbarch_register_name (gdbarch, sparc64_register_name); set_gdbarch_register_name (gdbarch, sparc64_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value); set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
tdep->has_fpu = 1; /* (all but sparclet and sparclite) */ #if 0
// OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
#endif
tdep->fp_register_bytes = 64 * 4; tdep->fp_register_bytes = 64 * 4;
tdep->print_insn_mach = bfd_mach_sparc_v9a; tdep->print_insn_mach = bfd_mach_sparc_v9a;
break; break;
@ -3418,7 +3455,9 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8); set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
set_gdbarch_register_name (gdbarch, sparc64_register_name); set_gdbarch_register_name (gdbarch, sparc64_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value); set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
tdep->has_fpu = 1; /* (all but sparclet and sparclite) */ #if 0
// OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
#endif
tdep->fp_register_bytes = 64 * 4; tdep->fp_register_bytes = 64 * 4;
tdep->print_insn_mach = bfd_mach_sparc_v9a; tdep->print_insn_mach = bfd_mach_sparc_v9a;
break; break;
@ -3438,8 +3477,10 @@ sparc_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
if (tdep == NULL) if (tdep == NULL)
return; return;
fprintf_unfiltered (file, "sparc_dump_tdep: has_fpu = %d\n", #if 0
tdep->has_fpu); // OBSOLETE fprintf_unfiltered (file, "sparc_dump_tdep: has_fpu = %d\n",
// OBSOLETE tdep->has_fpu);
#endif
fprintf_unfiltered (file, "sparc_dump_tdep: fp_register_bytes = %d\n", fprintf_unfiltered (file, "sparc_dump_tdep: fp_register_bytes = %d\n",
tdep->fp_register_bytes); tdep->fp_register_bytes);
fprintf_unfiltered (file, "sparc_dump_tdep: y_regnum = %d\n", fprintf_unfiltered (file, "sparc_dump_tdep: y_regnum = %d\n",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,316 +1,316 @@
/* Remote target glue for the SPARC Sparclet ROM monitor. // OBSOLETE /* Remote target glue for the SPARC Sparclet ROM monitor.
// OBSOLETE
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free // OBSOLETE Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free
Software Foundation, Inc. // OBSOLETE Software Foundation, Inc.
// OBSOLETE
This file is part of GDB. // OBSOLETE This file is part of GDB.
// OBSOLETE
This program is free software; you can redistribute it and/or modify // OBSOLETE 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 // OBSOLETE it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or // OBSOLETE the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. // OBSOLETE (at your option) any later version.
// OBSOLETE
This program is distributed in the hope that it will be useful, // OBSOLETE This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of // OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. // OBSOLETE GNU General Public License for more details.
// OBSOLETE
You should have received a copy of the GNU General Public License // OBSOLETE You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software // OBSOLETE along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, // OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ // OBSOLETE Boston, MA 02111-1307, USA. */
// OBSOLETE
// OBSOLETE
#include "defs.h" // OBSOLETE #include "defs.h"
#include "gdbcore.h" // OBSOLETE #include "gdbcore.h"
#include "target.h" // OBSOLETE #include "target.h"
#include "monitor.h" // OBSOLETE #include "monitor.h"
#include "serial.h" // OBSOLETE #include "serial.h"
#include "srec.h" // OBSOLETE #include "srec.h"
#include "symtab.h" // OBSOLETE #include "symtab.h"
#include "symfile.h" /* for generic_load */ // OBSOLETE #include "symfile.h" /* for generic_load */
#include "regcache.h" // OBSOLETE #include "regcache.h"
#include <time.h> // OBSOLETE #include <time.h>
// OBSOLETE
extern void report_transfer_performance (unsigned long, time_t, time_t); // OBSOLETE extern void report_transfer_performance (unsigned long, time_t, time_t);
// OBSOLETE
static struct target_ops sparclet_ops; // OBSOLETE static struct target_ops sparclet_ops;
// OBSOLETE
static void sparclet_open (char *args, int from_tty); // OBSOLETE static void sparclet_open (char *args, int from_tty);
// OBSOLETE
/* This array of registers need to match the indexes used by GDB. // OBSOLETE /* This array of registers need to match the indexes used by GDB.
This exists because the various ROM monitors use different strings // OBSOLETE This exists because the various ROM monitors use different strings
than does GDB, and don't necessarily support all the registers // OBSOLETE than does GDB, and don't necessarily support all the registers
either. So, typing "info reg sp" becomes a "r30". */ // OBSOLETE either. So, typing "info reg sp" becomes a "r30". */
// OBSOLETE
/*PSR 0x00000080 impl ver icc AW LE EE EC EF PIL S PS ET CWP WIM // OBSOLETE /*PSR 0x00000080 impl ver icc AW LE EE EC EF PIL S PS ET CWP WIM
0x0 0x0 0x0 0 0 0 0 0 0x0 1 0 0 0x00 0x2 // OBSOLETE 0x0 0x0 0x0 0 0 0 0 0 0x0 1 0 0 0x00 0x2
0000010 // OBSOLETE 0000010
INS LOCALS OUTS GLOBALS // OBSOLETE INS LOCALS OUTS GLOBALS
0 0x00000000 0x00000000 0x00000000 0x00000000 // OBSOLETE 0 0x00000000 0x00000000 0x00000000 0x00000000
1 0x00000000 0x00000000 0x00000000 0x00000000 // OBSOLETE 1 0x00000000 0x00000000 0x00000000 0x00000000
2 0x00000000 0x00000000 0x00000000 0x00000000 // OBSOLETE 2 0x00000000 0x00000000 0x00000000 0x00000000
3 0x00000000 0x00000000 0x00000000 0x00000000 // OBSOLETE 3 0x00000000 0x00000000 0x00000000 0x00000000
4 0x00000000 0x00000000 0x00000000 0x00000000 // OBSOLETE 4 0x00000000 0x00000000 0x00000000 0x00000000
5 0x00000000 0x00001000 0x00000000 0x00000000 // OBSOLETE 5 0x00000000 0x00001000 0x00000000 0x00000000
6 0x00000000 0x00000000 0x123f0000 0x00000000 // OBSOLETE 6 0x00000000 0x00000000 0x123f0000 0x00000000
7 0x00000000 0x00000000 0x00000000 0x00000000 // OBSOLETE 7 0x00000000 0x00000000 0x00000000 0x00000000
pc: 0x12010000 0x00000000 unimp // OBSOLETE pc: 0x12010000 0x00000000 unimp
npc: 0x12010004 0x00001000 unimp 0x1000 // OBSOLETE npc: 0x12010004 0x00001000 unimp 0x1000
tbr: 0x00000000 // OBSOLETE tbr: 0x00000000
y: 0x00000000 // OBSOLETE y: 0x00000000
*/ // OBSOLETE */
/* these correspond to the offsets from tm-* files from config directories */ // OBSOLETE /* these correspond to the offsets from tm-* files from config directories */
// OBSOLETE
/* is wim part of psr?? */ // OBSOLETE /* is wim part of psr?? */
/* monitor wants lower case */ // OBSOLETE /* monitor wants lower case */
static char *sparclet_regnames[] = { // OBSOLETE static char *sparclet_regnames[] = {
"g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", // OBSOLETE "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
"o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", // OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7",
"l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", // OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
"i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", // OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7",
// OBSOLETE
"", "", "", "", "", "", "", "", /* no FPU regs */ // OBSOLETE "", "", "", "", "", "", "", "", /* no FPU regs */
"", "", "", "", "", "", "", "", // OBSOLETE "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", // OBSOLETE "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", // OBSOLETE "", "", "", "", "", "", "", "",
/* no CPSR, FPSR */ // OBSOLETE /* no CPSR, FPSR */
"y", "psr", "wim", "tbr", "pc", "npc", "", "", // OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "", "",
// OBSOLETE
"ccsr", "ccpr", "cccrcr", "ccor", "ccobr", "ccibr", "ccir", "", // OBSOLETE "ccsr", "ccpr", "cccrcr", "ccor", "ccobr", "ccibr", "ccir", "",
// OBSOLETE
/* ASR15 ASR19 (don't display them) */ // OBSOLETE /* ASR15 ASR19 (don't display them) */
"asr1", "", "asr17", "asr18", "", "asr20", "asr21", "asr22", // OBSOLETE "asr1", "", "asr17", "asr18", "", "asr20", "asr21", "asr22",
/* // OBSOLETE /*
"awr0", "awr1", "awr2", "awr3", "awr4", "awr5", "awr6", "awr7", // OBSOLETE "awr0", "awr1", "awr2", "awr3", "awr4", "awr5", "awr6", "awr7",
"awr8", "awr9", "awr10", "awr11", "awr12", "awr13", "awr14", "awr15", // OBSOLETE "awr8", "awr9", "awr10", "awr11", "awr12", "awr13", "awr14", "awr15",
"awr16", "awr17", "awr18", "awr19", "awr20", "awr21", "awr22", "awr23", // OBSOLETE "awr16", "awr17", "awr18", "awr19", "awr20", "awr21", "awr22", "awr23",
"awr24", "awr25", "awr26", "awr27", "awr28", "awr29", "awr30", "awr31", // OBSOLETE "awr24", "awr25", "awr26", "awr27", "awr28", "awr29", "awr30", "awr31",
"apsr", // OBSOLETE "apsr",
*/ // OBSOLETE */
}; // OBSOLETE };
// OBSOLETE
// OBSOLETE
// OBSOLETE
/* Function: sparclet_supply_register // OBSOLETE /* Function: sparclet_supply_register
Just returns with no action. // OBSOLETE Just returns with no action.
This function is required, because parse_register_dump (monitor.c) // OBSOLETE This function is required, because parse_register_dump (monitor.c)
expects to be able to call it. If we don't supply something, it will // OBSOLETE expects to be able to call it. If we don't supply something, it will
call a null pointer and core-dump. Since this function does not // OBSOLETE call a null pointer and core-dump. Since this function does not
actually do anything, GDB will request the registers individually. */ // OBSOLETE actually do anything, GDB will request the registers individually. */
// OBSOLETE
static void // OBSOLETE static void
sparclet_supply_register (char *regname, int regnamelen, char *val, int vallen) // OBSOLETE sparclet_supply_register (char *regname, int regnamelen, char *val, int vallen)
{ // OBSOLETE {
return; // OBSOLETE return;
} // OBSOLETE }
// OBSOLETE
static void // OBSOLETE static void
sparclet_load (struct serial *desc, char *file, int hashmark) // OBSOLETE sparclet_load (struct serial *desc, char *file, int hashmark)
{ // OBSOLETE {
bfd *abfd; // OBSOLETE bfd *abfd;
asection *s; // OBSOLETE asection *s;
int i; // OBSOLETE int i;
CORE_ADDR load_offset; // OBSOLETE CORE_ADDR load_offset;
time_t start_time, end_time; // OBSOLETE time_t start_time, end_time;
unsigned long data_count = 0; // OBSOLETE unsigned long data_count = 0;
// OBSOLETE
/* enable user to specify address for downloading as 2nd arg to load */ // OBSOLETE /* enable user to specify address for downloading as 2nd arg to load */
// OBSOLETE
i = sscanf (file, "%*s 0x%lx", &load_offset); // OBSOLETE i = sscanf (file, "%*s 0x%lx", &load_offset);
if (i >= 1) // OBSOLETE if (i >= 1)
{ // OBSOLETE {
char *p; // OBSOLETE char *p;
// OBSOLETE
for (p = file; *p != '\000' && !isspace (*p); p++); // OBSOLETE for (p = file; *p != '\000' && !isspace (*p); p++);
// OBSOLETE
*p = '\000'; // OBSOLETE *p = '\000';
} // OBSOLETE }
else // OBSOLETE else
load_offset = 0; // OBSOLETE load_offset = 0;
// OBSOLETE
abfd = bfd_openr (file, 0); // OBSOLETE abfd = bfd_openr (file, 0);
if (!abfd) // OBSOLETE if (!abfd)
{ // OBSOLETE {
printf_filtered ("Unable to open file %s\n", file); // OBSOLETE printf_filtered ("Unable to open file %s\n", file);
return; // OBSOLETE return;
} // OBSOLETE }
// OBSOLETE
if (bfd_check_format (abfd, bfd_object) == 0) // OBSOLETE if (bfd_check_format (abfd, bfd_object) == 0)
{ // OBSOLETE {
printf_filtered ("File is not an object file\n"); // OBSOLETE printf_filtered ("File is not an object file\n");
return; // OBSOLETE return;
} // OBSOLETE }
// OBSOLETE
start_time = time (NULL); // OBSOLETE start_time = time (NULL);
// OBSOLETE
for (s = abfd->sections; s; s = s->next) // OBSOLETE for (s = abfd->sections; s; s = s->next)
if (s->flags & SEC_LOAD) // OBSOLETE if (s->flags & SEC_LOAD)
{ // OBSOLETE {
bfd_size_type section_size; // OBSOLETE bfd_size_type section_size;
bfd_vma vma; // OBSOLETE bfd_vma vma;
// OBSOLETE
vma = bfd_get_section_vma (abfd, s) + load_offset; // OBSOLETE vma = bfd_get_section_vma (abfd, s) + load_offset;
section_size = bfd_section_size (abfd, s); // OBSOLETE section_size = bfd_section_size (abfd, s);
// OBSOLETE
data_count += section_size; // OBSOLETE data_count += section_size;
// OBSOLETE
printf_filtered ("%s\t: 0x%4x .. 0x%4x ", // OBSOLETE printf_filtered ("%s\t: 0x%4x .. 0x%4x ",
bfd_get_section_name (abfd, s), vma, // OBSOLETE bfd_get_section_name (abfd, s), vma,
vma + section_size); // OBSOLETE vma + section_size);
gdb_flush (gdb_stdout); // OBSOLETE gdb_flush (gdb_stdout);
// OBSOLETE
monitor_printf ("load c r %x %x\r", vma, section_size); // OBSOLETE monitor_printf ("load c r %x %x\r", vma, section_size);
// OBSOLETE
monitor_expect ("load: loading ", NULL, 0); // OBSOLETE monitor_expect ("load: loading ", NULL, 0);
monitor_expect ("\r", NULL, 0); // OBSOLETE monitor_expect ("\r", NULL, 0);
// OBSOLETE
for (i = 0; i < section_size; i += 2048) // OBSOLETE for (i = 0; i < section_size; i += 2048)
{ // OBSOLETE {
int numbytes; // OBSOLETE int numbytes;
char buf[2048]; // OBSOLETE char buf[2048];
// OBSOLETE
numbytes = min (sizeof buf, section_size - i); // OBSOLETE numbytes = min (sizeof buf, section_size - i);
// OBSOLETE
bfd_get_section_contents (abfd, s, buf, i, numbytes); // OBSOLETE bfd_get_section_contents (abfd, s, buf, i, numbytes);
// OBSOLETE
serial_write (desc, buf, numbytes); // OBSOLETE serial_write (desc, buf, numbytes);
// OBSOLETE
if (hashmark) // OBSOLETE if (hashmark)
{ // OBSOLETE {
putchar_unfiltered ('#'); // OBSOLETE putchar_unfiltered ('#');
gdb_flush (gdb_stdout); // OBSOLETE gdb_flush (gdb_stdout);
} // OBSOLETE }
} /* Per-packet (or S-record) loop */ // OBSOLETE } /* Per-packet (or S-record) loop */
// OBSOLETE
monitor_expect_prompt (NULL, 0); // OBSOLETE monitor_expect_prompt (NULL, 0);
// OBSOLETE
putchar_unfiltered ('\n'); // OBSOLETE putchar_unfiltered ('\n');
} /* Loadable sections */ // OBSOLETE } /* Loadable sections */
// OBSOLETE
monitor_printf ("reg pc %x\r", bfd_get_start_address (abfd)); // OBSOLETE monitor_printf ("reg pc %x\r", bfd_get_start_address (abfd));
monitor_expect_prompt (NULL, 0); // OBSOLETE monitor_expect_prompt (NULL, 0);
monitor_printf ("reg npc %x\r", bfd_get_start_address (abfd) + 4); // OBSOLETE monitor_printf ("reg npc %x\r", bfd_get_start_address (abfd) + 4);
monitor_expect_prompt (NULL, 0); // OBSOLETE monitor_expect_prompt (NULL, 0);
// OBSOLETE
monitor_printf ("run\r"); // OBSOLETE monitor_printf ("run\r");
// OBSOLETE
end_time = time (NULL); // OBSOLETE end_time = time (NULL);
// OBSOLETE
if (hashmark) // OBSOLETE if (hashmark)
putchar_unfiltered ('\n'); // OBSOLETE putchar_unfiltered ('\n');
// OBSOLETE
report_transfer_performance (data_count, start_time, end_time); // OBSOLETE report_transfer_performance (data_count, start_time, end_time);
// OBSOLETE
pop_target (); // OBSOLETE pop_target ();
push_remote_target (monitor_get_dev_name (), 1); // OBSOLETE push_remote_target (monitor_get_dev_name (), 1);
// OBSOLETE
throw_exception (RETURN_QUIT); // OBSOLETE throw_exception (RETURN_QUIT);
} // OBSOLETE }
// OBSOLETE
/* Define the monitor command strings. Since these are passed directly // OBSOLETE /* Define the monitor command strings. Since these are passed directly
through to a printf style function, we may include formatting // OBSOLETE through to a printf style function, we may include formatting
strings. We also need a CR or LF on the end. */ // OBSOLETE strings. We also need a CR or LF on the end. */
// OBSOLETE
/* need to pause the monitor for timing reasons, so slow it down */ // OBSOLETE /* need to pause the monitor for timing reasons, so slow it down */
// OBSOLETE
static char *sparclet_inits[] = // OBSOLETE static char *sparclet_inits[] =
{"\n\r\r\n", NULL}; // OBSOLETE {"\n\r\r\n", NULL};
// OBSOLETE
static struct monitor_ops sparclet_cmds; // OBSOLETE static struct monitor_ops sparclet_cmds;
// OBSOLETE
static void // OBSOLETE static void
init_sparclet_cmds (void) // OBSOLETE init_sparclet_cmds (void)
{ // OBSOLETE {
sparclet_cmds.flags = MO_CLR_BREAK_USES_ADDR | // OBSOLETE sparclet_cmds.flags = MO_CLR_BREAK_USES_ADDR |
MO_HEX_PREFIX | // OBSOLETE MO_HEX_PREFIX |
MO_NO_ECHO_ON_OPEN | // OBSOLETE MO_NO_ECHO_ON_OPEN |
MO_NO_ECHO_ON_SETMEM | // OBSOLETE MO_NO_ECHO_ON_SETMEM |
MO_RUN_FIRST_TIME | // OBSOLETE MO_RUN_FIRST_TIME |
MO_GETMEM_READ_SINGLE; /* flags */ // OBSOLETE MO_GETMEM_READ_SINGLE; /* flags */
sparclet_cmds.init = sparclet_inits; /* Init strings */ // OBSOLETE sparclet_cmds.init = sparclet_inits; /* Init strings */
sparclet_cmds.cont = "cont\r"; /* continue command */ // OBSOLETE sparclet_cmds.cont = "cont\r"; /* continue command */
sparclet_cmds.step = "step\r"; /* single step */ // OBSOLETE sparclet_cmds.step = "step\r"; /* single step */
sparclet_cmds.stop = "\r"; /* break interrupts the program */ // OBSOLETE sparclet_cmds.stop = "\r"; /* break interrupts the program */
sparclet_cmds.set_break = "+bp %x\r"; /* set a breakpoint */ // OBSOLETE sparclet_cmds.set_break = "+bp %x\r"; /* set a breakpoint */
sparclet_cmds.clr_break = "-bp %x\r"; /* can't use "br" because only 2 hw bps are supported */ // OBSOLETE sparclet_cmds.clr_break = "-bp %x\r"; /* can't use "br" because only 2 hw bps are supported */
sparclet_cmds.clr_all_break = "-bp %x\r"; /* clear a breakpoint */ // OBSOLETE sparclet_cmds.clr_all_break = "-bp %x\r"; /* clear a breakpoint */
"-bp\r"; /* clear all breakpoints */ // OBSOLETE "-bp\r"; /* clear all breakpoints */
sparclet_cmds.fill = "fill %x -n %x -v %x -b\r"; /* fill (start length val) */ // OBSOLETE sparclet_cmds.fill = "fill %x -n %x -v %x -b\r"; /* fill (start length val) */
/* can't use "fi" because it takes words, not bytes */ // OBSOLETE /* can't use "fi" because it takes words, not bytes */
/* ex [addr] [-n count] [-b|-s|-l] default: ex cur -n 1 -b */ // OBSOLETE /* ex [addr] [-n count] [-b|-s|-l] default: ex cur -n 1 -b */
sparclet_cmds.setmem.cmdb = "ex %x -b\r%x\rq\r"; /* setmem.cmdb (addr, value) */ // OBSOLETE sparclet_cmds.setmem.cmdb = "ex %x -b\r%x\rq\r"; /* setmem.cmdb (addr, value) */
sparclet_cmds.setmem.cmdw = "ex %x -s\r%x\rq\r"; /* setmem.cmdw (addr, value) */ // OBSOLETE sparclet_cmds.setmem.cmdw = "ex %x -s\r%x\rq\r"; /* setmem.cmdw (addr, value) */
sparclet_cmds.setmem.cmdl = "ex %x -l\r%x\rq\r"; /* setmem.cmdl (addr, value) */ // OBSOLETE sparclet_cmds.setmem.cmdl = "ex %x -l\r%x\rq\r"; /* setmem.cmdl (addr, value) */
sparclet_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */ // OBSOLETE sparclet_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
sparclet_cmds.setmem.resp_delim = NULL; /*": " *//* setmem.resp_delim */ // OBSOLETE sparclet_cmds.setmem.resp_delim = NULL; /*": " *//* setmem.resp_delim */
sparclet_cmds.setmem.term = NULL; /*"? " *//* setmem.term */ // OBSOLETE sparclet_cmds.setmem.term = NULL; /*"? " *//* setmem.term */
sparclet_cmds.setmem.term_cmd = NULL; /*"q\r" *//* setmem.term_cmd */ // OBSOLETE sparclet_cmds.setmem.term_cmd = NULL; /*"q\r" *//* setmem.term_cmd */
/* since the parsing of multiple bytes is difficult due to // OBSOLETE /* since the parsing of multiple bytes is difficult due to
interspersed addresses, we'll only read 1 value at a time, // OBSOLETE interspersed addresses, we'll only read 1 value at a time,
even tho these can handle a count */ // OBSOLETE even tho these can handle a count */
/* we can use -n to set count to read, but may have to parse? */ // OBSOLETE /* we can use -n to set count to read, but may have to parse? */
sparclet_cmds.getmem.cmdb = "ex %x -n 1 -b\r"; /* getmem.cmdb (addr, #bytes) */ // OBSOLETE sparclet_cmds.getmem.cmdb = "ex %x -n 1 -b\r"; /* getmem.cmdb (addr, #bytes) */
sparclet_cmds.getmem.cmdw = "ex %x -n 1 -s\r"; /* getmem.cmdw (addr, #swords) */ // OBSOLETE sparclet_cmds.getmem.cmdw = "ex %x -n 1 -s\r"; /* getmem.cmdw (addr, #swords) */
sparclet_cmds.getmem.cmdl = "ex %x -n 1 -l\r"; /* getmem.cmdl (addr, #words) */ // OBSOLETE sparclet_cmds.getmem.cmdl = "ex %x -n 1 -l\r"; /* getmem.cmdl (addr, #words) */
sparclet_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, #dwords) */ // OBSOLETE sparclet_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, #dwords) */
sparclet_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */ // OBSOLETE sparclet_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */
sparclet_cmds.getmem.term = NULL; /* getmem.term */ // OBSOLETE sparclet_cmds.getmem.term = NULL; /* getmem.term */
sparclet_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */ // OBSOLETE sparclet_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
sparclet_cmds.setreg.cmd = "reg %s 0x%x\r"; /* setreg.cmd (name, value) */ // OBSOLETE sparclet_cmds.setreg.cmd = "reg %s 0x%x\r"; /* setreg.cmd (name, value) */
sparclet_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */ // OBSOLETE sparclet_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
sparclet_cmds.setreg.term = NULL; /* setreg.term */ // OBSOLETE sparclet_cmds.setreg.term = NULL; /* setreg.term */
sparclet_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */ // OBSOLETE sparclet_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
sparclet_cmds.getreg.cmd = "reg %s\r"; /* getreg.cmd (name) */ // OBSOLETE sparclet_cmds.getreg.cmd = "reg %s\r"; /* getreg.cmd (name) */
sparclet_cmds.getreg.resp_delim = " "; /* getreg.resp_delim */ // OBSOLETE sparclet_cmds.getreg.resp_delim = " "; /* getreg.resp_delim */
sparclet_cmds.getreg.term = NULL; /* getreg.term */ // OBSOLETE sparclet_cmds.getreg.term = NULL; /* getreg.term */
sparclet_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */ // OBSOLETE sparclet_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
sparclet_cmds.dump_registers = "reg\r"; /* dump_registers */ // OBSOLETE sparclet_cmds.dump_registers = "reg\r"; /* dump_registers */
sparclet_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\)"; /* register_pattern */ // OBSOLETE sparclet_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\)"; /* register_pattern */
sparclet_cmds.supply_register = sparclet_supply_register; /* supply_register */ // OBSOLETE sparclet_cmds.supply_register = sparclet_supply_register; /* supply_register */
sparclet_cmds.load_routine = sparclet_load; /* load_routine */ // OBSOLETE sparclet_cmds.load_routine = sparclet_load; /* load_routine */
sparclet_cmds.load = NULL; /* download command (srecs on console) */ // OBSOLETE sparclet_cmds.load = NULL; /* download command (srecs on console) */
sparclet_cmds.loadresp = NULL; /* load response */ // OBSOLETE sparclet_cmds.loadresp = NULL; /* load response */
sparclet_cmds.prompt = "monitor>"; /* monitor command prompt */ // OBSOLETE sparclet_cmds.prompt = "monitor>"; /* monitor command prompt */
/* yikes! gdb core dumps without this delimitor!! */ // OBSOLETE /* yikes! gdb core dumps without this delimitor!! */
sparclet_cmds.line_term = "\r"; /* end-of-command delimitor */ // OBSOLETE sparclet_cmds.line_term = "\r"; /* end-of-command delimitor */
sparclet_cmds.cmd_end = NULL; /* optional command terminator */ // OBSOLETE sparclet_cmds.cmd_end = NULL; /* optional command terminator */
sparclet_cmds.target = &sparclet_ops; /* target operations */ // OBSOLETE sparclet_cmds.target = &sparclet_ops; /* target operations */
sparclet_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */ // OBSOLETE sparclet_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
sparclet_cmds.regnames = sparclet_regnames; /* registers names */ // OBSOLETE sparclet_cmds.regnames = sparclet_regnames; /* registers names */
sparclet_cmds.magic = MONITOR_OPS_MAGIC; /* magic */ // OBSOLETE sparclet_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
}; // OBSOLETE };
// OBSOLETE
static void // OBSOLETE static void
sparclet_open (char *args, int from_tty) // OBSOLETE sparclet_open (char *args, int from_tty)
{ // OBSOLETE {
monitor_open (args, &sparclet_cmds, from_tty); // OBSOLETE monitor_open (args, &sparclet_cmds, from_tty);
} // OBSOLETE }
// OBSOLETE
void // OBSOLETE void
_initialize_sparclet (void) // OBSOLETE _initialize_sparclet (void)
{ // OBSOLETE {
int i; // OBSOLETE int i;
init_sparclet_cmds (); // OBSOLETE init_sparclet_cmds ();
// OBSOLETE
for (i = 0; i < NUM_REGS; i++) // OBSOLETE for (i = 0; i < NUM_REGS; i++)
if (sparclet_regnames[i][0] == 'c' || // OBSOLETE if (sparclet_regnames[i][0] == 'c' ||
sparclet_regnames[i][0] == 'a') // OBSOLETE sparclet_regnames[i][0] == 'a')
sparclet_regnames[i] = 0; /* mon can't report c* or a* regs */ // OBSOLETE sparclet_regnames[i] = 0; /* mon can't report c* or a* regs */
// OBSOLETE
sparclet_regnames[0] = 0; /* mon won't report %G0 */ // OBSOLETE sparclet_regnames[0] = 0; /* mon won't report %G0 */
// OBSOLETE
init_monitor_ops (&sparclet_ops); // OBSOLETE init_monitor_ops (&sparclet_ops);
sparclet_ops.to_shortname = "sparclet"; /* for the target command */ // OBSOLETE sparclet_ops.to_shortname = "sparclet"; /* for the target command */
sparclet_ops.to_longname = "SPARC Sparclet monitor"; // OBSOLETE sparclet_ops.to_longname = "SPARC Sparclet monitor";
/* use SW breaks; target only supports 2 HW breakpoints */ // OBSOLETE /* use SW breaks; target only supports 2 HW breakpoints */
sparclet_ops.to_insert_breakpoint = memory_insert_breakpoint; // OBSOLETE sparclet_ops.to_insert_breakpoint = memory_insert_breakpoint;
sparclet_ops.to_remove_breakpoint = memory_remove_breakpoint; // OBSOLETE sparclet_ops.to_remove_breakpoint = memory_remove_breakpoint;
// OBSOLETE
sparclet_ops.to_doc = // OBSOLETE sparclet_ops.to_doc =
"Use a board running the Sparclet debug monitor.\n\ // OBSOLETE "Use a board running the Sparclet debug monitor.\n\
Specify the serial device it is connected to (e.g. /dev/ttya)."; // OBSOLETE Specify the serial device it is connected to (e.g. /dev/ttya).";
// OBSOLETE
sparclet_ops.to_open = sparclet_open; // OBSOLETE sparclet_ops.to_open = sparclet_open;
add_target (&sparclet_ops); // OBSOLETE add_target (&sparclet_ops);
} // OBSOLETE }

File diff suppressed because it is too large Load Diff