diff options
author | Stu Grossman <grossman@cygnus> | 1998-10-05 19:42:04 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1998-10-05 19:42:04 +0000 |
commit | 242c0d81808102504721ac1289dccec5dce660f9 (patch) | |
tree | a0d74af308640017ea9e48e4a98be116f50bac55 /gdb/jv-lang.c | |
parent | ecd41d25b901d3fdee37e8215c288892b4c8c3d5 (diff) | |
download | gdb-242c0d81808102504721ac1289dccec5dce660f9.zip gdb-242c0d81808102504721ac1289dccec5dce660f9.tar.gz gdb-242c0d81808102504721ac1289dccec5dce660f9.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/jv-lang.c')
-rw-r--r-- | gdb/jv-lang.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index 603b225..c852446 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -1,5 +1,5 @@ /* Java language support routines for GDB, the GNU debugger. - Copyright 1997 Free Software Foundation, Inc. + Copyright 1997, 1998 Free Software Foundation, Inc. This file is part of GDB. @@ -44,16 +44,17 @@ struct type *java_float_type; struct type *java_double_type; struct type *java_void_type; -struct type *java_object_type; +static void java_emit_char PARAMS ((int c, GDB_FILE *stream, int quoter)); /* This objfile contains symtabs that have been dynamically created to record dynamically loaded Java classes and dynamically compiled java methods. */ -struct objfile *dynamics_objfile = NULL; -struct type *java_link_class_type PARAMS((struct type*, value_ptr)); +static struct objfile *dynamics_objfile = NULL; -struct objfile * +static struct type *java_link_class_type PARAMS ((struct type *, value_ptr)); + +static struct objfile * get_dynamics_objfile () { if (dynamics_objfile == NULL) @@ -560,7 +561,9 @@ java_link_class_type (type, clas) return type; } -struct type* +static struct type *java_object_type; + +struct type * get_java_object_type () { return java_object_type; @@ -704,15 +707,16 @@ java_value_string (ptr, len) error ("not implemented - java_value_string"); /* FIXME */ } -static void java_printchar PARAMS ((int c, GDB_FILE *stream)); +/* Print the character C on STREAM as part of the contents of a literal + string whose delimiter is QUOTER. Note that that format for printing + characters and strings is language specific. */ static void -java_printchar (c, stream) +java_emit_char (c, stream, quoter) int c; GDB_FILE *stream; + int quoter; { - fputc_filtered ('\'', stream); - switch (c) { case '\\': @@ -741,8 +745,6 @@ java_printchar (c, stream) fprintf_filtered (stream, "\\u%.4x", (unsigned int) c); break; } - - fputc_filtered ('\'', stream); } static value_ptr @@ -929,8 +931,9 @@ const struct language_defn java_language_defn = { java_parse, java_error, evaluate_subexp_java, - java_printchar, /* Print a character constant */ + c_printchar, /* Print a character constant */ c_printstr, /* Function to print string constant */ + java_emit_char, /* Function to print a single character */ java_create_fundamental_type, /* Create fundamental type in this language */ java_print_type, /* Print a type using appropriate syntax */ java_val_print, /* Print a value using appropriate syntax */ |