aboutsummaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-09-27 21:29:30 +0000
committerTom Tromey <tromey@redhat.com>2008-09-27 21:29:30 +0000
commit5c6ce71d76dc5618b6ebfc967e5c4b99d701ef50 (patch)
treee6c4de30e9bd0ff72eaaac583d47791a25c8e9d2 /gdb/language.h
parent09be204ecc3169d95a9cb1311d495888408b3173 (diff)
downloadgdb-5c6ce71d76dc5618b6ebfc967e5c4b99d701ef50.zip
gdb-5c6ce71d76dc5618b6ebfc967e5c4b99d701ef50.tar.gz
gdb-5c6ce71d76dc5618b6ebfc967e5c4b99d701ef50.tar.bz2
gdb
* scm-lang.c (scm_language_defn): Update. * p-typeprint.c (pascal_print_typedef): New function. * p-lang.h: (pascal_print_typedef): Declare. * p-lang.c (pascal_language_defn): Update. * objc-lang.c (objc_language_defn): Update. * m2-typeprint.c (m2_print_typedef): New function. * m2-lang.h (m2_print_typedef): Declare. * m2-lang.c (m2_language_defn): Update. * language.h (_LANG_c, _LANG_m2, _LANG_fortran, _LANG_pascal): Remove. (struct language_defn) <la_print_typedef>: New field. (default_print_typedef): Declare. (LA_PRINT_TYPEDEF): New define. * language.c (unknown_language_defn): Update. (auto_language_defn): Update. (local_language_defn): Update. * jv-lang.c (java_language_defn): Update. * f-lang.c (f_language_defn): Update. * c-typeprint.c (c_print_typedef): New function. * c-lang.h (c_print_typedef): Declare. * c-lang.c (c_language_defn): Update. (cplus_language_defn): Update. (asm_language_defn): Update. (minimal_language_defn): Update. * ada-lang.c (ada_language_defn): Update. * typeprint.c (default_print_typedef): New function. gdb/doc * gdbint.texinfo (Language Support): Remove text about omitting support for a language.
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/gdb/language.h b/gdb/language.h
index 04d4da2..ba28540 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -31,14 +31,6 @@ struct frame_info;
struct expression;
struct ui_file;
-/* This used to be included to configure GDB for one or more specific
- languages. Now it is left out to configure for all of them. FIXME. */
-/* #include "lang_def.h" */
-#define _LANG_c
-#define _LANG_m2
-#define _LANG_fortran
-#define _LANG_pascal
-
#define MAX_FORTRAN_DIMS 7 /* Maximum number of F77 array dims */
/* range_mode ==
@@ -192,6 +184,13 @@ struct language_defn
void (*la_print_type) (struct type *, char *, struct ui_file *, int,
int);
+ /* Print a typedef using syntax appropriate for this language.
+ TYPE is the underlying type. NEW_SYMBOL is the symbol naming
+ the type. STREAM is the output stream on which to print. */
+
+ void (*la_print_typedef) (struct type *type, struct symbol *new_symbol,
+ struct ui_file *stream);
+
/* Print a value using syntax appropriate for this language. */
int (*la_val_print) (struct type *, const gdb_byte *, int, CORE_ADDR,
@@ -350,6 +349,9 @@ extern enum language set_language (enum language);
#define LA_PRINT_TYPE(type,varstring,stream,show,level) \
(current_language->la_print_type(type,varstring,stream,show,level))
+#define LA_PRINT_TYPEDEF(type,new_symbol,stream) \
+ (current_language->la_print_typedef(type,new_symbol,stream))
+
#define LA_VAL_PRINT(type,valaddr,offset,addr,stream,fmt,deref,recurse,pretty) \
(current_language->la_val_print(type,valaddr,offset,addr,stream,fmt,deref, \
recurse,pretty))
@@ -468,4 +470,8 @@ int language_pass_by_reference (struct type *type);
independent of this. */
int default_pass_by_reference (struct type *type);
+/* The default implementation of la_print_typedef. */
+void default_print_typedef (struct type *type, struct symbol *new_symbol,
+ struct ui_file *stream);
+
#endif /* defined (LANGUAGE_H) */