User forums > Using Code::Blocks

debug - plague of complaints continues

<< < (2/2)

oBFusCATed:
The incomplete type is a gdb problem, if you're using gdb-7.4 and pretty new gdb you should report it in the gdb's bugzilla (probably first asking in the mailing list and searching the internet).

If you debug release builds all bets are of and the result can be pretty random.
Also if you don't provide the full source code I can't help you here...

Radek:
gdb is 7.0.1. The sources of dvec are attached. The lib folder contains all needed sources and the dvec.hpp header. Add all this to a project and compile a static library. No additional libraries or settings of the project are needed. The code is a standard C99, no breaking news from C09 or C11 have been used. The main.cpp is the test program. Create another project, add the library and the header to the build options and compile.

As far as the "incomplete type" is concerned, it occurs only with the release build of the library, not with the debug build. And I don't see why the results should be so random: With a release build, you cannot trace through the library code, because you do not have any debug info and, usually, you do not have the source code. But you should see data structures, because you have the headers, which should be used in creating a debug build of the tested program. For example, the Open Watcom debugger allows you to see the data even with a release build of a library. This way, you can detect problems caused by the optimizer.

The "incomplete type" is rather annoying. Those that have debugged wxWidgets programs can tell ...

[attachment deleted by admin]

oBFusCATed:
How can a c++ code be standard c99 code? Making the file extension to be .cpp means the code is C++!
And as I said first try gdb 7.4 before continuing.


--- Quote from: Radek on April 23, 2012, 05:05:07 pm ---And I don't see why the results should be so random

--- End quote ---
Because the gcc compiler is optimizing compiler and the most important goal for such compilers is speed not ease of debugging in release builds.
Also search the thread on the gcc mailing list about the discussion about improving the debugging in release builds (it happened in the 4.5,4.6,4.7 time frame).

Also I'm telling you this from experience, not speculating about how this is logical to be happening...

Navigation

[0] Message Index

[*] Previous page

Go to full version