This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFA] New constvars.exp tests
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: fnasser at redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Thu, 10 Oct 2002 16:39:53 -0400
- Subject: Re: [PATCH RFA] New constvars.exp tests
- References: <1021010203259.ZM16308@localhost.localdomain>
On Thu, Oct 10, 2002 at 01:32:59PM -0700, Kevin Buettner wrote:
> I am about to submit a patch which causes ptype to print a struct with
> qualifiers correctly. E.g, for the "crass" test, gdb currently
> exhibits the following behavior:
>
> (gdb) ptype crass
> type = struct crass {
> char * constptr;
> }
>
> This is incorrect because gdb failed to print a space in between
> "const" and "ptr".
>
> Unfortunately, if you don't use Dwarf 2, you'll simply end up seeing
>
> type = struct crass {
> char *ptr;
> }
>
> ...which is also wrong, but not unexpected (hence the xfail).
Not necessarily. Recent versions of GCC will emit const qualifiers in
stabs, leading to a horde of XPASS's in our testsuite... but that's a
problem for another patch.
Nice to see someone working on the type printer. I'm planning to
submit a "hit it over the head with a board" patch in a couple of days,
to let us simulate the output of the various demangling styles.
> * gdb.base/constvars.c (struct crass, struct crisp): New structs.
> * gdb.base/constvars.exp (ptype crass, ptype crisp): New tests.
FWIW, these test cases look correct to me.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer