[PATCH] gdbsupport: make gdb_assert_not_reached accept a format string
Simon Marchi
simark@simark.ca
Thu Nov 18 16:30:26 GMT 2021
On 2021-11-17 6:45 p.m., Andrew Burgess via Gdb-patches wrote:
> * Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> [2021-11-17 13:44:01 -0500]:
>
>> From: Simon Marchi <simon.marchi@polymtl.ca>
>>
>> Change gdb_assert_not_reached to accept a format string plus
>> corresponding arguments. This allows giving more precise messages.
>>
>> Because the format string passed by the caller is prepended with a "%s:"
>> to add the function name, the callers can no longer pass a translated
>> string (`_(...)`). Make the gdb_assert_not_reached include the _(),
>> just like the gdb_assert_fail macro just above.
>
> LGTM.
>
> Thanks,
> Andrew
Thanks, pushed.
Simon
More information about the Gdb-patches
mailing list