This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] [7.6.1] Fix argv[0] symlink regression (PR 15415)
- From: Yufeng Zhang <Yufeng dot Zhang at arm dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 04 Sep 2013 18:28:18 +0100
- Subject: Re: [patch] [7.6.1] Fix argv[0] symlink regression (PR 15415)
- Authentication-results: sourceware.org; auth=none
- References: <20130826182111 dot GA19509 at host2 dot jankratochvil dot net> <522763CF dot 7060105 at arm dot com> <20130904165334 dot GA22458 at host2 dot jankratochvil dot 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