This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[COMMITTED PATCH] Fix build on systems without sigaltstack.
- From: Gary Benson <gbenson at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>, Andreas Schwab <schwab at suse dot de>, Andrew Burgess <aburgess at broadcom dot com>, Doug Evans <xdje42 at gmail dot com>, Eli Zaretskii <eliz at gnu dot org>, Florian Weimer <fw at deneb dot enyo dot de>, Mark Kettenis <mark dot kettenis at xs4all dot nl>, Pedro Alves <palves at redhat dot com>, Tom Tromey <tromey at redhat dot com>, Corinna Vinschen <vinschen at redhat dot com>
- Date: Wed, 23 Jul 2014 15:37:36 +0100
- Subject: [COMMITTED PATCH] Fix build on systems without sigaltstack.
- Authentication-results: sourceware.org; auth=none
- References: <003201cf9f8019978904cc69b0muller at ics-cnrs dot unistra dot fr>
This commit fixes the build on systems without sigaltstack.
gdb/
2014-07-23 Gary Benson <gbenson@redhat.com>
* cp-support.c (gdb_demangle): Fix build on systems without
sigaltstack.
---
gdb/ChangeLog | 5 +++++
gdb/cp-support.c | 4 ++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index a8ea6fc..5464117 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -1557,7 +1557,11 @@ gdb_demangle (const char *name, int options)
#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
sa.sa_handler = gdb_demangle_signal_handler;
sigemptyset (&sa.sa_mask);
+#ifdef HAVE_SIGALTSTACK
sa.sa_flags = SA_ONSTACK;
+#else
+ sa.sa_flags = 0;
+#endif
sigaction (SIGSEGV, &sa, &old_sa);
#else
ofunc = (void (*)()) signal (SIGSEGV, gdb_demangle_signal_handler);
--
1.7.1