From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28541 invoked by alias); 27 Jan 2004 04:20:50 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 28534 invoked from network); 27 Jan 2004 04:20:48 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sources.redhat.com with SMTP; 27 Jan 2004 04:20:48 -0000 Received: (qmail 16680 invoked by uid 10); 27 Jan 2004 04:20:47 -0000 Received: (qmail 13485 invoked by uid 500); 27 Jan 2004 04:20:41 -0000 From: Ian Lance Taylor To: =?iso-8859-1?q?Dani=EBl?= Mantione Cc: gdb@sources.redhat.com Subject: Re: Stabs: constant string, constant boolean References: Date: Tue, 27 Jan 2004 04:20:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2004-01/txt/msg00310.txt.bz2 Dani=EBl Mantione writes: > Could someone enlighten me on the support of the constant string and > constant boolean for stabs debug information. >=20 > 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 >=20 > I.e. I try to add a boolean like this: >=20 > .stabs "BOOL1:c=3Db0;",36,0,5,0 >=20 > This results in "error type". However, if I try: >=20 > .stabs "BOOL1:c=3Di0;",36,0,5,0 >=20 > ... 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