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 V3 1/6] Merges gdb and gdbserver implementation for siginfo.


In $subject: please use imperative "Merge".  Also, "implementations",
plural.  (Please drop periods in subject lines while at it).

On 01/18/2016 08:25 AM, Walfred Tedeschi wrote:
> The compatible siginfo handling from amd64-linux-nat.c and
> gdbserver/linux-x86-low were extracted it into a new file
> nat/amd64-linux-siginfo.c.

I suggest:

Extract the compatible siginfo handling from amd64-linux-nat.c and
gdbserver/linux-x86-low to a new file nat/amd64-linux-siginfo.c.

> 
> 
> 2016-01-15  Walfred Tedeschi  <walfred.tedeschi@intel.com>
> 
> gdb/ChangeLog:
> 
> 	* nat/amd64-linux-siginfo.c: New file.
> 	* nat/amd64-linux-siginfo.h: New file.
> 	* Makefile.in (HFILES_NO_SRCDIR): Add nat/amd64-linux-siginfo.h.
> 	 Add native object files rule for

This "Add native..." sentence looks stray/unfinished.  Also, if it stays,
please align it with a single tab (you have an extra suprious space).

> 	(amd64-linux-siginfo.o): New rule.
> 	* config/i386/linux64.mh (NATDEPFILES): Add amd64-linux-siginfo.o.
> 	* amd64-linux-nat.c (nat/amd64-linux-siginfo.h): New include.
> 	(compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
> 	(compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
> 	(and collateral structures): Move to nat/amd64-linux-siginfo.c.

Please spell out the structures names instead of the "and collateral
structures" bit.

> 
> 
> gdb/gdbserver/ChangeLog:
> 
> 	* configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
> 	to srv_tgtobj.
> 	(i[34567]86-*-linux*): Add amd64-linux-siginfo.o
> 	to srv_tgtobj.
> 	* linux-x86-low.c [__x86_64__]: Include
> 	"nat/mad64-linux-siginfo.h".

Typo "mad64".

> 	(compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
> 	(compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
> 	(and collateral structures): Move to nat/amd64-linux-siginfo.c.

See above.

> 	* Makefile.in (amd64-linux-siginfo.o:): New rule.


> +
> +/*  Converts the system provided siginfo into compatible siginfo.  */

Say "Convert".  Also, please leave an empty line between intro command
and function definition.

> +static void
> +compat_siginfo_from_siginfo (compat_siginfo_t *to, siginfo_t *from)
> +{

> +
> +/* Converts the compatible siginfo into system siginfo.  */
> +static void
> +siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from)

Ditto.

> +/*  Converts the system provided siginfo into compatible x32 siginfo.  */
> +static void
> +compat_x32_siginfo_from_siginfo (compat_x32_siginfo_t *to,
> +				 siginfo_t *from)

Ditto.


> +
> +/* Converts the compatible x32 siginfo into system siginfo.  */
> +static void
> +siginfo_from_compat_x32_siginfo (siginfo_t *to,
> +				 compat_x32_siginfo_t *from)

Ditto.

Otherwise OK.

Thanks,
Pedro Alves


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