diff options
author | Yao Qi <yao@codesourcery.com> | 2012-08-28 16:53:30 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2012-08-28 16:53:30 +0000 |
commit | 18c1b81abee59b25ba6b68f7c715843b870f9bc6 (patch) | |
tree | 5513d7b8b01384ef409830cee4d2bc4c9a6a9aa3 /gdb/gdbserver/server.h | |
parent | fb048c26f19fec860e5e9004351307ed22fe1a11 (diff) | |
download | gdb-18c1b81abee59b25ba6b68f7c715843b870f9bc6.zip gdb-18c1b81abee59b25ba6b68f7c715843b870f9bc6.tar.gz gdb-18c1b81abee59b25ba6b68f7c715843b870f9bc6.tar.bz2 |
gdb/gdbserver/
* ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
* server.h: Include 'libiberty.h' and 'ansidecl.h'.
(ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
Remove declarations of xmalloc, xreallloc, xstrdup and
freeargv.
* Makefile.in (libiberty_h): New.
(server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
(linux-bfin-low.o): Append dependency 'libiberty.h'.
Diffstat (limited to 'gdb/gdbserver/server.h')
-rw-r--r-- | gdb/gdbserver/server.h | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index a6ba0db..e93ad00 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -27,6 +27,9 @@ #include "wincecompat.h" #endif +#include "libiberty.h" +#include "ansidecl.h" + #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -67,32 +70,6 @@ extern int vasprintf(char **strp, const char *fmt, va_list ap); int vsnprintf(char *str, size_t size, const char *format, va_list ap); #endif -#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 - -#ifndef ATTR_MALLOC -#if defined(__GNUC__) && (__GNUC__ >= 3) -#define ATTR_MALLOC __attribute__ ((__malloc__)) -#else -#define ATTR_MALLOC /* nothing */ -#endif -#endif - /* Define underscore macro, if not available, to be able to use it inside code shared with gdb in common directory. */ #ifndef _ @@ -364,16 +341,10 @@ void monitor_output (const char *msg); /* Functions from utils.c */ #include "common-utils.h" -void *xmalloc (size_t) ATTR_MALLOC; -void *xrealloc (void *, size_t); -void *xcalloc (size_t, size_t) ATTR_MALLOC; -char *xstrdup (const char *) ATTR_MALLOC; -void freeargv (char **argv); - void perror_with_name (const char *string); -void error (const char *string,...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2); -void fatal (const char *string,...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2); -void warning (const char *string,...) ATTR_FORMAT (printf, 1, 2); +void error (const char *string,...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2); +void fatal (const char *string,...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2); +void warning (const char *string,...) ATTRIBUTE_PRINTF (1, 2); char *paddress (CORE_ADDR addr); char *pulongest (ULONGEST u); char *plongest (LONGEST l); |