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


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 (éå)


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