diff options
author | Daniel Jacobowitz <dan@debian.org> | 2002-02-01 22:05:28 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2002-02-01 22:05:28 +0000 |
commit | fcfd71e7721c11233ee6bd581b4a65df80edf9f9 (patch) | |
tree | 1c7893e6460b1c90b2c84d018701c0e265d44bc3 /gdb/regformats | |
parent | 37b993d26d8720beacbce69dbbca8e1ec18bcaae (diff) | |
download | gdb-fcfd71e7721c11233ee6bd581b4a65df80edf9f9.tar.gz |
2002-02-01 Daniel Jacobowitz <drow@mvista.com>
* regformats/reg-arm.dat: New file.
* regformats/reg-i386.dat: New file.
* regformats/reg-ia64.dat: New file.
* regformats/reg-m68k.dat: New file.
* regformats/reg-mips.dat: New file.
* regformats/reg-ppc.dat: New file.
* regformats/reg-sh.dat: New file.
* regformats/regdef.h: New file.
* regformats/regdat.sh: New file.
Diffstat (limited to 'gdb/regformats')
-rw-r--r-- | gdb/regformats/reg-arm.dat | 28 | ||||
-rw-r--r-- | gdb/regformats/reg-i386.dat | 43 | ||||
-rw-r--r-- | gdb/regformats/reg-ia64.dat | 603 | ||||
-rw-r--r-- | gdb/regformats/reg-m68k.dat | 35 | ||||
-rw-r--r-- | gdb/regformats/reg-mips.dat | 112 | ||||
-rw-r--r-- | gdb/regformats/reg-ppc.dat | 76 | ||||
-rw-r--r-- | gdb/regformats/reg-sh.dat | 62 | ||||
-rwxr-xr-x | gdb/regformats/regdat.sh | 157 | ||||
-rw-r--r-- | gdb/regformats/regdef.h | 31 |
9 files changed, 1147 insertions, 0 deletions
diff --git a/gdb/regformats/reg-arm.dat b/gdb/regformats/reg-arm.dat new file mode 100644 index 00000000000..5a600258239 --- /dev/null +++ b/gdb/regformats/reg-arm.dat @@ -0,0 +1,28 @@ +name:arm +expedite:r11,sp,pc +32:r0 +32:r1 +32:r2 +32:r3 +32:r4 +32:r5 +32:r6 +32:r7 +32:r8 +32:r9 +32:r10 +32:r11 +32:r12 +32:sp +32:lr +32:pc +96:f0 +96:f1 +96:f2 +96:f3 +96:f4 +96:f5 +96:f6 +96:f7 +32:fps +32:cpsr diff --git a/gdb/regformats/reg-i386.dat b/gdb/regformats/reg-i386.dat new file mode 100644 index 00000000000..69c2d90f1fd --- /dev/null +++ b/gdb/regformats/reg-i386.dat @@ -0,0 +1,43 @@ +name:i386 +expedite:ebp,esp,eip +32:eax +32:ecx +32:edx +32:ebx +32:esp +32:ebp +32:esi +32:edi +32:eip +32:eflags +32:cs +32:ss +32:ds +32:es +32:fs +32:gs +80:st0 +80:st1 +80:st2 +80:st3 +80:st4 +80:st5 +80:st6 +80:st7 +32:fctrl +32:fstat +32:ftag +32:fiseg +32:fioff +32:foseg +32:fooff +32:fop +128:xmm0 +128:xmm1 +128:xmm2 +128:xmm3 +128:xmm4 +128:xmm5 +128:xmm6 +128:xmm7 +32:mxcsr diff --git a/gdb/regformats/reg-ia64.dat b/gdb/regformats/reg-ia64.dat new file mode 100644 index 00000000000..125902dfe8d --- /dev/null +++ b/gdb/regformats/reg-ia64.dat @@ -0,0 +1,603 @@ +name:ia64 +expedite:ip,psr,r12,bsp,cfm +64:r0 +64:r1 +64:r2 +64:r3 +64:r4 +64:r5 +64:r6 +64:r7 +64:r8 +64:r9 +64:r10 +64:r11 +64:r12 +64:r13 +64:r14 +64:r15 +64:r16 +64:r17 +64:r18 +64:r19 +64:r20 +64:r21 +64:r22 +64:r23 +64:r24 +64:r25 +64:r26 +64:r27 +64:r28 +64:r29 +64:r30 +64:r31 +64:r32 +64:r33 +64:r34 +64:r35 +64:r36 +64:r37 +64:r38 +64:r39 +64:r40 +64:r41 +64:r42 +64:r43 +64:r44 +64:r45 +64:r46 +64:r47 +64:r48 +64:r49 +64:r50 +64:r51 +64:r52 +64:r53 +64:r54 +64:r55 +64:r56 +64:r57 +64:r58 +64:r59 +64:r60 +64:r61 +64:r62 +64:r63 +64:r64 +64:r65 +64:r66 +64:r67 +64:r68 +64:r69 +64:r70 +64:r71 +64:r72 +64:r73 +64:r74 +64:r75 +64:r76 +64:r77 +64:r78 +64:r79 +64:r80 +64:r81 +64:r82 +64:r83 +64:r84 +64:r85 +64:r86 +64:r87 +64:r88 +64:r89 +64:r90 +64:r91 +64:r92 +64:r93 +64:r94 +64:r95 +64:r96 +64:r97 +64:r98 +64:r99 +64:r100 +64:r101 +64:r102 +64:r103 +64:r104 +64:r105 +64:r106 +64:r107 +64:r108 +64:r109 +64:r110 +64:r111 +64:r112 +64:r113 +64:r114 +64:r115 +64:r116 +64:r117 +64:r118 +64:r119 +64:r120 +64:r121 +64:r122 +64:r123 +64:r124 +64:r125 +64:r126 +64:r127 + +128:f0 +128:f1 +128:f2 +128:f3 +128:f4 +128:f5 +128:f6 +128:f7 +128:f8 +128:f9 +128:f10 +128:f11 +128:f12 +128:f13 +128:f14 +128:f15 +128:f16 +128:f17 +128:f18 +128:f19 +128:f20 +128:f21 +128:f22 +128:f23 +128:f24 +128:f25 +128:f26 +128:f27 +128:f28 +128:f29 +128:f30 +128:f31 +128:f32 +128:f33 +128:f34 +128:f35 +128:f36 +128:f37 +128:f38 +128:f39 +128:f40 +128:f41 +128:f42 +128:f43 +128:f44 +128:f45 +128:f46 +128:f47 +128:f48 +128:f49 +128:f50 +128:f51 +128:f52 +128:f53 +128:f54 +128:f55 +128:f56 +128:f57 +128:f58 +128:f59 +128:f60 +128:f61 +128:f62 +128:f63 +128:f64 +128:f65 +128:f66 +128:f67 +128:f68 +128:f69 +128:f70 +128:f71 +128:f72 +128:f73 +128:f74 +128:f75 +128:f76 +128:f77 +128:f78 +128:f79 +128:f80 +128:f81 +128:f82 +128:f83 +128:f84 +128:f85 +128:f86 +128:f87 +128:f88 +128:f89 +128:f90 +128:f91 +128:f92 +128:f93 +128:f94 +128:f95 +128:f96 +128:f97 +128:f98 +128:f99 +128:f100 +128:f101 +128:f102 +128:f103 +128:f104 +128:f105 +128:f106 +128:f107 +128:f108 +128:f109 +128:f110 +128:f111 +128:f112 +128:f113 +128:f114 +128:f115 +128:f116 +128:f117 +128:f118 +128:f119 +128:f120 +128:f121 +128:f122 +128:f123 +128:f124 +128:f125 +128:f126 +128:f127 + +64:p0 +64:p1 +64:p2 +64:p3 +64:p4 +64:p5 +64:p6 +64:p7 +64:p8 +64:p9 +64:p10 +64:p11 +64:p12 +64:p13 +64:p14 +64:p15 +64:p16 +64:p17 +64:p18 +64:p19 +64:p20 +64:p21 +64:p22 +64:p23 +64:p24 +64:p25 +64:p26 +64:p27 +64:p28 +64:p29 +64:p30 +64:p31 +64:p32 +64:p33 +64:p34 +64:p35 +64:p36 +64:p37 +64:p38 +64:p39 +64:p40 +64:p41 +64:p42 +64:p43 +64:p44 +64:p45 +64:p46 +64:p47 +64:p48 +64:p49 +64:p50 +64:p51 +64:p52 +64:p53 +64:p54 +64:p55 +64:p56 +64:p57 +64:p58 +64:p59 +64:p60 +64:p61 +64:p62 +64:p63 + +64:b0 +64:b1 +64:b2 +64:b3 +64:b4 +64:b5 +64:b6 +64:b7 + +64:vfp +64:vrap + +64:pr +64:ip +64:psr +64:cfm + +64:kr0 +64:kr1 +64:kr2 +64:kr3 +64:kr4 +64:kr5 +64:kr6 +64:kr7 + +64: +64: +64: +64: +64: +64: +64: +64: + +64:rsc +64:bsp +64:bspstore +64:rnat + +64: +64:fcr +64: +64: + +64:eflag +64:csd +64:ssd +64:cflg +64:fsr +64:fir +64:fdr +64: +64:ccv +64: +64: +64: +64:unat +64: +64: +64: +64:fpsr +64: +64: +64: +64:itc + +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64:pfs +64:lc +64:ec +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64: +64:nat0 +64:nat1 +64:nat2 +64:nat3 +64:nat4 +64:nat5 +64:nat6 +64:nat7 +64:nat8 +64:nat9 +64:nat10 +64:nat11 +64:nat12 +64:nat13 +64:nat14 +64:nat15 +64:nat16 +64:nat17 +64:nat18 +64:nat19 +64:nat20 +64:nat21 +64:nat22 +64:nat23 +64:nat24 +64:nat25 +64:nat26 +64:nat27 +64:nat28 +64:nat29 +64:nat30 +64:nat31 +64:nat32 +64:nat33 +64:nat34 +64:nat35 +64:nat36 +64:nat37 +64:nat38 +64:nat39 +64:nat40 +64:nat41 +64:nat42 +64:nat43 +64:nat44 +64:nat45 +64:nat46 +64:nat47 +64:nat48 +64:nat49 +64:nat50 +64:nat51 +64:nat52 +64:nat53 +64:nat54 +64:nat55 +64:nat56 +64:nat57 +64:nat58 +64:nat59 +64:nat60 +64:nat61 +64:nat62 +64:nat63 +64:nat64 +64:nat65 +64:nat66 +64:nat67 +64:nat68 +64:nat69 +64:nat70 +64:nat71 +64:nat72 +64:nat73 +64:nat74 +64:nat75 +64:nat76 +64:nat77 +64:nat78 +64:nat79 +64:nat80 +64:nat81 +64:nat82 +64:nat83 +64:nat84 +64:nat85 +64:nat86 +64:nat87 +64:nat88 +64:nat89 +64:nat90 +64:nat91 +64:nat92 +64:nat93 +64:nat94 +64:nat95 +64:nat96 +64:nat97 +64:nat98 +64:nat99 +64:nat100 +64:nat101 +64:nat102 +64:nat103 +64:nat104 +64:nat105 +64:nat106 +64:nat107 +64:nat108 +64:nat109 +64:nat110 +64:nat111 +64:nat112 +64:nat113 +64:nat114 +64:nat115 +64:nat116 +64:nat117 +64:nat118 +64:nat119 +64:nat120 +64:nat121 +64:nat122 +64:nat123 +64:nat124 +64:nat125 +64:nat126 +64:nat127 diff --git a/gdb/regformats/reg-m68k.dat b/gdb/regformats/reg-m68k.dat new file mode 100644 index 00000000000..1f0b078dd3c --- /dev/null +++ b/gdb/regformats/reg-m68k.dat @@ -0,0 +1,35 @@ +name:m68k +expedite:sp,fp,pc +32:d0 +32:d1 +32:d2 +32:d3 +32:d4 +32:d5 +32:d6 +32:d7 +32:a0 +32:a1 +32:a2 +32:a3 +32:a4 +32:a5 +32:fp +32:sp +32:ps +32:pc + +96:fp0 +96:fp1 +96:fp2 +96:fp3 +96:fp4 +96:fp5 +96:fp6 +96:fp7 + +32:fpcontrol +32:fpstatus +32:fpiaddr +32:fpcode +32:fpflags diff --git a/gdb/regformats/reg-mips.dat b/gdb/regformats/reg-mips.dat new file mode 100644 index 00000000000..7a7c8086e94 --- /dev/null +++ b/gdb/regformats/reg-mips.dat @@ -0,0 +1,112 @@ +name:mips +expedite:pc,sp +32:zero +32:at +32:v0 +32:v1 + +32:a0 +32:a1 +32:a2 +32:a3 + +32:t0 +32:t1 +32:t2 +32:t3 + +32:t4 +32:t5 +32:t6 +32:t7 + +32:s0 +32:s1 +32:s2 +32:s3 + +32:s4 +32:s5 +32:s6 +32:s7 + +32:t8 +32:t9 +32:k0 +32:k1 + +32:gp +32:sp +32:s8 +32:ra + +32:sr +32:lo +32:hi +32:bad + +32:cause +32:pc + +32:f0 +32:f1 +32:f2 +32:f3 + +32:f4 +32:f5 +32:f6 +32:f7 + +32:f8 +32:f9 +32:f10 +32:f11 + +32:f12 +32:f13 +32:f14 +32:f15 + +32:f16 +32:f17 +32:f18 +32:f19 + +32:f20 +32:f21 +32:f22 +32:f23 + +32:f24 +32:f25 +32:f26 +32:f27 + +32:f28 +32:f29 +32:f30 +32:f31 + +32:fsr +32:fir + +32:fp +32: + +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: diff --git a/gdb/regformats/reg-ppc.dat b/gdb/regformats/reg-ppc.dat new file mode 100644 index 00000000000..d915996cc01 --- /dev/null +++ b/gdb/regformats/reg-ppc.dat @@ -0,0 +1,76 @@ +name:ppc +expedite:r1,pc +32:r0 +32:r1 +32:r2 +32:r3 +32:r4 +32:r5 +32:r6 +32:r7 +32:r8 +32:r9 +32:r10 +32:r11 +32:r12 +32:r13 +32:r14 +32:r15 +32:r16 +32:r17 +32:r18 +32:r19 +32:r20 +32:r21 +32:r22 +32:r23 +32:r24 +32:r25 +32:r26 +32:r27 +32:r28 +32:r29 +32:r30 +32:r31 + +64:f0 +64:f1 +64:f2 +64:f3 +64:f4 +64:f5 +64:f6 +64:f7 +64:f8 +64:f9 +64:f10 +64:f11 +64:f12 +64:f13 +64:f14 +64:f15 +64:f16 +64:f17 +64:f18 +64:f19 +64:f20 +64:f21 +64:f22 +64:f23 +64:f24 +64:f25 +64:f26 +64:f27 +64:f28 +64:f29 +64:f30 +64:f31 + +32:pc +32:ps + +32:cr +32:lr +32:ctr +32:xer +0: diff --git a/gdb/regformats/reg-sh.dat b/gdb/regformats/reg-sh.dat new file mode 100644 index 00000000000..d670b46765b --- /dev/null +++ b/gdb/regformats/reg-sh.dat @@ -0,0 +1,62 @@ +name:sh +expedite:pc,r14,r15 +32:r0 +32:r1 +32:r2 +32:r3 +32:r4 +32:r5 +32:r6 +32:r7 +32:r8 +32:r9 +32:r10 +32:r11 +32:r12 +32:r13 +32:r14 +32:r15 +32:pc +32:pr +32:gbr +32:vbr +32:mach +32:macl +32:sr +32:fpul +32:fpscr +32:fr0 +32:fr1 +32:fr2 +32:fr3 +32:fr4 +32:fr5 +32:fr6 +32:fr7 +32:fr8 +32:fr9 +32:fr10 +32:fr11 +32:fr12 +32:fr13 +32:fr14 +32:fr15 + +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: +32: diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh new file mode 100755 index 00000000000..dc0ee65c459 --- /dev/null +++ b/gdb/regformats/regdat.sh @@ -0,0 +1,157 @@ +#!/bin/sh -u + +# Register protocol definitions for GDB, the GNU debugger. +# Copyright 2001, 2002 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. + +move_if_change () +{ + file=$1 + if test -r ${file} && cmp -s "${file}" new-"${file}" + then + echo "${file} unchanged." 1>&2 + else + mv new-"${file}" "${file}" + echo "${file} updated." 1>&2 + fi +} + +# Format of the input files +read="type entry" + +do_read () +{ + type="" + entry="" + while read line + do + if test "${line}" = "" + then + continue + elif test "${line}" = "#" -a "${comment}" = "" + then + continue + elif expr "${line}" : "#" > /dev/null + then + comment="${comment} +${line}" + else + + # The semantics of IFS varies between different SH's. Some + # treat ``::' as three fields while some treat it as just too. + # Work around this by eliminating ``::'' .... + line="`echo "${line}" | sed -e 's/::/: :/g' -e 's/::/: :/g'`" + + OFS="${IFS}" ; IFS="[:]" + eval read ${read} <<EOF +${line} +EOF + IFS="${OFS}" + + # .... and then going back through each field and strip out those + # that ended up with just that space character. + for r in ${read} + do + if eval test \"\${${r}}\" = \"\ \" + then + eval ${r}="" + fi + done + + break + fi + done + if [ -n "${type}" ] + then + true + else + false + fi +} + +if test ! -r $1; then + echo "$0: Could not open $1." 1>&2 + exit 1 +fi + +copyright () +{ +cat <<EOF +/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ + +/* A register protocol for GDB, the GNU debugger. + Copyright 2001, 2002 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. */ + +/* This file was created with the aid of \`\`regdat.sh'' and \`\`$1''. */ + +EOF +} + + +exec > new-$2 +copyright $1 +echo '#include "regdef.h"' +echo +offset=0 +i=0 +name=x +expedite=x +exec < $1 +while do_read +do + if test "${type}" = "name"; then + name="${entry}" + echo "struct reg regs_${name}[] = {" + continue + elif test "${type}" = "expedite"; then + expedite="${entry}" + continue + elif test "${name}" = x; then + echo "$0: $1 does not specify \`\`name''." 1>&2 + exit 1 + else + echo " { \"${entry}\", ${offset}, ${type} }," + offset=`expr ${offset} + ${type}` + i=`expr $i + 1` + fi +done + +echo "};" +echo +echo "const char *expedite_regs_${name} = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };" + +# close things off +exec 1>&2 +move_if_change $2 diff --git a/gdb/regformats/regdef.h b/gdb/regformats/regdef.h new file mode 100644 index 00000000000..d70a4885b24 --- /dev/null +++ b/gdb/regformats/regdef.h @@ -0,0 +1,31 @@ +/* Register protocol definition structures for the GNU Debugger + Copyright 2001, 2002 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. */ + +struct reg +{ + /* The name of this register - NULL for pad entries. */ + const char *name; + + /* The offset (in bits) of the value of this register in the buffer. */ + int offset; + + /* The size (in bits) of the value of this register, as transmitted. */ + int size; +}; |