Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] fix Ada SYMBOL_PRINT_NAME problem
Date: Tue, 29 Jan 2008 18:00:00 -0000	[thread overview]
Message-ID: <20080129175458.GG3773@caradoc.them.org> (raw)
In-Reply-To: <20080108114358.GE24614@adacore.com>

On Tue, Jan 08, 2008 at 03:43:58AM -0800, Joel Brobecker wrote:
> Trying to print "i" will result in the following menu:
> 
>     (gdb) print i
>     Multiple matches for i
>     [0] cancel
>     [1] pck__first(int) at pck.adb:3
>     [2] pck__second(int) at pck.adb:7
>     >
> 
> The expected output (particularly for choices 1 and 2) is:
> 
>     (gdb) p i
>     Multiple matches for i
>     [0] cancel
>     [1] pck.first.i at pck.adb:3
>     [2] pck.second.i at pck.adb:7
>     > 

Of course, as far as I'm concerned, pck.first.i is the demangled
version of pck__first__i.  You just don't have a convenient demangler
for it.  This is related to a lot of the code duplication in
ada-lang.c that I was complaining about earlier.

The clever demangling lookup table was clever for C++, but less clever
for other languages; you'll see that Java already has some
special-case code, and the comments there (e.g. about the msymbol
having the wrong demangling) also apply to Ada.

I've no objection to this patch in principle, but you're doing it in
the wrong place.  If you already know the symbol is an Ada symbol, why
go through all the rigamarole of putting it in the hash table?


-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2008-01-29 17:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 11:44 Joel Brobecker
2008-01-29 18:00 ` Daniel Jacobowitz [this message]
2008-01-30 21:55   ` Joel Brobecker
2008-01-30 21:59     ` Daniel Jacobowitz
2008-02-01 23:17       ` Joel Brobecker

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=20080129175458.GG3773@caradoc.them.org \
    --to=drow@false.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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