This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/501: Stabs Documentation Incorrect for Pointer Instances
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 18 Apr 2002 17:08:02 -0000
- Subject: Re: gdb/501: Stabs Documentation Incorrect for Pointer Instances
- Reply-to: Daniel Jacobowitz <drow at mvista dot com>
The following reply was made to PR gdb/501; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@mvista.com>
To: aryeh@dreamzion.com
Cc: gdb-gnats@sources.redhat.com
Subject: Re: gdb/501: Stabs Documentation Incorrect for Pointer Instances
Date: Thu, 18 Apr 2002 13:06:27 -0400
On Thu, Apr 18, 2002 at 04:44:19PM -0000, aryeh@dreamzion.com wrote:
>
> >Number: 501
> >Category: gdb
> >Synopsis: Stabs Documentation Incorrect for Pointer Instances
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: unassigned
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Thu Apr 18 09:48:01 PDT 2002
> >Closed-Date:
> >Last-Modified:
> >Originator: Aryeh M. Friedman
> >Release: All versions of stabs.info file
> >Organization:
> >Environment:
> GCC 2.95.X through to current GCC on FreeBSD/Linux/Solaris
> >Description:
> When stabs are produced for the following code:
>
> main()
> {
> char *p1;
> char *p2;
> }
>
> Something similor to the following stab string is produced:
> p1:(0,25)=*(0,1)
> p2:(0,25)
>
> Note that type (0,25) has is an undefined type as far as type def.
> stabs are concerned (i.e. there is no stab defining the type). Thus
> (0,25) is a implicitally created type definition. This behaviour is
> not documented in the stabs documentation. The documentation makes
> the incorrect assumption that all instance type ID's have an
> associated type definition stab this is simply incorrect in the case
> of PTR's and perhaps other types (if I find more cases of implicit
> type definition creation I will add them to this report).
There's examples of implicit type definition all over the manual.
Typedef stabs are only for named types, and 'pointer to <existing
type>' doesn't get a name. The phrase 'type definition' is used to
refer to what you're calling implicit type definitions, not to an
actual named 't' stab.
The documentation certainly needs updating (or destroying), though.
The stabs manual included with GDB is often wildly inaccurate, mostly
because the stabs format is not well-defined or consistently
implemented.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer