This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Fix jmisc.exp failures/bz 9320/java "void" issues
- From: Keith Seitz <keiths at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 26 Mar 2010 15:27:12 -0700
- Subject: [RFA] Fix jmisc.exp failures/bz 9320/java "void" issues
Hi,
These three Java problems are all fairly related, so I'm submitting
patches to fix all of them.
Explanation of the problems:
1) jmisc.exp failures
Ulrich Weigand recently pointed out that jmisc.exp was failing due to
the recent dwarf2_physname patches. In actuality this test was already
failing, but since dwarf2_physname, it just failed slightly differently.
Previously, it failed because of bz 9320, but now it fails because it
prints out constructor names like "jmisc(void)void". I've changed this
so that it once again prints out "jmisc()".
2) bz 9320
This is the whole "java methods have return types appended" bug, e.g.,
"jmisc.main(java.lang.String[])void". In the output of the ptype
command, the return type is already printed, so we don't need to see the
appended return type here.
3) "void"
Methods which take no parameters were being marked "(void)" (just like
C++). In fact, in java, this syntax is illegal. So I've changed
physnames (and c_type_print_args) to NOT print "void" if the language is
java.
I've also made a small change to jmisc.exp to allow the constructor to
be listed before the method "main". All tests in jmisc.exp should now pass.
Regression tested on i686-pc-linux-gnu native.*
Keith
* Note that there are some java failures that were recently introduced.
They do not affect these patches to the best of my knowledge. I reverted
the offending patches for testing.
ChangeLog
2010-03-26 Keith Seitz <keiths@redhat.com>
* 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.
testsuite/ChangeLog
2010-03-26 Keith Seitz <keiths@redhat.com>
* gdb.java/jmisc.exp (ptype jmisc): Allow the constructor to
appear in the output before main.
Attachment:
java-void.patch
Description: Text document