Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Gdb List <gdb@sources.redhat.com>
Subject: Re: question about method naming
Date: Mon, 06 May 2002 15:53:00 -0000	[thread overview]
Message-ID: <87adrc6frc.fsf@creche.redhat.com> (raw)
In-Reply-To: Daniel Jacobowitz's message of "Mon, 6 May 2002 15:33:56 -0400"

>>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:

Tom> If I type:
Tom> b x.main
Tom> gdb tells me that there is no such method.

Daniel> Are you working on a very current gcj?  I.E. one that defaults
Daniel> to DWARF-2 output?  I observe the same thing in 3.0.4 with
Daniel> -gdwarf-2, but not with -gstabs+.

Yes.  I'm using the trunk cvs gcj.

Daniel> In this version, the stabs debug info claims that 'class x'
Daniel> has a member function 'main'.  In DWARF-2 it claims that
Daniel> 'class x' has a member function 'x.main(java.lang.String[])'.
Daniel> If this is still the case in your compiler (check readelf -w
Daniel> output, search for a DW_TAG_subprogram whose name contains
Daniel> main) then I believe it is a gcj bug.

Ok.  What is the correct output?  `main(java.lang.String[])'?

I wonder if this was done because of the lack of namespace support in
gdb?  In this case that would be strange (`x' is a class, not a
namespace).  This is something I'll note in the bug report.

Daniel> Also amusing:
Daniel>  <2><1c4>: Abbrev Number: 6 (DW_TAG_subprogram)
Daniel>      DW_AT_external    : 1
Daniel>      DW_AT_name        : ()
Daniel>      DW_AT_MIPS_linkage_name: _ZN1xC1Ev
Daniel>      DW_AT_artificial  : 1
Daniel>      DW_AT_declaration : 1
Daniel> The constructor's name is obviously wrong...

I saw this too.

Thanks for your insight,
Tom


  reply	other threads:[~2002-05-06 22:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-06 10:44 Tom Tromey
2002-05-06 12:33 ` Daniel Jacobowitz
2002-05-06 15:53   ` Tom Tromey [this message]
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=87adrc6frc.fsf@creche.redhat.com \
    --to=tromey@redhat.com \
    --cc=drow@mvista.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