From: Hannes Domani <ssbssa@yahoo.de>
To: gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: Auto-loading on MS-Windows
Date: Mon, 6 Jul 2020 17:55:06 +0000 (UTC) [thread overview]
Message-ID: <388823135.5879620.1594058106514@mail.yahoo.com> (raw)
In-Reply-To: <83imf0sg1b.fsf@gnu.org>
Am Montag, 6. Juli 2020, 19:35:12 MESZ hat Eli Zaretskii <eliz@gnu.org> Folgendes geschrieben:
> I turned on "debug auto-load" today and saw this:
>
> auto-load: Attempted file "D:\gnu\gdb-10.0.50.20200629\gdb\gdb.exe-gdb.py" does not exist.
> auto-load: Expanded $-variables to "d:\usr\lib\debug;d:\usr\share\gdb\9.1/../auto-load".
> auto-load: Searching 'set auto-load scripts-directory' path "$debugdir;$datadir/../auto-load".
> auto-load: Attempted file "d:\usr\lib\debugD:\gnu\gdb-10.0.50.20200629\gdb\gdb.exe-gdb.py" does not exist.
> auto-load: Attempted file "d:\usr\share\gdb\9.1/../auto-loadD:\gnu\gdb-10.0.50.20200629\gdb\gdb.exe-gdb.py" does not exist.
> ^^^^^^^^^^^^^^^^^^^^^^
>
> Note the underlined part: we are concatenating the auto-load directory
> with an absolute Windows file name, and the result is an invalid file
> name. The code in auto_load_objfile_script_1 which does that:
>
> if (debug_auto_load)
> fprintf_unfiltered (gdb_stdlog, _("auto-load: Searching 'set auto-load "
> "scripts-directory' path \"%s\".\n"),
> auto_load_dir);
>
> for (const gdb::unique_xmalloc_ptr<char> &dir : vec)
> {
> /* FILENAME is absolute, so we don't need a "/" here. */
> debugfile_holder = dir.get () + filename;
> debugfile = debugfile_holder.c_str ();
>
> input = gdb_fopen_cloexec (debugfile, "r");
>
> evidently assumes the absolute file names start with a slash.
>
> I guess on Windows we need to convert "D:\foo\bar" into "\D\foo\bar"
> before appending it to the auto-load directory?
I've sent this patch not too long ago:
https://sourceware.org/pipermail/gdb-patches/2020-May/169125.html
And I've kinda missed to ping it.
Hannes
next prev parent reply other threads:[~2020-07-06 17:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 17:35 Eli Zaretskii
2020-07-06 17:55 ` Hannes Domani [this message]
2020-07-06 18:10 ` Eli Zaretskii
2020-07-06 18:18 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=388823135.5879620.1594058106514@mail.yahoo.com \
--to=ssbssa@yahoo.de \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox