Is this a correct place to ask questions on GDB

Discussion in 'C++' started by parag_paul@hotmail.com, Sep 23, 2007.

  1. Guest

    If yes
    I am having trouble with debugging C++ constructors.
    A lot of code is there in the construcutor and it is becoming
    increasingly difficult to debug them as the debugger does not step
    into the correct file and line no.

    I have changed the dir variable to point to the correct location but
    nothing helps.
    Can anybody tell me about any suggestions.
    Asking here becoz many using C++ will also be using the debugger.

    We have a compiler that creates an executable.( the compiler is
    written in C++) . now the executable will run calling all these
    constructors. Do you think, objcopy or optmizing the symbols names in
    the executable leads to GDB behaving wonky
    -Parag
    , Sep 23, 2007
    #1
    1. Advertising

  2. Phlip Guest

    parag_paul wrote:

    > I am having trouble with debugging C++ constructors.


    What do your unit tests say about them?

    > the executable leads to GDB behaving wonky


    You'll get the best answer on GDB's home forum. This newsgroup is only
    qualified to discuss the raw C++ language itself.

    --
    Phlip
    Phlip, Sep 23, 2007
    #2
    1. Advertising

  3. * :
    > If yes
    > I am having trouble with debugging C++ constructors.
    > A lot of code is there in the construcutor and it is becoming
    > increasingly difficult to debug them as the debugger does not step
    > into the correct file and line no.


    You can try to factor out that code as separate functions.

    It's a also a good idea to use asserts.

    And to reduce the code to an absolutely minimum example that works, and
    build up from that.

    Cheers, & hth.,

    - Alf


    BTW., use of particular debuggers is off-topic in clc++m.

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
    Alf P. Steinbach, Sep 23, 2007
    #3
  4. red floyd Guest

    wrote:
    > If yes

    No.

    Try gnu.g++.help
    red floyd, Sep 23, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. darrel
    Replies:
    1
    Views:
    372
    Rob Meade
    Nov 30, 2005
  2. JAlexa9898
    Replies:
    2
    Views:
    414
    Andrew Thompson
    Feb 2, 2005
  3. Surendra
    Replies:
    0
    Views:
    500
    Surendra
    Mar 23, 2006
  4. seba
    Replies:
    1
    Views:
    1,430
    mlimber
    Mar 22, 2007
  5. Timothy Madden
    Replies:
    1
    Views:
    1,604
    Timothy Madden
    Sep 17, 2009
Loading...

Share This Page