diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/.Sanitize | 43 | ||||
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rwxr-xr-x | gdb/configure | 4 | ||||
-rw-r--r-- | gdb/configure.in | 4 | ||||
-rw-r--r-- | gdb/d10v-tdep.c | 153 |
5 files changed, 213 insertions, 0 deletions
diff --git a/gdb/.Sanitize b/gdb/.Sanitize index bb06b39..e107271 100644 --- a/gdb/.Sanitize +++ b/gdb/.Sanitize @@ -29,6 +29,20 @@ else fi fi +d10v_files="d10v-tdep.c" + +if ( echo $* | grep keep\-d10v > /dev/null ) ; then + keep_these_too="${d10v_files} ${keep_these_too}" + if [ -n "${verbose}" ] ; then + echo Keeping ${d10v_files} + fi +else + lose_these_too="${d10v_files} ${lose_these_too}" + if [ -n "${verbose}" ] ; then + echo Deleting ${d10v_files} + fi +fi + gdbtk_files="README.GDBTK gdbtk.c gdbtk.tcl" if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then @@ -469,6 +483,35 @@ else done fi +d10v_files="configure.in configure ChangeLog" + +if ( echo $* | grep keep\-d10v > /dev/null ) ; then + for i in $d10v_files ; do + if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Keeping d10v stuff in $i + fi + fi + done +else + for i in $d10v_files ; do + if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Removing traces of \"d10v\" from $i... + fi + cp $i new + sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/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 + if ( echo $* | grep keep\-gm > /dev/null ) ; then for i in * ; do if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 382b0a0..270eb69 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +start-sanitize-d10v +Mon Aug 26 18:36:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com> + + * config/d10v/d10v.mt: New file. + * config/d10v/tm-d10v.h: New file. + * configure.in: New target D10V. + * d10v-tdep.c: New file. + +end-sanitize-d10v Sun Aug 25 00:09:47 1996 Fred Fish <fnf@rtl.cygnus.com> * rs6000-tdep.c: Fix typo in comment. diff --git a/gdb/configure b/gdb/configure index 35dbadd..429ed7f 100755 --- a/gdb/configure +++ b/gdb/configure @@ -2853,6 +2853,10 @@ arm-*-*) gdb_target=arm ;; c1-*-*) gdb_target=convex ;; c2-*-*) gdb_target=convex ;; +# start-sanitize-d10v +d10v-*-*) gdb_target=d10v ;; +# end-sanitize-d10v + h8300-*-*) gdb_target=h8300 ;; h8500-*-*) gdb_target=h8500 ;; diff --git a/gdb/configure.in b/gdb/configure.in index 4045fbf..ac6c8ab 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -471,6 +471,10 @@ arm-*-*) gdb_target=arm ;; c1-*-*) gdb_target=convex ;; c2-*-*) gdb_target=convex ;; +# start-sanitize-d10v +d10v-*-*) gdb_target=d10v ;; +# end-sanitize-d10v + h8300-*-*) gdb_target=h8300 ;; h8500-*-*) gdb_target=h8500 ;; diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c new file mode 100644 index 0000000..0dc4c4d --- /dev/null +++ b/gdb/d10v-tdep.c @@ -0,0 +1,153 @@ +/* Target-dependent code for MItsubishi D10V, for GDB. + Copyright (C) 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. */ + +/* Contributed by Martin Hunt, hunt@cygnus.com */ + +#include "defs.h" +#include "frame.h" +#include "obstack.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcmd.h" +#include "gdbcore.h" +#include "value.h" +#include "inferior.h" +#include "dis-asm.h" + +void +d10v_pop_frame () +{ +} + +CORE_ADDR +d10v_skip_prologue (start_pc) + CORE_ADDR start_pc; +{ +} + +CORE_ADDR +d10v_frame_chain (frame) + struct frame_info *frame; +{ + if (!inside_entry_file (frame->pc)) + return read_memory_integer (FRAME_FP (frame) + frame->f_offset, 4); + else + return 0; +} + +/* 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 +d10v_frame_find_saved_regs (fi, fsr) + struct frame_info *fi; + struct frame_saved_regs *fsr; +{ +} + +void +d10v_init_extra_frame_info (fromleaf, fi) + int fromleaf; + struct frame_info *fi; +{ + struct frame_saved_regs dummy; + if (fi->next) + fi->pc = fi->next->return_pc; + d10v_frame_find_saved_regs (fi, &dummy); +} + +static void +show_regs (args, from_tty) + char *args; + int from_tty; +{ + long long num1, num2; + printf_filtered ("PC=%04x (0x%x) PSW=%04x RPT_S=%04x RPT_E=%04x RPT_C=%04x\n", + read_register (PC_REGNUM), read_register (PC_REGNUM) << 2, + read_register (PSW_REGNUM), + read_register (24), + read_register (25), + read_register (23)); + printf_filtered ("R0-R7 %04x %04x %04x %04x %04x %04x %04x %04x\n", + read_register (0), + read_register (1), + read_register (2), + read_register (3), + read_register (4), + read_register (5), + read_register (6), + read_register (7)); + printf_filtered ("R8-R15 %04x %04x %04x %04x %04x %04x %04x %04x\n", + read_register (8), + read_register (9), + read_register (10), + read_register (11), + read_register (12), + read_register (13), + read_register (14), + read_register (15)); + read_register_gen (A0_REGNUM, (char *)&num1); + read_register_gen (A0_REGNUM+1, (char *)&num2); + printf_filtered ("A0-A1 %010llx %010llx\n",num1, num2); +} + +void +_initialize_d10v_tdep () +{ + struct cmd_list_element *c; + tm_print_insn = print_insn_d10v; + add_com ("regs", class_vars, show_regs, "Print all registers"); +} + +CORE_ADDR +d10v_read_register_pid (regno, pid) + int regno, pid; +{ + int save_pid; + CORE_ADDR retval; + + if (pid == inferior_pid) + return (read_register(regno)) << 2; + + save_pid = inferior_pid; + inferior_pid = pid; + retval = read_register (regno); + inferior_pid = save_pid; + return (retval << 2); +} + +void +d10v_write_register_pid (regno, val, pid) + int regno; + LONGEST val; + int pid; +{ + int save_pid; + + val >>= 2; + + if (pid == inferior_pid) + { + write_register (regno, val); + return; + } + + save_pid = inferior_pid; + inferior_pid = pid; + write_register (regno, val); + inferior_pid = save_pid; +} |