public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* break jmisc.main
@ 2003-03-13 20:39 David Carlton
  2003-03-13 20:54 ` David Carlton
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: David Carlton @ 2003-03-13 20:39 UTC (permalink / raw)
  To: gdb; +Cc: Tom Tromey, Michael Elizabeth Chastain

Here's the scoop with the FAILs on "break jmisc.main" and "break
jmisc.main(java.lang.String[]))".

1) For "break jmisc.main", decode_line_1 calls decode_compound (which
   handles C++ and Java compound data structures).  That notices that
   there is a class calles 'jmisc', and then looks for a member in it
   called 'main'.

   Unfortunately, GDB thinks the member in question is called
   'jmisc.main(java.lang.String[])' instead of just 'main': the debug
   info says:

	.long	.LC2	# DW_AT_name: "jmisc.main(java.lang.String[])"

   Sigh.  GCJ should get fixed.

2) For "break jmisc.main(java.lang.String[])", decode_compound gets
   bypassed, and decode_variable gets called, looking for a symbol of
   that name.  Unfortunately, it doesn't find one: the symbol that it
   finds is called something strange like
   "jmisc::main(Jaray<java::lang::String*>*)".  (I'm pretty sure
   that's right, though I'd have to check this at home to be sure;
   that's what c++filt demangles the name to.)

   Something weird is going on here; at first, I'd assumed this was a
   bug in cplus_demangle, but c++filt -s java gets the name demangled
   correctly.  So my guess is that, somewhere, a demangler is getting
   called in a situation where the symbol isn't yet identified as a
   Java symbol, so the C++ demangler gets used.  Do the minsym readers
   reliably know the language of the minsyms they're creating?  If
   not, then we could be getting the bad value there and caching it
   with the new demangling code, so the bad value remains when the
   symbol table is setting the symbol's name.

So, we have two things to do: submit a bug report to the GCJ people,
and track down where the symbol name is getting demangled
incorrectly.  (And a third thing: convince somebody who knows more
about GCJ to become GDB's Java maintainer.)

David Carlton
carlton@math.stanford.edu

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: break jmisc.main
@ 2003-03-14 15:09 Michael Elizabeth Chastain
  0 siblings, 0 replies; 14+ messages in thread
From: Michael Elizabeth Chastain @ 2003-03-14 15:09 UTC (permalink / raw)
  To: carlton, drow; +Cc: gdb, tromey

carlton> 2) For "break jmisc.main(java.lang.String[])", decode_compound gets
carlton>    bypassed, and decode_variable gets called, looking for a symbol of
carlton>    that name.  Unfortunately, it doesn't find one: the symbol that it
carlton>    finds is called something strange like
carlton>    "jmisc::main(Jaray<java::lang::String*>*)".  (I'm pretty sure
carlton>    that's right, though I'd have to check this at home to be sure;
carlton>    that's what c++filt demangles the name to.)

drow> Do you know if this actually broke with my caching patch, or if it was
drow> broken before?  I checked, and nowhere in GDB do we ever set the
drow> demangling style to Java.  Not that I could find, at least.

My testbed says that this worked in gdb HEAD on 2003-02-01 and failed
in gdb HEAD on 2003-02-05.

Michael C

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2003-03-14 15:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-13 20:39 break jmisc.main David Carlton
2003-03-13 20:54 ` David Carlton
2003-03-13 20:57 ` Daniel Jacobowitz
2003-03-13 21:07   ` Daniel Jacobowitz
2003-03-13 21:16   ` David Carlton
2003-03-13 21:22     ` Daniel Jacobowitz
2003-03-13 23:32     ` David Carlton
2003-03-13 23:36       ` Daniel Jacobowitz
2003-03-14  0:17         ` David Carlton
2003-03-14  4:18           ` Daniel Jacobowitz
2003-03-13 23:04   ` Tom Tromey
2003-03-13 22:59 ` Tom Tromey
2003-03-13 23:03   ` Daniel Jacobowitz
2003-03-14 15:09 Michael Elizabeth Chastain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).