Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: GDB List <gdb@sourceware.org>
Subject: Re: C++ Typedefs and symbol tables
Date: Mon, 20 Aug 2007 17:18:00 -0000	[thread overview]
Message-ID: <20070820171803.GA11056@caradoc.them.org> (raw)
In-Reply-To: <46C9CB12.5000004@st.com>

On Mon, Aug 20, 2007 at 06:10:42PM +0100, Andrew STUBBS wrote:
> Hi,
> 
> I have encountered a problem setting breakpoints on overloaded C++ functions: 
> when I specify the function signature, I have to use the canonical type name, 
> not the typedef name used in the source I am looking at. (I am aware it prompts 
> where no signature is given, but that possibility is not available to scripts, 
> for example).

Check whether you are ending up with a search based on the function's
symbol or minsym.  The mangled name always uses the canonical type
name (for obvious ABI reasons).

> The dwarf debug information, on the other hand, shows the function with the 
> typedef name used in the source code. It also contains the proper mapping from 
> typedef name to actual class name.
> 
> Would it not be possible to use the debug information, where available, to 
> canonicalize the type names before attempting to match the function signatures, 
> at least for the purposes of setting breakpoints?

Yes, but it's a lot of work.  We can not currently canonicalize
anything during lookup because we do not canonicalize during symbol
reading; and just turning that on slows things down considerably.  The
cp-names.y parser was intended for exactly this.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-08-20 17:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20 17:11 Andrew STUBBS
2007-08-20 17:18 ` Daniel Jacobowitz [this message]
2007-08-20 17:35   ` Andrew STUBBS
2007-08-20 17:49     ` Daniel Jacobowitz
2007-08-20 18:12       ` Andrew STUBBS
2007-08-20 18:23         ` 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=20070820171803.GA11056@caradoc.them.org \
    --to=drow@false.org \
    --cc=andrew.stubbs@st.com \
    --cc=gdb@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