PR25993, read of freed memory
Christian Biesinger
cbiesinger@google.com
Tue May 19 17:25:21 GMT 2020
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 {}.
Christian
More information about the Binutils
mailing list