doc/ChangeLog:
[deliverable/binutils-gdb.git] / gdb / language.c
index 78a72f0dbfa6aa9fc28989f9881f670703477baf..d1efac7b3e88b35227c6d041e83577b66ce9aaed 100644 (file)
@@ -1,7 +1,7 @@
 /* Multiple source language support for GDB.
 
-   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+   2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
 
    Contributed by the Department of Computer Science at the State University
    of New York at Buffalo.
@@ -20,8 +20,8 @@
 
    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.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /* This file contains functions that return things that are specific
    to languages.  Each function should examine current_language if necessary,
@@ -1057,6 +1057,17 @@ default_word_break_characters (void)
   return " \t\n!@#$%^&*()+=|~`}{[]\"';:?/>.<,-";
 }
 
+/* Print the index of array elements using the C99 syntax.  */
+
+void
+default_print_array_index (struct value *index_value, struct ui_file *stream,
+                           int format, enum val_prettyprint pretty)
+{
+  fprintf_filtered (stream, "[");
+  LA_VALUE_PRINT (index_value, stream, format, pretty);
+  fprintf_filtered (stream, "] = ");
+}
+
 /* Define the language that is no language.  */
 
 static int
@@ -1181,6 +1192,7 @@ const struct language_defn unknown_language_defn =
   NULL,
   default_word_break_characters,
   unknown_language_arch_info,  /* la_language_arch_info.  */
+  default_print_array_index,
   LANG_MAGIC
 };
 
@@ -1217,6 +1229,7 @@ const struct language_defn auto_language_defn =
   NULL,
   default_word_break_characters,
   unknown_language_arch_info,  /* la_language_arch_info.  */
+  default_print_array_index,
   LANG_MAGIC
 };
 
@@ -1252,6 +1265,7 @@ const struct language_defn local_language_defn =
   NULL,
   default_word_break_characters,
   unknown_language_arch_info,  /* la_language_arch_info.  */
+  default_print_array_index,
   LANG_MAGIC
 };
 \f
This page took 0.024692 seconds and 4 git commands to generate.