[review] Allow not saving the signal state in SIGSETJMP

Sourceware to Gerrit sync (Code Review)
2019-10-16T21:15:35Z

Sourceware to Gerrit sync has uploaded a new patch set version (#3) to the change originally created by Christian Biesinger.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/124
......................................................................

Allow not saving the signal state in SIGSETJMP

Saving the signal state is very slow (this patch is a 14% speedup). The
reason we need this code is because signal handler will leave the
signal blocked when we longjmp out of it. But in this case we can
just manually unblock the signal instead of taking the unconditional
perf hit.

gdb/ChangeLog:

2019-10-16 Christian Biesinger <cbiesinger@google.com>

* gdbsupport/gdb_setjmp.h (SIGSETJMP): Allow passing in the value to
pass on to sigsetjmp's second argument.
* cp-support.c (gdb_demangle): Unblock SIGSEGV if we caught a crash.

Change-Id: Ib3010966050c64b4cc8b47d8cb45871652b0b3ea
---
M gdb/ChangeLog
M gdb/cp-support.c
M gdb/gdbsupport/gdb_setjmp.h
3 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d11dbfb..ba028ed 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2019-10-16 Christian Biesinger <cbiesinger@google.com>
+
+ * gdbsupport/gdb_setjmp.h (SIGSETJMP): Allow passing in the value to
+ pass on to sigsetjmp's second argument.
+ * cp-support.c (gdb_demangle): Unblock SIGSEGV if we caught a crash.
+
2019-10-16 Keith Seitz <keiths@redhat.com>

PR gdb/23567