Re: gdb 8.x - g++ 7.x compatibility

carl hansen <[email protected]>
Newsgroups gmane.comp.gdb.devel,gmane.comp.gcc.devel
Message-ID <CAHEkXCQkg2HpJB1qv7EdwSmYNdCR_=g4JRtcmMyv5PwoOR=bfA@mail.gmail.com>
On Fri, Feb 2, 2018 at 7:17 PM, Roman Popov <[email protected]> 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.​
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.