This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Return argv0-symlink.exp early if gdb can't load symlink
- From: Yao Qi <yao at codesourcery dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: <palves at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Thu, 10 Apr 2014 21:16:56 +0800
- Subject: Re: [PATCH] Return argv0-symlink.exp early if gdb can't load symlink
- Authentication-results: sourceware.org; auth=none
- References: <1396428218-31822-1-git-send-email-yao at codesourcery dot com> <533BD0D5 dot 4000408 at codesourcery dot com> <533BEAA8 dot 4080100 at redhat dot com> <533C18DA dot 3000307 at codesourcery dot com> <83mwg3brux dot fsf at gnu dot org>
On 04/03/2014 12:47 AM, Eli Zaretskii wrote:
> What do you mean by "load"? Which command failed?
>
Here are the steps to create a symlink and load symlink in GDB.
$ export CYGWIN=winsymlinks:nativestrict
$ ln -sf wchar wchar-filelink
$ file wchar-filelink
wchar-filelink: symbolic link to `wchar'
(gdb) file ~/wchar-filelink
"C:\cygwin\home\yqi/wchar-filelink": not in executable format: File
format not recognized
This error is emitted by
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
{
/* Make sure to close exec_bfd, or else "run" might try to use
it. */
exec_close ();
error (_("\"%s\": not in executable format: %s"),
scratch_pathname,
gdb_bfd_errmsg (bfd_get_error (), matching));
}
I suspect that BFD doesn't recognize native symlink on windows. I'll
dig into bfd.
--
Yao (éå)