Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Gdb List <gdb@sources.redhat.com>
Subject: question about method naming
Date: Mon, 06 May 2002 10:44:00 -0000	[thread overview]
Message-ID: <87u1pl6u33.fsf@creche.redhat.com> (raw)

I compiled the appended code with `gcj -g'.  I'm using the trunk cvs
gcj.  Then I ran gdb on the program.

If I type:

    b x.main

gdb tells me that there is no such method.

I tracked the problem down to linespec.c:find_methods().

Here we end up in the loop, and method_name for the 0th method is:

    (gdb) p method_name
    $27 = 0x83e9a52 "x.main(java.lang.String[])"

So of course we fail to match this against "main".

Is this a gdb bug or a gcj bug?  Or just a disagreement?

I'm guessing that method_name should not be fully qualified.
Is that correct?

Tom

public class x
{
  public static void main (String[] args)
  {
    char c = args[0].charAt(0);
    System.out.println(c);
  }
}


             reply	other threads:[~2002-05-06 17:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-06 10:44 Tom Tromey [this message]
2002-05-06 12:33 ` Daniel Jacobowitz
2002-05-06 15:53   ` Tom Tromey
2002-05-06 16:07     ` Daniel Jacobowitz

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=87u1pl6u33.fsf@creche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb@sources.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