This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: one week to gdb-7.6 release?
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org, palves at redhat dot com, jan dot kratochvil at redhat dot com, ralf dot corsepius at rtems dot org, vapier at gentoo dot org, joel dot sherrill at oarcorp dot com
- Date: Mon, 25 Mar 2013 08:18:26 -0700
- Subject: Re: one week to gdb-7.6 release?
- References: <20130320160032 dot GC5447 at adacore dot com> <83vc8myoyb dot fsf at gnu dot org> <83ehf64cfs dot fsf at gnu dot org> <20130323162534 dot GI5447 at adacore dot com> <834ng23soj dot fsf at gnu dot org>
> > 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?
That would be a good start indeed. We could possibly think of testing
that the argument is an absolute path and then apply an xfullpath on
it if not, but we'd be taking a risk of causing a change in behavior.
What I would do is add a comment inside the posix implementation that
the current use of this function is such that returning a copy of
the argument is sufficient. That way, someone finding that the function
finally needs to be implemented will understand the history.
> > 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.)
I understand where you are coming from. This is based on a discussion
we had on this, and we decided to standardize on the former. It really
does not matter to me either way, but I try to help us improve our
consistency...
--
Joel