public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix mi-file.exp fails on remote host
Date: Tue, 13 May 2014 18:51:00 -0000	[thread overview]
Message-ID: <537264BF.8050402@redhat.com> (raw)
In-Reply-To: <1399966474-6106-1-git-send-email-yao@codesourcery.com>

On 05/13/14 08:34, Yao Qi wrote:

> and the file name is "basics.c" in my test env, so use string_to_regexp
> instead.

I don't get this rationale.  I mean, I get that . is special in regexps, but
although not strictly correct, it's usually harmless.  I believe we have a
ton of cases of just passing a filename with a dot as a regexp, as evidenced
by ...

>      # get the path and absolute path to the current executable
>      mi_gdb_test "222-file-list-exec-source-files" \
> -	    "222\\\^done,files=\\\[\{file=\".*/${srcfile}\",fullname=\"$fullname_syntax${srcfile}\"\}.*]" \
> +	    "222\\\^done,files=\\\[\{file=\"[string_to_regexp ${srcfile}]\",fullname=\"$fullname_syntax${srcfile}\"\}.*]" \
>                "Getting a list of source files."

... the second ${srcfile} in the exact same line your changing.  So it
looks odd to have to change one, but not the other.

What am I missing?

-- 
Pedro Alves

  reply	other threads:[~2014-05-13 18:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13  7:37 Yao Qi
2014-05-13 18:51 ` Pedro Alves [this message]
2014-05-14  2:22   ` Yao Qi
2014-05-14  8:48     ` Pedro Alves
2014-05-14 12:25       ` Yao Qi

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=537264BF.8050402@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).