This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gdb 8.x - g++ 7.x compatibility
- From: Roman Popov <ripopov at gmail dot com>
- To: gdb at sourceware dot org, gcc at gcc dot gnu dot org
- Date: Fri, 2 Feb 2018 19:17:38 -0800
- Subject: gdb 8.x - g++ 7.x compatibility
- Authentication-results: sourceware.org; auth=none
Hello,
I'm trying to switch from g++ 5.4 to g++ 7.2.
GDB 8.0.1 however does not understand RTTI generated by g++7.2, so my
Python scripts for GDB are not working.
Here is a code example:
struct base { virtual ~base(){} };
template< int IVAL, unsigned UVAL, unsigned long long ULLVAL>
struct derived : base {
int x = IVAL + + UVAL + ULLVAL;
};
int main()
{
base * o = new derived<1,2,3>{};
return 0;
}
When compiled with g++5.4 I can read value of x in debugger.
When compiled with g++7.2 gdb reports:
warning: RTTI symbol not found for class 'derived<1, 2u, 3ull>'
Problem here is that type name saved in debug information is
*derived<1, 2, 3>*, not *derived<1, 2u, 3ull>*
Do you plan to fix this anytime soon?
Thanks,
Roman