From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26313 invoked by alias); 31 Mar 2014 01:06:51 -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 26298 invoked by uid 89); 31 Mar 2014 01:06:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 31 Mar 2014 01:06:46 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WUQgS-0001Cp-GN from Yao_Qi@mentor.com ; Sun, 30 Mar 2014 18:06:40 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 30 Mar 2014 18:06:40 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Sun, 30 Mar 2014 18:06:36 -0700 Message-ID: <5338BF1B.5000204@codesourcery.com> Date: Mon, 31 Mar 2014 01:06:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Keith Seitz CC: Subject: Re: [PATCH] Escape backslash in windows path References: <1396058002-13704-1-git-send-email-yao@codesourcery.com> <53366280.5050909@redhat.com> In-Reply-To: <53366280.5050909@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00678.txt.bz2 On 03/29/2014 02:04 PM, Keith Seitz wrote: >> + # Escape backslash in case HOME is a windows path. >> > + regsub -all {\\} $HOME {\\\\} HOME >> > pass $test >> > } >> > } > Does string_to_regexp work for this? Yes, I didn't know this procedure before. Update the patch using string_to_regexp. -- Yao (齐尧) gdb/testsuite: 2014-03-31 Yao Qi * gdb.base/setshow.exp: Invoke string_to_regexp to HOME and PWD. --- gdb/testsuite/gdb.base/setshow.exp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp index 13da410..639ca72 100644 --- a/gdb/testsuite/gdb.base/setshow.exp +++ b/gdb/testsuite/gdb.base/setshow.exp @@ -179,7 +179,7 @@ gdb_test_no_output "set history filename ~/foobar.baz" \ "set history filename ~/foobar.baz" #test show history filename ~/foobar.baz gdb_test "show history filename" \ - "The filename in which to record the command history is \"$HOME/foobar.baz\"..*" \ + "The filename in which to record the command history is \"[string_to_regexp $HOME]/foobar.baz\"..*" \ "show history filename (~/foobar.baz)" #get current working directory set PWD "" @@ -195,7 +195,7 @@ gdb_test_no_output "set history filename foobar.baz" \ "set history filename foobar.baz" #test show history filename foobar.baz gdb_test "show history filename" \ - "The filename in which to record the command history is \"$PWD/foobar.baz\"..*" \ + "The filename in which to record the command history is \"[string_to_regexp $PWD]/foobar.baz\"..*" \ "show history filename (current_directory/foobar.baz)" #test set history save on gdb_test_no_output "set history save on" "set history save on" -- 1.7.7.6