This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] C++-ify parse_format_string
On 11/23/2017 09:13 PM, Simon Marchi wrote:
> I have a patch in some branch that does essentially the same thing, so
> I was able to compare our approaches. In my version, I removed the
> big allocation that is shared among pieces, and made each piece have
> its own std::string. Unless we want to keep the current allocation
> scheme for performance/memory usage reasons, I think that using
> std::strings simplifies things in the parse_format_string function.
> The format_pieces structure is replaced with an std::vector of
> format_piece.
Sounds like a step backwards to me. If it simplifies things, then
it sounds like it might be because we're missing some utility,
like string_view or something like that.
Thanks,
Pedro Alves