Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: gdb/regformats/regdat.sh

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/regformats/reg-tilegx32.dat ('k') | gdb/regformats/regdef.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/regformats/regdat.sh
diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh
index 3ca57fa4bef1e1a6ea35d8dd8937a13a6a5c8f27..625612514fdd531f66f2c30d526ea0031db5f60a 100755
--- a/gdb/regformats/regdat.sh
+++ b/gdb/regformats/regdat.sh
@@ -1,7 +1,7 @@
#!/bin/sh -u
# Register protocol definitions for GDB, the GNU debugger.
-# Copyright 2001-2002, 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is part of GDB.
#
@@ -94,7 +94,7 @@ cat <<EOF
/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
/* A register protocol for GDB, the GNU debugger.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -121,6 +121,7 @@ exec > new-$2
copyright $1
echo '#include "server.h"'
echo '#include "regdef.h"'
+echo '#include "tdesc.h"'
echo
offset=0
i=0
@@ -134,7 +135,7 @@ while do_read
do
if test "${type}" = "name"; then
name="${entry}"
- echo "struct reg regs_${name}[] = {"
+ echo "static struct reg regs_${name}[] = {"
continue
elif test "${type}" = "xmltarget"; then
xmltarget="${entry}"
@@ -160,12 +161,12 @@ done
echo "};"
echo
-echo "const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };"
+echo "static const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };"
if test "${xmltarget}" = x; then
if test "${xmlarch}" = x && test "${xmlosabi}" = x; then
- echo "const char *xmltarget_${name} = 0;"
+ echo "static const char *xmltarget_${name} = 0;"
else
- echo "const char *xmltarget_${name} = \"@<target>\\"
+ echo "static const char *xmltarget_${name} = \"@<target>\\"
if test "${xmlarch}" != x; then
echo "<architecture>${xmlarch}</architecture>\\"
fi
@@ -175,18 +176,27 @@ if test "${xmltarget}" = x; then
echo "</target>\";"
fi
else
- echo "const char *xmltarget_${name} = \"${xmltarget}\";"
+ echo "static const char *xmltarget_${name} = \"${xmltarget}\";"
fi
echo
cat <<EOF
+const struct target_desc *tdesc_${name};
+
void
-init_registers_${name} ()
+init_registers_${name} (void)
{
- set_register_cache (regs_${name},
- sizeof (regs_${name}) / sizeof (regs_${name}[0]));
- gdbserver_expedite_regs = expedite_regs_${name};
- gdbserver_xmltarget = xmltarget_${name};
+ static struct target_desc tdesc_${name}_s;
+ struct target_desc *result = &tdesc_${name}_s;
+
+ result->reg_defs = regs_${name};
+ result->num_registers = sizeof (regs_${name}) / sizeof (regs_${name}[0]);
+ result->expedite_regs = expedite_regs_${name};
+ result->xmltarget = xmltarget_${name};
+
+ init_target_desc (result);
+
+ tdesc_${name} = result;
}
EOF
« no previous file with comments | « gdb/regformats/reg-tilegx32.dat ('k') | gdb/regformats/regdef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698