failure to step into std::string constructor [message #213059] |
Sun, 30 March 2008 13:40  |
Eclipse User |
|
|
|
Originally posted by: beluchin.hotmail.com
When debugging the program below:
#include <string>
#include <iostream>
using namespace std;
int main() {
std::string s("Hello World");
std::cout << s << '\n';
return 0;
}
I try to step into the constructor of the std::string. However, the
debugger apparently fails to do that. The iostream file is opened on the
editor and the next instruction is shown on line 77 of that file:
static ios_base::Init __ioinit;
Also, on the gdb console, the message:
mi_cmd_var_create: unable to create variable object
is shown. The program runs correctly, though. Can anything be done to make
gdb behave correctly when stepping into the constructor of std::string?
This is the first thing I try to do after I do a plain-vanilla
installation in Windows XP of (following the indicated order):
~ mingw 5.1.3 from sourceforge, with g++ and make
~ gdb 6.6 from the same page as mingw
~ classic Eclipse 3.3.2
~ CDT from inside Eclipse from
http://download.eclipse.org/tools/cdt/releases/europa
|
|
|
|
|
|
Re: failure to step into std::string constructor [message #213130 is a reply to message #213115] |
Mon, 31 March 2008 21:03  |
Eclipse User |
|
|
|
Originally posted by: beluchin.hotmail.com
I took a second look at this. I initially thought that the definition of
the std::string constructor resided in a header file, for it was a member
function of a class template.
I inspected the header files, though, and noticed that the GNU compiler
already implements (and uses) the "export" extension for templates, which
means that the definitions of the member functions of the standard
library's class templates is no longer on header files.
That explains why the debugger fails to step into that method.
Thanks for the heads-up.
|
|
|
Powered by
FUDForum. Page generated in 0.04532 seconds