* remote-sim.c (simulator_command): Add comment about dealing with
NULL or empty args. start-sanitize-tic80 * Makefile.in (tic80-tdep.o): Add target. * configure.tgt: Add tic80 case. * tic80-tdep.c: New file. * config/tic80/{tic80.mt, tm-tic80.h}: New files. end-sanitize-tic80
This commit is contained in:
parent
ff86eeb590
commit
12967062e4
7 changed files with 334 additions and 1 deletions
|
@ -74,6 +74,20 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
tic80_files="tic80-tdep.c"
|
||||||
|
|
||||||
|
if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
|
||||||
|
keep_these_too="${tic80_files} ${keep_these_too}"
|
||||||
|
if [ -n "${verbose}" ] ; then
|
||||||
|
echo Keeping ${tic80_files}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
lose_these_too="${tic80_files} ${lose_these_too}"
|
||||||
|
if [ -n "${verbose}" ] ; then
|
||||||
|
echo Deleting ${tic80_files}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
v850_files="v850ice.c v850-tdep.c"
|
v850_files="v850ice.c v850-tdep.c"
|
||||||
|
|
||||||
if ( echo $* | grep keep\-v850 > /dev/null ) ; then
|
if ( echo $* | grep keep\-v850 > /dev/null ) ; then
|
||||||
|
@ -615,6 +629,33 @@ else
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
|
||||||
|
for i in * ; do
|
||||||
|
if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
|
||||||
|
if [ -n "${verbose}" ] ; then
|
||||||
|
echo Keeping tic80 stuff in $i
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
for i in * ; do
|
||||||
|
if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
|
||||||
|
if [ -n "${verbose}" ] ; then
|
||||||
|
echo Removing traces of \"tic80\" from $i...
|
||||||
|
fi
|
||||||
|
cp $i new
|
||||||
|
sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
|
||||||
|
if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
|
||||||
|
if [ -n "${verbose}" ] ; then
|
||||||
|
echo Caching $i in .Recover...
|
||||||
|
fi
|
||||||
|
mv $i .Recover
|
||||||
|
fi
|
||||||
|
mv new $i
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
for i in * ; do
|
for i in * ; do
|
||||||
if test ! -d $i && (grep sanitize $i > /dev/null) ; then
|
if test ! -d $i && (grep sanitize $i > /dev/null) ; then
|
||||||
echo '***' Some mentions of Sanitize are still left in $i! 1>&2
|
echo '***' Some mentions of Sanitize are still left in $i! 1>&2
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
Sat Mar 22 16:41:35 1997 Fred Fish <fnf@cygnus.com>
|
||||||
|
|
||||||
|
* remote-sim.c (simulator_command): Add comment about dealing with
|
||||||
|
NULL or empty args.
|
||||||
|
start-sanitize-tic80
|
||||||
|
* Makefile.in (tic80-tdep.o): Add target.
|
||||||
|
* configure.tgt: Add tic80 case.
|
||||||
|
* tic80-tdep.c: New file.
|
||||||
|
* config/tic80/{tic80.mt, tm-tic80.h}: New files.
|
||||||
|
end-sanitize-tic80
|
||||||
|
|
||||||
Sat Mar 22 02:48:11 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
Sat Mar 22 02:48:11 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||||
|
|
||||||
* c-exp.y (yylex): Handle nested template parameter lists.
|
* c-exp.y (yylex): Handle nested template parameter lists.
|
||||||
|
|
5
gdb/config/tic80/tic80.mt
Normal file
5
gdb/config/tic80/tic80.mt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Target: TI TMS320C80 (MVP) processor
|
||||||
|
TDEPFILES= tic80-tdep.o
|
||||||
|
TM_FILE= tm-tic80.h
|
||||||
|
SIM_OBS = remote-sim.o
|
||||||
|
SIM = ../sim/tic80/libsim.a -lm
|
182
gdb/config/tic80/tm-tic80.h
Normal file
182
gdb/config/tic80/tm-tic80.h
Normal file
|
@ -0,0 +1,182 @@
|
||||||
|
/* Parameters for execution on a TI TMS320C80 (MVP) processor.
|
||||||
|
Copyright 1997
|
||||||
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GDB.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef TM_TIC80_H
|
||||||
|
#define TM_TIC80_H
|
||||||
|
|
||||||
|
#ifdef __STDC__ /* Forward declare structs used in prototypes */
|
||||||
|
struct frame_info;
|
||||||
|
struct type;
|
||||||
|
struct value;
|
||||||
|
struct symbol;
|
||||||
|
struct frame_saved_regs;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
|
||||||
|
|
||||||
|
#define NUM_REGS 35
|
||||||
|
|
||||||
|
#define REGISTER_NAMES \
|
||||||
|
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
|
||||||
|
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
|
||||||
|
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
|
||||||
|
"r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", \
|
||||||
|
"pc", "a0", "a1" \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Various dedicated register numbers */
|
||||||
|
|
||||||
|
#define SP_REGNUM 1 /* Contains address of top of stack */
|
||||||
|
#define FP_REGNUM 31 /* Contains address of executing stack frame */
|
||||||
|
#define PC_REGNUM 32 /* Contains program counter (FIXME?) */
|
||||||
|
#define A0_REGNUM 33 /* Accumulator register 0 */
|
||||||
|
#define A1_REGNUM 34 /* Accumulator register 1 */
|
||||||
|
|
||||||
|
/* Total amount of space needed to store our copies of the machine's
|
||||||
|
register state, the array `registers'. */
|
||||||
|
|
||||||
|
#define REGISTER_BYTES (((NUM_REGS - 2) * 4) + (2 * 8))
|
||||||
|
|
||||||
|
/* Index within `registers' of the first byte of the space for
|
||||||
|
register N. */
|
||||||
|
|
||||||
|
#define REGISTER_BYTE(N) \
|
||||||
|
(((N) > A0_REGNUM) ? (((N) - A0_REGNUM) * 8 + A0_REGNUM * 4) : ((N) * 4))
|
||||||
|
|
||||||
|
#define REGISTER_SIZE 4
|
||||||
|
|
||||||
|
/* All regs are 4 bytes. */
|
||||||
|
|
||||||
|
#define REGISTER_RAW_SIZE(N) (4)
|
||||||
|
|
||||||
|
/* Largest value REGISTER_RAW_SIZE can have. */
|
||||||
|
|
||||||
|
#define MAX_REGISTER_RAW_SIZE 4
|
||||||
|
|
||||||
|
/* All regs are 4 bytes. */
|
||||||
|
|
||||||
|
#define REGISTER_VIRTUAL_SIZE(N) (4)
|
||||||
|
|
||||||
|
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
|
||||||
|
|
||||||
|
#define MAX_REGISTER_VIRTUAL_SIZE (4)
|
||||||
|
|
||||||
|
/* Return the GDB type object for the "standard" data type
|
||||||
|
of data in register N. */
|
||||||
|
|
||||||
|
#define REGISTER_VIRTUAL_TYPE(N) /* FIXME? */ \
|
||||||
|
(((N) == A0_REGNUM || (N) == A1_REGNUM) ? builtin_type_float : builtin_type_int)
|
||||||
|
|
||||||
|
/* Offset from address of function to start of its code.
|
||||||
|
Zero on most machines. */
|
||||||
|
|
||||||
|
#define FUNCTION_START_OFFSET 0
|
||||||
|
|
||||||
|
/* Stack grows downward. */
|
||||||
|
|
||||||
|
#define INNER_THAN <
|
||||||
|
|
||||||
|
/* Sequence of bytes for breakpoint instruction.
|
||||||
|
This is padded out to the size of a machine word. */
|
||||||
|
|
||||||
|
#define BREAKPOINT {0x0, 0x0, 0x0, 0x0} /* FIXME! */
|
||||||
|
|
||||||
|
/* Amount PC 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 /* FIXME! */
|
||||||
|
|
||||||
|
/* Push an empty stack frame, to record the current PC, etc. */
|
||||||
|
|
||||||
|
#define PUSH_DUMMY_FRAME tic80_push_dummy_frame()
|
||||||
|
extern void tic80_push_dummy_frame PARAMS ((void));
|
||||||
|
|
||||||
|
/* Discard from the stack the innermost frame, restoring all registers. */
|
||||||
|
|
||||||
|
#define POP_FRAME tic80_pop_frame()
|
||||||
|
extern void tic80_pop_frame PARAMS ((void));
|
||||||
|
|
||||||
|
/* Return number of bytes at start of arglist that are not really args. */
|
||||||
|
|
||||||
|
#define FRAME_ARGS_SKIP 0
|
||||||
|
|
||||||
|
/* Set VAL to the number of args passed to frame described by FI.
|
||||||
|
Can set VAL to -1, meaning no way to tell. */
|
||||||
|
/* We can't tell how many args there are */
|
||||||
|
|
||||||
|
#define FRAME_NUM_ARGS(val,fi) (val = -1)
|
||||||
|
|
||||||
|
#define FRAME_ARGS_SKIP 0
|
||||||
|
#define FRAME_ARGS_ADDRESS(fi) (fi)->frame
|
||||||
|
#define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
|
||||||
|
|
||||||
|
/* Put here the code to store, into a struct frame_saved_regs,
|
||||||
|
the addresses of the saved registers of frame described by FRAME_INFO.
|
||||||
|
This includes special registers such as pc and fp saved in special
|
||||||
|
ways in the stack frame. sp is even more special:
|
||||||
|
the address we return for it IS the sp for the next frame. */
|
||||||
|
|
||||||
|
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
|
||||||
|
tic80_frame_find_saved_regs(frame_info, &(frame_saved_regs))
|
||||||
|
extern void tic80_frame_find_saved_regs PARAMS ((struct frame_info *, struct frame_saved_regs *));
|
||||||
|
|
||||||
|
/* Advance PC across any function entry prologue instructions
|
||||||
|
to reach some "real" code. */
|
||||||
|
|
||||||
|
#define SKIP_PROLOGUE(pc) { (pc) = tic80_skip_prologue (pc); }
|
||||||
|
extern CORE_ADDR tic80_skip_prologue PARAMS ((CORE_ADDR pc));
|
||||||
|
|
||||||
|
/* Immediately after a function call, return the saved pc.
|
||||||
|
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) tic80_saved_pc_after_call(frame)
|
||||||
|
extern CORE_ADDR tic80_saved_pc_after_call PARAMS ((struct frame_info *));
|
||||||
|
|
||||||
|
/* 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. */
|
||||||
|
|
||||||
|
#define FRAME_CHAIN(thisframe) (CORE_ADDR) tic80_frame_chain (thisframe)
|
||||||
|
extern CORE_ADDR tic80_frame_chain PARAMS ((struct frame_info *));
|
||||||
|
|
||||||
|
#define FRAME_SAVED_PC(FRAME) tic80_frame_saved_pc (FRAME)
|
||||||
|
extern CORE_ADDR tic80_frame_saved_pc PARAMS ((struct frame_info *));
|
||||||
|
|
||||||
|
/* 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. */
|
||||||
|
|
||||||
|
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
|
||||||
|
tic80_extract_return_value((TYPE), (REGBUF), (VALBUF))
|
||||||
|
extern void tic80_extract_return_value PARAMS ((struct type *, char *, char *));
|
||||||
|
|
||||||
|
/* Write into appropriate registers a function return value
|
||||||
|
of type TYPE, given in virtual format. */
|
||||||
|
|
||||||
|
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
|
||||||
|
tic80_store_return_value((TYPE), (VALBUF))
|
||||||
|
extern void tic80_store_return_value PARAMS ((struct type *, char *));
|
||||||
|
|
||||||
|
#endif /* TM_TIC80_H */
|
|
@ -253,6 +253,10 @@ sparc64-*-*) gdb_target=sp64 ;;
|
||||||
|
|
||||||
tahoe-*-*) gdb_target=tahoe ;;
|
tahoe-*-*) gdb_target=tahoe ;;
|
||||||
|
|
||||||
|
# start-sanitize-tic80
|
||||||
|
tic80-*-*) gdb_target=tic80 ;;
|
||||||
|
# end-sanitize-tic80
|
||||||
|
|
||||||
vax-*-*) gdb_target=vax ;;
|
vax-*-*) gdb_target=vax ;;
|
||||||
|
|
||||||
# start-sanitize-v850
|
# start-sanitize-v850
|
||||||
|
|
|
@ -709,7 +709,8 @@ simulator_command (args, from_tty)
|
||||||
/* Note that if the simulator hasn't been opened, gdbsim_desc == NULL
|
/* Note that if the simulator hasn't been opened, gdbsim_desc == NULL
|
||||||
which is correct (??? assuming of course one wishes to continue to
|
which is correct (??? assuming of course one wishes to continue to
|
||||||
allow commands to be sent to unopened simulators, which isn't entirely
|
allow commands to be sent to unopened simulators, which isn't entirely
|
||||||
unreasonable). */
|
unreasonable). Simulators should be prepared to deal with any
|
||||||
|
combination of NULL or empty args. */
|
||||||
sim_do_command (gdbsim_desc, args);
|
sim_do_command (gdbsim_desc, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
89
gdb/tic80-tdep.c
Normal file
89
gdb/tic80-tdep.c
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
/* Target-dependent code for the TI TMS320C80 (MVP) architecture,
|
||||||
|
for GDB, the GNU Debugger.
|
||||||
|
Copyright 1997 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GDB.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#include "defs.h"
|
||||||
|
|
||||||
|
CORE_ADDR
|
||||||
|
tic80_skip_prologue (pc)
|
||||||
|
CORE_ADDR pc;
|
||||||
|
{
|
||||||
|
error ("tic80_skip_prologue not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
|
CORE_ADDR
|
||||||
|
tic80_frame_chain (finfo)
|
||||||
|
struct frame_info *finfo;
|
||||||
|
{
|
||||||
|
error ("tic80_frame_chain not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
|
CORE_ADDR
|
||||||
|
tic80_frame_saved_pc (finfo)
|
||||||
|
struct frame_info *finfo;
|
||||||
|
{
|
||||||
|
error ("tic80_frame_saved_pc not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
|
CORE_ADDR
|
||||||
|
tic80_saved_pc_after_call (finfo)
|
||||||
|
struct frame_info *finfo;
|
||||||
|
{
|
||||||
|
error ("tic80_saved_pc_after_call not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
tic80_pop_frame ()
|
||||||
|
{
|
||||||
|
error ("tic80_pop_frame not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
tic80_store_return_value (valtype, valbuf)
|
||||||
|
struct type *valtype;
|
||||||
|
char *valbuf;
|
||||||
|
{
|
||||||
|
error ("tic80_store_return_value not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Put here the code to store, into a struct frame_saved_regs, the
|
||||||
|
addresses of the saved registers of frame described by FRAME_INFO.
|
||||||
|
This includes special registers such as pc and fp saved in special
|
||||||
|
ways in the stack frame. sp is even more special: the address we
|
||||||
|
return for it IS the sp for the next frame. */
|
||||||
|
|
||||||
|
void
|
||||||
|
tic80_frame_find_saved_regs (fi, fsr)
|
||||||
|
struct frame_info *fi;
|
||||||
|
struct frame_saved_regs *fsr;
|
||||||
|
{
|
||||||
|
error ("tic80_frame_find_saved_regs not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Given a return value in `regbuf' with a type `valtype',
|
||||||
|
extract and copy its value into `valbuf'. */
|
||||||
|
|
||||||
|
void
|
||||||
|
tic80_extract_return_value (valtype, regbuf, valbuf)
|
||||||
|
struct type *valtype;
|
||||||
|
char regbuf[REGISTER_BYTES];
|
||||||
|
char *valbuf;
|
||||||
|
{
|
||||||
|
error ("tic80_extract_return_value not implemented");
|
||||||
|
}
|
Loading…
Reference in a new issue