This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb 8.x - g++ 7.x compatibility
- From: carl hansen <carlhansen1234 at gmail dot com>
- To: Roman Popov <ripopov at gmail dot com>
- Cc: gdb at sourceware dot org, GCC Development <gcc at gcc dot gnu dot org>
- Date: Fri, 2 Feb 2018 19:57:28 -0800
- Subject: Re: gdb 8.x - g++ 7.x compatibility
- Authentication-results: sourceware.org; auth=none
- References: <CAATAM3ED7B3wEJFmaZA_MaOtN5EGKSGFmusAf-Mg5hX35D2r6A@mail.gmail.com>
On Fri, Feb 2, 2018 at 7:17 PM, Roman Popov <ripopov@gmail.com> wrote:
> 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
>
try gdb 8.1 and gcc 7.3 and iterate.
see if fixed, repost.