On Thu, 2014-07-03 at 12:05 +0200, Jakub Jelinek wrote: > On Thu, Jul 03, 2014 at 11:53:29AM +0200, Mark Wielaard wrote: > > I pulled out the guality.exp [p]type test extension from the actual > > dwarf2out.c changes (which I will repost soon with some tweaks). I think > > the test extension itself is useful on its own (and will use it to > > add tests for my new patches). > > > > All new tests PASS, except when using -flto, so you'll need the > > "Don't run guality.exp tests with LTO_TORTURE_OPTIONS" > > if you don't want to add new FAILs. But I hope this patch can go in > > even without that because I do think it is useful on its own. > > Is what gdb prints for ptype stable across different gdb versions (except > for whitespace that you canonicalize)? If yes, this looks good to me.
Yes, I believe it is (I tested against gdb git master and gdb 7.6.50). It tries to print the expression as a canonical C type, so it should be stable. GDB itself contains similar tests, but for pregenerated .S files or synthetic generated DWARF. This just extends it to make sure gcc and gdb agree on the produced/consumed debuginfo. Cheers, Mark