This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Stabs: constant string, constant boolean
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Daniël Mantione <daniel at deadlock dot et dot tudelft dot nl>
- Cc: gdb at sources dot redhat dot com
- Date: 26 Jan 2004 23:20:41 -0500
- Subject: Re: Stabs: constant string, constant boolean
- References: <Pine.LNX.4.44.0401270015420.4176-100000@deadlock.et.tudelft.nl>
Daniël Mantione <daniel@deadlock.et.tudelft.nl> writes:
> Could someone enlighten me on the support of the constant string and
> constant boolean for stabs debug information.
>
> I tried several versions of gdb (not yet 6.0), but all I get out of them
> is "error type". I try to generate debug info exactly as described on
> http://source.redhat.com/gdb/current/onlinedocs/stabs_3.html#SEC16
>
> I.e. I try to add a boolean like this:
>
> .stabs "BOOL1:c=b0;",36,0,5,0
>
> This results in "error type". However, if I try:
>
> .stabs "BOOL1:c=i0;",36,0,5,0
>
> ... gdb treats it as integer fine.
Looking at the code, I see that gdb only supports the 'r', 'i', and
'e' types. The 'b', 'c', 's', and 'S' types are documented, but not
supported.
I note this in the docs:
The boolean, character, string, and set constants are not
supported by GDB 4.9, but it ignores them.
This is not entirely unreasonable, as the 'b', 'c', 's', and 'S' types
are short on type information. I think it would normally be better to
use 'e' instead of 'b' or 'c'. I suppose that 's' and 'S' aren't seen
as an issue since they won't arise in C.
Ian