From: Eli Zaretskii <eliz@gnu.org>
To: Simon Marchi <simark@simark.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: Fix lookup of separate debug file on MS-Windows
Date: Sat, 27 Apr 2019 16:39:00 -0000 [thread overview]
Message-ID: <83ftq3v1vv.fsf@gnu.org> (raw)
In-Reply-To: <491fba49-4be5-ef4e-c75e-8b8845673360@simark.ca> (message from Simon Marchi on Sat, 27 Apr 2019 12:16:23 -0400)
> Cc: gdb-patches@sourceware.org
> From: Simon Marchi <simark@simark.ca>
> Date: Sat, 27 Apr 2019 12:16:23 -0400
>
> I think we should consider the case where we build GDB on GNU/Linux, to remotely
> debug a Windows program. When building on GNU/Linux, HAS_DRIVE_SPEC always return false,
> since it's defined as (see include/filenames.h):
>
> #define HAS_DRIVE_SPEC(f) (0)
>
> Let's suppose DEBUGDIR is "D:/my/debug", DIR is "target:E:/the/directory/" and DEBUGLINK
> is "program.debug". On GNU/Linux, we would build the path
>
> target:D:/my/debug/E:/the/directory/program.debug
>
> And I suppose that the "E:" would result in the debug file not being found.
When debugging remotely, is the debug info on a Windows or on a
GNU/Linux filesystem? If the latter, the above will work. I always
thought that in remote debugging, GDB itself runs on the local host,
i.e. on GNU/Linux in this case, and the part that runs on the remote
is gdbserver. Isn't that correct?
> So I think we should be using HAS_DRIVE_SPEC_1, which allows us to do the same check. We
> just need to pass to the macro whether the target filesystem id DOS-based. The only problem
> is, how do we know whether the target filesystem is DOS-based? We wouldn't want
> HAS_DRIVE_SPEC_1 to do this stripping erroneously when debugging natively on GNU/Linux...
But if we do that, how do we distinguish between the use case you
describe above and a use case where the we debug locally and the file
names just happen to include colons? Are we willing to restrict file
names on GNU/Linux to support the remote debugging on Windows?
Thanks for the other comments, I will implement them when we agree
about the above issue.
next prev parent reply other threads:[~2019-04-27 16:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 13:49 Eli Zaretskii
2019-04-18 16:19 ` LRN
2019-04-18 18:41 ` Eli Zaretskii
2019-04-18 21:42 ` LRN
2019-04-19 6:48 ` Eli Zaretskii
2019-04-19 10:06 ` LRN
2019-04-21 12:06 ` Eli Zaretskii
2019-04-21 12:55 ` Simon Marchi
2019-04-22 9:19 ` Eli Zaretskii
2019-04-27 10:56 ` Eli Zaretskii
2019-04-27 16:16 ` Simon Marchi
2019-04-27 16:39 ` Eli Zaretskii [this message]
2019-04-27 18:56 ` Simon Marchi
2019-04-27 19:05 ` Eli Zaretskii
2019-05-03 7:36 ` 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=83ftq3v1vv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).