Obsolete i960.

This commit is contained in:
Andrew Cagney 2002-08-22 21:52:45 +00:00
parent ececec60e1
commit 4d210288d3
16 changed files with 2952 additions and 2937 deletions

View File

@ -1,3 +1,21 @@
2002-08-22 Andrew Cagney <cagney@redhat.com>
* NEWS: Mention that the i960 has been made obsolete.
* Makefile.in (SFILES): Delete remote-nrom.c, remote-nindy.c and
i960-tdep.c
(remote-nrom.o): Obsolete target.
(remote-nindy.o, i960-tdep.o): Ditto.
* remote-nrom.c: Make file obsolete.
* remote-nindy.c, remote-vx960.c: Ditto.
* config/i960/vxworks960.mt, config/i960/nindy960.mt: Ditto.
* config/i960/mon960.mt, config/i960/tm-i960.h: Ditto.
* config/i960/tm-vx960.h, config/i960/tm-nindy960.h: Ditto.
* config/i960/tm-mon960.h, i960-tdep.c: Ditto.
* configure.tgt: Make i960-*-bout*, i960-nindy-coff*,
i960-*-coff*, i960-nindy-elf*, i960-*-elf*, i960-*-nindy* and
i960-*-vxworks* obsolete.
* MAINTAINERS: Note that the i960 is obsolete.
2002-08-21 Corinna Vinschen <vinschen@redhat.com
* aix-thread.c (aix_thread_detach): Disable thread debugging on

View File

@ -91,9 +91,7 @@ maintainer works with the native maintainer when resolving API issues.
i386 --target=i386-elf ,-Werror
Mark Kettenis kettenis@gnu.org
i960 --target=i960-coff ,-Werror
Maintenance only
OBSOLETE candidate, not multi-arch
i960 (--target=i960-coff OBSOLETE)
ia64 --target=ia64-linux-gnu ,-Werror
(--target=ia64-elf broken)

View File

@ -542,7 +542,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
memattr.c mem-break.c minsyms.c mipsread.c nlmread.c objfiles.c \
p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c \
macrotab.c macroexp.c macrocmd.c macroscope.c \
printcmd.c remote.c remote-nrom.c scm-exp.c scm-lang.c \
printcmd.c remote.c scm-exp.c scm-lang.c \
scm-valprint.c source.c stabsread.c stack.c symfile.c \
symmisc.c symtab.c linespec.c target.c thread.c top.c tracepoint.c \
typeprint.c utils.c valarith.c valops.c valprint.c values.c \
@ -1359,7 +1359,6 @@ ALLDEPFILES = a68v-nat.c \
i387-tdep.c \
i386-linux-tdep.c i386-nat.c \
i386gnu-nat.c i386gnu-tdep.c \
i960-tdep.c \
ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c \
infptrace.c inftarg.c irix4-nat.c irix5-nat.c \
lynx-nat.c m3-nat.c \
@ -1381,7 +1380,7 @@ ALLDEPFILES = a68v-nat.c \
procfs.c \
remote-array.c remote-e7000.c \
remote-es.c remote-hms.c remote-mips.c \
remote-nindy.c remote-rdp.c remote-sim.c \
remote-rdp.c remote-sim.c \
remote-st.c remote-utils.c dcache.c \
remote-vx.c \
rs6000-nat.c rs6000-tdep.c \
@ -1794,8 +1793,8 @@ i386v4-nat.o: i386v4-nat.c $(defs_h) $(regcache_h)
i387-tdep.o: i387-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) $(language_h) $(regcache_h) $(doublest_h) i386-tdep.h
i960-tdep.o: i960-tdep.c $(defs_h) $(symtab_h) $(value_h) $(frame_h) \
$(floatformat_h) $(target_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
# OBSOLETE i960-tdep.o: i960-tdep.c $(defs_h) $(symtab_h) $(value_h) $(frame_h) \
# OBSOLETE $(floatformat_h) $(target_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(regcache_h)
@ -2101,10 +2100,10 @@ remote-mips.o: remote-mips.c $(defs_h) $(gdbcmd_h) \
$(gdbcore_h) $(inferior_h) $(serial_h) $(symfile_h) $(target_h) \
$(regcache_h)
remote-nindy.o: remote-nindy.c $(floatformat_h) $(command_h) \
$(defs_h) $(gdbcore_h) $(inferior_h) \
nindy-share/env.h nindy-share/stop.h $(remote_utils_h) \
$(symfile_h) $(regcache_h)
# OBSOLETE remote-nindy.o: remote-nindy.c $(floatformat_h) $(command_h) \
# OBSOLETE $(defs_h) $(gdbcore_h) $(inferior_h) \
# OBSOLETE nindy-share/env.h nindy-share/stop.h $(remote_utils_h) \
# OBSOLETE $(symfile_h) $(regcache_h)
# OBSOLETE remote-os9k.o: remote-os9k.c $(defs_h) $(gdbcore_h) \
# OBSOLETE $(command_h) $(monitor_h) $(remote_utils_h) $(symtab_h) $(symfile_h) \
@ -2145,8 +2144,8 @@ remote.o: remote.c $(bfd_h) $(gdb_wait_h) $(defs_h) $(gdbcmd_h) \
$(gdb_string_h) $(event_loop_h) $(event_top_h) $(remote_h) \
$(inf_loop_h) $(value_h)
remote-nrom.o: remote-nrom.c $(bfd_h) $(gdb_wait_h) $(defs_h) $(gdbcmd_h) \
$(inferior_h) $(remote_utils_h) $(symfile_h) $(terminal_h)
# OBSOLETE remote-nrom.o: remote-nrom.c $(bfd_h) $(gdb_wait_h) $(defs_h) $(gdbcmd_h) \
# OBSOLETE $(inferior_h) $(remote_utils_h) $(symfile_h) $(terminal_h)
rom68k-rom.o: rom68k-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) \
$(gdbcmd_h) $(inferior_h) $(target_h) $(serial_h) $(terminal_h) \

View File

@ -67,6 +67,7 @@ i386 running OSF/1 i[3456]86-*osf1mk*
HP/Apollo 68k Family m68*-apollo*-sysv*,
m68*-apollo*-bsd*,
m68*-hp-bsd*, m68*-hp-hpux*
I960 with MON960 i960-*-coff
* OBSOLETE languages

View File

@ -1,6 +1,5 @@
# Target: Intel 960 rom monitor
TDEPFILES= i960-tdep.o monitor.o mon960-rom.o ttyflush.o xmodem.o dsrec.o
TM_FILE= tm-mon960.h
SIM_OBS = remote-sim.o
SIM = ../sim/i960/libsim.a
# OBSOLETE # Target: Intel 960 rom monitor
# OBSOLETE TDEPFILES= i960-tdep.o monitor.o mon960-rom.o ttyflush.o xmodem.o dsrec.o
# OBSOLETE TM_FILE= tm-mon960.h
# OBSOLETE SIM_OBS = remote-sim.o
# OBSOLETE SIM = ../sim/i960/libsim.a

View File

@ -1,3 +1,3 @@
# Target: Intel 80960, in an embedded system under the NINDY monitor
TDEPFILES= i960-tdep.o nindy-tdep.o remote-nindy.o nindy.o Onindy.o ttyflush.o
TM_FILE= tm-nindy960.h
# OBSOLETE # Target: Intel 80960, in an embedded system under the NINDY monitor
# OBSOLETE TDEPFILES= i960-tdep.o nindy-tdep.o remote-nindy.o nindy.o Onindy.o ttyflush.o
# OBSOLETE TM_FILE= tm-nindy960.h

View File

@ -1,345 +1,345 @@
/* Parameters for target machine Intel 960, for GDB, the GNU debugger.
Copyright 1990, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002 Free
Software Foundation, Inc.
Contributed by Intel Corporation.
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. */
/* Definitions to target GDB to any i960. */
#ifndef I80960
#define I80960
#endif
#include "doublest.h"
/* Hook for the SYMBOL_CLASS of a parameter when decoding DBX symbol
information. In the i960, parameters can be stored as locals or as
args, depending on the type of the debug record.
From empirical observation, gcc960 uses N_LSYM to indicate
arguments passed in registers and then copied immediately
to the frame, and N_PSYM to indicate arguments passed in a
g14-relative argument block. */
#define DBX_PARM_SYMBOL_CLASS(type) ((type == N_LSYM)? LOC_LOCAL_ARG: LOC_ARG)
/* Offset from address of function to start of its code.
Zero on most machines. */
#define FUNCTION_START_OFFSET 0
/* Advance ip across any function entry prologue instructions
to reach some "real" code. */
#define SKIP_PROLOGUE(ip) (i960_skip_prologue (ip))
extern CORE_ADDR i960_skip_prologue ();
/* Immediately after a function call, return the saved ip.
Can't always go through the frames for this because on some machines
the new frame is not set up until the new function
executes some instructions. */
#define SAVED_PC_AFTER_CALL(frame) (saved_pc_after_call (frame))
extern CORE_ADDR saved_pc_after_call ();
/* Stack grows upward */
#define INNER_THAN(lhs,rhs) ((lhs) > (rhs))
/* Say how long (ordinary) registers are. This is a piece of bogosity
used in push_word and a few other places; REGISTER_RAW_SIZE is the
real way to know how big a register is. */
#define REGISTER_SIZE 4
/* Number of machine registers */
#define NUM_REGS 40
/* Initializer for an array of names of registers.
There should be NUM_REGS strings in this initializer. */
#define REGISTER_NAMES { \
/* 0 */ "pfp", "sp", "rip", "r3", "r4", "r5", "r6", "r7", \
/* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",\
/* 16 */ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
/* 24 */ "g8", "g9", "g10", "g11", "g12", "g13", "g14", "fp", \
/* 32 */ "pcw", "ac", "tc", "ip", "fp0", "fp1", "fp2", "fp3",\
}
/* Register numbers of various important registers (used to index
into arrays of register names and register values). */
#define R0_REGNUM 0 /* First local register */
#define SP_REGNUM 1 /* Contains address of top of stack */
#define RIP_REGNUM 2 /* Return instruction pointer (local r2) */
#define R15_REGNUM 15 /* Last local register */
#define G0_REGNUM 16 /* First global register */
#define G13_REGNUM 29 /* g13 - holds struct return address */
#define G14_REGNUM 30 /* g14 - ptr to arg block / leafproc return address */
#define FP_REGNUM 31 /* Contains address of executing stack frame */
#define PCW_REGNUM 32 /* process control word */
#define ACW_REGNUM 33 /* arithmetic control word */
#define TCW_REGNUM 34 /* trace control word */
#define IP_REGNUM 35 /* instruction pointer */
#define FP0_REGNUM 36 /* First floating point register */
/* Some registers have more than one name */
#define PC_REGNUM IP_REGNUM /* GDB refers to ip as the Program Counter */
#define PFP_REGNUM R0_REGNUM /* Previous frame pointer */
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
#define REGISTER_BYTES ((36*4) + (4*10))
/* Index within `registers' of the first byte of the space for register N. */
#define REGISTER_BYTE(N) ( (N) < FP0_REGNUM ? \
(4*(N)) : ((10*(N)) - (6*FP0_REGNUM)) )
/* The i960 has register windows, sort of. */
extern void i960_get_saved_register (char *raw_buffer,
int *optimized,
CORE_ADDR *addrp,
struct frame_info *frame,
int regnum,
enum lval_type *lval);
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
i960_get_saved_register(raw_buffer, optimized, addrp, frame, regnum, lval)
/* Number of bytes of storage in the actual machine representation
for register N. On the i960, all regs are 4 bytes except for floating
point, which are 10. NINDY only sends us 8 byte values for these,
which is a pain, but VxWorks handles this correctly, so we must. */
#define REGISTER_RAW_SIZE(N) ( (N) < FP0_REGNUM ? 4 : 10 )
/* Number of bytes of storage in the program's representation for register N. */
#define REGISTER_VIRTUAL_SIZE(N) ( (N) < FP0_REGNUM ? 4 : 8 )
/* Largest value REGISTER_RAW_SIZE can have. */
#define MAX_REGISTER_RAW_SIZE 10
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
#define MAX_REGISTER_VIRTUAL_SIZE 8
#include "floatformat.h"
#define TARGET_LONG_DOUBLE_FORMAT &floatformat_i960_ext
/* Return the GDB type object for the "standard" data type
of data in register N. */
struct type *i960_register_type (int regnum);
#define REGISTER_VIRTUAL_TYPE(N) i960_register_type (N)
/* Macros for understanding function return values... */
/* Does the specified function use the "struct returning" convention
or the "value returning" convention? The "value returning" convention
almost invariably returns the entire value in registers. The
"struct returning" convention often returns the entire value in
memory, and passes a pointer (out of or into the function) saying
where the value (is or should go).
Since this sometimes depends on whether it was compiled with GCC,
this is also an argument. This is used in call_function to build a
stack, and in value_being_returned to print return values.
On i960, a structure is returned in registers g0-g3, if it will fit.
If it's more than 16 bytes long, g13 pointed to it on entry. */
extern use_struct_convention_fn i960_use_struct_convention;
#define USE_STRUCT_CONVENTION(gcc_p, type) i960_use_struct_convention (gcc_p, type)
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. This is only called if USE_STRUCT_CONVENTION for this
type is 0.
On the i960 we just take as many bytes as we need from G0 through G3. */
#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy(VALBUF, REGBUF+REGISTER_BYTE(G0_REGNUM), TYPE_LENGTH (TYPE))
/* If USE_STRUCT_CONVENTION produces a 1,
extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one).
Address of where to put structure was passed in in global
register g13 on entry. God knows what's in g13 now. The
(..., 0) below is to make it appear to return a value, though
actually all it does is call error(). */
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(error("Don't know where large structure is returned on i960"), 0)
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format, for "value returning" functions.
For 'return' command: not (yet) implemented for i960. */
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
error ("Returning values from functions is not implemented in i960 gdb")
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function. */
#define STORE_STRUCT_RETURN(ADDR, SP) \
error ("Returning values from functions is not implemented in i960 gdb")
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
However, if FRAME_CHAIN_VALID returns zero,
it means the given frame is the outermost one and has no caller. */
/* We cache information about saved registers in the frame structure,
to save us from having to re-scan function prologues every time
a register in a non-current frame is accessed. */
#define EXTRA_FRAME_INFO \
struct frame_saved_regs *fsr; \
CORE_ADDR arg_pointer;
/* Zero the frame_saved_regs pointer when the frame is initialized,
so that FRAME_FIND_SAVED_REGS () will know to allocate and
initialize a frame_saved_regs struct the first time it is called.
Set the arg_pointer to -1, which is not valid; 0 and other values
indicate real, cached values. */
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
((fi)->fsr = 0, (fi)->arg_pointer = -1)
/* On the i960, we get the chain pointer by reading the PFP saved
on the stack and clearing the status bits. */
#define FRAME_CHAIN(thisframe) \
(read_memory_integer (FRAME_FP(thisframe), 4) & ~0xf)
/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
and has no caller.
On the i960, each various target system type must define FRAME_CHAIN_VALID,
since it differs between NINDY and VxWorks, the two currently supported
targets types. We leave it undefined here. */
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
CORE_ADDR leafproc_return (CORE_ADDR ip);
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(leafproc_return ((FI)->pc) != 0)
/* Note that in the i960 architecture the return pointer is saved in the
*caller's* stack frame.
Make sure to zero low-order bits because of bug in 960CA A-step part
(instruction addresses should always be word-aligned anyway). */
#define FRAME_SAVED_PC(frame) \
((read_memory_integer(FRAME_CHAIN(frame)+8,4)) & ~3)
/* On the i960, FRAME_ARGS_ADDRESS should return the value of
g14 as passed into the frame, if known. We need a function for this.
We cache this value in the frame info if we've already looked it up. */
#define FRAME_ARGS_ADDRESS(fi) \
(((fi)->arg_pointer != -1)? (fi)->arg_pointer: frame_args_address (fi, 0))
extern CORE_ADDR frame_args_address (); /* i960-tdep.c */
/* This is the same except it should return 0 when
it does not really know where the args are, rather than guessing.
This value is not cached since it is only used infrequently. */
#define FRAME_ARGS_ADDRESS_CORRECT(fi) (frame_args_address (fi, 1))
#define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
/* Set NUMARGS to the number of args passed to a frame.
Can return -1, meaning no way to tell. */
#define FRAME_NUM_ARGS(fi) (-1)
/* Return number of bytes at start of arglist that are not really args. */
#define FRAME_ARGS_SKIP 0
/* Produce the positions of the saved registers in a stack frame. */
#define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
frame_find_saved_regs (frame_info_addr, &sr)
extern void frame_find_saved_regs (); /* See i960-tdep.c */
/* Things needed for making calls to functions in the inferior process */
/* Push an empty stack frame, to record the current ip, etc.
Not (yet?) implemented for i960. */
#define PUSH_DUMMY_FRAME \
error("Function calls into the inferior process are not supported on the i960")
/* Discard from the stack the innermost frame, restoring all registers. */
void i960_pop_frame (void);
#define POP_FRAME \
i960_pop_frame ()
/* This sequence of words is the instructions
callx 0x00000000
fmark
*/
/* #define CALL_DUMMY { 0x86003000, 0x00000000, 0x66003e00 } */
/* #define CALL_DUMMY_START_OFFSET 0 *//* Start execution at beginning of dummy */
/* Indicate that we don't support calling inferior child functions. */
#undef CALL_DUMMY
/* Insert the specified number of args and function address
into a call sequence of the above form stored at 'dummyname'.
Ignore arg count on i960. */
/* #define FIX_CALL_DUMMY(dummyname, fun, nargs) *(((int *)dummyname)+1) = fun */
#undef FIX_CALL_DUMMY
/* Interface definitions for kernel debugger KDB */
/* (Not relevant to i960.) */
// OBSOLETE /* Parameters for target machine Intel 960, for GDB, the GNU debugger.
// OBSOLETE
// OBSOLETE Copyright 1990, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002 Free
// OBSOLETE Software Foundation, Inc.
// OBSOLETE
// OBSOLETE Contributed by Intel Corporation.
// OBSOLETE This file is part of GDB.
// OBSOLETE
// OBSOLETE This program is free software; you can redistribute it and/or modify
// OBSOLETE it under the terms of the GNU General Public License as published by
// OBSOLETE the Free Software Foundation; either version 2 of the License, or
// OBSOLETE (at your option) any later version.
// OBSOLETE
// OBSOLETE This program is distributed in the hope that it will be useful,
// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// OBSOLETE GNU General Public License for more details.
// OBSOLETE
// OBSOLETE You should have received a copy of the GNU General Public License
// OBSOLETE along with this program; if not, write to the Free Software
// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
// OBSOLETE Boston, MA 02111-1307, USA. */
// OBSOLETE
// OBSOLETE /* Definitions to target GDB to any i960. */
// OBSOLETE
// OBSOLETE #ifndef I80960
// OBSOLETE #define I80960
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE #include "doublest.h"
// OBSOLETE
// OBSOLETE /* Hook for the SYMBOL_CLASS of a parameter when decoding DBX symbol
// OBSOLETE information. In the i960, parameters can be stored as locals or as
// OBSOLETE args, depending on the type of the debug record.
// OBSOLETE
// OBSOLETE From empirical observation, gcc960 uses N_LSYM to indicate
// OBSOLETE arguments passed in registers and then copied immediately
// OBSOLETE to the frame, and N_PSYM to indicate arguments passed in a
// OBSOLETE g14-relative argument block. */
// OBSOLETE
// OBSOLETE #define DBX_PARM_SYMBOL_CLASS(type) ((type == N_LSYM)? LOC_LOCAL_ARG: LOC_ARG)
// OBSOLETE
// OBSOLETE /* Offset from address of function to start of its code.
// OBSOLETE Zero on most machines. */
// OBSOLETE
// OBSOLETE #define FUNCTION_START_OFFSET 0
// OBSOLETE
// OBSOLETE /* Advance ip across any function entry prologue instructions
// OBSOLETE to reach some "real" code. */
// OBSOLETE
// OBSOLETE #define SKIP_PROLOGUE(ip) (i960_skip_prologue (ip))
// OBSOLETE extern CORE_ADDR i960_skip_prologue ();
// OBSOLETE
// OBSOLETE /* Immediately after a function call, return the saved ip.
// OBSOLETE Can't always go through the frames for this because on some machines
// OBSOLETE the new frame is not set up until the new function
// OBSOLETE executes some instructions. */
// OBSOLETE
// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) (saved_pc_after_call (frame))
// OBSOLETE extern CORE_ADDR saved_pc_after_call ();
// OBSOLETE
// OBSOLETE /* Stack grows upward */
// OBSOLETE
// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) > (rhs))
// OBSOLETE
// OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity
// OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the
// OBSOLETE real way to know how big a register is. */
// OBSOLETE
// OBSOLETE #define REGISTER_SIZE 4
// OBSOLETE
// OBSOLETE /* Number of machine registers */
// OBSOLETE #define NUM_REGS 40
// OBSOLETE
// OBSOLETE /* Initializer for an array of names of registers.
// OBSOLETE There should be NUM_REGS strings in this initializer. */
// OBSOLETE
// OBSOLETE #define REGISTER_NAMES { \
// OBSOLETE /* 0 */ "pfp", "sp", "rip", "r3", "r4", "r5", "r6", "r7", \
// OBSOLETE /* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",\
// OBSOLETE /* 16 */ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
// OBSOLETE /* 24 */ "g8", "g9", "g10", "g11", "g12", "g13", "g14", "fp", \
// OBSOLETE /* 32 */ "pcw", "ac", "tc", "ip", "fp0", "fp1", "fp2", "fp3",\
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Register numbers of various important registers (used to index
// OBSOLETE into arrays of register names and register values). */
// OBSOLETE
// OBSOLETE #define R0_REGNUM 0 /* First local register */
// OBSOLETE #define SP_REGNUM 1 /* Contains address of top of stack */
// OBSOLETE #define RIP_REGNUM 2 /* Return instruction pointer (local r2) */
// OBSOLETE #define R15_REGNUM 15 /* Last local register */
// OBSOLETE #define G0_REGNUM 16 /* First global register */
// OBSOLETE #define G13_REGNUM 29 /* g13 - holds struct return address */
// OBSOLETE #define G14_REGNUM 30 /* g14 - ptr to arg block / leafproc return address */
// OBSOLETE #define FP_REGNUM 31 /* Contains address of executing stack frame */
// OBSOLETE #define PCW_REGNUM 32 /* process control word */
// OBSOLETE #define ACW_REGNUM 33 /* arithmetic control word */
// OBSOLETE #define TCW_REGNUM 34 /* trace control word */
// OBSOLETE #define IP_REGNUM 35 /* instruction pointer */
// OBSOLETE #define FP0_REGNUM 36 /* First floating point register */
// OBSOLETE
// OBSOLETE /* Some registers have more than one name */
// OBSOLETE
// OBSOLETE #define PC_REGNUM IP_REGNUM /* GDB refers to ip as the Program Counter */
// OBSOLETE #define PFP_REGNUM R0_REGNUM /* Previous frame pointer */
// OBSOLETE
// OBSOLETE /* Total amount of space needed to store our copies of the machine's
// OBSOLETE register state, the array `registers'. */
// OBSOLETE #define REGISTER_BYTES ((36*4) + (4*10))
// OBSOLETE
// OBSOLETE /* Index within `registers' of the first byte of the space for register N. */
// OBSOLETE
// OBSOLETE #define REGISTER_BYTE(N) ( (N) < FP0_REGNUM ? \
// OBSOLETE (4*(N)) : ((10*(N)) - (6*FP0_REGNUM)) )
// OBSOLETE
// OBSOLETE /* The i960 has register windows, sort of. */
// OBSOLETE
// OBSOLETE extern void i960_get_saved_register (char *raw_buffer,
// OBSOLETE int *optimized,
// OBSOLETE CORE_ADDR *addrp,
// OBSOLETE struct frame_info *frame,
// OBSOLETE int regnum,
// OBSOLETE enum lval_type *lval);
// OBSOLETE
// OBSOLETE #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
// OBSOLETE i960_get_saved_register(raw_buffer, optimized, addrp, frame, regnum, lval)
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Number of bytes of storage in the actual machine representation
// OBSOLETE for register N. On the i960, all regs are 4 bytes except for floating
// OBSOLETE point, which are 10. NINDY only sends us 8 byte values for these,
// OBSOLETE which is a pain, but VxWorks handles this correctly, so we must. */
// OBSOLETE
// OBSOLETE #define REGISTER_RAW_SIZE(N) ( (N) < FP0_REGNUM ? 4 : 10 )
// OBSOLETE
// OBSOLETE /* Number of bytes of storage in the program's representation for register N. */
// OBSOLETE
// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) ( (N) < FP0_REGNUM ? 4 : 8 )
// OBSOLETE
// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
// OBSOLETE
// OBSOLETE #define MAX_REGISTER_RAW_SIZE 10
// OBSOLETE
// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */
// OBSOLETE
// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 8
// OBSOLETE
// OBSOLETE #include "floatformat.h"
// OBSOLETE
// OBSOLETE #define TARGET_LONG_DOUBLE_FORMAT &floatformat_i960_ext
// OBSOLETE
// OBSOLETE /* Return the GDB type object for the "standard" data type
// OBSOLETE of data in register N. */
// OBSOLETE
// OBSOLETE struct type *i960_register_type (int regnum);
// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) i960_register_type (N)
// OBSOLETE
// OBSOLETE /* Macros for understanding function return values... */
// OBSOLETE
// OBSOLETE /* Does the specified function use the "struct returning" convention
// OBSOLETE or the "value returning" convention? The "value returning" convention
// OBSOLETE almost invariably returns the entire value in registers. The
// OBSOLETE "struct returning" convention often returns the entire value in
// OBSOLETE memory, and passes a pointer (out of or into the function) saying
// OBSOLETE where the value (is or should go).
// OBSOLETE
// OBSOLETE Since this sometimes depends on whether it was compiled with GCC,
// OBSOLETE this is also an argument. This is used in call_function to build a
// OBSOLETE stack, and in value_being_returned to print return values.
// OBSOLETE
// OBSOLETE On i960, a structure is returned in registers g0-g3, if it will fit.
// OBSOLETE If it's more than 16 bytes long, g13 pointed to it on entry. */
// OBSOLETE
// OBSOLETE extern use_struct_convention_fn i960_use_struct_convention;
// OBSOLETE #define USE_STRUCT_CONVENTION(gcc_p, type) i960_use_struct_convention (gcc_p, type)
// OBSOLETE
// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
// OBSOLETE into VALBUF. This is only called if USE_STRUCT_CONVENTION for this
// OBSOLETE type is 0.
// OBSOLETE
// OBSOLETE On the i960 we just take as many bytes as we need from G0 through G3. */
// OBSOLETE
// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
// OBSOLETE memcpy(VALBUF, REGBUF+REGISTER_BYTE(G0_REGNUM), TYPE_LENGTH (TYPE))
// OBSOLETE
// OBSOLETE /* If USE_STRUCT_CONVENTION produces a 1,
// OBSOLETE extract from an array REGBUF containing the (raw) register state
// OBSOLETE the address in which a function should return its structure value,
// OBSOLETE as a CORE_ADDR (or an expression that can be used as one).
// OBSOLETE
// OBSOLETE Address of where to put structure was passed in in global
// OBSOLETE register g13 on entry. God knows what's in g13 now. The
// OBSOLETE (..., 0) below is to make it appear to return a value, though
// OBSOLETE actually all it does is call error(). */
// OBSOLETE
// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
// OBSOLETE (error("Don't know where large structure is returned on i960"), 0)
// OBSOLETE
// OBSOLETE /* Write into appropriate registers a function return value
// OBSOLETE of type TYPE, given in virtual format, for "value returning" functions.
// OBSOLETE
// OBSOLETE For 'return' command: not (yet) implemented for i960. */
// OBSOLETE
// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
// OBSOLETE error ("Returning values from functions is not implemented in i960 gdb")
// OBSOLETE
// OBSOLETE /* Store the address of the place in which to copy the structure the
// OBSOLETE subroutine will return. This is called from call_function. */
// OBSOLETE
// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \
// OBSOLETE error ("Returning values from functions is not implemented in i960 gdb")
// OBSOLETE
// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
// OBSOLETE (its caller). */
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address
// OBSOLETE and produces the frame's chain-pointer.
// OBSOLETE
// OBSOLETE However, if FRAME_CHAIN_VALID returns zero,
// OBSOLETE it means the given frame is the outermost one and has no caller. */
// OBSOLETE
// OBSOLETE /* We cache information about saved registers in the frame structure,
// OBSOLETE to save us from having to re-scan function prologues every time
// OBSOLETE a register in a non-current frame is accessed. */
// OBSOLETE
// OBSOLETE #define EXTRA_FRAME_INFO \
// OBSOLETE struct frame_saved_regs *fsr; \
// OBSOLETE CORE_ADDR arg_pointer;
// OBSOLETE
// OBSOLETE /* Zero the frame_saved_regs pointer when the frame is initialized,
// OBSOLETE so that FRAME_FIND_SAVED_REGS () will know to allocate and
// OBSOLETE initialize a frame_saved_regs struct the first time it is called.
// OBSOLETE Set the arg_pointer to -1, which is not valid; 0 and other values
// OBSOLETE indicate real, cached values. */
// OBSOLETE
// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
// OBSOLETE ((fi)->fsr = 0, (fi)->arg_pointer = -1)
// OBSOLETE
// OBSOLETE /* On the i960, we get the chain pointer by reading the PFP saved
// OBSOLETE on the stack and clearing the status bits. */
// OBSOLETE
// OBSOLETE #define FRAME_CHAIN(thisframe) \
// OBSOLETE (read_memory_integer (FRAME_FP(thisframe), 4) & ~0xf)
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
// OBSOLETE and has no caller.
// OBSOLETE
// OBSOLETE On the i960, each various target system type must define FRAME_CHAIN_VALID,
// OBSOLETE since it differs between NINDY and VxWorks, the two currently supported
// OBSOLETE targets types. We leave it undefined here. */
// OBSOLETE
// OBSOLETE
// OBSOLETE /* A macro that tells us whether the function invocation represented
// OBSOLETE by FI does not have a frame on the stack associated with it. If it
// OBSOLETE does not, FRAMELESS is set to 1, else 0. */
// OBSOLETE
// OBSOLETE CORE_ADDR leafproc_return (CORE_ADDR ip);
// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \
// OBSOLETE (leafproc_return ((FI)->pc) != 0)
// OBSOLETE
// OBSOLETE /* Note that in the i960 architecture the return pointer is saved in the
// OBSOLETE *caller's* stack frame.
// OBSOLETE
// OBSOLETE Make sure to zero low-order bits because of bug in 960CA A-step part
// OBSOLETE (instruction addresses should always be word-aligned anyway). */
// OBSOLETE
// OBSOLETE #define FRAME_SAVED_PC(frame) \
// OBSOLETE ((read_memory_integer(FRAME_CHAIN(frame)+8,4)) & ~3)
// OBSOLETE
// OBSOLETE /* On the i960, FRAME_ARGS_ADDRESS should return the value of
// OBSOLETE g14 as passed into the frame, if known. We need a function for this.
// OBSOLETE We cache this value in the frame info if we've already looked it up. */
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \
// OBSOLETE (((fi)->arg_pointer != -1)? (fi)->arg_pointer: frame_args_address (fi, 0))
// OBSOLETE extern CORE_ADDR frame_args_address (); /* i960-tdep.c */
// OBSOLETE
// OBSOLETE /* This is the same except it should return 0 when
// OBSOLETE it does not really know where the args are, rather than guessing.
// OBSOLETE This value is not cached since it is only used infrequently. */
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_ADDRESS_CORRECT(fi) (frame_args_address (fi, 1))
// OBSOLETE
// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
// OBSOLETE
// OBSOLETE /* Set NUMARGS to the number of args passed to a frame.
// OBSOLETE Can return -1, meaning no way to tell. */
// OBSOLETE
// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
// OBSOLETE
// OBSOLETE /* Return number of bytes at start of arglist that are not really args. */
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_SKIP 0
// OBSOLETE
// OBSOLETE /* Produce the positions of the saved registers in a stack frame. */
// OBSOLETE
// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
// OBSOLETE frame_find_saved_regs (frame_info_addr, &sr)
// OBSOLETE extern void frame_find_saved_regs (); /* See i960-tdep.c */
// OBSOLETE
// OBSOLETE /* Things needed for making calls to functions in the inferior process */
// OBSOLETE
// OBSOLETE /* Push an empty stack frame, to record the current ip, etc.
// OBSOLETE
// OBSOLETE Not (yet?) implemented for i960. */
// OBSOLETE
// OBSOLETE #define PUSH_DUMMY_FRAME \
// OBSOLETE error("Function calls into the inferior process are not supported on the i960")
// OBSOLETE
// OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. */
// OBSOLETE
// OBSOLETE
// OBSOLETE void i960_pop_frame (void);
// OBSOLETE #define POP_FRAME \
// OBSOLETE i960_pop_frame ()
// OBSOLETE
// OBSOLETE
// OBSOLETE /* This sequence of words is the instructions
// OBSOLETE
// OBSOLETE callx 0x00000000
// OBSOLETE fmark
// OBSOLETE */
// OBSOLETE
// OBSOLETE /* #define CALL_DUMMY { 0x86003000, 0x00000000, 0x66003e00 } */
// OBSOLETE
// OBSOLETE /* #define CALL_DUMMY_START_OFFSET 0 *//* Start execution at beginning of dummy */
// OBSOLETE
// OBSOLETE /* Indicate that we don't support calling inferior child functions. */
// OBSOLETE
// OBSOLETE #undef CALL_DUMMY
// OBSOLETE
// OBSOLETE /* Insert the specified number of args and function address
// OBSOLETE into a call sequence of the above form stored at 'dummyname'.
// OBSOLETE
// OBSOLETE Ignore arg count on i960. */
// OBSOLETE
// OBSOLETE /* #define FIX_CALL_DUMMY(dummyname, fun, nargs) *(((int *)dummyname)+1) = fun */
// OBSOLETE
// OBSOLETE #undef FIX_CALL_DUMMY
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Interface definitions for kernel debugger KDB */
// OBSOLETE /* (Not relevant to i960.) */

View File

@ -1,69 +1,69 @@
/* Parameters for Intel 960 running MON960 monitor, for GDB, the GNU debugger.
Copyright 1990, 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
Contributed by Intel Corporation and 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. */
/*****************************************************************************
* Definitions to target GDB to an i960 debugged over a serial line.
******************************************************************************/
#include "i960/tm-i960.h"
/* forward declarations */
struct frame_info;
/* redefined from tm-i960.h */
/* Number of machine registers */
#undef NUM_REGS
#define NUM_REGS 40
/* Initializer for an array of names of registers.
There should be NUM_REGS strings in this initializer. */
#undef REGISTER_NAMES
#define REGISTER_NAMES { \
/* 0 */ "pfp", "sp", "rip", "r3", "r4", "r5", "r6", "r7", \
/* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",\
/* 16 */ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
/* 24 */ "g8", "g9", "g10", "g11", "g12", "g13", "g14", "fp", \
/* 32 */ "pc", "ac", "tc", "ip", "fp0", "fp1", "fp2", "fp3",\
}
/* Override the standard gdb prompt when compiled for this target. */
#define DEFAULT_PROMPT "(gdb960) "
/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
and has no caller.
On the i960, each various target system type defines FRAME_CHAIN_VALID,
since it differs between Nindy, Mon960 and VxWorks, the currently supported
target types. */
extern int mon960_frame_chain_valid (CORE_ADDR, struct frame_info *);
#define FRAME_CHAIN_VALID(chain, thisframe) mon960_frame_chain_valid (chain, thisframe)
/* Sequence of bytes for breakpoint instruction */
#define BREAKPOINT {0x00, 0x3e, 0x00, 0x66}
/* Amount ip must be decremented by after a breakpoint.
* This is often the number of bytes in BREAKPOINT but not always.
*/
#define DECR_PC_AFTER_BREAK 4
// OBSOLETE /* Parameters for Intel 960 running MON960 monitor, for GDB, the GNU debugger.
// OBSOLETE Copyright 1990, 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
// OBSOLETE Contributed by Intel Corporation and Cygnus Support.
// OBSOLETE
// OBSOLETE This file is part of GDB.
// OBSOLETE
// OBSOLETE This program is free software; you can redistribute it and/or modify
// OBSOLETE it under the terms of the GNU General Public License as published by
// OBSOLETE the Free Software Foundation; either version 2 of the License, or
// OBSOLETE (at your option) any later version.
// OBSOLETE
// OBSOLETE This program is distributed in the hope that it will be useful,
// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// OBSOLETE GNU General Public License for more details.
// OBSOLETE
// OBSOLETE You should have received a copy of the GNU General Public License
// OBSOLETE along with this program; if not, write to the Free Software
// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
// OBSOLETE Boston, MA 02111-1307, USA. */
// OBSOLETE
// OBSOLETE /*****************************************************************************
// OBSOLETE * Definitions to target GDB to an i960 debugged over a serial line.
// OBSOLETE ******************************************************************************/
// OBSOLETE
// OBSOLETE #include "i960/tm-i960.h"
// OBSOLETE
// OBSOLETE /* forward declarations */
// OBSOLETE struct frame_info;
// OBSOLETE
// OBSOLETE /* redefined from tm-i960.h */
// OBSOLETE /* Number of machine registers */
// OBSOLETE #undef NUM_REGS
// OBSOLETE #define NUM_REGS 40
// OBSOLETE
// OBSOLETE /* Initializer for an array of names of registers.
// OBSOLETE There should be NUM_REGS strings in this initializer. */
// OBSOLETE #undef REGISTER_NAMES
// OBSOLETE #define REGISTER_NAMES { \
// OBSOLETE /* 0 */ "pfp", "sp", "rip", "r3", "r4", "r5", "r6", "r7", \
// OBSOLETE /* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",\
// OBSOLETE /* 16 */ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
// OBSOLETE /* 24 */ "g8", "g9", "g10", "g11", "g12", "g13", "g14", "fp", \
// OBSOLETE /* 32 */ "pc", "ac", "tc", "ip", "fp0", "fp1", "fp2", "fp3",\
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Override the standard gdb prompt when compiled for this target. */
// OBSOLETE
// OBSOLETE #define DEFAULT_PROMPT "(gdb960) "
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
// OBSOLETE and has no caller.
// OBSOLETE
// OBSOLETE On the i960, each various target system type defines FRAME_CHAIN_VALID,
// OBSOLETE since it differs between Nindy, Mon960 and VxWorks, the currently supported
// OBSOLETE target types. */
// OBSOLETE
// OBSOLETE extern int mon960_frame_chain_valid (CORE_ADDR, struct frame_info *);
// OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) mon960_frame_chain_valid (chain, thisframe)
// OBSOLETE
// OBSOLETE /* Sequence of bytes for breakpoint instruction */
// OBSOLETE
// OBSOLETE #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66}
// OBSOLETE
// OBSOLETE /* Amount ip must be decremented by after a breakpoint.
// OBSOLETE * This is often the number of bytes in BREAKPOINT but not always.
// OBSOLETE */
// OBSOLETE
// OBSOLETE #define DECR_PC_AFTER_BREAK 4

View File

@ -1,106 +1,106 @@
/* Parameters for Intel 960 running NINDY monitor, for GDB, the GNU debugger.
Copyright 1990, 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
Contributed by Intel Corporation and 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. */
/*****************************************************************************
* Definitions to target GDB to an i960 debugged over a serial line.
******************************************************************************/
#include "i960/tm-i960.h"
/* forward declarations */
struct frame_info;
/* Override the standard gdb prompt when compiled for this target. */
#define DEFAULT_PROMPT "(gdb960) "
/* Additional command line options accepted by nindy gdb's, for handling
the remote-nindy.c interface. These should really be target-specific
rather than architecture-specific. */
extern int nindy_old_protocol; /* nonzero if old NINDY serial protocol */
extern int nindy_initial_brk; /* Send a BREAK to reset board first */
extern char *nindy_ttyname; /* Name of serial port to talk to nindy */
#define ADDITIONAL_OPTIONS \
{"O", no_argument, &nindy_old_protocol, 1}, \
{"brk", no_argument, &nindy_initial_brk, 1}, \
{"ser", required_argument, 0, 1004}, /* 1004 is magic cookie for ADDL_CASES */
#define ADDITIONAL_OPTION_CASES \
case 1004: /* -ser option: remote nindy auto-start */ \
nindy_ttyname = optarg; \
break;
#define ADDITIONAL_OPTION_HELP \
"\
-O Use old protocol to talk to a Nindy target\n\
-brk Send a break to a Nindy target to reset it.\n\
-ser SERIAL Open remote Nindy session to SERIAL port.\n\
"
/* If specified on the command line, open tty for talking to nindy,
and download the executable file if one was specified. */
extern void nindy_open (char *name, int from_tty);
#define ADDITIONAL_OPTION_HANDLER \
if (nindy_ttyname != NULL) \
{ \
if (catch_command_errors (nindy_open, nindy_ttyname, \
!batch, RETURN_MASK_ALL)) \
{ \
if (execarg != NULL) \
catch_command_errors (target_load, execarg, !batch, \
RETURN_MASK_ALL); \
} \
}
/* If configured for i960 target, we take control before main loop
and demand that we configure for a nindy target. */
#define BEFORE_MAIN_LOOP_HOOK \
nindy_before_main_loop();
extern void
nindy_before_main_loop (); /* In remote-nindy.c */
/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
and has no caller.
On the i960, each various target system type defines FRAME_CHAIN_VALID,
since it differs between NINDY and VxWorks, the two currently supported
targets types. */
extern int nindy_frame_chain_valid (CORE_ADDR, struct frame_info *);
#define FRAME_CHAIN_VALID(chain, thisframe) nindy_frame_chain_valid (chain, thisframe)
extern int
nindy_frame_chain_valid (); /* See nindy-tdep.c */
/* Sequence of bytes for breakpoint instruction */
#define BREAKPOINT {0x00, 0x3e, 0x00, 0x66}
/* Amount ip must be decremented by after a breakpoint.
* This is often the number of bytes in BREAKPOINT but not always.
*/
#define DECR_PC_AFTER_BREAK 0
// OBSOLETE /* Parameters for Intel 960 running NINDY monitor, for GDB, the GNU debugger.
// OBSOLETE Copyright 1990, 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
// OBSOLETE Contributed by Intel Corporation and Cygnus Support.
// OBSOLETE
// OBSOLETE This file is part of GDB.
// OBSOLETE
// OBSOLETE This program is free software; you can redistribute it and/or modify
// OBSOLETE it under the terms of the GNU General Public License as published by
// OBSOLETE the Free Software Foundation; either version 2 of the License, or
// OBSOLETE (at your option) any later version.
// OBSOLETE
// OBSOLETE This program is distributed in the hope that it will be useful,
// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// OBSOLETE GNU General Public License for more details.
// OBSOLETE
// OBSOLETE You should have received a copy of the GNU General Public License
// OBSOLETE along with this program; if not, write to the Free Software
// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
// OBSOLETE Boston, MA 02111-1307, USA. */
// OBSOLETE
// OBSOLETE /*****************************************************************************
// OBSOLETE * Definitions to target GDB to an i960 debugged over a serial line.
// OBSOLETE ******************************************************************************/
// OBSOLETE
// OBSOLETE #include "i960/tm-i960.h"
// OBSOLETE
// OBSOLETE /* forward declarations */
// OBSOLETE struct frame_info;
// OBSOLETE
// OBSOLETE /* Override the standard gdb prompt when compiled for this target. */
// OBSOLETE
// OBSOLETE #define DEFAULT_PROMPT "(gdb960) "
// OBSOLETE
// OBSOLETE /* Additional command line options accepted by nindy gdb's, for handling
// OBSOLETE the remote-nindy.c interface. These should really be target-specific
// OBSOLETE rather than architecture-specific. */
// OBSOLETE
// OBSOLETE extern int nindy_old_protocol; /* nonzero if old NINDY serial protocol */
// OBSOLETE extern int nindy_initial_brk; /* Send a BREAK to reset board first */
// OBSOLETE extern char *nindy_ttyname; /* Name of serial port to talk to nindy */
// OBSOLETE
// OBSOLETE #define ADDITIONAL_OPTIONS \
// OBSOLETE {"O", no_argument, &nindy_old_protocol, 1}, \
// OBSOLETE {"brk", no_argument, &nindy_initial_brk, 1}, \
// OBSOLETE {"ser", required_argument, 0, 1004}, /* 1004 is magic cookie for ADDL_CASES */
// OBSOLETE
// OBSOLETE #define ADDITIONAL_OPTION_CASES \
// OBSOLETE case 1004: /* -ser option: remote nindy auto-start */ \
// OBSOLETE nindy_ttyname = optarg; \
// OBSOLETE break;
// OBSOLETE
// OBSOLETE #define ADDITIONAL_OPTION_HELP \
// OBSOLETE "\
// OBSOLETE -O Use old protocol to talk to a Nindy target\n\
// OBSOLETE -brk Send a break to a Nindy target to reset it.\n\
// OBSOLETE -ser SERIAL Open remote Nindy session to SERIAL port.\n\
// OBSOLETE "
// OBSOLETE
// OBSOLETE /* If specified on the command line, open tty for talking to nindy,
// OBSOLETE and download the executable file if one was specified. */
// OBSOLETE
// OBSOLETE extern void nindy_open (char *name, int from_tty);
// OBSOLETE #define ADDITIONAL_OPTION_HANDLER \
// OBSOLETE if (nindy_ttyname != NULL) \
// OBSOLETE { \
// OBSOLETE if (catch_command_errors (nindy_open, nindy_ttyname, \
// OBSOLETE !batch, RETURN_MASK_ALL)) \
// OBSOLETE { \
// OBSOLETE if (execarg != NULL) \
// OBSOLETE catch_command_errors (target_load, execarg, !batch, \
// OBSOLETE RETURN_MASK_ALL); \
// OBSOLETE } \
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* If configured for i960 target, we take control before main loop
// OBSOLETE and demand that we configure for a nindy target. */
// OBSOLETE
// OBSOLETE #define BEFORE_MAIN_LOOP_HOOK \
// OBSOLETE nindy_before_main_loop();
// OBSOLETE
// OBSOLETE extern void
// OBSOLETE nindy_before_main_loop (); /* In remote-nindy.c */
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
// OBSOLETE and has no caller.
// OBSOLETE
// OBSOLETE On the i960, each various target system type defines FRAME_CHAIN_VALID,
// OBSOLETE since it differs between NINDY and VxWorks, the two currently supported
// OBSOLETE targets types. */
// OBSOLETE
// OBSOLETE extern int nindy_frame_chain_valid (CORE_ADDR, struct frame_info *);
// OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) nindy_frame_chain_valid (chain, thisframe)
// OBSOLETE
// OBSOLETE extern int
// OBSOLETE nindy_frame_chain_valid (); /* See nindy-tdep.c */
// OBSOLETE
// OBSOLETE /* Sequence of bytes for breakpoint instruction */
// OBSOLETE
// OBSOLETE #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66}
// OBSOLETE
// OBSOLETE /* Amount ip must be decremented by after a breakpoint.
// OBSOLETE * This is often the number of bytes in BREAKPOINT but not always.
// OBSOLETE */
// OBSOLETE
// OBSOLETE #define DECR_PC_AFTER_BREAK 0

View File

@ -1,52 +1,52 @@
/* Parameters for VxWorks Intel 960's, for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998, 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 "i960/tm-i960.h"
#include "config/tm-vxworks.h"
/* Under VxWorks the IP isn't filled in. Skip it, go with RIP, which has
the real value. */
#undef PC_REGNUM
#define PC_REGNUM RIP_REGNUM
/* We have more complex, useful breakpoints on the target.
Amount ip must be decremented by after a breakpoint. */
#define DECR_PC_AFTER_BREAK 0
/* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
/* Breakpoint patching is handled at the target end in VxWorks. */
/* #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66} */
/* Number of registers in a ptrace_getregs call. */
#define VX_NUM_REGS (16 + 16 + 3)
/* Number of registers in a ptrace_getfpregs call. */
/* @@ Can't use this -- the rdb library for the 960 target
doesn't support setting or retrieving FP regs. KR */
/* #define VX_SIZE_FPREGS (REGISTER_RAW_SIZE (FP0_REGNUM) * 4) */
// OBSOLETE /* Parameters for VxWorks Intel 960's, for GDB, the GNU debugger.
// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998, 1999
// OBSOLETE Free Software Foundation, Inc.
// OBSOLETE Contributed by Cygnus Support.
// OBSOLETE
// OBSOLETE This file is part of GDB.
// OBSOLETE
// OBSOLETE This program is free software; you can redistribute it and/or modify
// OBSOLETE it under the terms of the GNU General Public License as published by
// OBSOLETE the Free Software Foundation; either version 2 of the License, or
// OBSOLETE (at your option) any later version.
// OBSOLETE
// OBSOLETE This program is distributed in the hope that it will be useful,
// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// OBSOLETE GNU General Public License for more details.
// OBSOLETE
// OBSOLETE You should have received a copy of the GNU General Public License
// OBSOLETE along with this program; if not, write to the Free Software
// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
// OBSOLETE Boston, MA 02111-1307, USA. */
// OBSOLETE
// OBSOLETE #include "i960/tm-i960.h"
// OBSOLETE #include "config/tm-vxworks.h"
// OBSOLETE
// OBSOLETE /* Under VxWorks the IP isn't filled in. Skip it, go with RIP, which has
// OBSOLETE the real value. */
// OBSOLETE #undef PC_REGNUM
// OBSOLETE #define PC_REGNUM RIP_REGNUM
// OBSOLETE
// OBSOLETE /* We have more complex, useful breakpoints on the target.
// OBSOLETE Amount ip must be decremented by after a breakpoint. */
// OBSOLETE
// OBSOLETE #define DECR_PC_AFTER_BREAK 0
// OBSOLETE
// OBSOLETE /* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
// OBSOLETE
// OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
// OBSOLETE
// OBSOLETE /* Breakpoint patching is handled at the target end in VxWorks. */
// OBSOLETE /* #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66} */
// OBSOLETE
// OBSOLETE /* Number of registers in a ptrace_getregs call. */
// OBSOLETE
// OBSOLETE #define VX_NUM_REGS (16 + 16 + 3)
// OBSOLETE
// OBSOLETE /* Number of registers in a ptrace_getfpregs call. */
// OBSOLETE
// OBSOLETE /* @@ Can't use this -- the rdb library for the 960 target
// OBSOLETE doesn't support setting or retrieving FP regs. KR */
// OBSOLETE
// OBSOLETE /* #define VX_SIZE_FPREGS (REGISTER_RAW_SIZE (FP0_REGNUM) * 4) */

View File

@ -1,6 +1,6 @@
# Target: VxWorks running on an Intel 960
TDEPFILES= i960-tdep.o remote-vx.o remote-vx960.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
TM_FILE= tm-vx960.h
# Define this for the vx-share routines, which don't see param.h.
MT_CFLAGS= -DI80960
# OBSOLETE # Target: VxWorks running on an Intel 960
# OBSOLETE TDEPFILES= i960-tdep.o remote-vx.o remote-vx960.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
# OBSOLETE TM_FILE= tm-vx960.h
# OBSOLETE
# OBSOLETE # Define this for the vx-share routines, which don't see param.h.
# OBSOLETE MT_CFLAGS= -DI80960

View File

@ -120,13 +120,13 @@ i[3456]86-*-cygwin*) gdb_target=cygwin ;;
i[3456]86-*-vxworks*) gdb_target=vxworks ;;
i[3456]86-*-*) gdb_target=embed ;;
i960-*-bout*) gdb_target=vxworks960 ;;
i960-nindy-coff*) gdb_target=nindy960 ;;
i960-*-coff*) gdb_target=mon960 ;;
i960-nindy-elf*) gdb_target=nindy960 ;;
i960-*-elf*) gdb_target=mon960 ;;
i960-*-nindy*) gdb_target=nindy960 ;;
i960-*-vxworks*) gdb_target=vxworks960 ;;
# OBSOLETE i960-*-bout*) gdb_target=vxworks960 ;;
# OBSOLETE i960-nindy-coff*) gdb_target=nindy960 ;;
# OBSOLETE i960-*-coff*) gdb_target=mon960 ;;
# OBSOLETE i960-nindy-elf*) gdb_target=nindy960 ;;
# OBSOLETE i960-*-elf*) gdb_target=mon960 ;;
# OBSOLETE i960-*-nindy*) gdb_target=nindy960 ;;
# OBSOLETE i960-*-vxworks*) gdb_target=vxworks960 ;;
ia64-*-aix*) gdb_target=aix ;;
ia64-*-linux*) gdb_target=linux

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,351 +1,351 @@
/* Remote debugging with the XLNT Designs, Inc (XDI) NetROM.
Copyright 1990, 1991, 1992, 1995, 1998, 1999, 2000
Free Software Foundation, Inc.
Contributed by:
Roger Moyers
XLNT Designs, Inc.
15050 Avenue of Science, Suite 106
San Diego, CA 92128
(619)487-9320
roger@xlnt.com
Adapted from work done at Cygnus Support in remote-nindy.c,
later merged in by Stan Shebs at Cygnus.
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 "defs.h"
#include "gdbcmd.h"
#include "serial.h"
#include "target.h"
/* Default ports used to talk with the NetROM. */
#define DEFAULT_NETROM_LOAD_PORT 1236
#define DEFAULT_NETROM_CONTROL_PORT 1237
static void nrom_close (int quitting);
/* New commands. */
static void nrom_passthru (char *, int);
/* We talk to the NetROM over these sockets. */
static struct serial *load_desc = NULL;
static struct serial *ctrl_desc = NULL;
static int load_port = DEFAULT_NETROM_LOAD_PORT;
static int control_port = DEFAULT_NETROM_CONTROL_PORT;
static char nrom_hostname[100];
/* Forward data declaration. */
extern struct target_ops nrom_ops;
/* Scan input from the remote system, until STRING is found. Print chars that
don't match. */
static int
expect (char *string)
{
char *p = string;
int c;
immediate_quit++;
while (1)
{
c = serial_readchar (ctrl_desc, 5);
if (c == *p++)
{
if (*p == '\0')
{
immediate_quit--;
return 0;
}
}
else
{
fputc_unfiltered (c, gdb_stdout);
p = string;
if (c == *p)
p++;
}
}
}
static void
nrom_kill (void)
{
nrom_close (0);
}
static struct serial *
open_socket (char *name, int port)
{
char sockname[100];
struct serial *desc;
sprintf (sockname, "%s:%d", name, port);
desc = serial_open (sockname);
if (!desc)
perror_with_name (sockname);
return desc;
}
static void
load_cleanup (void)
{
serial_close (load_desc);
load_desc = NULL;
}
/* Download a file specified in ARGS to the netROM. */
static void
nrom_load (char *args, int fromtty)
{
int fd, rd_amt, fsize;
bfd *pbfd;
asection *section;
char *downloadstring = "download 0\n";
struct cleanup *old_chain;
/* Tell the netrom to get ready to download. */
if (serial_write (ctrl_desc, downloadstring, strlen (downloadstring)))
error ("nrom_load: control_send() of `%s' failed", downloadstring);
expect ("Waiting for a connection...\n");
load_desc = open_socket (nrom_hostname, load_port);
old_chain = make_cleanup (load_cleanup, 0);
pbfd = bfd_openr (args, 0);
if (pbfd)
{
make_cleanup (bfd_close, pbfd);
if (!bfd_check_format (pbfd, bfd_object))
error ("\"%s\": not in executable format: %s",
args, bfd_errmsg (bfd_get_error ()));
for (section = pbfd->sections; section; section = section->next)
{
if (bfd_get_section_flags (pbfd, section) & SEC_ALLOC)
{
bfd_vma section_address;
unsigned long section_size;
const char *section_name;
section_name = bfd_get_section_name (pbfd, section);
section_address = bfd_get_section_vma (pbfd, section);
section_size = bfd_section_size (pbfd, section);
if (bfd_get_section_flags (pbfd, section) & SEC_LOAD)
{
file_ptr fptr;
printf_filtered ("[Loading section %s at %x (%d bytes)]\n",
section_name, section_address,
section_size);
fptr = 0;
while (section_size > 0)
{
char buffer[1024];
int count;
count = min (section_size, 1024);
bfd_get_section_contents (pbfd, section, buffer, fptr,
count);
serial_write (load_desc, buffer, count);
section_address += count;
fptr += count;
section_size -= count;
}
}
else
/* BSS and such */
{
printf_filtered ("[section %s: not loading]\n",
section_name);
}
}
}
}
else
error ("\"%s\": Could not open", args);
do_cleanups (old_chain);
}
/* Open a connection to the remote NetROM devices. */
static void
nrom_open (char *name, int from_tty)
{
int errn;
if (!name || strchr (name, '/') || strchr (name, ':'))
error (
"To open a NetROM connection, you must specify the hostname\n\
or IP address of the NetROM device you wish to use.");
strcpy (nrom_hostname, name);
target_preopen (from_tty);
unpush_target (&nrom_ops);
ctrl_desc = open_socket (nrom_hostname, control_port);
push_target (&nrom_ops);
if (from_tty)
printf_filtered ("Connected to NetROM device \"%s\"\n", nrom_hostname);
}
/* Close out all files and local state before this target loses control. */
static void
nrom_close (int quitting)
{
if (load_desc)
serial_close (load_desc);
if (ctrl_desc)
serial_close (ctrl_desc);
}
/* Pass arguments directly to the NetROM. */
static void
nrom_passthru (char *args, int fromtty)
{
char buf[1024];
sprintf (buf, "%s\n", args);
if (serial_write (ctrl_desc, buf, strlen (buf)))
error ("nrom_reset: control_send() of `%s'failed", args);
}
static void
nrom_mourn (void)
{
unpush_target (&nrom_ops);
generic_mourn_inferior ();
}
/* Define the target vector. */
struct target_ops nrom_ops;
static void
init_nrom_ops (void)
{
nrom_ops.to_shortname = "nrom";
nrom_ops.to_longname = "Remote XDI `NetROM' target";
nrom_ops.to_doc = "Remote debug using a NetROM over Ethernet";
nrom_ops.to_open = nrom_open;
nrom_ops.to_close = nrom_close;
nrom_ops.to_attach = NULL;
nrom_ops.to_post_attach = NULL;
nrom_ops.to_require_attach = NULL;
nrom_ops.to_detach = NULL;
nrom_ops.to_require_detach = NULL;
nrom_ops.to_resume = NULL;
nrom_ops.to_wait = NULL;
nrom_ops.to_post_wait = NULL;
nrom_ops.to_fetch_registers = NULL;
nrom_ops.to_store_registers = NULL;
nrom_ops.to_prepare_to_store = NULL;
nrom_ops.to_xfer_memory = NULL;
nrom_ops.to_files_info = NULL;
nrom_ops.to_insert_breakpoint = NULL;
nrom_ops.to_remove_breakpoint = NULL;
nrom_ops.to_terminal_init = NULL;
nrom_ops.to_terminal_inferior = NULL;
nrom_ops.to_terminal_ours_for_output = NULL;
nrom_ops.to_terminal_ours = NULL;
nrom_ops.to_terminal_info = NULL;
nrom_ops.to_kill = nrom_kill;
nrom_ops.to_load = nrom_load;
nrom_ops.to_lookup_symbol = NULL;
nrom_ops.to_create_inferior = NULL;
nrom_ops.to_post_startup_inferior = NULL;
nrom_ops.to_acknowledge_created_inferior = NULL;
nrom_ops.to_clone_and_follow_inferior = NULL;
nrom_ops.to_post_follow_inferior_by_clone = NULL;
nrom_ops.to_insert_fork_catchpoint = NULL;
nrom_ops.to_remove_fork_catchpoint = NULL;
nrom_ops.to_insert_vfork_catchpoint = NULL;
nrom_ops.to_remove_vfork_catchpoint = NULL;
nrom_ops.to_has_forked = NULL;
nrom_ops.to_has_vforked = NULL;
nrom_ops.to_can_follow_vfork_prior_to_exec = NULL;
nrom_ops.to_post_follow_vfork = NULL;
nrom_ops.to_insert_exec_catchpoint = NULL;
nrom_ops.to_remove_exec_catchpoint = NULL;
nrom_ops.to_has_execd = NULL;
nrom_ops.to_reported_exec_events_per_exec_call = NULL;
nrom_ops.to_has_exited = NULL;
nrom_ops.to_mourn_inferior = nrom_mourn;
nrom_ops.to_can_run = NULL;
nrom_ops.to_notice_signals = 0;
nrom_ops.to_thread_alive = 0;
nrom_ops.to_stop = 0;
nrom_ops.to_pid_to_exec_file = NULL;
nrom_ops.to_stratum = download_stratum;
nrom_ops.DONT_USE = NULL;
nrom_ops.to_has_all_memory = 1;
nrom_ops.to_has_memory = 1;
nrom_ops.to_has_stack = 1;
nrom_ops.to_has_registers = 1;
nrom_ops.to_has_execution = 0;
nrom_ops.to_sections = NULL;
nrom_ops.to_sections_end = NULL;
nrom_ops.to_magic = OPS_MAGIC;
}
void
_initialize_remote_nrom (void)
{
init_nrom_ops ();
add_target (&nrom_ops);
add_show_from_set (
add_set_cmd ("nrom_load_port", no_class, var_zinteger, (char *) &load_port,
"Set the port to use for NetROM downloads\n", &setlist),
&showlist);
add_show_from_set (
add_set_cmd ("nrom_control_port", no_class, var_zinteger, (char *) &control_port,
"Set the port to use for NetROM debugger services\n", &setlist),
&showlist);
add_cmd ("nrom", no_class, nrom_passthru,
"Pass arguments as command to NetROM",
&cmdlist);
}
// OBSOLETE /* Remote debugging with the XLNT Designs, Inc (XDI) NetROM.
// OBSOLETE Copyright 1990, 1991, 1992, 1995, 1998, 1999, 2000
// OBSOLETE Free Software Foundation, Inc.
// OBSOLETE Contributed by:
// OBSOLETE Roger Moyers
// OBSOLETE XLNT Designs, Inc.
// OBSOLETE 15050 Avenue of Science, Suite 106
// OBSOLETE San Diego, CA 92128
// OBSOLETE (619)487-9320
// OBSOLETE roger@xlnt.com
// OBSOLETE Adapted from work done at Cygnus Support in remote-nindy.c,
// OBSOLETE later merged in by Stan Shebs at Cygnus.
// OBSOLETE
// OBSOLETE This file is part of GDB.
// OBSOLETE
// OBSOLETE This program is free software; you can redistribute it and/or modify
// OBSOLETE it under the terms of the GNU General Public License as published by
// OBSOLETE the Free Software Foundation; either version 2 of the License, or
// OBSOLETE (at your option) any later version.
// OBSOLETE
// OBSOLETE This program is distributed in the hope that it will be useful,
// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// OBSOLETE GNU General Public License for more details.
// OBSOLETE
// OBSOLETE You should have received a copy of the GNU General Public License
// OBSOLETE along with this program; if not, write to the Free Software
// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
// OBSOLETE Boston, MA 02111-1307, USA. */
// OBSOLETE
// OBSOLETE #include "defs.h"
// OBSOLETE #include "gdbcmd.h"
// OBSOLETE #include "serial.h"
// OBSOLETE #include "target.h"
// OBSOLETE
// OBSOLETE /* Default ports used to talk with the NetROM. */
// OBSOLETE
// OBSOLETE #define DEFAULT_NETROM_LOAD_PORT 1236
// OBSOLETE #define DEFAULT_NETROM_CONTROL_PORT 1237
// OBSOLETE
// OBSOLETE static void nrom_close (int quitting);
// OBSOLETE
// OBSOLETE /* New commands. */
// OBSOLETE
// OBSOLETE static void nrom_passthru (char *, int);
// OBSOLETE
// OBSOLETE /* We talk to the NetROM over these sockets. */
// OBSOLETE
// OBSOLETE static struct serial *load_desc = NULL;
// OBSOLETE static struct serial *ctrl_desc = NULL;
// OBSOLETE
// OBSOLETE static int load_port = DEFAULT_NETROM_LOAD_PORT;
// OBSOLETE static int control_port = DEFAULT_NETROM_CONTROL_PORT;
// OBSOLETE
// OBSOLETE static char nrom_hostname[100];
// OBSOLETE
// OBSOLETE /* Forward data declaration. */
// OBSOLETE
// OBSOLETE extern struct target_ops nrom_ops;
// OBSOLETE
// OBSOLETE /* Scan input from the remote system, until STRING is found. Print chars that
// OBSOLETE don't match. */
// OBSOLETE
// OBSOLETE static int
// OBSOLETE expect (char *string)
// OBSOLETE {
// OBSOLETE char *p = string;
// OBSOLETE int c;
// OBSOLETE
// OBSOLETE immediate_quit++;
// OBSOLETE
// OBSOLETE while (1)
// OBSOLETE {
// OBSOLETE c = serial_readchar (ctrl_desc, 5);
// OBSOLETE
// OBSOLETE if (c == *p++)
// OBSOLETE {
// OBSOLETE if (*p == '\0')
// OBSOLETE {
// OBSOLETE immediate_quit--;
// OBSOLETE return 0;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE fputc_unfiltered (c, gdb_stdout);
// OBSOLETE p = string;
// OBSOLETE if (c == *p)
// OBSOLETE p++;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_kill (void)
// OBSOLETE {
// OBSOLETE nrom_close (0);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static struct serial *
// OBSOLETE open_socket (char *name, int port)
// OBSOLETE {
// OBSOLETE char sockname[100];
// OBSOLETE struct serial *desc;
// OBSOLETE
// OBSOLETE sprintf (sockname, "%s:%d", name, port);
// OBSOLETE desc = serial_open (sockname);
// OBSOLETE if (!desc)
// OBSOLETE perror_with_name (sockname);
// OBSOLETE
// OBSOLETE return desc;
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE load_cleanup (void)
// OBSOLETE {
// OBSOLETE serial_close (load_desc);
// OBSOLETE load_desc = NULL;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Download a file specified in ARGS to the netROM. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_load (char *args, int fromtty)
// OBSOLETE {
// OBSOLETE int fd, rd_amt, fsize;
// OBSOLETE bfd *pbfd;
// OBSOLETE asection *section;
// OBSOLETE char *downloadstring = "download 0\n";
// OBSOLETE struct cleanup *old_chain;
// OBSOLETE
// OBSOLETE /* Tell the netrom to get ready to download. */
// OBSOLETE if (serial_write (ctrl_desc, downloadstring, strlen (downloadstring)))
// OBSOLETE error ("nrom_load: control_send() of `%s' failed", downloadstring);
// OBSOLETE
// OBSOLETE expect ("Waiting for a connection...\n");
// OBSOLETE
// OBSOLETE load_desc = open_socket (nrom_hostname, load_port);
// OBSOLETE
// OBSOLETE old_chain = make_cleanup (load_cleanup, 0);
// OBSOLETE
// OBSOLETE pbfd = bfd_openr (args, 0);
// OBSOLETE
// OBSOLETE if (pbfd)
// OBSOLETE {
// OBSOLETE make_cleanup (bfd_close, pbfd);
// OBSOLETE
// OBSOLETE if (!bfd_check_format (pbfd, bfd_object))
// OBSOLETE error ("\"%s\": not in executable format: %s",
// OBSOLETE args, bfd_errmsg (bfd_get_error ()));
// OBSOLETE
// OBSOLETE for (section = pbfd->sections; section; section = section->next)
// OBSOLETE {
// OBSOLETE if (bfd_get_section_flags (pbfd, section) & SEC_ALLOC)
// OBSOLETE {
// OBSOLETE bfd_vma section_address;
// OBSOLETE unsigned long section_size;
// OBSOLETE const char *section_name;
// OBSOLETE
// OBSOLETE section_name = bfd_get_section_name (pbfd, section);
// OBSOLETE section_address = bfd_get_section_vma (pbfd, section);
// OBSOLETE section_size = bfd_section_size (pbfd, section);
// OBSOLETE
// OBSOLETE if (bfd_get_section_flags (pbfd, section) & SEC_LOAD)
// OBSOLETE {
// OBSOLETE file_ptr fptr;
// OBSOLETE
// OBSOLETE printf_filtered ("[Loading section %s at %x (%d bytes)]\n",
// OBSOLETE section_name, section_address,
// OBSOLETE section_size);
// OBSOLETE
// OBSOLETE fptr = 0;
// OBSOLETE
// OBSOLETE while (section_size > 0)
// OBSOLETE {
// OBSOLETE char buffer[1024];
// OBSOLETE int count;
// OBSOLETE
// OBSOLETE count = min (section_size, 1024);
// OBSOLETE
// OBSOLETE bfd_get_section_contents (pbfd, section, buffer, fptr,
// OBSOLETE count);
// OBSOLETE
// OBSOLETE serial_write (load_desc, buffer, count);
// OBSOLETE section_address += count;
// OBSOLETE fptr += count;
// OBSOLETE section_size -= count;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else
// OBSOLETE /* BSS and such */
// OBSOLETE {
// OBSOLETE printf_filtered ("[section %s: not loading]\n",
// OBSOLETE section_name);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else
// OBSOLETE error ("\"%s\": Could not open", args);
// OBSOLETE
// OBSOLETE do_cleanups (old_chain);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Open a connection to the remote NetROM devices. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_open (char *name, int from_tty)
// OBSOLETE {
// OBSOLETE int errn;
// OBSOLETE
// OBSOLETE if (!name || strchr (name, '/') || strchr (name, ':'))
// OBSOLETE error (
// OBSOLETE "To open a NetROM connection, you must specify the hostname\n\
// OBSOLETE or IP address of the NetROM device you wish to use.");
// OBSOLETE
// OBSOLETE strcpy (nrom_hostname, name);
// OBSOLETE
// OBSOLETE target_preopen (from_tty);
// OBSOLETE
// OBSOLETE unpush_target (&nrom_ops);
// OBSOLETE
// OBSOLETE ctrl_desc = open_socket (nrom_hostname, control_port);
// OBSOLETE
// OBSOLETE push_target (&nrom_ops);
// OBSOLETE
// OBSOLETE if (from_tty)
// OBSOLETE printf_filtered ("Connected to NetROM device \"%s\"\n", nrom_hostname);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Close out all files and local state before this target loses control. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_close (int quitting)
// OBSOLETE {
// OBSOLETE if (load_desc)
// OBSOLETE serial_close (load_desc);
// OBSOLETE if (ctrl_desc)
// OBSOLETE serial_close (ctrl_desc);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Pass arguments directly to the NetROM. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_passthru (char *args, int fromtty)
// OBSOLETE {
// OBSOLETE char buf[1024];
// OBSOLETE
// OBSOLETE sprintf (buf, "%s\n", args);
// OBSOLETE if (serial_write (ctrl_desc, buf, strlen (buf)))
// OBSOLETE error ("nrom_reset: control_send() of `%s'failed", args);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_mourn (void)
// OBSOLETE {
// OBSOLETE unpush_target (&nrom_ops);
// OBSOLETE generic_mourn_inferior ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Define the target vector. */
// OBSOLETE
// OBSOLETE struct target_ops nrom_ops;
// OBSOLETE
// OBSOLETE static void
// OBSOLETE init_nrom_ops (void)
// OBSOLETE {
// OBSOLETE nrom_ops.to_shortname = "nrom";
// OBSOLETE nrom_ops.to_longname = "Remote XDI `NetROM' target";
// OBSOLETE nrom_ops.to_doc = "Remote debug using a NetROM over Ethernet";
// OBSOLETE nrom_ops.to_open = nrom_open;
// OBSOLETE nrom_ops.to_close = nrom_close;
// OBSOLETE nrom_ops.to_attach = NULL;
// OBSOLETE nrom_ops.to_post_attach = NULL;
// OBSOLETE nrom_ops.to_require_attach = NULL;
// OBSOLETE nrom_ops.to_detach = NULL;
// OBSOLETE nrom_ops.to_require_detach = NULL;
// OBSOLETE nrom_ops.to_resume = NULL;
// OBSOLETE nrom_ops.to_wait = NULL;
// OBSOLETE nrom_ops.to_post_wait = NULL;
// OBSOLETE nrom_ops.to_fetch_registers = NULL;
// OBSOLETE nrom_ops.to_store_registers = NULL;
// OBSOLETE nrom_ops.to_prepare_to_store = NULL;
// OBSOLETE nrom_ops.to_xfer_memory = NULL;
// OBSOLETE nrom_ops.to_files_info = NULL;
// OBSOLETE nrom_ops.to_insert_breakpoint = NULL;
// OBSOLETE nrom_ops.to_remove_breakpoint = NULL;
// OBSOLETE nrom_ops.to_terminal_init = NULL;
// OBSOLETE nrom_ops.to_terminal_inferior = NULL;
// OBSOLETE nrom_ops.to_terminal_ours_for_output = NULL;
// OBSOLETE nrom_ops.to_terminal_ours = NULL;
// OBSOLETE nrom_ops.to_terminal_info = NULL;
// OBSOLETE nrom_ops.to_kill = nrom_kill;
// OBSOLETE nrom_ops.to_load = nrom_load;
// OBSOLETE nrom_ops.to_lookup_symbol = NULL;
// OBSOLETE nrom_ops.to_create_inferior = NULL;
// OBSOLETE nrom_ops.to_post_startup_inferior = NULL;
// OBSOLETE nrom_ops.to_acknowledge_created_inferior = NULL;
// OBSOLETE nrom_ops.to_clone_and_follow_inferior = NULL;
// OBSOLETE nrom_ops.to_post_follow_inferior_by_clone = NULL;
// OBSOLETE nrom_ops.to_insert_fork_catchpoint = NULL;
// OBSOLETE nrom_ops.to_remove_fork_catchpoint = NULL;
// OBSOLETE nrom_ops.to_insert_vfork_catchpoint = NULL;
// OBSOLETE nrom_ops.to_remove_vfork_catchpoint = NULL;
// OBSOLETE nrom_ops.to_has_forked = NULL;
// OBSOLETE nrom_ops.to_has_vforked = NULL;
// OBSOLETE nrom_ops.to_can_follow_vfork_prior_to_exec = NULL;
// OBSOLETE nrom_ops.to_post_follow_vfork = NULL;
// OBSOLETE nrom_ops.to_insert_exec_catchpoint = NULL;
// OBSOLETE nrom_ops.to_remove_exec_catchpoint = NULL;
// OBSOLETE nrom_ops.to_has_execd = NULL;
// OBSOLETE nrom_ops.to_reported_exec_events_per_exec_call = NULL;
// OBSOLETE nrom_ops.to_has_exited = NULL;
// OBSOLETE nrom_ops.to_mourn_inferior = nrom_mourn;
// OBSOLETE nrom_ops.to_can_run = NULL;
// OBSOLETE nrom_ops.to_notice_signals = 0;
// OBSOLETE nrom_ops.to_thread_alive = 0;
// OBSOLETE nrom_ops.to_stop = 0;
// OBSOLETE nrom_ops.to_pid_to_exec_file = NULL;
// OBSOLETE nrom_ops.to_stratum = download_stratum;
// OBSOLETE nrom_ops.DONT_USE = NULL;
// OBSOLETE nrom_ops.to_has_all_memory = 1;
// OBSOLETE nrom_ops.to_has_memory = 1;
// OBSOLETE nrom_ops.to_has_stack = 1;
// OBSOLETE nrom_ops.to_has_registers = 1;
// OBSOLETE nrom_ops.to_has_execution = 0;
// OBSOLETE nrom_ops.to_sections = NULL;
// OBSOLETE nrom_ops.to_sections_end = NULL;
// OBSOLETE nrom_ops.to_magic = OPS_MAGIC;
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE _initialize_remote_nrom (void)
// OBSOLETE {
// OBSOLETE init_nrom_ops ();
// OBSOLETE add_target (&nrom_ops);
// OBSOLETE
// OBSOLETE add_show_from_set (
// OBSOLETE add_set_cmd ("nrom_load_port", no_class, var_zinteger, (char *) &load_port,
// OBSOLETE "Set the port to use for NetROM downloads\n", &setlist),
// OBSOLETE &showlist);
// OBSOLETE
// OBSOLETE add_show_from_set (
// OBSOLETE add_set_cmd ("nrom_control_port", no_class, var_zinteger, (char *) &control_port,
// OBSOLETE "Set the port to use for NetROM debugger services\n", &setlist),
// OBSOLETE &showlist);
// OBSOLETE
// OBSOLETE add_cmd ("nrom", no_class, nrom_passthru,
// OBSOLETE "Pass arguments as command to NetROM",
// OBSOLETE &cmdlist);
// OBSOLETE }

View File

@ -1,160 +1,160 @@
/* i80960-dependent portions of the RPC protocol
used with a VxWorks target
Contributed by Wind River Systems.
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 <stdio.h>
#include "defs.h"
#include "vx-share/regPacket.h"
#include "frame.h"
#include "inferior.h"
#include "target.h"
#include "gdbcore.h"
#include "command.h"
#include "symtab.h"
#include "symfile.h" /* for struct complaint */
#include "regcache.h"
#include "gdb_string.h"
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#ifdef _AIX /* IBM claims "void *malloc()" not char * */
#define malloc bogon_malloc
#endif
#include <rpc/rpc.h>
#include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
#include <netdb.h>
#include "vx-share/ptrace.h"
#include "vx-share/xdr_ptrace.h"
#include "vx-share/xdr_ld.h"
#include "vx-share/xdr_rdb.h"
#include "vx-share/dbgRpcLib.h"
/* get rid of value.h if possible */
#include <value.h>
#include <symtab.h>
/* Flag set if target has fpu */
extern int target_has_fp;
/* 960 floating point format descriptor, from "i960-tdep.c." */
extern struct ext_format ext_format_i960;
/* Generic register read/write routines in remote-vx.c. */
extern void net_read_registers ();
extern void net_write_registers ();
/* Read a register or registers from the VxWorks target.
REGNO is the register to read, or -1 for all; currently,
it is ignored. FIXME look at regno to improve efficiency. */
void
vx_read_register (int regno)
{
char i960_greg_packet[I960_GREG_PLEN];
char i960_fpreg_packet[I960_FPREG_PLEN];
/* Get general-purpose registers. When copying values into
registers [], don't assume that a location in registers []
is properly aligned for the target data type. */
net_read_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_GETREGS);
bcopy (&i960_greg_packet[I960_R_R0],
&registers[REGISTER_BYTE (R0_REGNUM)], 16 * I960_GREG_SIZE);
bcopy (&i960_greg_packet[I960_R_G0],
&registers[REGISTER_BYTE (G0_REGNUM)], 16 * I960_GREG_SIZE);
bcopy (&i960_greg_packet[I960_R_PCW],
&registers[REGISTER_BYTE (PCW_REGNUM)], sizeof (int));
bcopy (&i960_greg_packet[I960_R_ACW],
&registers[REGISTER_BYTE (ACW_REGNUM)], sizeof (int));
bcopy (&i960_greg_packet[I960_R_TCW],
&registers[REGISTER_BYTE (TCW_REGNUM)], sizeof (int));
/* If the target has floating point registers, fetch them.
Otherwise, zero the floating point register values in
registers[] for good measure, even though we might not
need to. */
if (target_has_fp)
{
net_read_registers (i960_fpreg_packet, I960_FPREG_PLEN,
PTRACE_GETFPREGS);
bcopy (&i960_fpreg_packet[I960_R_FP0],
&registers[REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
}
else
bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
/* Mark the register cache valid. */
registers_fetched ();
}
/* Store a register or registers into the VxWorks target.
REGNO is the register to store, or -1 for all; currently,
it is ignored. FIXME look at regno to improve efficiency. */
void
vx_write_register (int regno)
{
char i960_greg_packet[I960_GREG_PLEN];
char i960_fpreg_packet[I960_FPREG_PLEN];
/* Store floating-point registers. When copying values from
registers [], don't assume that a location in registers []
is properly aligned for the target data type. */
bcopy (&registers[REGISTER_BYTE (R0_REGNUM)],
&i960_greg_packet[I960_R_R0], 16 * I960_GREG_SIZE);
bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
&i960_greg_packet[I960_R_G0], 16 * I960_GREG_SIZE);
bcopy (&registers[REGISTER_BYTE (PCW_REGNUM)],
&i960_greg_packet[I960_R_PCW], sizeof (int));
bcopy (&registers[REGISTER_BYTE (ACW_REGNUM)],
&i960_greg_packet[I960_R_ACW], sizeof (int));
bcopy (&registers[REGISTER_BYTE (TCW_REGNUM)],
&i960_greg_packet[I960_R_TCW], sizeof (int));
net_write_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_SETREGS);
/* Store floating point registers if the target has them. */
if (target_has_fp)
{
bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
&i960_fpreg_packet[I960_R_FP0],
REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
net_write_registers (i960_fpreg_packet, I960_FPREG_PLEN,
PTRACE_SETFPREGS);
}
}
// OBSOLETE /* i80960-dependent portions of the RPC protocol
// OBSOLETE used with a VxWorks target
// OBSOLETE
// OBSOLETE Contributed by Wind River Systems.
// OBSOLETE
// OBSOLETE This file is part of GDB.
// OBSOLETE
// OBSOLETE This program is free software; you can redistribute it and/or modify
// OBSOLETE it under the terms of the GNU General Public License as published by
// OBSOLETE the Free Software Foundation; either version 2 of the License, or
// OBSOLETE (at your option) any later version.
// OBSOLETE
// OBSOLETE This program is distributed in the hope that it will be useful,
// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// OBSOLETE GNU General Public License for more details.
// OBSOLETE
// OBSOLETE You should have received a copy of the GNU General Public License
// OBSOLETE along with this program; if not, write to the Free Software
// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
// OBSOLETE Boston, MA 02111-1307, USA. */
// OBSOLETE
// OBSOLETE #include <stdio.h>
// OBSOLETE #include "defs.h"
// OBSOLETE
// OBSOLETE #include "vx-share/regPacket.h"
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "target.h"
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include "command.h"
// OBSOLETE #include "symtab.h"
// OBSOLETE #include "symfile.h" /* for struct complaint */
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE #include "gdb_string.h"
// OBSOLETE #include <errno.h>
// OBSOLETE #include <fcntl.h>
// OBSOLETE #include <sys/types.h>
// OBSOLETE #include <sys/time.h>
// OBSOLETE #include <sys/socket.h>
// OBSOLETE
// OBSOLETE #ifdef _AIX /* IBM claims "void *malloc()" not char * */
// OBSOLETE #define malloc bogon_malloc
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE #include <rpc/rpc.h>
// OBSOLETE #include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
// OBSOLETE #include <netdb.h>
// OBSOLETE #include "vx-share/ptrace.h"
// OBSOLETE #include "vx-share/xdr_ptrace.h"
// OBSOLETE #include "vx-share/xdr_ld.h"
// OBSOLETE #include "vx-share/xdr_rdb.h"
// OBSOLETE #include "vx-share/dbgRpcLib.h"
// OBSOLETE
// OBSOLETE /* get rid of value.h if possible */
// OBSOLETE #include <value.h>
// OBSOLETE #include <symtab.h>
// OBSOLETE
// OBSOLETE /* Flag set if target has fpu */
// OBSOLETE
// OBSOLETE extern int target_has_fp;
// OBSOLETE
// OBSOLETE /* 960 floating point format descriptor, from "i960-tdep.c." */
// OBSOLETE
// OBSOLETE extern struct ext_format ext_format_i960;
// OBSOLETE
// OBSOLETE /* Generic register read/write routines in remote-vx.c. */
// OBSOLETE
// OBSOLETE extern void net_read_registers ();
// OBSOLETE extern void net_write_registers ();
// OBSOLETE
// OBSOLETE /* Read a register or registers from the VxWorks target.
// OBSOLETE REGNO is the register to read, or -1 for all; currently,
// OBSOLETE it is ignored. FIXME look at regno to improve efficiency. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE vx_read_register (int regno)
// OBSOLETE {
// OBSOLETE char i960_greg_packet[I960_GREG_PLEN];
// OBSOLETE char i960_fpreg_packet[I960_FPREG_PLEN];
// OBSOLETE
// OBSOLETE /* Get general-purpose registers. When copying values into
// OBSOLETE registers [], don't assume that a location in registers []
// OBSOLETE is properly aligned for the target data type. */
// OBSOLETE
// OBSOLETE net_read_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_GETREGS);
// OBSOLETE
// OBSOLETE bcopy (&i960_greg_packet[I960_R_R0],
// OBSOLETE &registers[REGISTER_BYTE (R0_REGNUM)], 16 * I960_GREG_SIZE);
// OBSOLETE bcopy (&i960_greg_packet[I960_R_G0],
// OBSOLETE &registers[REGISTER_BYTE (G0_REGNUM)], 16 * I960_GREG_SIZE);
// OBSOLETE bcopy (&i960_greg_packet[I960_R_PCW],
// OBSOLETE &registers[REGISTER_BYTE (PCW_REGNUM)], sizeof (int));
// OBSOLETE bcopy (&i960_greg_packet[I960_R_ACW],
// OBSOLETE &registers[REGISTER_BYTE (ACW_REGNUM)], sizeof (int));
// OBSOLETE bcopy (&i960_greg_packet[I960_R_TCW],
// OBSOLETE &registers[REGISTER_BYTE (TCW_REGNUM)], sizeof (int));
// OBSOLETE
// OBSOLETE /* If the target has floating point registers, fetch them.
// OBSOLETE Otherwise, zero the floating point register values in
// OBSOLETE registers[] for good measure, even though we might not
// OBSOLETE need to. */
// OBSOLETE
// OBSOLETE if (target_has_fp)
// OBSOLETE {
// OBSOLETE net_read_registers (i960_fpreg_packet, I960_FPREG_PLEN,
// OBSOLETE PTRACE_GETFPREGS);
// OBSOLETE bcopy (&i960_fpreg_packet[I960_R_FP0],
// OBSOLETE &registers[REGISTER_BYTE (FP0_REGNUM)],
// OBSOLETE REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
// OBSOLETE REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
// OBSOLETE
// OBSOLETE /* Mark the register cache valid. */
// OBSOLETE
// OBSOLETE registers_fetched ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Store a register or registers into the VxWorks target.
// OBSOLETE REGNO is the register to store, or -1 for all; currently,
// OBSOLETE it is ignored. FIXME look at regno to improve efficiency. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE vx_write_register (int regno)
// OBSOLETE {
// OBSOLETE char i960_greg_packet[I960_GREG_PLEN];
// OBSOLETE char i960_fpreg_packet[I960_FPREG_PLEN];
// OBSOLETE
// OBSOLETE /* Store floating-point registers. When copying values from
// OBSOLETE registers [], don't assume that a location in registers []
// OBSOLETE is properly aligned for the target data type. */
// OBSOLETE
// OBSOLETE bcopy (&registers[REGISTER_BYTE (R0_REGNUM)],
// OBSOLETE &i960_greg_packet[I960_R_R0], 16 * I960_GREG_SIZE);
// OBSOLETE bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
// OBSOLETE &i960_greg_packet[I960_R_G0], 16 * I960_GREG_SIZE);
// OBSOLETE bcopy (&registers[REGISTER_BYTE (PCW_REGNUM)],
// OBSOLETE &i960_greg_packet[I960_R_PCW], sizeof (int));
// OBSOLETE bcopy (&registers[REGISTER_BYTE (ACW_REGNUM)],
// OBSOLETE &i960_greg_packet[I960_R_ACW], sizeof (int));
// OBSOLETE bcopy (&registers[REGISTER_BYTE (TCW_REGNUM)],
// OBSOLETE &i960_greg_packet[I960_R_TCW], sizeof (int));
// OBSOLETE
// OBSOLETE net_write_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_SETREGS);
// OBSOLETE
// OBSOLETE /* Store floating point registers if the target has them. */
// OBSOLETE
// OBSOLETE if (target_has_fp)
// OBSOLETE {
// OBSOLETE bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
// OBSOLETE &i960_fpreg_packet[I960_R_FP0],
// OBSOLETE REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
// OBSOLETE
// OBSOLETE net_write_registers (i960_fpreg_packet, I960_FPREG_PLEN,
// OBSOLETE PTRACE_SETFPREGS);
// OBSOLETE }
// OBSOLETE }