From 0729219dab3a669a294ea00f471fe18c4ba65d79 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 9 Apr 2002 21:11:35 +0000 Subject: 2002-04-09 Daniel Jacobowitz * gdbserver/Makefile.in: Add WARN_CFLAGS. Update configury dependencies. * gdbserver/configure.in: Check for * gdbserver/configure: Regenerate. * gdbserver/config.in: Regenerate. * gdbserver/gdbreplay.c: Include needed system headers. (remote_open): Remove strchr prototype. * gdbserver/linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS. * gdbserver/regcache.c (supply_register): Change buf argument to const void *. (supply_register_by_name): Likewise. (collect_register): Change buf argument to void *. (collect_register_by_name): Likewise. * gdbserver/regcache.h: Add missing prototypes. * gdbserver/remote-utils.c: Include for inet_ntoa. * gdbserver/server.c (handle_query): New function. (attached): New static variable, moved out of main. (main): Quiet longjmp clobber warnings. * gdbserver/server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes. * gdbserver/utils.c (error): Remove NORETURN. (fatal): Likewise. --- gdb/gdbserver/server.h | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'gdb/gdbserver/server.h') diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index 7f22041..9de0d73 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -23,20 +23,36 @@ #define SERVER_H #include "config.h" + #include #include #include #include +#include - -/* FIXME: Both of these should be autoconf'd for. */ -#define NORETURN +#ifndef ATTR_NORETURN +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) +#define ATTR_NORETURN __attribute__ ((noreturn)) +#else +#define ATTR_NORETURN /* nothing */ +#endif +#endif + +#ifndef ATTR_FORMAT +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4)) +#define ATTR_FORMAT(type, x, y) __attribute__ ((format(type, x, y))) +#else +#define ATTR_FORMAT(type, x, y) /* nothing */ +#endif +#endif + +/* FIXME: This should probably be autoconf'd for. It's an integer type at + least the size of a (void *). */ typedef long long CORE_ADDR; #include "regcache.h" #include "gdb/signals.h" -#include /* Target-specific functions */ @@ -93,11 +109,13 @@ int target_signal_to_host (enum target_signal oursig); /* Functions from utils.c */ void perror_with_name (char *string); -void error (const char *string,...); -void fatal (const char *string,...); +void error (const char *string,...) ATTR_NORETURN; +void fatal (const char *string,...) ATTR_NORETURN; void warning (const char *string,...); +/* Functions from the register cache definition. */ +void init_registers (void); /* Maximum number of bytes to read/write at once. The value here is chosen to fill up a packet (the headers account for the 32). */ -- cgit v1.1