This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Return argv0-symlink.exp early if gdb can't load symlink


> Date: Wed, 2 Apr 2014 22:04:10 +0800
> From: Yao Qi <yao@codesourcery.com>
> CC: <gdb-patches@sourceware.org>
> 
> > 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]