From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20281 invoked by alias); 9 Jul 2002 11:16:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20263 invoked by uid 71); 9 Jul 2002 11:16:01 -0000 Date: Tue, 09 Jul 2002 04:16:00 -0000 Message-ID: <20020709111601.20261.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: James Cownie Subject: Re: debug/7241: DWARF encoding for "char" incorrect in gcc Reply-To: James Cownie X-SW-Source: 2002-07/txt/msg00262.txt.bz2 List-Id: The following reply was made to PR debug/7241; it has been noted by GNATS. From: James Cownie To: Franz Sirl Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: debug/7241: DWARF encoding for "char" incorrect in gcc Date: Tue, 09 Jul 2002 12:12:20 +0100 > Hmm, I would rather think g++ is the wrong one here. IIRC in C++ (C > too?) "char"/"signed char"/"unsigned char" are actually 3 distinct > types and thus encoding 6 should have only be used if you would have > explicitly written "signed char" in your example, or? My point is not the issue of signedness, but that of "character"-ness. Gcc is emitting this as if it were int8_t (a single byte integer), and is not telling the debugger that the type should be displayed as holding a character. DWARF only has encodings for explicitly signed or explicitly unsigned objects. The fact that C has three different char types ("char", "signed char" and "unsigned char") is not expressible in DWARF, where the debugger needs to know what the underlying representation really is. Therefore in DWARF I would always expect that the C "char" type should be represented as either DW_ATE_signed_char or DW_ATE_unsigned_char, as appropriate. "char" should _not_ be represented as DW_ATE_signed or DW_ATE_unsigned, since those are _integer_ types, and the debugger will not attempt to display them as characters. -- Jim James Cownie Etnus, LLC. +44 117 9071438 http://www.etnus.com