From: Eli Zaretskii <eliz@gnu.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 5/6] gdb: prepend comp_dir to symtab name in buildsym_compunit
Date: Thu, 07 Apr 2022 20:04:17 +0300 [thread overview]
Message-ID: <83lewgbzam.fsf@gnu.org> (raw)
In-Reply-To: <37276133-bfc5-43df-dea7-9e8188a8e5a9@polymtl.ca> (message from Simon Marchi on Thu, 7 Apr 2022 12:44:28 -0400)
> Date: Thu, 7 Apr 2022 12:44:28 -0400
> Cc: gdb-patches@sourceware.org
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> >> + if (!IS_ABSOLUTE_PATH (name) && m_comp_dir != nullptr)
> >> + {
> >> + name_copy = string_printf ("%s/%s", m_comp_dir.get (), name);
> >
> > Is it really the best idea to concatenate the directory and the file
> > this way? What is 'name' includes "./" or "../" components? what if
> > m_comp_dir ends in a slash or a backslash (for example, if it's just
> > "/")? etc. etc.
>
> It might not look pretty, but it should still yield a valid path.
Well, at least on MS-Windows, "/foo/bar" and "//foo/bar" are very
different things.
next prev parent reply other threads:[~2022-04-07 17:04 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 1:51 [PATCH 0/6] Fix printing macros Simon Marchi
2022-04-07 1:51 ` [PATCH 1/6] gdb/testsuite/dwarf: remove two unused variables Simon Marchi
2022-04-07 13:51 ` Tom Tromey
2022-04-07 1:51 ` [PATCH 2/6] gdb/testsuite/dwarf: simplify line number program syntax Simon Marchi
2022-04-07 13:52 ` Tom Tromey
2022-04-07 17:10 ` Simon Marchi
2022-04-07 1:51 ` [PATCH 3/6] gdb/testsuite/dwarf: don't automatically add directory and file entry for DWARF 5 Simon Marchi
2022-04-18 16:28 ` Tom Tromey
2022-04-18 17:32 ` Simon Marchi
2022-04-18 19:28 ` Tom Tromey
2022-04-18 20:58 ` Simon Marchi
2022-04-07 1:51 ` [PATCH 4/6] gdb/testsuite: add "macros" option to gdb_compile Simon Marchi
2022-04-07 14:01 ` Tom Tromey
2022-04-07 17:22 ` Simon Marchi
2022-04-07 18:31 ` Tom Tromey
2022-04-07 18:41 ` Simon Marchi
2022-04-07 1:51 ` [PATCH 5/6] gdb: prepend comp_dir to symtab name in buildsym_compunit Simon Marchi
2022-04-07 6:09 ` Eli Zaretskii
2022-04-07 16:44 ` Simon Marchi
2022-04-07 17:04 ` Eli Zaretskii [this message]
2022-04-07 17:26 ` Simon Marchi
2022-04-07 19:15 ` Eli Zaretskii
2022-04-07 19:45 ` Simon Marchi
2022-04-08 4:07 ` Eli Zaretskii
2022-04-08 13:54 ` Simon Marchi
2022-04-09 6:59 ` Eli Zaretskii
2022-04-18 16:35 ` Tom Tromey
2022-04-18 17:36 ` Simon Marchi
2022-04-18 17:59 ` Pedro Alves
2022-04-18 18:19 ` Simon Marchi
2022-04-18 18:25 ` Pedro Alves
2022-04-18 20:33 ` Samuel Thibault
2022-04-18 20:56 ` Simon Marchi
2022-04-07 15:19 ` Hannes Domani
2022-04-07 18:01 ` Simon Marchi
2022-04-21 10:56 ` Hannes Domani
2022-04-21 20:26 ` Simon Marchi
2022-04-18 16:36 ` Tom Tromey
2022-04-18 20:18 ` Simon Marchi
2022-04-07 1:51 ` [PATCH 6/6] gdb/testsuite: add macros test for source files compiled in various ways Simon Marchi
2022-04-18 16:53 ` Tom Tromey
2022-04-21 18:36 ` Simon Marchi
2022-04-21 18:45 ` Pedro Alves
2022-04-21 18:47 ` Pedro Alves
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=83lewgbzam.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--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).