This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] stabs: octal negative numbers



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.
 > > 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]