From: Eli Zaretskii <eliz@gnu.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: pedro@palves.net, gdb-patches@sourceware.org, simon.marchi@efficios.com
Subject: Re: [PATCH v2] gdbsupport: add path_join function
Date: Wed, 20 Apr 2022 19:47:13 +0300 [thread overview]
Message-ID: <83r15rsnvy.fsf@gnu.org> (raw)
In-Reply-To: <58f0aaff-0df0-a4b9-46f3-69f0458ff2b6@polymtl.ca> (message from Simon Marchi on Wed, 20 Apr 2022 12:11:20 -0400)
> Date: Wed, 20 Apr 2022 12:11:20 -0400
> Cc: pedro@palves.net, gdb-patches@sourceware.org, simon.marchi@efficios.com
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> >>> path_join ("d:/foo/bar", "d:quux");
> >>
> >> What does d:quux mean? Should the "d:" be considered as a drive letter
> >> here or not?
> >
> > Yes, of course. It always does in Windows file names.
>
> Then what does it mean? How is it different from d:/quux?
It means 'quux' relative to the current directory on drive D:. On
Windows, a process can have a separate directory on each drive, which
you get to if you type "D:" (or "C:" or "X:") at the cmd prompt. By
contrast, "d:/quux" means 'quux' relative to the root of drive D:, no
matter what is the current directory there.
> > I just wonder how we will be able to document what this function does
> > and what it doesn't, because it seems like we are stopping halfway
> > between a simple concatenation that just avoids multiple consecutive
> > slashes and a much more heavy-weight functionality. We need to
> > document our functionality well enough so that people know what to
> > expect and what not to expect when they call this function.
>
> Since the problem is about absolute paths on the right hand side, maybe
> we can just forbid passing absolute paths except for the first (left
> hand side) operand. I don't really need that feature for my DWARF
> fixes.
Yes, I think we should limit "tricky" processing to the minimum, then
it will be easier to document the behavior clearly and unequivocally.
next prev parent reply other threads:[~2022-04-20 16:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 0:20 Simon Marchi
2022-04-20 6:08 ` Eli Zaretskii
2022-04-20 11:52 ` Pedro Alves
2022-04-20 12:35 ` Eli Zaretskii
2022-04-20 12:38 ` Pedro Alves
2022-04-20 12:45 ` Eli Zaretskii
2022-04-20 13:12 ` Pedro Alves
2022-04-20 14:45 ` Simon Marchi
2022-04-20 15:57 ` Eli Zaretskii
2022-04-20 16:11 ` Simon Marchi
2022-04-20 16:47 ` Eli Zaretskii [this message]
2022-04-20 17:31 ` Pedro Alves
2022-04-20 17:22 ` Pedro Alves
2022-04-20 17:35 ` Simon Marchi
2022-04-20 17:44 ` Pedro Alves
2022-04-20 14:55 ` Simon Marchi
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=83r15rsnvy.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
--cc=simon.marchi@efficios.com \
--cc=simon.marchi@polymtl.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).