aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-07-23 15:25:05 +0100
committerGary Benson <gbenson@redhat.com>2014-07-23 15:25:05 +0100
commit91b522404e7eee8b4101bccabc29821792e6a627 (patch)
treeeff6f7dfa2942448f2c123ae9b8a0f9e3d8a2e75 /gdb
parente294541cdab0373f6097862de1068cc985e7e242 (diff)
downloadgdb-91b522404e7eee8b4101bccabc29821792e6a627.zip
gdb-91b522404e7eee8b4101bccabc29821792e6a627.tar.gz
gdb-91b522404e7eee8b4101bccabc29821792e6a627.tar.bz2
Fix build on systems without sigaltstack.
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.
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);