From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21442 invoked by alias); 2 Apr 2014 16:47:43 -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 21431 invoked by uid 89); 2 Apr 2014 16:47:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout22.012.net.il Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Apr 2014 16:47:41 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N3E00500X5XG100@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Wed, 02 Apr 2014 19:47:39 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N3E005VCXBEC120@a-mtaout22.012.net.il>; Wed, 02 Apr 2014 19:47:39 +0300 (IDT) Date: Wed, 02 Apr 2014 16:47:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Return argv0-symlink.exp early if gdb can't load symlink In-reply-to: <533C18DA.3000307@codesourcery.com> To: Yao Qi Cc: palves@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83mwg3brux.fsf@gnu.org> References: <1396428218-31822-1-git-send-email-yao@codesourcery.com> <533BD0D5.4000408@codesourcery.com> <533BEAA8.4080100@redhat.com> <533C18DA.3000307@codesourcery.com> X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00032.txt.bz2 > Date: Wed, 2 Apr 2014 22:04:10 +0800 > From: Yao Qi > CC: > > > In case you're running the tests on a Windows system that > > supports it, did you try just setting winsymlinks:native in your > > CYGWIN? Things then should work IIUC. If GDB can't load > > native Windows symlinks, then that sounds like a real GDB > > bug to me. > > Yes, I tried that, and GDB still failed to load symlink. What do you mean by "load"? Which command failed? Native Windows symlinks are transparently resolved by functions that open files, so if "load" above means "open and read", I would expect that to work in GDB without any problems. Assuming those were native Windows symlinks, of course, and not Cygwin emulations. > If we want to test GDB reading native windows symlink, why don't we > write code to create symlink via CreateSymbolicLink > (http://msdn.microsoft.com/en-us/library/windows/desktop/aa363878(v=vs.85).aspx)? As I wrote elsewhere, it will either trigger UAC elevation prompts, or just silently fail. You need to start a shell "As Administrator", and run the test suite from that shell, for this to succeed. And if you are willing to go to those lengths, simply use the mklink command provided with Windows to create native symlinks. > No idea how to detect such Windows system in procedure off hand. Can you probe the Windows version? Symlinks are available with Windows Vista and later. Or just check if issuing "mklink" command emits error message from cmd.exe.