From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Andrew Burgess <andrew.burgess@embecosm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCHv2 1/3] gdb: refactor the initialization file lookup code
Date: Tue, 26 Jan 2021 10:09:51 -0500 [thread overview]
Message-ID: <e8ab9486-9e6f-0714-8e75-17d933322ff7@polymtl.ca> (raw)
In-Reply-To: <d07578559150d082dc9c8d2986c2eb060a69e447.1611653889.git.andrew.burgess@embecosm.com>
On 2021-01-26 4:48 a.m., Andrew Burgess wrote:
> +static void
> +get_init_files (std::vector<std::string> *system_gdbinit,
> + std::string *home_gdbinit,
> + std::string *local_gdbinit)
> +{
> + /* Cache the file lookup object so we only actually search for the files
> + once. */
> + static std::unique_ptr<gdb_initfile_finder> init_files;
> + if (init_files == nullptr)
> + init_files = std::unique_ptr<gdb_initfile_finder>
> + (new gdb_initfile_finder (GDBINIT,
Just a nit, but I'd use an optional instead of a unique_ptr here, just
because we don't need dynamic allocation.
Otherwise, LGTM.
Simon
next prev parent reply other threads:[~2021-01-26 15:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 9:48 [PATCHv2 0/3] Adding startup files to GDB Andrew Burgess
2021-01-26 9:48 ` [PATCHv2 1/3] gdb: refactor the initialization file lookup code Andrew Burgess
2021-01-26 15:09 ` Simon Marchi via Gdb-patches [this message]
2021-01-26 9:48 ` [PATCHv2 2/3] gdb: process startup files and startup command line options Andrew Burgess
2021-01-26 15:22 ` Eli Zaretskii via Gdb-patches
2021-01-26 15:32 ` Simon Marchi via Gdb-patches
2021-01-26 15:30 ` Simon Marchi via Gdb-patches
2021-01-26 9:48 ` [PATCHv2 3/3] gdb: add "set startup-quietly" command Andrew Burgess
2021-01-26 15:12 ` Eli Zaretskii via Gdb-patches
2021-02-18 16:41 ` [PATCHv3 0/3] Adding startup files to GDB Andrew Burgess
2021-02-18 16:41 ` [PATCHv3 1/3] gdb: refactor the initialization file lookup code Andrew Burgess
2021-02-18 16:41 ` [PATCHv3 2/3] gdb: process early initialization files and command line options Andrew Burgess
2021-02-18 17:46 ` Eli Zaretskii via Gdb-patches
2021-03-24 12:10 ` Andrew Burgess
2021-03-24 17:17 ` Eli Zaretskii via Gdb-patches
2021-02-18 16:41 ` [PATCHv3 3/3] gdb: add "set startup-quietly" command Andrew Burgess
2021-02-18 17:32 ` Eli Zaretskii via Gdb-patches
2021-03-24 12:08 ` Andrew Burgess
2021-03-31 20:11 ` [PATCHv3 0/3] Adding startup files to GDB Andrew Burgess
2021-04-02 19:20 ` Tom Tromey
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=e8ab9486-9e6f-0714-8e75-17d933322ff7@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