diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-11-17 13:44:01 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-11-18 11:29:19 -0500 |
commit | 557b4d7650ffa3cd6dbfb8a56c830a1d45562d19 (patch) | |
tree | 0c08f5fc48886db33c57cb42bfaa1d0fc80640cc /gdb/ui-out.c | |
parent | ab198279120fe7937c0970a8bb881922726678f9 (diff) | |
download | gdb-557b4d7650ffa3cd6dbfb8a56c830a1d45562d19.zip gdb-557b4d7650ffa3cd6dbfb8a56c830a1d45562d19.tar.gz gdb-557b4d7650ffa3cd6dbfb8a56c830a1d45562d19.tar.bz2 |
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
Diffstat (limited to 'gdb/ui-out.c')
-rw-r--r-- | gdb/ui-out.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/ui-out.c b/gdb/ui-out.c index 982d157..fe0e18b 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -638,10 +638,10 @@ ui_out::vmessage (const ui_file_style &in_style, const char *format, } break; case wide_string_arg: - gdb_assert_not_reached (_("wide_string_arg not supported in vmessage")); + gdb_assert_not_reached ("wide_string_arg not supported in vmessage"); break; case wide_char_arg: - gdb_assert_not_reached (_("wide_char_arg not supported in vmessage")); + gdb_assert_not_reached ("wide_char_arg not supported in vmessage"); break; case long_long_arg: call_do_message (style, current_substring, va_arg (args, long long)); @@ -704,16 +704,16 @@ ui_out::vmessage (const ui_file_style &in_style, const char *format, call_do_message (style, current_substring, va_arg (args, double)); break; case long_double_arg: - gdb_assert_not_reached (_("long_double_arg not supported in vmessage")); + gdb_assert_not_reached ("long_double_arg not supported in vmessage"); break; case dec32float_arg: - gdb_assert_not_reached (_("dec32float_arg not supported in vmessage")); + gdb_assert_not_reached ("dec32float_arg not supported in vmessage"); break; case dec64float_arg: - gdb_assert_not_reached (_("dec64float_arg not supported in vmessage")); + gdb_assert_not_reached ("dec64float_arg not supported in vmessage"); break; case dec128float_arg: - gdb_assert_not_reached (_("dec128float_arg not supported in vmessage")); + gdb_assert_not_reached ("dec128float_arg not supported in vmessage"); break; case ptr_arg: switch (current_substring[2]) |