From: Christian Biesinger <cbiesinger@google.com>
To: Simon Marchi <simark@simark.ca>
Cc: Alan Modra <amodra@gmail.com>,
binutils@sourceware.org,
gdb-patches <gdb-patches@sourceware.org>
Subject: Re: PR25993, read of freed memory
Date: Tue, 19 May 2020 13:58:46 -0500 [thread overview]
Message-ID: <CAPTJ0XGmNaywjnzwZfzewo2ngUdn8cGR-9p-dawSYv7v8J-VLQ@mail.gmail.com> (raw)
In-Reply-To: <d4b55136-abd9-6281-a62e-72ac35690bd5@simark.ca>
On Tue, May 19, 2020 at 12:27 PM Simon Marchi <simark@simark.ca> wrote:
>
> On 2020-05-19 1:25 p.m., Christian Biesinger wrote:
> > On Tue, May 19, 2020 at 8:27 AM Simon Marchi <simark@simark.ca> wrote:
> >> Can you please change `char *name` to be `gdb::optional<std::string>`?
> >>
> >> The caller that passes a name should use string_printf to build the string, as mentioned
> >> above. The caller that does not pass a name can pass `{}`, to pass an empty optional.
> >
> > We may want to add C++17's std::nullopt to gdb::optional, to make it
> > clearer what's going on there. Then you could pass gdb::nullopt
> > instead of {}.
>
> If it's technically possible, I completely agree.
Yep, it is. Sent a patch to add it.
Christian
next prev parent reply other threads:[~2020-05-19 18:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 4:32 Alan Modra
2020-05-19 13:27 ` Simon Marchi
2020-05-19 17:25 ` Christian Biesinger
2020-05-19 17:26 ` Simon Marchi
2020-05-19 18:58 ` Christian Biesinger [this message]
2020-05-19 19:37 ` Pedro Alves
2020-05-19 19:38 ` Simon Marchi
2020-05-19 23:40 ` Alan Modra
2020-05-20 0:19 ` Simon Marchi
2020-05-20 1:51 ` Alan Modra
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=CAPTJ0XGmNaywjnzwZfzewo2ngUdn8cGR-9p-dawSYv7v8J-VLQ@mail.gmail.com \
--to=cbiesinger@google.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.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