aboutsummaryrefslogtreecommitdiff
path: root/gdb/regformats
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/regformats')
-rwxr-xr-xgdb/regformats/regdat.sh12
-rw-r--r--gdb/regformats/regdef.h10
2 files changed, 22 insertions, 0 deletions
diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh
index eb0475e..9035b3d 100755
--- a/gdb/regformats/regdat.sh
+++ b/gdb/regformats/regdat.sh
@@ -123,6 +123,7 @@ EOF
exec > new-$2
copyright $1
echo '#include "regdef.h"'
+echo '#include "regcache.h"'
echo
offset=0
i=0
@@ -151,6 +152,17 @@ done
echo "};"
echo
echo "const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };"
+echo
+
+cat <<EOF
+void
+init_registers ()
+{
+ set_register_cache (regs_${name},
+ sizeof (regs_${name}) / sizeof (regs_${name}[0]));
+ gdbserver_expedite_regs = expedite_regs_${name};
+}
+EOF
# close things off
exec 1>&2
diff --git a/gdb/regformats/regdef.h b/gdb/regformats/regdef.h
index 17174ee..c1f862c 100644
--- a/gdb/regformats/regdef.h
+++ b/gdb/regformats/regdef.h
@@ -18,6 +18,9 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef REGDEF_H
+#define REGDEF_H
+
struct reg
{
/* The name of this register - NULL for pad entries. */
@@ -34,3 +37,10 @@ struct reg
/* The size (in bits) of the value of this register, as transmitted. */
int size;
};
+
+/* Set the current remote protocol and register cache according to the array
+ ``regs'', with ``n'' elements. */
+
+void set_register_cache (struct reg *regs, int n);
+
+#endif /* REGDEF_H */