gdbsupport: make gdb_assert_not_reached accept a format string
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 17 Nov 2021 18:44:01 +0000 (13:44 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 18 Nov 2021 16:29:19 +0000 (11:29 -0500)
commit557b4d7650ffa3cd6dbfb8a56c830a1d45562d19
tree0c08f5fc48886db33c57cb42bfaa1d0fc80640cc
parentab198279120fe7937c0970a8bb881922726678f9
gdbsupport: make gdb_assert_not_reached accept a format string

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.

Change-Id: Id0cfda5a57979df6cdaacaba0d55dd91ae9efee7
19 files changed:
gdb/arch/arc.c
gdb/ax-gdb.c
gdb/cli/cli-option.c
gdb/compile/compile-c-support.c
gdb/compile/compile-c-symbols.c
gdb/dwarf2/read.c
gdb/findvar.c
gdb/infrun.c
gdb/printcmd.c
gdb/remote.c
gdb/riscv-tdep.c
gdb/thread-fsm.h
gdb/tid-parse.c
gdb/tracepoint.c
gdb/tui/tui-layout.c
gdb/ui-out.c
gdb/varobj.c
gdbsupport/filestuff.cc
gdbsupport/gdb_assert.h