aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/server.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-04-09 21:11:35 +0000
committerDaniel Jacobowitz <drow@false.org>2002-04-09 21:11:35 +0000
commit0729219dab3a669a294ea00f471fe18c4ba65d79 (patch)
tree402766eba5b19f554e3f712f0586b07dcd149798 /gdb/gdbserver/server.h
parent97658e92dfc5dd20031100cf6a3b26d700228613 (diff)
downloadgdb-0729219dab3a669a294ea00f471fe18c4ba65d79.zip
gdb-0729219dab3a669a294ea00f471fe18c4ba65d79.tar.gz
gdb-0729219dab3a669a294ea00f471fe18c4ba65d79.tar.bz2
2002-04-09 Daniel Jacobowitz <drow@mvista.com>
* gdbserver/Makefile.in: Add WARN_CFLAGS. Update configury dependencies. * gdbserver/configure.in: Check for <string.h> * 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 <arpa/inet.h> 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.
Diffstat (limited to 'gdb/gdbserver/server.h')
-rw-r--r--gdb/gdbserver/server.h30
1 files changed, 24 insertions, 6 deletions
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 <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#include <setjmp.h>
-
-/* 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 <setjmp.h>
/* 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). */