gdb/gdb-6.8-quit-never-aborts.patch
Michael Matz c7081b119c - Rebase to gdb version 7.10.1 as of version in Fedora 23:
* reverse debugging on aarch64
  * new commands or subcommands:
    - info os cpu, set/show serial parity, info dll
    - maint print symbol-cache/symbol-cache-statistics,
      maint flush-symbol-cache
    - record btrace bts, record bts
    - compile print
    - show/set mpx bound
    - tui enable/disable
    - record btrace pt, record pt
    - maint info btrace,
      maint btrace packet-history/clear-packet-history/clear
  * s390 support for vector ABI
  * "set sysroot" improvements related to remote targets
  * better support for debugging containerized programs
    (without "set sysroot")
  * HISTSIZE environment variable is replaced by GDBHISTSIZE
  * python scripting:
    - it's possible to write frame unwinders
    - several new methods in Objfile, Type and Value classes
    - gdb can auto-load scripts contained in special sections
      named '.debug_gdb_scripts'.
  * extensions for the MI interface, new remote packet types
- Removed obsolete patches:
    0001-S390-Add-target-descriptions-for-vector-register-set.patch
    0001-S390-Fix-compiler-invocation-with-compile-command.patch
    0001-S390-Support-new-vector-register-sections.patch
    0002-S390-Add-vector-register-support-to-gdb.patch
    0003-S390-Add-vector-register-support-to-gdbserver.patch

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=128
2016-01-14 17:05:52 +00:00

65 lines
2.6 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.9.50.20150520/gdb/defs.h
===================================================================
--- gdb-7.9.50.20150520.orig/gdb/defs.h 2015-05-31 18:06:24.579002757 +0200
+++ gdb-7.9.50.20150520/gdb/defs.h 2015-05-31 18:06:29.253031613 +0200
@@ -145,6 +145,7 @@ extern void set_quit_flag (void);
/* Flag that function quit should call quit_force. */
extern volatile int sync_quit_force_run;
+extern int quit_flag_cleanup;
extern int immediate_quit;
extern void quit (void);
Index: gdb-7.9.50.20150520/gdb/top.c
===================================================================
--- gdb-7.9.50.20150520.orig/gdb/top.c 2015-05-31 18:06:24.580002763 +0200
+++ gdb-7.9.50.20150520/gdb/top.c 2015-05-31 18:06:29.254031619 +0200
@@ -1463,7 +1463,9 @@ quit_force (char *args, int from_tty)
qt.args = args;
qt.from_tty = from_tty;
- /* We want to handle any quit errors and exit regardless. */
+ /* 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;
/* Get out of tfind mode, and kill or detach all inferiors. */
TRY
Index: gdb-7.9.50.20150520/gdb/utils.c
===================================================================
--- gdb-7.9.50.20150520.orig/gdb/utils.c 2015-05-31 18:06:24.582002776 +0200
+++ gdb-7.9.50.20150520/gdb/utils.c 2015-05-31 18:06:29.255031625 +0200
@@ -122,6 +122,11 @@ int job_control;
int immediate_quit;
+/* Nonzero means we are already processing the quitting cleanups and we should
+ no longer get aborted. */
+
+int quit_flag_cleanup;
+
/* 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.) */
Index: gdb-7.9.50.20150520/gdb/extension.c
===================================================================
--- gdb-7.9.50.20150520.orig/gdb/extension.c 2015-05-31 18:06:24.582002776 +0200
+++ gdb-7.9.50.20150520/gdb/extension.c 2015-05-31 18:06:29.256031632 +0200
@@ -833,6 +833,9 @@ check_quit_flag (void)
int i, result = 0;
const struct extension_language_defn *extlang;
+ if (quit_flag_cleanup)
+ return 0;
+
ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang)
{
if (extlang->ops->check_quit_flag != NULL)