From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCHv2 1/2] gdb/guile: perform tilde expansion when sourcing guile scripts
Date: Fri, 7 May 2021 10:55:38 -0400 [thread overview]
Message-ID: <2bfc1a5d-d8ba-e0af-15b7-d241a6e2c274@polymtl.ca> (raw)
In-Reply-To: <20210507102910.GL6612@embecosm.com>
On 2021-05-07 6:29 a.m., Andrew Burgess wrote:
> @@ -737,8 +738,10 @@ source_script_with_search (const char *file, int from_tty, int search_path)
> anyway so that error messages show the actual file used. But only do
> this if we (may have) used search_path, as printing the full path in
> errors for the non-search case can be more noise than signal. */
> + gdb::unique_xmalloc_ptr<char> file_to_open = gdb_tilde_expand_up (file);
> source_script_from_stream (opened->stream.get (), file,
> - search_path ? opened->full_path.get () : file);
> + search_path ? opened->full_path.get ()
> + : file_to_open.get ());
A minor detail, but the gdb_tilde_expand_up call is only necessary when
search_path is false. So if there's a easy way to avoid it otherwise,
it would be nice. But other than that, LGTM.
Simon
next prev parent reply other threads:[~2021-05-07 14:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 17:40 [PATCH] " Andrew Burgess
2021-05-05 19:11 ` Tom Tromey
2021-05-05 21:01 ` [PATCHv2 0/2] " Andrew Burgess
2021-05-05 21:01 ` [PATCHv2 1/2] " Andrew Burgess
2021-05-06 2:23 ` Simon Marchi via Gdb-patches
2021-05-07 10:29 ` Andrew Burgess
2021-05-07 14:55 ` Simon Marchi via Gdb-patches [this message]
2021-05-07 21:23 ` Andrew Burgess
2021-05-05 21:01 ` [PATCHv2 2/2] gdb/guile: Have gdbscm_safe_source_script return a unique_ptr Andrew Burgess
2021-05-06 2:28 ` Simon Marchi via Gdb-patches
2021-05-06 2:32 ` Simon Marchi via Gdb-patches
2021-05-07 8:55 ` Andrew Burgess
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=2bfc1a5d-d8ba-e0af-15b7-d241a6e2c274@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=andrew.burgess@embecosm.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