Hi all!
This is a question regarding the gdb command 'info types', which can tell where a type is defined in source code.
For example, in gdb if I type 'info types mytype' in the following program:
Code:
//main.cpp
#include <iostream>
struct mytype
{
const static bool value = false;
};
int
main()
{
//mytype tip; //if I remove this comment, it works
std::cout << mytype::value << std::endl;
retu 0;
}
But if I remove comment in line 12, gdb finds the type definition and outputs this:
Code:
All types matching regular expression "mytype": File main.cpp: mytype;
Is it possible to find where a type is defined in gdb without declaring a variable of that type?
Thanks a lot!
برچسب:
نویسنده: استخدام کار