Code::Blocks Forums

User forums => Help => Topic started by: jaqq on January 14, 2009, 02:58:44 am

Title: Problems (debugging) with standard C++ files
Post by: jaqq on January 14, 2009, 02:58:44 am
Hello.

I tried posting a similar question in another forum. Since I got no answer, I removed the earlier post and applied a few changes (for completeness). Here it is.

Apparently, Code Blocks doesn't understand that standard include files like vector and list are C++ files. I tried to configure that but I need I file mask. The problem is that such standard includes don't have extensions. I could use several file masks like *vector, *list, etc (using simply the whole name as the mask doesn't work). But of course this is boring. Is there a better solution?

Another related problem is that I can't debug into such files. In the standard library implementation I'm using the push_back method is implemented directly inside file vector. When I debug into push_back I can see from the debugger console (inside Code Blocks) that the debugger goes to the correct line. However, the editor doesn't open file vector and position the line in accordance to the debugger. I have already tried inserting the include directory in the search paths for the debugger. No success... When eventually processing goes to an ordinary .c, .cpp, .h files the debugger and the editor work together (matching lines in the files) again.

Just in case it's useful, I'm on GCC. But I'm not using the native standard library implementation. I'm using the Apache C++ Standard Library.

Thanks.
Title: Re: Problems (debugging) with standard C++ files
Post by: ollydbg on January 16, 2009, 08:16:02 am
Please give a small test program that I can test for you.
By the way, I'm using the standard c++ library bundled with mingw. :D
Title: Re: Problems (debugging) with standard C++ files
Post by: MortenMacFly on January 16, 2009, 09:32:38 am
Just being curios: Why (except you develop a STL library yourself) would one ever want to debug into STL code?! :shock:
Title: Re: Problems (debugging) with standard C++ files
Post by: jaqq on January 17, 2009, 07:39:48 pm
Ollydbg, you don't really need a sample. Just call push_back and that's it. I can't debug inside it because as I said the debugger doesn't sync with the (no extension) source file. If push_back is implemented in a .h file of the standard library implementation that ships with mingw you probably won't be able to reproduce the problem. However, you might be able to reproduce it trying to debug inside a file with no extension.

MorteMacFly, your comment makes total sense. I'm not developing an STL version. However, I'm doing some work inside it. ;)