std::string msg = string_printf
("Cannot determine architecture: ISA=%d; bitness=%d",
features.isa, 8 * features.reg_size);
- gdb_assert_not_reached (msg.c_str ());
+ gdb_assert_not_reached ("%s", msg.c_str ());
}
set_tdesc_architecture (tdesc.get (), arch_name.c_str ());
default:
std::string msg = string_printf
("Cannot choose target description XML: %d", features.isa);
- gdb_assert_not_reached (msg.c_str ());
+ gdb_assert_not_reached ("%s", msg.c_str ());
}
return tdesc;
break;
case LOC_COMPUTED:
- gdb_assert_not_reached (_("LOC_COMPUTED variable missing a method"));
+ gdb_assert_not_reached ("LOC_COMPUTED variable missing a method");
case LOC_OPTIMIZED_OUT:
/* Flag this, but don't say anything; leave it up to callers to
default:
/* Not yet. */
- gdb_assert_not_reached (_("option type not supported"));
+ gdb_assert_not_reached ("option type not supported");
}
return {};
set_list, show_list);
}
else
- gdb_assert_not_reached (_("option type not handled"));
+ gdb_assert_not_reached ("option type not handled");
}
}
break;
default:
- gdb_assert_not_reached (_("Unknown compiler scope reached."));
+ gdb_assert_not_reached ("Unknown compiler scope reached.");
}
}
};
break;
default:
- gdb_assert_not_reached (_("Unknown compiler scope reached."));
+ gdb_assert_not_reached ("Unknown compiler scope reached.");
}
}
};
break;
default:
- gdb_assert_not_reached (_("Unknown compiler scope reached."));
+ gdb_assert_not_reached ("Unknown compiler scope reached.");
}
}
};
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
break;
}
default:
- gdb_assert_not_reached (_("Unexpected DWARF form."));
+ gdb_assert_not_reached ("Unexpected DWARF form.");
}
}
/* All cases listed explicitly so that gcc -Wall will detect it if
we failed to consider one. */
case LOC_COMPUTED:
- gdb_assert_not_reached (_("LOC_COMPUTED variable missing a method"));
+ gdb_assert_not_reached ("LOC_COMPUTED variable missing a method");
case LOC_REGISTER:
case LOC_ARG:
break;
case LOC_COMPUTED:
- gdb_assert_not_reached (_("LOC_COMPUTED variable missing a method"));
+ gdb_assert_not_reached ("LOC_COMPUTED variable missing a method");
case LOC_UNRESOLVED:
{
step = gdbarch_displaced_step_hw_singlestep (gdbarch);
}
else
- gdb_assert_not_reached (_("Invalid displaced_step_prepare_status "
- "value."));
+ gdb_assert_not_reached ("Invalid displaced_step_prepare_status "
+ "value.");
}
/* Do we need to do it the hard way, w/temp breakpoints? */
break;
case LOC_COMPUTED:
- gdb_assert_not_reached (_("LOC_COMPUTED variable missing a method"));
+ gdb_assert_not_reached ("LOC_COMPUTED variable missing a method");
case LOC_REGISTER:
/* GDBARCH is the architecture associated with the objfile the symbol
case AUTO_BOOLEAN_AUTO:
return config->support;
default:
- gdb_assert_not_reached (_("bad switch"));
+ gdb_assert_not_reached ("bad switch");
}
}
error (_("Running \"%s\" on the remote target failed"),
remote_exec_file);
default:
- gdb_assert_not_reached (_("bad switch"));
+ gdb_assert_not_reached ("bad switch");
}
}
case 4:
return ebreak;
default:
- gdb_assert_not_reached (_("unhandled breakpoint kind"));
+ gdb_assert_not_reached ("unhandled breakpoint kind");
}
}
break;
default:
- gdb_assert_not_reached (_("unknown argument location type"));
+ gdb_assert_not_reached ("unknown argument location type");
}
}
break;
default:
- gdb_assert_not_reached (_("unknown argument location type"));
+ gdb_assert_not_reached ("unknown argument location type");
}
if (second_arg_length > 0)
FSM finishes successfully. */
virtual enum async_reply_reason do_async_reply_reason ()
{
- gdb_assert_not_reached (_("should not call async_reply_reason here"));
+ gdb_assert_not_reached ("should not call async_reply_reason here");
}
};
return m_range_parser.finished ();
}
- gdb_assert_not_reached (_("unhandled state"));
+ gdb_assert_not_reached ("unhandled state");
}
/* See tid-parse.h. */
return m_range_parser.cur_tok ();
}
- gdb_assert_not_reached (_("unhandled state"));
+ gdb_assert_not_reached ("unhandled state");
}
void
printf_filtered ("optimized out.\n");
continue;
case LOC_COMPUTED:
- gdb_assert_not_reached (_("LOC_COMPUTED variable missing a method"));
+ gdb_assert_not_reached ("LOC_COMPUTED variable missing a method");
}
}
if (SYMBOL_TYPE (sym))
if (layout == layouts[i].get ())
return i;
}
- gdb_assert_not_reached (_("layout not found!?"));
+ gdb_assert_not_reached ("layout not found!?");
}
/* Function to set the layout. */
}
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));
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])
return py_varobj_get_iterator (var, var->dynamic->pretty_printer);
#endif
- gdb_assert_not_reached (_("\
-requested an iterator from a non-dynamic varobj"));
+ gdb_assert_not_reached ("requested an iterator from a non-dynamic varobj");
}
static bool
if (it != open_fds.end ())
open_fds.erase (it);
else
- gdb_assert_not_reached (_("fd not found in open_fds"));
+ gdb_assert_not_reached ("fd not found in open_fds");
}
/* Helper function for close_most_fds that closes the file descriptor
return result;
#else
- gdb_assert_not_reached (_("socketpair not available on this host"));
+ gdb_assert_not_reached ("socketpair not available on this host");
#endif
}
mark_cloexec (filedes[1]);
}
#else /* HAVE_PIPE */
- gdb_assert_not_reached (_("pipe not available on this host"));
+ gdb_assert_not_reached ("pipe not available on this host");
#endif /* HAVE_PIPE */
#endif /* HAVE_PIPE2 */
/* The canonical form of gdb_assert (0).
MESSAGE is a string to include in the error message. */
-#define gdb_assert_not_reached(message) \
- internal_error (__FILE__, __LINE__, "%s: %s", __func__, _(message))
+#define gdb_assert_not_reached(message, ...) \
+ internal_error (__FILE__, __LINE__, _("%s: " message), __func__, \
+ ##__VA_ARGS__)
#endif /* COMMON_GDB_ASSERT_H */