Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Berlin <dberlin@dberlin.org>
To: David Carlton <carlton@math.stanford.edu>
Cc: Paul Hilfinger <hilfingr@CS.Berkeley.EDU>,
	Elena Zannoni <ezannoni@redhat.com>, Adam Fedor <fedor@doc.com>,
	GDB Patches <gdb@sources.redhat.com>,
	Daniel Jacobowitz <drow@mvista.com>
Subject: Re: Demangling and searches
Date: Wed, 08 Jan 2003 00:38:00 -0000	[thread overview]
Message-ID: <78152D27-22A1-11D7-9952-000393575BCC@dberlin.org> (raw)
In-Reply-To: <ro1n0mcebwt.fsf@jackfruit.Stanford.EDU>


On Tuesday, January 7, 2003, at 07:13  PM, David Carlton wrote:

> On Tue, 07 Jan 2003 15:54:36 -0800, Paul Hilfinger 
> <hilfingr@CS.Berkeley.EDU> said:
>
>> For some time, I've been meaning to ask a basic question about GDB
>> search strategy: for language implementations that mangle their
>> identifiers, the standard procedure in GDB at the moment is to
>> search for the demangled identifier among the demangled identifiers
>> of the symbol table, and to speed this search up by precomputing and
>> storing the demangled symbol names.  Why?
>
>> We used to do that for Ada mode in GDB, but subsequently changed our
>> approach entirely.  For Ada, we MANGLE the symbol we're searching
>> for and then search among the MANGLED (i.e., raw, unmodified,
>> warm-from- the-executable) names.
>
> I'm curious: in Ada, what does the mangling do?  In particular, how
> much type info does it contain?  In C++, the mangled name contains
> type info for the arguments for functions; I don't see how, using
> GDB's current data structures, to allow us to allow users to, say,
> break on a function without requiring them to specify the types of the
> arguments, if we took your approach.  (Though it might be possible to
> modify GDB's data structures to allow that.)

Further, the mangling is ABI dependent.
Thus, you'd have to know what ABI the symbol you are looking up is 
going to use, to mangle it properly


  reply	other threads:[~2003-01-08  0:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-07 23:56 Paul Hilfinger
2003-01-08  0:13 ` David Carlton
2003-01-08  0:38   ` Daniel Berlin [this message]
2003-01-09  2:38   ` Paul Hilfinger
2003-01-09 21:51     ` David Carlton
2003-01-08  1:04 ` Daniel Jacobowitz
2003-01-08  1:39 ` Elena Zannoni

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=78152D27-22A1-11D7-9952-000393575BCC@dberlin.org \
    --to=dberlin@dberlin.org \
    --cc=carlton@math.stanford.edu \
    --cc=drow@mvista.com \
    --cc=ezannoni@redhat.com \
    --cc=fedor@doc.com \
    --cc=gdb@sources.redhat.com \
    --cc=hilfingr@CS.Berkeley.EDU \
    /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