summaryrefslogtreecommitdiff
path: root/gdb/c-typeprint.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2010-03-31 00:48:28 +0000
committerKeith Seitz <keiths@redhat.com>2010-03-31 00:48:28 +0000
commitca7c2194b048f0a73a5b7a2ad4f8430922cdfe59 (patch)
treeddde6a302a8abd8d3f6fa35b0d674ea97ffb8d4a /gdb/c-typeprint.c
parent704351e1a181751067c37f0d93d5f88d65f3afaa (diff)
downloadgdb-ca7c2194b048f0a73a5b7a2ad4f8430922cdfe59.tar.gz
* c-typeprint.c (c_type_print_args): Don't print "void"
for java, regardless of whether it is TYPE_PROTOTYPED. Use the passed-in language instead of current_language. (c_type_print_varspec_suffix): Use current_language instead of assuming language_c. * jv-typeprint.c (java_type_print_base): (bz 9320) Strip off any return type specifier from the physname.
Diffstat (limited to 'gdb/c-typeprint.c')
-rw-r--r--gdb/c-typeprint.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 5cc5f6b6eaa..68bcbd7fa89 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -416,8 +416,8 @@ c_type_print_args (struct type *type, struct ui_file *stream,
}
}
else if (!printed_any
- && (TYPE_PROTOTYPED (type)
- || current_language->la_language == language_cplus))
+ && ((TYPE_PROTOTYPED (type) && language != language_java)
+ || language == language_cplus))
fprintf_filtered (stream, "void");
fprintf_filtered (stream, ")");
@@ -616,7 +616,7 @@ c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
if (passed_a_ptr)
fprintf_filtered (stream, ")");
if (!demangled_args)
- c_type_print_args (type, stream, 1, language_c);
+ c_type_print_args (type, stream, 1, current_language->la_language);
c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
passed_a_ptr, 0);
break;