From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20067 invoked by alias); 23 Mar 2013 17:57:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 19974 invoked by uid 89); 23 Mar 2013 17:57:34 -0000 X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.1 Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 23 Mar 2013 17:57:30 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MK400G00KBK5Y00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Sat, 23 Mar 2013 19:57:28 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MK400GY0KJR5540@a-mtaout21.012.net.il>; Sat, 23 Mar 2013 19:57:27 +0200 (IST) Date: Sun, 24 Mar 2013 00:07:00 -0000 From: Eli Zaretskii Subject: Re: one week to gdb-7.6 release? In-reply-to: <20130323162534.GI5447@adacore.com> To: Joel Brobecker Cc: gdb-patches@sourceware.org, palves@redhat.com, jan.kratochvil@redhat.com, ralf.corsepius@rtems.org, vapier@gentoo.org, joel.sherrill@oarcorp.com Reply-to: Eli Zaretskii Message-id: <834ng23soj.fsf@gnu.org> References: <20130320160032.GC5447@adacore.com> <83vc8myoyb.fsf@gnu.org> <83ehf64cfs.fsf@gnu.org> <20130323162534.GI5447@adacore.com> X-SW-Source: 2013-03/txt/msg00876.txt.bz2 > Date: Sat, 23 Mar 2013 09:25:34 -0700 > From: Joel Brobecker > 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 > > > > * 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.)