From 242c0d81808102504721ac1289dccec5dce660f9 Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Mon, 5 Oct 1998 19:42:04 +0000 Subject: * c-lang.c (emit_char c_printchar c_printstr), c-lang.h (c_printstr) ch-lang.c (chill_printstr chill_printchar) c-valprint.c (c_val_print) ch-valprint.c (chill_val_print) expprint.c (print_subexp) f-lang.c (f_printstr f_printchar emit_char) f-valprint.c (f_val_print) jv-lang.c (java_printchar java_emit_char) jv-valprint.c (java_value_print java_val_print) language.c (unk_lang_printchar unk_lang_printstr unk_lang_emit_char) language.h (struct language_defn LA_PRINT_STRING LA_EMIT_CHAR) m2-lang.c (m2_printstr m2_printchar emit_char) printcmd.c (print_formatted) scm-lang.c (scm_printstr) valprint.c (val_print_string) value.h (val_print_string): Add emit_char routines to language_desc struct to allow finer control over language specific character output issues. Add character width arg to printstr routines to allow handling of wchar_t/Unicode strings. Fix c_printstr to handle wide characters. Supply width argument to LA_PRINT_STRING and val_print_string. * jv-lang.c (java_object_type dynamics_objfile java_link_class_type get_dynamics_objfile get_java_object_type) jv-lang.h (get_java_object_type): Make lots of things static. * expprint.c (dump_prefix_expression dump_subexp): Move opcode name printing to common routine (op_name). * (dump_subexp): Add support for OP_SCOPE. --- gdb/language.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'gdb/language.c') diff --git a/gdb/language.c b/gdb/language.c index 47bf441..1c10026 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -84,10 +84,13 @@ static void set_type_range PARAMS ((void)); static void -unk_lang_printchar PARAMS ((int, GDB_FILE *)); +unk_lang_emit_char PARAMS ((int c, GDB_FILE *stream, int quoter)); static void -unk_lang_printstr PARAMS ((GDB_FILE *, char *, unsigned int, int)); +unk_lang_printchar PARAMS ((int c, GDB_FILE *stream)); + +static void +unk_lang_printstr PARAMS ((GDB_FILE *stream, char *string, unsigned int length, int width, int force_ellipses)); static struct type * unk_lang_create_fundamental_type PARAMS ((struct objfile *, int)); @@ -1213,6 +1216,15 @@ unk_lang_error (msg) } static void +unk_lang_emit_char (c, stream, quoter) + register int c; + GDB_FILE *stream; + int quoter; +{ + error ("internal error - unimplemented function unk_lang_emit_char called."); +} + +static void unk_lang_printchar (c, stream) register int c; GDB_FILE *stream; @@ -1221,10 +1233,11 @@ unk_lang_printchar (c, stream) } static void -unk_lang_printstr (stream, string, length, force_ellipses) +unk_lang_printstr (stream, string, length, width, force_ellipses) GDB_FILE *stream; char *string; unsigned int length; + int width; int force_ellipses; { error ("internal error - unimplemented function unk_lang_printstr called."); @@ -1290,6 +1303,7 @@ const struct language_defn unknown_language_defn = { evaluate_subexp_standard, unk_lang_printchar, /* Print character constant */ unk_lang_printstr, + unk_lang_emit_char, unk_lang_create_fundamental_type, unk_lang_print_type, /* Print a type using appropriate syntax */ unk_lang_val_print, /* Print a value using appropriate syntax */ @@ -1317,6 +1331,7 @@ const struct language_defn auto_language_defn = { evaluate_subexp_standard, unk_lang_printchar, /* Print character constant */ unk_lang_printstr, + unk_lang_emit_char, unk_lang_create_fundamental_type, unk_lang_print_type, /* Print a type using appropriate syntax */ unk_lang_val_print, /* Print a value using appropriate syntax */ @@ -1343,6 +1358,7 @@ const struct language_defn local_language_defn = { evaluate_subexp_standard, unk_lang_printchar, /* Print character constant */ unk_lang_printstr, + unk_lang_emit_char, unk_lang_create_fundamental_type, unk_lang_print_type, /* Print a type using appropriate syntax */ unk_lang_val_print, /* Print a value using appropriate syntax */ -- cgit v1.1