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: one week to gdb-7.6 release?


> Date: Sat, 23 Mar 2013 09:25:34 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org, palves@redhat.com,
> 	jan.kratochvil@redhat.com, ralf.corsepius@rtems.org,
> 	vapier@gentoo.org, joel.sherrill@oarcorp.com
> 
> > 2013-03-18  Eli Zaretskii  <eliz@gnu.org>
> > 
> > 	* windows-nat.c (windows_get_absolute_argv0): New function.
> > 	* windows-nat.h: Add its prototype.
> > 
> > 	* main.c (get_init_files): Use filename_ncmp instead of strncmp.
> > 	Use IS_DIR_SEPARATOR instead of looking for a character inside
> > 	SLASH_STRING.  Include filenames.h.
> > 	(captured_main) [__MINGW32__]: Make argv[0] absolute, so that
> > 	relocate_gdb_directory works when passed gdb_program_name.
> > 	Include windows-nat.h.
> 
> I think that the patch, as is, breaks the windows-hosted cross-debugger
> builds. windows-nat.o is only linked in when configured as a native
> debugger:
> 
>    if test "${gdb_native}" = "yes"; then
>      host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
> 
> I think that the standard approach in this case would be to define
> a function in utils.h, and have its implementation in both posix-hdep.c
> and mingw-hdep.c.

What would the implementation in posix-hdep.c look like?  Just return
its argument, xstrdup'ed?

> A minor nitpick on coding style: Can you add an empty line between
> the comment documenting a function ands its definition?

I don't mind, but this style is not uniformly used in the sources.
Quite a few places don't leave that empty line.  (I'm accustomed to
the latter, which is why I used that.)


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