Re: [PATCH][gdb] Mention CU offset for if verbose

Simon Marchi
2020-02-09T12:16:24Z

On 2020-02-09 6:48 a.m., Tom de Vries wrote:
> I've done that now by using gdb::unique_xmalloc_ptr<char>. [ FWIW,
> there's some code in create_type_unit_group that does something similar,
> but there we use std::string and string_printf. ]

You could use std::string and string_printf here as well, but what you did
is fine. The patch LGTM.

Thanks!

>
> Also, I realized that the code was too deep in the call stack, and I've
> brought it one level up, to process_psymtab_comp_unit_reader, to make
> sure it doesn't trigger for f.i. create_type_unit_group.
>
> Thanks,
> - Tom