Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yufeng Zhang <Yufeng.Zhang@arm.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch] [7.6.1] Fix argv[0] symlink regression (PR 15415)
Date: Wed, 04 Sep 2013 17:28:00 -0000	[thread overview]
Message-ID: <52276DB2.2020905@arm.com> (raw)
In-Reply-To: <20130904165334.GA22458@host2.jankratochvil.net>

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<jan.kratochvil@redhat.com>
>>>
>>>          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 over
> argv[0].  The testcase PASSes for me both with gdbserver and with gdbserver 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 component
> (and latest directory component).
>
> Could you post your FAIL gdb.log or do you have just theoretical objectives?

I am running the test on a simulator implementing the gdb remote stub. 
  I think it is related with the way the simulator is spawned; it seems 
like only the file name 'argv0-symlink-filelink' is passed to the simulator:

spawn <simulator listening on 9784> argv0-symlink-filelink
target remote localhost:9784
Remote debugging using localhost:9784
0x0000000000400180 in _start ()
(gdb) continue
Continuing.

Breakpoint 1, main (argc=1, argv=0x20414fe0) at 
/work/src/binutils/gdb/testsuite/gdb.base/argv0-symlink.c:21
21        return 0;
(gdb) print argv[0]
$1 = 0x412fa8 "argv0-symlink-filelink"
(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name


I'll check my test config.

Thanks,
Yufeng


      reply	other threads:[~2013-09-04 17:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26 18:21 Jan Kratochvil
2013-08-26 20:29 ` Doug Evans
2013-08-27 14:09   ` Jan Kratochvil
2013-08-28 16:50     ` Doug Evans
2013-08-28 18:04       ` [commit+7.6.1] " Jan Kratochvil
2013-09-04 10:48         ` Pedro Alves
2013-09-04 16:31           ` Doug Evans
2013-09-04 16:55             ` Pedro Alves
2013-09-04 19:13           ` Jan Kratochvil
2013-09-04 16:46 ` Yufeng Zhang
2013-09-04 16:53   ` Jan Kratochvil
2013-09-04 17:28     ` Yufeng Zhang [this message]

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=52276DB2.2020905@arm.com \
    --to=yufeng.zhang@arm.com \
    --cc=gdb-patches@sourceware.org \
    /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