From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9666 invoked by alias); 4 Sep 2013 17:28:23 -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 9653 invoked by uid 89); 4 Sep 2013 17:28:23 -0000 Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Sep 2013 17:28:23 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 04 Sep 2013 18:28:20 +0100 Received: from [10.1.201.52] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 4 Sep 2013 18:28:19 +0100 Message-ID: <52276DB2.2020905@arm.com> Date: Wed, 04 Sep 2013 17:28:00 -0000 From: Yufeng Zhang User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [patch] [7.6.1] Fix argv[0] symlink regression (PR 15415) References: <20130826182111.GA19509@host2.jankratochvil.net> <522763CF.7060105@arm.com> <20130904165334.GA22458@host2.jankratochvil.net> In-Reply-To: <20130904165334.GA22458@host2.jankratochvil.net> X-MC-Unique: 113090418282000301 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00139.txt.bz2 On 09/04/13 17:53, Jan Kratochvil wrote: > On Wed, 04 Sep 2013 18:46:07 +0200, Yufeng Zhang wrote: >> On 08/26/13 19:21, Jan Kratochvil wrote: >>> gdb/testsuite/ >>> 2013-08-26 Jan Kratochvil >>> >>> PR gdb/15415 >>> * gdb.base/argv0-symlink.c: New file. >>> * gdb.base/argv0-symlink.exp: New file. >> >> I wonder if the tests shall be skipped in the remote environment >> where gdb has no control over argv[0]. > > The testcase runs gdbserver (even in gdbserver mode) so it has control ov= er > argv[0]. The testcase PASSes for me both with gdbserver and with gdbserv= er in > extended mode running on localhost (Fedora Rawhide x86_64). > > If one runs gdbserver on remote host with different filesystem I believe = the > testcase still should work as I test there only the latest filename compo= nent > (and latest directory component). > > Could you post your FAIL gdb.log or do you have just theoretical objectiv= es? I am running the test on a simulator implementing the gdb remote stub.=20 I think it is related with the way the simulator is spawned; it seems=20 like only the file name 'argv0-symlink-filelink' is passed to the simulator: spawn argv0-symlink-filelink target remote localhost:9784 Remote debugging using localhost:9784 0x0000000000400180 in _start () (gdb) continue Continuing. Breakpoint 1, main (argc=3D1, argv=3D0x20414fe0) at=20 /work/src/binutils/gdb/testsuite/gdb.base/argv0-symlink.c:21 21 return 0; (gdb) print argv[0] $1 =3D 0x412fa8 "argv0-symlink-filelink" (gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name I'll check my test config. Thanks, Yufeng