From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23929 invoked by alias); 28 Feb 2013 17:17:08 -0000 Received: (qmail 23911 invoked by uid 22791); 28 Feb 2013 17:17:06 -0000 X-SWARE-Spam-Status: No, hits=-8.1 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 X-Spam-Check-By: sourceware.org Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Feb 2013 17:16:59 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 28 Feb 2013 09:15:43 -0800 X-ExtLoop1: 1 Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga002.jf.intel.com with ESMTP; 28 Feb 2013 09:15:42 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.108]) by IRSMSX104.ger.corp.intel.com ([169.254.5.48]) with mapi id 14.01.0355.002; Thu, 28 Feb 2013 17:15:41 +0000 From: "Agovic, Sanimir" To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH] add-inferior: expand tilde in -exec FILENAME argument Date: Thu, 28 Feb 2013 17:20:00 -0000 Message-ID: <0377C58828D86C4588AEEC42FC3B85A7162A0A3C@IRSMSX102.ger.corp.intel.com> References: <1362062885-6620-1-git-send-email-sanimir.agovic@intel.com> <512F7897.5000705@redhat.com> In-Reply-To: <512F7897.5000705@redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00750.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com] > Sent: Thursday, February 28, 2013 04:33 PM Thanks for your feedback. > I assume this fixes: >=20 > (gdb) add-inferior -exec ~/gdb/tests/main > Added inferior 2 > ~/gdb/tests/main: No such file or directory. >=20 > even though the file does exist. Yes. Sorry for not being clear about the cause. > I wondered if other similar places expand the tilde early > or just before file open [...] I found at least one another case: % gdb -batch \~/gdb/tests/main # or --exec=3D~/gdb/tests/main ~/gdb/tests/main: No such file or directory. Whereas: % gdb -batch --symbols=3D\~/gdb/tests/main Succeeds. Seems like gdb relies on the shell to expand its executable name. As an alternative approach I can expand tilde in exec_file_attach which is what symbol_file_add and core_file_command do. -Sanimir Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052