From: Daniel Jacobowitz <drow@false.org>
To: Christophe LYON <christophe.lyon@st.com>
Cc: gdb@sourceware.org
Subject: Re: gdb.cp/templates.exp, ctor/dtor breakpoints, etc....
Date: Mon, 19 Jan 2009 15:56:00 -0000 [thread overview]
Message-ID: <20090119155600.GA5296@caradoc.them.org> (raw)
In-Reply-To: <49749C97.80000@st.com>
On Mon, Jan 19, 2009 at 04:30:31PM +0100, Christophe LYON wrote:
> But... if GDB does not rely on mangled names, how is it supposed to find
> the right template instantiation when trying to set a breakpoint on a
> function? For instance in templates.exp, where the T5 template is
> defined, how to find the T5<int> ctor, if all the ctor instantiations are
> named "T5" ? Should GDB analyse all the type definition in .debug_info and
> find the right type?
They're all named T5<X>::T5 for some X. We get fully qualified type
names in the debug info. The function should be contained in or
specified by the containing type.
Admittedly, for some template cases this gets really out of hand.
It's *hard* to represent Template<Type::Bar, 5, &(static_var)> as the
name of a type in DWARF. But this can all be done using DW_AT_name;
it only gets really tricky if the compiler uses the DWARF extensions
for type and value parameters.
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2009-01-19 15:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-16 10:20 Christophe LYON
2009-01-16 15:04 ` Daniel Jacobowitz
2009-01-16 17:12 ` Christophe LYON
2009-01-16 17:19 ` Daniel Jacobowitz
2009-01-19 15:31 ` Christophe LYON
2009-01-19 15:56 ` Daniel Jacobowitz [this message]
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=20090119155600.GA5296@caradoc.them.org \
--to=drow@false.org \
--cc=christophe.lyon@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