From f05bd277cf9e786c77b2a0ca9bd07cbb6ea283a7 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 9 Jul 1998 22:23:18 +0000 Subject: [PATCH] * mn10300-tdep.c (mn10300_generic_register_names): New variable. (set_machine_hook): New function. Copy the appropriate register names into reg_names. (_initialize_mn10300_tdep): Set up to call set_machine_hook. * tm-mn10300 (NUM_REGS): Bump to 32. (REGISTER_NAMES): Updated accordingly. start-sanitize-am33 * mn10300-tdep.c (am33_register_names): New variable. (mn10300_analyze_prologue): Handle regs saved by am33 prologues. * tm-mn10300.h (E0_REGNUM): Define. end-sanitize-am33 Initial am33 support. --- gdb/.Sanitize | 27 +++++++++++++++++++++++++++ gdb/ChangeLog | 15 +++++++++++++++ gdb/config/mn10300/.Sanitize | 27 +++++++++++++++++++++++++++ gdb/config/mn10300/tm-mn10300.h | 9 +++++++-- 4 files changed, 76 insertions(+), 2 deletions(-) diff --git a/gdb/.Sanitize b/gdb/.Sanitize index 9b0c0af515c..835e2f47ae1 100644 --- a/gdb/.Sanitize +++ b/gdb/.Sanitize @@ -757,6 +757,33 @@ else done fi +if ( echo $* | grep keep\-am33 > /dev/null ) ; then + for i in * ; do + if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Keeping am33 stuff in $i + fi + fi + done +else + for i in * ; do + if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Removing traces of \"am33\" from $i... + fi + cp $i new + sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/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\-d30v > /dev/null ) ; then for i in * ; do if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e46ba2fdc77..4ae49736615 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,18 @@ +Thu Jul 9 16:16:47 1998 Jeffrey A Law (law@cygnus.com) + + * mn10300-tdep.c (mn10300_generic_register_names): New variable. + (set_machine_hook): New function. Copy the appropriate register + names into reg_names. + (_initialize_mn10300_tdep): Set up to call set_machine_hook. + * tm-mn10300 (NUM_REGS): Bump to 32. + (REGISTER_NAMES): Updated accordingly. + +start-sanitize-am33 + * mn10300-tdep.c (am33_register_names): New variable. + (mn10300_analyze_prologue): Handle regs saved by am33 prologues. + * tm-mn10300.h (E0_REGNUM): Define. +end-sanitize-am33 + Tue Jul 7 7:40:13 1998 Ron Unrau * symtab.c (find_pc_sect_psymbol): allow case where textlow is 0 diff --git a/gdb/config/mn10300/.Sanitize b/gdb/config/mn10300/.Sanitize index e1bb8e9111c..7249e27aee1 100644 --- a/gdb/config/mn10300/.Sanitize +++ b/gdb/config/mn10300/.Sanitize @@ -30,4 +30,31 @@ Things-to-lose: Do-last: +if ( echo $* | grep keep\-am33 > /dev/null ) ; then + for i in * ; do + if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Keeping am33 stuff in $i + fi + fi + done +else + for i in * ; do + if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Removing traces of \"am33\" from $i... + fi + cp $i new + sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/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 + # End of file. diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h index 72dcd52cb9b..30a195cce54 100644 --- a/gdb/config/mn10300/tm-mn10300.h +++ b/gdb/config/mn10300/tm-mn10300.h @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* All registers are 32bits (phew!). */ #define REGISTER_SIZE 4 #define MAX_REGISTER_RAW_SIZE 4 -#define NUM_REGS 14 +#define NUM_REGS 32 #define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int @@ -39,7 +39,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define REGISTER_NAMES \ { "d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3", \ - "sp", "pc", "mdr", "psw", "lir", "lar" } + "sp", "pc", "mdr", "psw", "lir", "lar", "", "", \ + "", "", "", "", "", "", "", "", \ + "", "", "", "", "", "", "", "" } #define SP_REGNUM 8 #define PC_REGNUM 9 @@ -47,6 +49,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define PSW_REGNUM 11 #define LIR_REGNUM 12 #define LAR_REGNUM 13 +/* start-sanitize-am33 */ +#define E0_REGNUM 14 +/* end-sanitize-am33 */ #define FP_REGNUM 7 -- 2.30.2