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/compile | |
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/compile')
-rw-r--r-- | gdb/compile/compile-c-support.c | 6 | ||||
-rw-r--r-- | gdb/compile/compile-c-symbols.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c index 65f1867..e365cef 100644 --- a/gdb/compile/compile-c-support.c +++ b/gdb/compile/compile-c-support.c @@ -352,7 +352,7 @@ struct c_add_code_header break; default: - gdb_assert_not_reached (_("Unknown compiler scope reached.")); + gdb_assert_not_reached ("Unknown compiler scope reached."); } } }; @@ -376,7 +376,7 @@ struct c_add_code_footer break; default: - gdb_assert_not_reached (_("Unknown compiler scope reached.")); + gdb_assert_not_reached ("Unknown compiler scope reached."); } } }; @@ -477,7 +477,7 @@ struct cplus_add_code_header break; default: - gdb_assert_not_reached (_("Unknown compiler scope reached.")); + gdb_assert_not_reached ("Unknown compiler scope reached."); } } }; diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c index 08ebe0f..fa1cb7a 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -587,8 +587,8 @@ generate_c_for_for_one_variable (compile_instance *compiler, error (_("Local symbol unhandled when generating C code.")); case LOC_COMPUTED: - gdb_assert_not_reached (_("LOC_COMPUTED variable " - "missing a method.")); + gdb_assert_not_reached ("LOC_COMPUTED variable " + "missing a method."); default: /* Nothing to do for all other cases, as they don't represent |