This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb.c++ failures


On Thu, Jan 10, 2002 at 07:21:18PM +0000, Jason Merrill wrote:
> >>>>> "Michael" == Michael Elizabeth Chastain <mec@shout.net> writes:
> 
> > Jason Merrill writes:
> >> method.exp: The 'print this' tests are failing because gdb is printing
> >> the types as, say, (A * const), and the test just wants (A *).  The
> >> former is correct, since 'this' is readonly.  Any objection to changing
> >> the test (and others affected) to allow the const?
> 
> > Fred Fish submitted a patch for this.
> 
> Quite so.  Fred, it looks good to me.

I agree.

> > There is a second issue in the patch about the type of "this" in const
> > methods.  The type should be "const A *", and I would be willing to
> > accept "const A * const".  But gdb with stabs is printing just plain "A
> > *".
> 
> The stabs output from gcc ignores const and volatile.  There is even a
> comment saying that "stabs does not distinguish const and volatile".
> The method qualifiers are described, and gdb could do the work to apply
> them to the type of 'this', but it's probably fine just to leave it as it
> is.

There are documented extensions to STABS to express both const and
volatile.  GDB supports them, and documents them - see info stabs. 
They're originally Sun extensions.

Could I persuade you to add them to GCC?  It would take you less time
than I.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]