On Wed, 12 Oct 2005 23:44:13 +0100, Roger James wrote: > I have been trying to a debug a problem I have been having with the latest > cvs build (null filenames being given to the ringbuffer constructor). So I > attached gdb to mythfrontend and put a breakpoint on the location where > mythfrontend was logging the error messages (Ringbuffer.cpp:529, I also > tried 530). But I cannot get the breakpoint to trigger even thought the > message is logged! I realise I must be doing something really dumb, but > what. Something is running through that piece of code as the message is > output in the frontend log, but the debugger is not catching it. So either > it is a totally different process or the breakpoint is not being set where > I think it is.
Sounds like you're setting the breakpoint in the constructor. If so then there's a known issue with gdb failing to set breakpoints correctly, it's documented in the release notes. Essentially g++ >= 3.3 generates multiple versions of each constructor/destructor from one set of source code. gdb doesn't realise this and only sets the breakpoint in one of them (since each source line now maps into multiple generated functions), hence whether you stop is random. The easiest way round it is to use rbreak to set the breakpoint on all of the versions of the same constructor, then step through from there. Cheers, Martin. _______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
