News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

debugging on linux: strange symbols, files open twice, "nothing to be done"

Started by CuteAlien, September 01, 2008, 12:18:44 AM

Previous topic - Next topic

mandrav

Right, this seems to be some kind of gcc/gdb bug.
This bug can be circumvented by removing the "virtual" keyword from the TestDebugger class' ancestors list

class TestDebugger : public foo::Base1 ,public Base2
Be patient!
This bug will be fixed soon...

CuteAlien

Quote from: mandrav on September 16, 2008, 09:51:32 PM
Right, this seems to be some kind of gcc/gdb bug.
This bug can be circumvented by removing the "virtual" keyword from the TestDebugger class' ancestors list

class TestDebugger : public foo::Base1 ,public Base2

That would work in my reduced test-case... but the real classes are derived from a class doing the reference-counting so that would introduce diamond inheritance problems :-(

Edit: I'll report it to the gdb people.

Jenna

Have you tried to use a pointer ?

TestDebugger* iAmTheBug;

That works for me in the test-case.

CuteAlien


mandrav

Quote from: CuteAlien on September 16, 2008, 10:38:21 PM
... but the real classes are derived from a class doing the reference-counting so that would introduce diamond inheritance problems :-(
(emphasis added)

Which is why you shouldn't create such objects on the stack but only on the heap...
So, Jens is right (again) :) :

Quote from: jens on September 16, 2008, 11:45:37 PM
Have you tried to use a pointer ?

Be patient!
This bug will be fixed soon...

CuteAlien

Quote from: mandrav on September 17, 2008, 09:40:58 AM
Which is why you shouldn't create such objects on the stack but only on the heap...
So, Jens is right (again) :) :

Yeah, yeah, but sometimes you want to use classes in different contexts and except for debugging that would have worked. In that case it was a context specifically created for debugging, so every class needed was just in the function *sigh*.

Anyway, I could debug now, but while doing that I found out that I was too early when I announced that the problem with the strange symbols that get inserted sometimes in the sourcecode (mentioned at the start of thread) has been fixed with the newer nightly build I'm using. It certainly got a lot better, but I think it's somehow related to the speed of the debugger. When I stepped deeper and deeper into a library the stepping started to take more and  more time. And as soon as that happened I got the strange characters back when I pressed on stepping before the debugger was finished with it's current step. So that might also be something worth looking into.