Update copyright year in most headers.
[deliverable/binutils-gdb.git] / gdb / regformats / regdat.sh
index cd59b39ff14e42ed825cfa5757188d0610ab4654..18c8189d192718ab72ffcf5eb36b93203582f8d5 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh -u
 
 # Register protocol definitions for GDB, the GNU debugger.
-# Copyright 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+# Copyright 2001, 2002, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
@@ -100,7 +100,7 @@ cat <<EOF
 
    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
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -109,9 +109,7 @@ cat <<EOF
    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.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* This file was created with the aid of \`\`regdat.sh'' and \`\`$1''.  */
 
@@ -127,6 +125,9 @@ echo
 offset=0
 i=0
 name=x
+xmltarget=x
+xmlarch=x
+xmlosabi=x
 expedite=x
 exec < $1
 while do_read
@@ -135,6 +136,15 @@ do
     name="${entry}"
     echo "struct reg regs_${name}[] = {"
     continue
+  elif test "${type}" = "xmltarget"; then
+    xmltarget="${entry}"
+    continue
+  elif test "${type}" = "xmlarch"; then
+    xmlarch="${entry}"
+    continue
+  elif test "${type}" = "osabi"; then
+    xmlosabi="${entry}"
+    continue
   elif test "${type}" = "expedite"; then
     expedite="${entry}"
     continue
@@ -151,15 +161,32 @@ done
 echo "};"
 echo
 echo "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;"
+  else
+    echo "const char *xmltarget_${name} = \"@<target>\\"
+    if test "${xmlarch}" != x; then
+      echo "<architecture>${xmlarch}</architecture>\\"
+    fi
+    if test "${xmlosabi}" != x; then
+      echo "<osabi>${xmlosabi}</osabi>\\"
+    fi
+    echo "</target>\";"
+  fi
+else
+  echo "const char *xmltarget_${name} = \"${xmltarget}\";"
+fi
 echo
 
 cat <<EOF
 void
-init_registers ()
+init_registers_${name} ()
 {
     set_register_cache (regs_${name},
                        sizeof (regs_${name}) / sizeof (regs_${name}[0]));
     gdbserver_expedite_regs = expedite_regs_${name};
+    gdbserver_xmltarget = xmltarget_${name};
 }
 EOF
 
This page took 0.0383 seconds and 4 git commands to generate.