This is the mail archive of the gdb-patches@sourceware.org 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: [PATCH v5 01/15] refactoring: rename create_range_type to create_static_range_type


Thanks for your review.

> I have a few minor formatting nits highighted below, but this patch
> is pre-approved with those changes.
Addressed mentioned ChangeLog and coding style issues below. Thanks again.

 -Sanimir

> -----Original Message-----
> From: Joel Brobecker [mailto:brobecker@adacore.com]
> Sent: Thursday, February 27, 2014 11:03 PM
> To: Agovic, Sanimir
> Cc: tromey@redhat.com; Boell, Keven; gdb-patches@sourceware.org
> Subject: Re: [PATCH v5 01/15] refactoring: rename create_range_type to
> create_static_range_type
> 
> On Thu, Feb 06, 2014 at 05:27:22PM +0100, Sanimir Agovic wrote:
> > 2013-12-19  Sanimir Agovic  <sanimir.agovic@intel.com>
> >             Keven Boell <keven.boell@intel.com>
> >
> > 	* gdbtypes.c (create_static_range_type): Renamed from create_range_type.
> > 	* gdbtypes.h (create_static_range_type): Renamed from create_range_type.
> > 	* ada-lang.c (*): All uses of create_range_type updated.
> > 	* coffread.c (*): All uses of create_range_type updated.
> > 	* dwarf2read.c (*): All uses of create_range_type updated.
> > 	* f-exp.y (*): All uses of create_range_type updated.
> > 	* m2-valprint.c (*): All uses of create_range_type updated.
> > 	* mdebugread.c (*): All uses of create_range_type updated.
> > 	* stabsread.c (*): All uses of create_range_type updated.
> > 	* valops.c (*): All uses of create_range_type updated.
> > 	* valprint.c (*): All uses of create_range_type updated.
> 
> Can you remove the " (*)" from the ChangeLog entries? These are not
> needed. Thus, for instance:
> 
>         * ada-lang.c: All uses of create_range_type updated.
> 
> I have a few minor formatting nits highighted below, but this patch
> is pre-approved with those changes.
> 
> Thank you!
> 
> > diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
> > index 786ca7a..0d93267 100644
> > --- a/gdb/ada-lang.c
> > +++ b/gdb/ada-lang.c
> > @@ -1875,8 +1875,8 @@ ada_type_of_array (struct value *arr, int bounds)
> >            struct value *high = desc_one_bound (descriptor, arity, 1);
> >
> >            arity -= 1;
> > -          create_range_type (range_type, value_type (low),
> > -                             longest_to_int (value_as_long (low)),
> > +          create_static_range_type (range_type, value_type (low),
> > +				    longest_to_int (value_as_long (low)),
> >                               longest_to_int (value_as_long (high)));
> 
> The indentation of the 3 line (longest_to_int) needs to be adjusted.
> 
> >    struct type *index_type =
> > -    create_range_type (NULL, TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (type0)),
> > -                       low, high);
> > +    create_static_range_type (NULL, TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (type0)),
> > +			      low, high);
> 
> I know that you've been following the style in this file, but
> the assignment operator should be at the start of the next line.
> We don't need or even want to fix all incorrect forms in this patch,
> but can we fix the ones we touch?
> 
> >    struct type *index_type =
> > -    create_range_type (NULL, TYPE_INDEX_TYPE (type), low, high);
> > +    create_static_range_type (NULL, TYPE_INDEX_TYPE (type), low, high);
> 
> Same here, please.
> 
> >    struct type *index_type =
> > -    create_range_type (NULL, TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (arr_type0)),
> > -                       low, low - 1);
> > +    create_static_range_type
> > +    (NULL, TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (arr_type0)), low, low - 1);
> 
> Same as above. Also, can you indent the '(' for the start of the
> function parameters 2 characters past the funtion's indentation?
> Something like the following:
> 
>   struct type *index_type
>     = create_static_range_type
>         (NULL, TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (arr_type0)), low, low - 1);
> 
> --
> Joel
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


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