From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24234 invoked by alias); 25 Mar 2003 17:07:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24215 invoked from network); 25 Mar 2003 17:07:12 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 25 Mar 2003 17:07:12 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h2PH7BQ26607 for ; Tue, 25 Mar 2003 12:07:11 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h2PH7BQ26414 for ; Tue, 25 Mar 2003 12:07:11 -0500 Received: from cygbert.vinschen.de (vpn50-10.rdu.redhat.com [172.16.50.10]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h2PH79506699 for ; Tue, 25 Mar 2003 09:07:09 -0800 Received: (from corinna@localhost) by cygbert.vinschen.de (8.11.6/8.9.3/Linux sendmail 8.9.3) id h2PH73527567 for gdb-patches@sources.redhat.com; Tue, 25 Mar 2003 18:07:03 +0100 Date: Tue, 25 Mar 2003 17:07:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: Re: [PATCH] xstormy16-tdep.c: Set chars to unsigned Message-ID: <20030325170703.GM23762@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20030325161831.GF23762@cygbert.vinschen.de> <3E8083BD.90807@redhat.com> <20030325163554.GH23762@cygbert.vinschen.de> <3E8089A9.8070805@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E8089A9.8070805@redhat.com> User-Agent: Mutt/1.4i X-SW-Source: 2003-03/txt/msg00499.txt.bz2 On Tue, Mar 25, 2003 at 11:54:01AM -0500, Andrew Cagney wrote: > >On Tue, Mar 25, 2003 at 11:28:45AM -0500, Andrew Cagney wrote: > These tests: > > print/d (int) (char) -1 > $11 = -1 > [...] are looking pretty normal: print/d (int) (char) -1^M $11 = 255^M (gdb) PASS: gdb.base/sizeof.exp: get value of (int) (char) -1 (255) print/d (int) (signed char) -1^M $12 = -1^M (gdb) PASS: gdb.base/sizeof.exp: get value of (int) (signed char) -1 (-1) print/d (int) (unsigned char) -1^M $13 = 255^M (gdb) PASS: gdb.base/sizeof.exp: get value of (int) (unsigned char) -1 (255) next^M valueof ((int) (char) -1) == 255^M 118 printf ("valueof ((int) (signed char) -1) == %d\n", (int) (signed char) -1);^M (gdb) PASS: gdb.base/sizeof.exp: check valueof (int) (char) -1 == 255 next^M valueof ((int) (signed char) -1) == -1^M 119 printf ("valueof ((int) (unsigned char) -1) == %d\n", (int) (unsigned char) -1);^M (gdb) PASS: gdb.base/sizeof.exp: check valueof (int) (signed char) -1 == -1 next^M valueof ((int) (unsigned char) -1) == 255^M 121 return 0;^M > Can you please check this, and expand a little on exactly what the > charsets.exp problem was. The characters returned from the application's strings were unsigned, the characters evaluated in gdb internally were signed e. g.: print 'A'^M $3 = -63 'A'^M (gdb) PASS: gdb.base/charset.exp: parse character literal in ibm1047 print 'A' == ibm1047_string[8]^M $4 = 0^M (gdb) FAIL: gdb.base/charset.exp: check value of parsed character literal in ibm1047 This is solved with my patch. Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc. mailto:vinschen@redhat.com