Re: [PATCH] gdb, gdbsupport, gdbserver: add support for printf 't' length modifier

Tom Tromey
2026-01-15T19:25:09Z

>>>>> "Simon" == simon marchi <simon.marchi@polymtl.ca> writes:

Simon> Add support for the `t` length modifier in format_pieces, which
Simon> gdb_printf ultimately uses (through ui_out::vmessage). Modify the three
Simon> users of format_pieces: gdb's printf command, gdb's ui_out::vmessage
Simon> function and gdbserver's ax_printf function.

Thanks.

These modifiers are one of the clearest reasons that printf should be
replaced. I think we should generally avoid them. We've already got
plongest, etc; which seem safer. See commit a1537331 (the "other
direction") but there's also commit a5adb8f3 and probably more.

Anyway, it's ok.
Approved-By: Tom Tromey <tom@tromey.com>

Tom