gdb/gdbserver/

* server.h (internal_error): Declare.
	(gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
	* utils.c (internal_error): New function.
This commit is contained in:
Pedro Alves
2010-03-16 17:47:52 +00:00
parent 46956e396d
commit e92d13d5bc
3 changed files with 52 additions and 0 deletions

View File

@ -171,6 +171,22 @@ warning (const char *string,...)
va_end (args);
}
/* Report a problem internal to GDBserver, and exit. */
void
internal_error (const char *file, int line, const char *fmt, ...)
{
va_list args;
va_start (args, fmt);
fprintf (stderr, "\
%s:%d: A problem internal to GDBserver has been detected.\n", file, line);
vfprintf (stderr, fmt, args);
fprintf (stderr, "\n");
va_end (args);
exit (1);
}
/* Temporary storage using circular buffer. */
#define NUMCELLS 4
#define CELLSIZE 50