Re: Attaching breakpoints to templated functions
Re: Attaching breakpoints to templated functions
- Subject: Re: Attaching breakpoints to templated functions
- From: Fritz Anderson <email@hidden>
- Date: Mon, 30 Jan 2006 09:18:06 -0600
On 30 Jan 2006, at 7:51 AM, Chris Jefferson wrote:
In xcode 2.2, whenever I try attaching a breakpoint to a templated
function (by just clicking in the margin), it never seems to be
triggered if I then start the debugger. Is there any way to get these
to work?
GDB assumes that the source code for any function is associated with
one machine-code implementation. As the purpose of template code is
to use one batch of source code to generate many machine-code
implementations, you have a clash; your breakpoint will be set for
one of the instantiations of the template, but you can't control
which one.
If you are interested in a particular instantiation (oh, I just found
a typo in my book; I hope it was caught in copy-edit), you can use
the Breakpoints window to set a breakpoint on its fully-qualified
name (e.g. Shape<double>::area). If you want to break on all
instantiations, use the debugger console to set a regular-expression
break (rbreak Shape.*area).
-- F
--
Fritz Anderson -- http://www.manoverboard.org/
Consulting Programmer -- http://resume.manoverboard.org/
Step into Xcode, coming out late January -- http://six.manoverboard.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden