aboutsummaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1992-11-21 06:10:08 +0000
committerFred Fish <fnf@specifix.com>1992-11-21 06:10:08 +0000
commit5d074aa97723ff99cdeef26b3cf90e2095f3a566 (patch)
treee2fc7782cea920368364afebba4a2abc777e12b3 /gdb/language.h
parent242d9c06b2cc1a554f580023c9c54bc39d420e0d (diff)
downloadgdb-5d074aa97723ff99cdeef26b3cf90e2095f3a566.zip
gdb-5d074aa97723ff99cdeef26b3cf90e2095f3a566.tar.gz
gdb-5d074aa97723ff99cdeef26b3cf90e2095f3a566.tar.bz2
* defs.h (sevenbit_strings): Add declaration.
* defs.h (printchar): Replace with gdb_printchar. * language.h (language_defn): Add new function pointers la_printchar and la_printstr, to do language dependent printing of characters and strings. * language.h (local_printchar, local_printstr): New macros to call language dependent functions pointed to by la_printchar and la_printstr respectively. * c-exp.y (emit_char, c_printchar, c_printstr): New language dependent functions for printing characters and strings. * c-exp.y (c_language_defn, cplus_language_defn): Add c_printchar and c_printstr. * command.c (do_setshow_command): Rename printchar use to gdb_printchar. * expprint.c (print_subexp): Replace C style string output with call to local_printstr. * language.c (unk_lang_printchar, unk_lang_printstr): New stubs, currently errors. * language.c (unknown_language_defn, auto_language_defn, local_language_defn): Add unk_lang_printchar and unk_lang_printstr. * m2-exp.y (emit_char, m2_printchar, m2_printstr): New language dependent functions to print characters and strings. * m2-exp.y (m2_language_defn): Add m2_printchar and m2_printstr. * utils.c (printchar): Renamed to gdb_printchar. * valprint.c (print_string): Remove prototype, function moved to c-exp.y, where it becomes c_printstr. * valprint.c (print_max): Made global for reference from the language dependent printing routines in *-exp.y. * valprint.c (repeat_count_threshold): New variable with function of old REPEAT_COUNT_THREHOLD define, but now settable by user. Change all references to old macro to references to new variable. * valprint.c (value_print, val_print): Replace calls to print_string with calls to local_printstr. * valprint.c (val_print): Replace C style character printing with call to local_printchar. * valprint.c (val_print): Add case for TYPE_CODE_CHAR. * valprint.c (_initialize_valprint): Add add_show_from_set call for setting up repeat_count_threshold as print variable. **** start-sanitize-chill **** * ch-exp.y (decode_integer_value): New function. * ch-exp.y (decode_integer_literal): Use decode_integer_value. * ch-exp.y (chill_printchar, chill_printstr): New language dependent functions for printing characters and strings. * ch-exp.y (chill_language_defn): Add chill_printchar and chill_printstr. **** end-sanitize-chill ****
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/language.h b/gdb/language.h
index 2cc6a3b..0e240f5 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -106,6 +106,8 @@ struct language_defn {
enum type_check la_type_check; /* Default type checking */
int (*la_parser) PARAMS((void)); /* Parser function */
void (*la_error) PARAMS ((char *)); /* Parser error function */
+ void (*la_printchar) PARAMS ((int, FILE *));
+ void (*la_printstr) PARAMS ((FILE *, char *, unsigned int, int));
struct type **la_longest_int; /* Longest signed integral type */
struct type **la_longest_unsigned_int; /* Longest uns integral type */
struct type **la_longest_float; /* Longest floating point type */
@@ -215,6 +217,11 @@ set_language PARAMS ((enum language));
#define local_hex_format_suffix() \
(current_language->la_hex_format.la_format_suffix)
+#define local_printchar(ch, stream) \
+ (current_language->la_printchar(ch, stream))
+#define local_printstr(stream, string, length, force_ellipses) \
+ (current_language->la_printstr(stream, string, length, force_ellipses))
+
/* Return a format string for printf that will print a number in one of
the local (language-specific) formats. Result is static and is
overwritten by the next call. Takes printf options like "08" or "l"