News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

debugging and stepping into code question

Started by adviner, February 25, 2007, 03:24:47 AM

Previous topic - Next topic

adviner

Hi All,
  I'm using nightly build code blocks on windows xp.  I'm using gtkmm for windows.  The problem i have is stepping to the code or stopping it at a breakpoint on the class constructor.  Example:

Main code:

int main(int argc, char *argv[])
{


    Gtk::Main kit(argc, argv);
    Glib::RefPtr<Gnome::Glade::Xml> refXML = Gnome::Glade::Xml::create("C:\\CDeveloper\\Projects\\FinancialMatters\\Bin\\FinancialMatters.glade");

    FinancialMatters financialMatters(refXML);
    kit.run();
..
}

I can stop at the line FinancialMatters but when i try to step into the constructor i get the header refptr.h.  So i though i with a breakpoint on the FinancialMatters constructor i just select debug/continue but it never gets to it

FinancialMatters::FinancialMatters(Glib::RefPtr<Gnome::Glade::Xml> ref_xml)
{
    try
    {
        _Properties = new Properties();
    }
    catch(...)
    {
    }
}

I even put a breakpoint in the initialization of the Properties() class but it never hits it.  That is all my application does nothing more.  I'm just trying to get to the point where i can step into the code when debugging.

Is there something wrong with the way i'm debugging? 

Pecan


adviner

Thanks Pecan,
  I actually found this site earlier.  The problem is not being able to debug b/c i can do it fine.  The problem is stepping into the FinancialMatters constructor doesnt seem to work with the examples from my original post.

Thanks

Pecan

#3
As the example states: gdb cannot honor a break in a constructor/destructor.
It cannot tell which of the many constructors (there are many ctor/dtors with the same name, virtual etc) the user will step into or place a break.

Please re-read the work-around at the bottom of the wiki article.

adviner

I appreciate that.  I totally missed that part of the constructor.

Thanks again for the quick response.