Is this a correct place to ask questions on GDB

P

parag_paul

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
 
P

Phlip

parag_paul said:
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.
 
A

Alf P. Steinbach

* (e-mail address removed):
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top