User forums > Help

Debug problem with header files

<< < (4/6) > >>

nenin:

--- Quote from: rhf on April 10, 2009, 06:05:50 pm ---
--- Quote from: TDragon on April 10, 2009, 05:38:33 pm ---I really need a reproducible test case to work with here, folks.
--- End quote ---
I know, and it is frustrating that I can't come up with a test case as I did for the previous problem. I am currently working on a fairly large program; and every now and then, when I set a break in a header file, the debugger fails. <***>
--- End quote ---
I confirm the same problem. I have a project with headers placed in root project folder and some subfolders. I can not enter breakpoint  in headers from start, and now I found that gdb kind of hung in template function, if I enter it by step and than place a new breakpoint inside. WinXP SP3, last TDM gcc.   :(

RJP Computing:
I can work on an example, but do the inline templates of the example I posted have anything to do with that? I should also mention that the header is in a sub-directory that is three levels down. (<proj_root>\wxtools\wx\serialization\combobox.h)


--- Quote from: TDragon on April 10, 2009, 05:38:33 pm ---I shouldn't need to ask this, but are you sure you're compiling without any optimization flags and with debugging info turned on?

--- End quote ---
Yes I have them on.

ollydbg:
I have the interests for testing, if you can supply a test case. :D

RJP Computing:
Alright I wrote a small example that shows the bug. I attached the source to this post. Just make a new console project and add the files to the project.

Here are some things I found:

* Only set a breakpoint in the file wxtools\wx\serialization\combobox.h. It will not set the breakpoint.
* If you set a breakpoint in a cpp (headerbrk.cpp) that includes the header then it will set the breakpoint properly.
[attachment deleted by admin]

TDragon:
Sorry, works fine for me. GCC 4.3.3 TDM-1, GDB 6.8-mingw-3. Screenshot attached.

[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version