aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/cp-support.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 687e2fe..5abebac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-23 Gary Benson <gbenson@redhat.com>
+
+ * cp-support.c (gdb_demangle): Fix build on systems without
+ sigaltstack.
+
2014-07-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2loc.c (value_of_dwarf_reg_entry): Remove setting value address
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);