aboutsummaryrefslogtreecommitdiff
path: root/gas/as.h
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-01-18 08:23:10 -0500
committerNathan Sidwell <nathan@acm.org>2017-01-18 08:23:10 -0500
commit1ec4b9f28bab4400c882a0f3e966eb12b73cee1a (patch)
treed5c4263ec5061e83bc72f5096247ec0ebec1b892 /gas/as.h
parent319b82e47dd12d6554e17a2ceedd3139b88ba55f (diff)
downloadgdb-1ec4b9f28bab4400c882a0f3e966eb12b73cee1a.zip
gdb-1ec4b9f28bab4400c882a0f3e966eb12b73cee1a.tar.gz
gdb-1ec4b9f28bab4400c882a0f3e966eb12b73cee1a.tar.bz2
Catch gas exit-via-signal
gas/ * as.h (gas_assert): Use abort. (as_assert): Remove. (signal_init): Declare. * as.c (main): Call signal_init. * messages.c: #include <signal.h> (as_assert): Delete. (as_abort): Allow NULL FILE. (signal_crash): New. (signal_init): Register fatal signal handlers. * configure.ac: Check for strsignal. * config.in: Rebuilt. * configure: Rebuilt.
Diffstat (limited to 'gas/as.h')
-rw-r--r--gas/as.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/gas/as.h b/gas/as.h
index 76aa9ac..fee7c75 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -85,8 +85,7 @@
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
#define __PRETTY_FUNCTION__ ((char *) NULL)
#endif
-#define gas_assert(P) \
- ((void) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)))
+#define gas_assert(P) ((void) ((P) ? 0 : (abort (), 0)))
#undef abort
#define abort() as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
@@ -459,8 +458,8 @@ PRINTF_LIKE (as_warn);
PRINTF_WHERE_LIKE (as_bad_where);
PRINTF_WHERE_LIKE (as_warn_where);
-void as_assert (const char *, int, const char *) ATTRIBUTE_NORETURN;
void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
+void signal_init (void);
void sprint_value (char *, addressT);
int had_errors (void);
int had_warnings (void);