From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10931 invoked by alias); 23 Nov 2004 14:32:30 -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 10806 invoked from network); 23 Nov 2004 14:32:11 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 23 Nov 2004 14:32:11 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iANEWAon031486 for ; Tue, 23 Nov 2004 09:32:10 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iANEWAr23196 for ; Tue, 23 Nov 2004 09:32:10 -0500 Received: from localhost.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id iANEWAgs011787; Tue, 23 Nov 2004 09:32:10 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 708BE1A467A; Tue, 23 Nov 2004 09:28:35 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16803.18707.377459.922918@localhost.redhat.com> Date: Tue, 23 Nov 2004 14:32:00 -0000 To: Jerome Guitton Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] stabs: octal negative numbers In-Reply-To: <20041123140912.GA16691@adacore.com> References: <20041026173953.GA31663@act-europe.fr> <20041123140912.GA16691@adacore.com> X-SW-Source: 2004-11/txt/msg00449.txt.bz2 I have no problems with this as long as a testcase is added. > > Jerome Guitton (guitton@act-europe.fr): > > > The patch in attachment adds support for parsing stabs that contains > > negative numbers in octal, two's complement form. I have never > > experienced the problem with C programs, but GCC generates those kind > > of numbers for some Ada subtypes: > > > > procedure Test_Case is > > > > type Base_Fixed_Point_Type is > > delta 1.0 / 16.0 > > range (System.Min_Int / 2) * 1.0 / 16.0 .. > > (System.Max_Int / 2) * 1.0 / 16.0; > > > > subtype Fixed_Point_Subtype is > > Base_Fixed_Point_Type range -50.0 .. 50.0; > > > > begin > > null; > > end Test_Case; > > > > The stabs generated for Fixed_Point_Subtype is: > > > > .stabs "test_case__fixed_point_subtype___XF_1_16:t(0,14)=@s64;r(0,12);01777777777777777776340;0000000001440;",128,0,10,0 > > > > (01777777777777777776340 is -800 on 64-bits). > > > > Tested on an i686-linux host, with stabs+ format, no regressions. > > Worth submitting an Ada test case, I guess. > > > > Comments? OK to apply? > > > > -- > > Jerome > > > 2004-10-26 Jerome Guitton > > > > * stabsread.c (read_huge_number): Add support for reading octal > > signed number in twos complement, based on the size of this > > number. > > (read_range_type): Add support for reading octal signed bounds > > in twos complements, based on the size of the type. > > (read_type_number, read_cpp_abbrev, read_member_functions, > > read_cpp_abbrev, read_one_struct_field, read_baseclasses, > > read_struct_type, read_array_type, read_enum_type, > > read_sun_builtin_type, read_sun_floating_type): Update calls to > > read_huge_number. > > (read_type): Update call to read_range_type. > >