6 msgShifting: what's going on?
1 msgneed help: gcc rtl function calls
7 msgHow to dump all the optimization flags enabled?
3 msgcommand line order of object files and libraries
5 msgOpenMP on gcc
1 msg[AIX] gcc cannot compile huge c file
2 msgSeemingly identical gcc versions, except one se...
4 msgwhat's this syntax ?
3 msgstrict C++ mode
2 msglist of warning messages
5 msgProblem With templates
4 msgEmbedded arm-elf-gcc
1 msgRe: bucknell matthews
1 msgCompiling gcc 3.3.2 on AIX 64 bit platform
2 msgcan __exchange_and_add be used from outside?

Command flags for debugging template code
\ Stephen Torri (27 Mar 2007)
. \ John Love-Jensen (27 Mar 2007)
. . \ Stephen Torri (27 Mar 2007)
. . \ Dima Sorkin (8 Apr 2007)

3 msg_ZTV vs _ZTI
3 msg'char *' diff in header & func arg list?
2 msgRe: Where is ld.so and libdl.so built from
2 msgmember class
Subject:Re: Command flags for debugging template code
Group:Gcc-help
From:Stephen Torri
Date:27 Mar 2007


Thanks for the programming idea. That is certainly an easy way of doing
what I want.

Stephen

On Tue, 2007-03-27 at 06:43 -0500, John Love-Jensen wrote:
> Hi Stephen,
>
> One of the problems with debugging (depending on the debugger and
> environment) is break points with inline functions.
>
> To give me a debug-able spot I can drop a breakpoint on, I've done this
> before:
>
> // --- Fruit.h ---
> void EljayBreakpoint();
>
> class Fruit
> {
> public:
>
> template <typename Basket>
> void print_Contents(Basket* container_ptr)
> {
> EljayBreakpoint();
> std::cout << container_ptr->dump() << std::endl;
> }
> };
>
> // --- Fruit.cpp ---
> #include "Fruit.h"
> void EljayBreakpoint()
> {
> std::cerr << "EljayBreakpoint: you are here\n";
> }
>
> And then I set the breakpoint inside EljayBreakpoint.
>
> I now realize I haven't needed to do this trick in many years. So either
> the debuggers are better on the platforms I'm using and can sensically step
> into inline functions, or I'm making less boo-boos.
>
> HTH,
> --Eljay
>



© 2004-2008 readlist.com