Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [patch] Expand tildes in solib-search-path entries.
Date: Thu, 24 May 2012 15:31:00 -0000	[thread overview]
Message-ID: <4FBE542E.8020703@redhat.com> (raw)
In-Reply-To: <1337710624.19373.9.camel@hactar>

On 05/22/2012 07:17 PM, Thiago Jung Bauermann wrote:

> diff --git a/gdb/source.c b/gdb/source.c
> index 27c5b0e..af68ebd 100644
> --- a/gdb/source.c
> +++ b/gdb/source.c
> @@ -771,8 +771,28 @@ openp (const char *path, int opts, const char *string,
>  	}
>        else
>  	{
> -	  /* Normal file name in path -- just use it.  */
> -	  strcpy (filename, dir);
> +	  /* See whether we need to expand the tilde.  */
> +	  if (strchr(dir, '~'))


Seem to me this could be an "else if" above the "else" instead of
nested within the "else".  The "Don't search $cdir" bit below
should never apply, even in the rare beyond belief case of the user's
home expanding to literal "$cdir".  Okay with that change.

-- 
Pedro Alves


  reply	other threads:[~2012-05-24 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 18:17 Thiago Jung Bauermann
2012-05-24 15:31 ` Pedro Alves [this message]
2012-05-30  3:44   ` Thiago Jung Bauermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FBE542E.8020703@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=thiago.bauermann@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox