* configure.in: Recognize v850 target.

* v850-tdep.c:  New file, NEC V850 target support.
	* config/v850/{v850.mt tm-v850.h}:  New files for NEC V850 support.
This commit is contained in:
Stu Grossman 1996-09-28 00:59:13 +00:00
parent 8b19233bfe
commit e281063162
4 changed files with 130 additions and 0 deletions

View File

@ -1,3 +1,11 @@
start-sanitize-v850
Fri Sep 27 17:43:06 1996 Stu Grossman (grossman@critters.cygnus.com)
* configure.in: Recognize v850 target.
* v850-tdep.c: New file, NEC V850 target support.
* config/v850/{v850.mt tm-v850.h}: New files for NEC V850 support.
end-sanitize-v850
Fri Sep 27 14:48:15 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* infrun.c (wait_for_inferior): Update current_line and

82
gdb/config/v850/tm-v850.h Normal file
View File

@ -0,0 +1,82 @@
/* Parameters for execution on an NEC V850 processor.
Copyright 1996
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. */
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
#define NUM_REGS 64
#define REGISTER_NAMES \
{ "r0", "r1", "r2", "sp", "gp", "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", "ep", "r31", \
\
"eipc", "eipsw", "fepc", "fepsw", "ecr", "psw", "sr6", "sr7", \
"sr8", "sr9", "sr10", "sr11", "sr12", "sr13", "sr14", "sr15", \
"sr16", "sr17", "sr18", "sr19", "sr20", "sr21", "sr22", "sr23", \
"sr24", "sr25", "sr26", "sr27", "sr28", "sr29", "sr30", "sr31" }
#define REGISTER_BYTES (NUM_REGS * 4)
#define REGISTER_SIZE 4
#define MAX_REGISTER_RAW_SIZE 4
#define SP_REGNUM 3
#define FP_REGNUM 2
#define RP_REGNUM 31
#define PC_REGNUM 32
#define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
#define REGISTER_BYTE(REG) ((REG) * 4)
#define REGISTER_VIRTUAL_SIZE(REG) 4
#define REGISTER_RAW_SIZE(REG) 4
#define MAX_REGISTER_VIRTUAL_SIZE 4
#define BREAKPOINT {0xff, 0xff}
#define FUNCTION_START_OFFSET 0
#define DECR_PC_AFTER_BREAK 0
#define POP_FRAME warning ("POP_FRAME not implemented yet!")
#define INNER_THAN <
#define FRAME_ARGS_SKIP 4
#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
#define FRAME_CHAIN(fi) (read_memory_unsigned_integer ((fi)->frame - 8, 4))
#define FRAME_SAVED_PC(fi) (read_memory_unsigned_integer((fi)->frame - 4, 4))
#define SKIP_PROLOGUE(pc) pc+=8
#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
#define FRAME_NUM_ARGS(val, fi) ((val) = -1)
#define FRAME_FIND_SAVED_REGS(fi, regaddr) warning ("FRAME_FIND_SAVED_REGS not implemented yet!")
#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) warning ("EXTRACT_RETURN_VALUE not implemented yet!")
#define STORE_RETURN_VALUE(TYPE, VALBUF) warning ("STORE_RETURN_VALUE not implemented yet!")

View File

@ -728,6 +728,8 @@ tahoe-*-*) gdb_target=tahoe ;;
vax-*-*) gdb_target=vax ;;
v850-*-*) gdb_target=v850 ;;
w65-*-*) gdb_target=w65 ;;
z8k-*-coff*) gdb_target=z8k ;;

38
gdb/v850-tdep.c Normal file
View File

@ -0,0 +1,38 @@
/* Target-dependent code for the NEC V850 for GDB, the GNU debugger.
Copyright 1986, 1996
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. */
/* ??? Support for calling functions from gdb in sparc64 is unfinished. */
#include "defs.h"
#include "frame.h"
#include "inferior.h"
#include "obstack.h"
#include "target.h"
#include "value.h"
#include "bfd.h"
#include "gdb_string.h"
#include "gdbcore.h"
void
_initialize_sparc_tdep ()
{
tm_print_insn = print_insn_v850;
}