|
Boost Users : |
Subject: Re: [Boost-users] can't debug into BOOST_FOREACH?
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2009-03-02 08:14:29
On Mon, Mar 2, 2009 at 1:43 PM, Stephan Menzel <stephan.menzel_at_gmx.eu>wrote:
> Hi there,
>
> I just noticed there seems to be no way of debugging into a BOOST_FOREACH
> loop... Is that true?
>
> I use g++ 4.3 / gdb 6.8 here and neither would the debugger stop any any
> breakpoint inside such loops nor can I step into them from outside. Is this
> supposed to be like that?
>
> puzzled...
>
> Stephan
>
AFAIK BOOST_FOREACH is a macro. Therefore it is expanded by pre-processor
into the real code. Can you debug into macros with g++/gdb anyway? MSVC
supports that, but what about g++/gdb?
There might be some workarounds, like temorary modifying the BOOST_FOREACH
code and placing a debug break compiler intrinsic call into it. I think than
you might be able to stop the debugger inside, but not sure what is shown
than.
Good Luck,
Ovanes
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net