This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[users/palves/format_strings] Make printf_filtered support the gdb-specific formatters too
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 1 Jul 2019 20:29:17 +0100
- Subject: [users/palves/format_strings] Make printf_filtered support the gdb-specific formatters too
- References: <20190605020116.1550-1-tom@tromey.com> <1ee4bd6b-4cdf-f3a9-74af-0843bf123a8b@redhat.com> <87lfygi1x0.fsf@tromey.com> <32872d6a-15d6-9718-59ae-957694e114c9@redhat.com> <b0299d9c-22d8-de30-72b5-99de4605d5dd@redhat.com> <87imtjhj6b.fsf@tromey.com> <625cd0ba-058d-d4bf-8ba3-8676f335b0f3@redhat.com> <87blzbep47.fsf@tromey.com> <2180f72f-da10-5333-90a1-666ba3bd145e@redhat.com> <87imtjbrmx.fsf@tromey.com> <871s056yjw.fsf@tromey.com> <87wohx5hir.fsf@tromey.com> <ef92b0b9-11cc-57ce-9253-157161d58860@redhat.com> <87a7dxps66.fsf@tromey.com>
On 7/1/19 6:42 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> Well, you used printf_filtered the new patches, but that doesn't work
> Pedro> with the new format specifiers, yet. :-)
>
> Oops. I meant not to do that, but of course made a mistake.
>
> Pedro> If we want the new new formatters to work with printf_(un)filtered,
> Pedro> the patch below fixes it by making printf_(un)filtered defer to
> Pedro> cli_ui_out::message for format processing, instead of to
> Pedro> string_printf (and thus to vsnprintf). It's maybe a bit roundabout, but
> Pedro> I couldn't think of a better/easier way.
>
> We should probably do this, just to avoid future mistakes along these
> same lines.
>
I merged this one to the branch as well.
Thanks,
Pedro Alves