From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25821 invoked by alias); 28 Feb 2013 15:32:54 -0000 Received: (qmail 25812 invoked by uid 22791); 28 Feb 2013 15:32:53 -0000 X-SWARE-Spam-Status: No, hits=-8.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Feb 2013 15:32:43 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1SFWfCc005544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Feb 2013 10:32:41 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r1SFWeFF020314; Thu, 28 Feb 2013 10:32:40 -0500 Message-ID: <512F7897.5000705@redhat.com> Date: Thu, 28 Feb 2013 15:54:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Sanimir Agovic CC: gdb-patches@sourceware.org Subject: Re: [PATCH] add-inferior: expand tilde in -exec FILENAME argument References: <1362062885-6620-1-git-send-email-sanimir.agovic@intel.com> In-Reply-To: <1362062885-6620-1-git-send-email-sanimir.agovic@intel.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2013-02/txt/msg00740.txt.bz2 Thanks. On 02/28/2013 02:48 PM, Sanimir Agovic wrote: > I could not come up with a solid testcase, hints are welcome. Not sure either. I assume this fixes: (gdb) add-inferior -exec ~/gdb/tests/main Added inferior 2 ~/gdb/tests/main: No such file or directory. even though the file does exist. I wondered if other similar places expand the tilde early or just before file open, and confirmed that at least "file" and "info files" have expanded the tilde before any visible strings is shown: (gdb) file ~/gdb/tests/main Load new symbol table from "/home/pedro/gdb/tests/main"? (y or n) (gdb) info files Symbols from "/home/pedro/gdb/tests/main". Local exec file: `/home/pedro/gdb/tests/main', file type elf64-x86-64. > 2013-02-28 Sanimir Agovic > > * inferior.c: Include "readline/readline.h". > (add_inferior_command): Tilde expand filename. OK. Thanks again for the patch. -- Pedro Alves