From: Elena Zannoni <ezannoni@redhat.com>
To: Jerome Guitton <guitton@act-europe.fr>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] stabs: octal negative numbers
Date: Tue, 23 Nov 2004 14:32:00 -0000 [thread overview]
Message-ID: <16803.18707.377459.922918@localhost.redhat.com> (raw)
In-Reply-To: <20041123140912.GA16691@adacore.com>
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 <guitton@gnat.com>
> >
> > * 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.
> >
next prev parent reply other threads:[~2004-11-23 14:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-26 17:39 Jerome Guitton
2004-10-26 17:50 ` Joel Brobecker
2004-11-23 14:10 ` Jerome Guitton
2004-11-23 14:32 ` Elena Zannoni [this message]
2004-11-23 14:38 ` Jerome Guitton
2004-11-25 19:20 ` [RFA/testsuite] Ada fixed points [was stabs: octal negative numbers] Jerome Guitton
2004-11-28 17:49 ` Daniel Jacobowitz
2004-11-29 10:24 ` Jerome Guitton
2004-11-29 13:42 ` Daniel Jacobowitz
2004-11-29 15:21 ` Andrew Cagney
2004-11-29 15:26 ` Daniel Jacobowitz
2004-11-29 17:24 ` Jerome Guitton
2004-12-01 17:17 ` Jerome Guitton
2004-12-13 17:21 ` Jerome Guitton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16803.18707.377459.922918@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=guitton@act-europe.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox