Re: [patch] gdb.c++/local.exp: make usable with gcc

Daniel Jacobowitz
2002-04-09T04:39:50Z

On Mon, Apr 08, 2002 at 10:15:15PM -0500, Michael Elizabeth Chastain wrote:
> This is about as much fun as a trip to the dentist. And about as
> necessary, too.
>
> gdb.c++/local.exp has four tests for classes defined in nested scopes.
> In sound-byte terms, the tests "were never known to work with gcc".
> Most tests in most configurations FAILed or XFAILed (look at one of the
> weekly attention reports). Those that did PASS were passing because
> their error messages were deemed legal output.
>
> There is some nice testing functionality buried in here so I polished it
> up and ran it on my testbed. The big change was to access the nested
> classes inside the scope where they are defined rather than outside.
> The four tests reveal two genuine gdb bugs, which now result in FAILs.
>
> The bugs are:
>
> . For a nested class definition with v3 dwarf-2 (plus 2.96-rh dwarf-2),
> gdb prints two copies of the member function declaration.
>
> . gdb treats the commands "ptype InnerLocal::NestedInnerLocal" as a
> field lookup in the InnerLocal class, failing to find the nested
> class named NestedInnerLocal. This happens with both v2 and v3,
> both dwarf-2 and stabs+.
>
> I'm going to put this up for comment for 24 hours and then commit.
> After commit, I will file PR's for the bugs.

Thanks! I'll take a look at those to-be PRs when I have a chance.

--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer