Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: Some java questions
Date: Tue, 09 Sep 2008 21:18:00 -0000	[thread overview]
Message-ID: <m3bpyx9fy7.fsf@fleche.redhat.com> (raw)
In-Reply-To: <48C6D1DF.3060705@redhat.com> (Keith Seitz's message of "Tue\, 09 Sep 2008 12\:43\:27 -0700")

>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> But that's not my real concern. What puzzles me is this second
Keith> function "jmisc.main(java.lang.String[])void". What the heck is that,
Keith> cause it isn't java. It looks to me like some partially demangled java
Keith> method signature (which is still not valid input to a java compiler).

To support Java 1.5, we had to add return types to name mangling.
These are needed due to covariant return types.

What you are seeing here is just how the demangler chooses to print
this information.  E.g., when I 'nm --demangle=java' a simple java
program, I see:

0804891e T h.main(java.lang.String[])void
         U java.lang.Object.toString()java.lang.String
[etc]

Keith> At long last, my question is: Is gdb supposed to be able to do
Keith> something with "jmisc.main(java.lang.String[])void", i.e. is it
Keith> considered valid "input" to break, print, and other commands?

FYI -- nobody really maintains the gcj support in gdb.

It would be nice to be able to break on a method that can only be
differentiated by its return type.  Normally, though, I think only one
of the methods like this really matters -- the rest are just bridge
methods and probably not interesting.  It might be tricky for gdb to
sort this out though.

Tom


  reply	other threads:[~2008-09-09 21:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09 19:44 Keith Seitz
2008-09-09 21:18 ` Tom Tromey [this message]
2008-09-09 21:31   ` Daniel Jacobowitz
2008-09-09 23:39     ` Keith Seitz
2008-09-09 23:36   ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3bpyx9fy7.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox