gdb/gdb-6.8-quit-never-aborts.patch
Michael Matz a2f8e1d8c6 - Update to gdb 7.12.1
* negative repeat count for x examines backwards
  * fortran: support structs/arrays with dynamically types fields
  * support MPX bound checking
  * support for the Rust language
  * 'catch syscall' now can catch groups of related syscalls
  * New (sub)commands:
    - skip {-file,-gfile,-function,-rfunction}: generic skip
      mechanism
    - maint {selftest,info line-table}
    - new-ui: create new user interface for GUI clients
  * (fast) tracepoints on s390x and ppc64le added to gdbserver
  * New target Andes NDS32
- Remove patch gdb-aarch64-v81-hwbreakpoints.diff (upstream)
- Add patches from Fedora package:
    gdb-6.7-testsuite-stable-results.patch
    gdb-add-index-chmod.patch
    gdb-bison-old.patch
    gdb-container-rh-pkg.patch
    gdb-libexec-add-index.patch
    gdb-linux_perf-bundle.patch
    gdb-physname-pr11734-test.patch
    gdb-physname-pr12273-test.patch
    gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
    gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
    gdb-rhbz1149205-catch-syscall-after-fork-test.patch
    gdb-rhbz1156192-recursive-dlopen-test.patch
    gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
    gdb-rhbz1350436-type-printers-error.patch
    gdb-test-ivy-bridge.patch

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=151
2017-02-15 16:05:56 +00:00

75 lines
2.7 KiB
Diff

We may abort the process of detaching threads with multiple SIGINTs - which are
being sent during a testcase terminating its child GDB.
Some of the threads may not be properly PTRACE_DETACHed which hurts if they
should have been detached with SIGSTOP (as they are accidentally left running
on the debugger termination).
Index: gdb-7.11.50.20160630/gdb/defs.h
===================================================================
--- gdb-7.11.50.20160630.orig/gdb/defs.h 2016-07-03 16:40:43.423078926 +0200
+++ gdb-7.11.50.20160630/gdb/defs.h 2016-07-03 16:41:08.568271741 +0200
@@ -175,6 +175,10 @@
/* Flag that function quit should call quit_force. */
extern volatile int sync_quit_force_run;
+#ifdef NEED_DETACH_SIGSTOP
+extern int quit_flag_cleanup;
+#endif
+
extern void quit (void);
/* Helper for the QUIT macro. */
Index: gdb-7.11.50.20160630/gdb/extension.c
===================================================================
--- gdb-7.11.50.20160630.orig/gdb/extension.c 2016-07-03 16:40:41.723065890 +0200
+++ gdb-7.11.50.20160630/gdb/extension.c 2016-07-03 16:41:44.896550309 +0200
@@ -830,6 +830,11 @@
int i, result = 0;
const struct extension_language_defn *extlang;
+#ifdef NEED_DETACH_SIGSTOP
+ if (quit_flag_cleanup)
+ return 0;
+#endif
+
ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang)
{
if (extlang->ops->check_quit_flag != NULL)
Index: gdb-7.11.50.20160630/gdb/top.c
===================================================================
--- gdb-7.11.50.20160630.orig/gdb/top.c 2016-07-03 16:40:41.724065898 +0200
+++ gdb-7.11.50.20160630/gdb/top.c 2016-07-03 16:40:43.424078934 +0200
@@ -1617,7 +1617,13 @@
qt.args = args;
qt.from_tty = from_tty;
+#ifndef NEED_DETACH_SIGSTOP
/* We want to handle any quit errors and exit regardless. */
+#else
+ /* We want to handle any quit errors and exit regardless but we should never
+ get user-interrupted to properly detach the inferior. */
+ quit_flag_cleanup = 1;
+#endif
/* Get out of tfind mode, and kill or detach all inferiors. */
TRY
Index: gdb-7.11.50.20160630/gdb/utils.c
===================================================================
--- gdb-7.11.50.20160630.orig/gdb/utils.c 2016-07-03 16:40:41.725065905 +0200
+++ gdb-7.11.50.20160630/gdb/utils.c 2016-07-03 16:41:38.961504799 +0200
@@ -109,6 +109,13 @@
int job_control;
+#ifdef NEED_DETACH_SIGSTOP
+/* Nonzero means we are already processing the quitting cleanups and we should
+ no longer get aborted. */
+
+int quit_flag_cleanup;
+#endif
+
/* Nonzero means that strings with character values >0x7F should be printed
as octal escapes. Zero means just print the value (e.g. it's an
international character, and the terminal or window can cope.) */