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: New ARI warning Fri Feb 27 01:54:21 UTC 2015


> Yes, I've tried to follow that in my other patches (some of which I haven't
> sent yet), but most of the code I work on follows the other style and old
> habits die hard. :)

:-)

> Not sure if these sorts of fixes need a ChangeLog entry as well, but does
> this address these?

Yes, all changes require a ChangeLog entry (I have this wild and
impossible dream that, one day, we will get rid of these ChangeLogs.
One day...)

> gdb/ChangeLog:
> 
> 	* amd64fbsd-tdep.c (amd64fbsd_sigtramp_p): Style fixes.
> 	* i386fbsd-tdep.c (i386fbsd_sigtramp_p): Likewise.



> diff --git a/gdb/i386fbsd-tdep.c b/gdb/i386fbsd-tdep.c
> index d4516ee..ed41706 100644
> --- a/gdb/i386fbsd-tdep.c
> +++ b/gdb/i386fbsd-tdep.c
> @@ -105,24 +105,24 @@ static const gdb_byte i386fbsd_osigtramp_end[] =
>  };
>  
>  /* The three different trampolines are all the same size.  */
> -gdb_static_assert (sizeof i386fbsd_sigtramp_start ==
> -                  sizeof i386fbsd_freebsd4_sigtramp_start);
> -gdb_static_assert (sizeof i386fbsd_sigtramp_start ==
> -                  sizeof i386fbsd_osigtramp_start);
> -gdb_static_assert (sizeof i386fbsd_sigtramp_middle ==
> -                  sizeof i386fbsd_freebsd4_sigtramp_middle);
> -gdb_static_assert (sizeof i386fbsd_sigtramp_middle ==
> -                  sizeof i386fbsd_osigtramp_middle);
> -gdb_static_assert (sizeof i386fbsd_sigtramp_end ==
> -                  sizeof i386fbsd_freebsd4_sigtramp_end);
> -gdb_static_assert (sizeof i386fbsd_sigtramp_end ==
> -                  sizeof i386fbsd_osigtramp_end);
> +gdb_static_assert (sizeof i386fbsd_sigtramp_start
> +                  == sizeof i386fbsd_freebsd4_sigtramp_start);
> +gdb_static_assert (sizeof i386fbsd_sigtramp_start
> +                  == sizeof i386fbsd_osigtramp_start);
> +gdb_static_assert (sizeof i386fbsd_sigtramp_middle
> +                  == sizeof i386fbsd_freebsd4_sigtramp_middle);
> +gdb_static_assert (sizeof i386fbsd_sigtramp_middle
> +                  == sizeof i386fbsd_osigtramp_middle);
> +gdb_static_assert (sizeof i386fbsd_sigtramp_end
> +                  == sizeof i386fbsd_freebsd4_sigtramp_end);
> +gdb_static_assert (sizeof i386fbsd_sigtramp_end
> +                  == sizeof i386fbsd_osigtramp_end);
>  
>  /* We assume that the middle is the largest chunk below.  */
> -gdb_static_assert (sizeof i386fbsd_sigtramp_middle >
> -                  sizeof i386fbsd_sigtramp_start);
> -gdb_static_assert (sizeof i386fbsd_sigtramp_middle >
> -                  sizeof i386fbsd_sigtramp_end);
> +gdb_static_assert (sizeof i386fbsd_sigtramp_middle
> +                  > sizeof i386fbsd_sigtramp_start);
> +gdb_static_assert (sizeof i386fbsd_sigtramp_middle
> +                  > sizeof i386fbsd_sigtramp_end);

You'll need to mention those in the ChangeLog as well.
Since there is no function as the context, I would probably say
something like this:

        * i386fbsd-tdep.c: Fix style in various gdb_static_assert
        expressions.

?

Otherwise, looks good to me.

Thanks!
-- 
Joel


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