mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-04 16:18:18 +00:00
Hitachi SH3e, patch to make FP registers debuggable.
This commit is contained in:
parent
e1a1ddc65e
commit
a862098505
@ -459,6 +459,35 @@ else
|
||||
done
|
||||
fi
|
||||
|
||||
sh3e_files="ChangeLog"
|
||||
|
||||
if ( echo $* | grep keep\-sh3e > /dev/null ) ; then
|
||||
for i in $sh3e_files ; do
|
||||
if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
|
||||
if [ -n "${verbose}" ] ; then
|
||||
echo Keeping sh3e stuff in $i
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
for i in $sh3e_files ; do
|
||||
if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
|
||||
if [ -n "${verbose}" ] ; then
|
||||
echo Removing traces of \"sh3e\" from $i...
|
||||
fi
|
||||
cp $i new
|
||||
sed '/start\-sanitize\-sh3e/,/end-\sanitize\-sh3e/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
|
||||
if test ! -d $i && (grep sanitize $i > /dev/null) ; then
|
||||
echo '***' Some mentions of Sanitize are still left in $i! 1>&2
|
||||
|
@ -27,7 +27,35 @@ stub.c
|
||||
|
||||
Things-to-lose:
|
||||
|
||||
|
||||
Do-last:
|
||||
|
||||
sh3e_files="tm-sh.h"
|
||||
|
||||
if ( echo $* | grep keep\-sh3e > /dev/null ) ; then
|
||||
for i in $sh3e_files ; do
|
||||
if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
|
||||
if [ -n "${verbose}" ] ; then
|
||||
echo Keeping sh3e stuff in $i
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
for i in $sh3e_files ; do
|
||||
if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
|
||||
if [ -n "${verbose}" ] ; then
|
||||
echo Removing traces of \"sh3e\" from $i...
|
||||
fi
|
||||
cp $i new
|
||||
sed '/start\-sanitize\-sh3e/,/end-\sanitize\-sh3e/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.
|
||||
|
@ -99,6 +99,13 @@ extern CORE_ADDR sh_skip_prologue ();
|
||||
of data in register N. */
|
||||
|
||||
#define REGISTER_VIRTUAL_TYPE(N) builtin_type_int
|
||||
/* start-sanitize-sh3e */
|
||||
#undef REGISTER_VIRTUAL_TYPE
|
||||
#define REGISTER_VIRTUAL_TYPE(N) \
|
||||
((((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) \
|
||||
|| (N) == FPUL_REGNUM) \
|
||||
? builtin_type_float : builtin_type_int)
|
||||
/* end-sanitize-sh3e */
|
||||
|
||||
/* Initializer for an array of names of registers.
|
||||
Entries beyond the first NUM_REGS are ignored. */
|
||||
@ -107,8 +114,22 @@ extern CORE_ADDR sh_skip_prologue ();
|
||||
{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
|
||||
"r8", "r9", "r10","r11","r12","r13","r14","r15",\
|
||||
"pc", "pr","gbr","vbr","mach","macl","sr","ticks","stalls","cycles","insts" ,"plr","tlr" }
|
||||
/* start-sanitize-sh3e */
|
||||
#undef REGISTER_NAMES
|
||||
#define REGISTER_NAMES \
|
||||
{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
|
||||
"r8", "r9", "r10","r11","r12","r13","r14","r15",\
|
||||
"pc", "pr","gbr","vbr","mach","macl", "sr", "fpul", "fpscr", \
|
||||
"fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", \
|
||||
"fr8", "fr9", "fr10","fr11","fr12","fr13","fr14","fr15",\
|
||||
}
|
||||
/* end-sanitize-sh3e */
|
||||
|
||||
#define NUM_REGS 28
|
||||
/* start-sanitize-sh3e */
|
||||
#undef NUM_REGS
|
||||
#define NUM_REGS 41
|
||||
/* end-sanitize-sh3e */
|
||||
|
||||
/* Register numbers of various important registers.
|
||||
Note that some of these values are "real" register numbers,
|
||||
@ -127,7 +148,14 @@ extern CORE_ADDR sh_skip_prologue ();
|
||||
#define MACH_REGNUM 20
|
||||
#define MACL_REGNUM 21
|
||||
#define SR_REGNUM 22
|
||||
#define NUM_REALREGS 23
|
||||
#define NUM_REALREGS 23
|
||||
/* start-sanitize-sh3e */
|
||||
#define FPUL_REGNUM 23
|
||||
#define FP0_REGNUM 25
|
||||
#undef NUM_REALREGS
|
||||
#define NUM_REALREGS 41
|
||||
/* end-sanitize-sh3e */
|
||||
|
||||
/* Store the address of the place in which to copy the structure the
|
||||
subroutine will return. This is called from call_function.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user