[RHEL] Reintroduce gdb-6.8-quit-never-aborts.patch.
This commit is contained in:
parent
556378e101
commit
5677fb2373
74
gdb-6.8-quit-never-aborts.patch
Normal file
74
gdb-6.8-quit-never-aborts.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
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.5.50.20130118/gdb/defs.h
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.5.50.20130118.orig/gdb/defs.h 2013-01-01 07:32:41.000000000 +0100
|
||||||
|
+++ gdb-7.5.50.20130118/gdb/defs.h 2013-01-21 16:40:29.889256633 +0100
|
||||||
|
@@ -176,6 +176,7 @@ extern int check_quit_flag (void);
|
||||||
|
/* Set the quit flag. */
|
||||||
|
extern void set_quit_flag (void);
|
||||||
|
|
||||||
|
+extern int quit_flag_cleanup;
|
||||||
|
extern int immediate_quit;
|
||||||
|
|
||||||
|
extern void quit (void);
|
||||||
|
Index: gdb-7.5.50.20130118/gdb/top.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.5.50.20130118.orig/gdb/top.c 2013-01-21 14:56:12.000000000 +0100
|
||||||
|
+++ gdb-7.5.50.20130118/gdb/top.c 2013-01-21 14:56:16.385710056 +0100
|
||||||
|
@@ -1329,7 +1329,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;
|
||||||
|
catch_errors (quit_target, &qt,
|
||||||
|
"Quitting: ", RETURN_MASK_ALL);
|
||||||
|
|
||||||
|
Index: gdb-7.5.50.20130118/gdb/utils.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.5.50.20130118.orig/gdb/utils.c 2013-01-21 14:56:12.000000000 +0100
|
||||||
|
+++ gdb-7.5.50.20130118/gdb/utils.c 2013-01-21 16:41:02.225233493 +0100
|
||||||
|
@@ -141,6 +141,11 @@ int quit_flag;
|
||||||
|
|
||||||
|
int immediate_quit;
|
||||||
|
|
||||||
|
+/* Nonzero means we are already processing the quitting cleanups and we should
|
||||||
|
+ no longer get aborted. */
|
||||||
|
+
|
||||||
|
+int quit_flag_cleanup;
|
||||||
|
+
|
||||||
|
#ifndef HAVE_PYTHON
|
||||||
|
|
||||||
|
/* Clear the quit flag. */
|
||||||
|
@@ -164,6 +169,9 @@ set_quit_flag (void)
|
||||||
|
int
|
||||||
|
check_quit_flag (void)
|
||||||
|
{
|
||||||
|
+ if (quit_flag_cleanup)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
/* This is written in a particular way to avoid races. */
|
||||||
|
if (quit_flag)
|
||||||
|
{
|
||||||
|
Index: gdb-7.5.50.20130118/gdb/python/python.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.5.50.20130118.orig/gdb/python/python.c 2013-01-21 16:39:03.000000000 +0100
|
||||||
|
+++ gdb-7.5.50.20130118/gdb/python/python.c 2013-01-21 16:39:30.698299142 +0100
|
||||||
|
@@ -181,6 +181,9 @@ set_quit_flag (void)
|
||||||
|
int
|
||||||
|
check_quit_flag (void)
|
||||||
|
{
|
||||||
|
+ if (quit_flag_cleanup)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
return PyOS_InterruptOccurred ();
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,41 @@
|
|||||||
|
http://sourceware.org/ml/gdb-patches/2013-01/msg00469.html
|
||||||
|
Subject: [patch] Fix gdb.fortran/common-block.exp crash in PIE mode
|
||||||
|
|
||||||
|
Hi Tom,
|
||||||
|
|
||||||
|
runtest F90_FOR_TARGET="gfortran -fPIE -pie" gdb.fortran/common-block.exp
|
||||||
|
|
||||||
|
crashes GDB as function relocate_one_symbol
|
||||||
|
if ((SYMBOL_CLASS (sym) == LOC_LABEL
|
||||||
|
|| SYMBOL_CLASS (sym) == LOC_STATIC)
|
||||||
|
&& SYMBOL_SECTION (sym) >= 0)
|
||||||
|
SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (delta, SYMBOL_SECTION (sym));
|
||||||
|
corrupts SYMBOL_VALUE_COMMON_BLOCK
|
||||||
|
struct common_block *common_block;
|
||||||
|
as it thinks it can update it like SYMBOL_VALUE_ADDRESS
|
||||||
|
CORE_ADDR address;
|
||||||
|
due to its LOC_STATIC.
|
||||||
|
|
||||||
|
No regressions on {x86_64,x86_64-m32,i686}-fedora18-linux-gnu and in PIE mode.
|
||||||
|
|
||||||
|
|
||||||
|
Thanks,
|
||||||
|
Jan
|
||||||
|
|
||||||
|
|
||||||
|
gdb/
|
||||||
|
2013-01-19 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
Fix gdb.fortran/common-block.exp crash in PIE mode.
|
||||||
|
* dwarf2read.c (new_symbol_full) <DW_TAG_common_block>: Use
|
||||||
|
LOC_COMMON_BLOCK.
|
||||||
|
* f-valprint.c (info_common_command_for_block): Expect
|
||||||
|
LOC_COMMON_BLOCK in gdb_assert.
|
||||||
|
* symtab.h (struct general_symbol_info): Update comment for the
|
||||||
|
common_block member.
|
||||||
|
(domain_enum): Extend comment for the COMMON_BLOCK_DOMAIN member.
|
||||||
|
(enum address_class): New member LOC_COMMON_BLOCK.
|
||||||
|
|
||||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||||
index 7a58c45..364e6af 100644
|
index 7a58c45..364e6af 100644
|
||||||
--- a/gdb/dwarf2read.c
|
--- a/gdb/dwarf2read.c
|
||||||
@ -58,3 +96,4 @@ index c334a3a..b992266 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* The methods needed to implement LOC_COMPUTED. These methods can
|
/* The methods needed to implement LOC_COMPUTED. These methods can
|
||||||
|
|
||||||
|
13
gdb.spec
13
gdb.spec
@ -34,7 +34,7 @@ Version: 7.5.50.20130118
|
|||||||
|
|
||||||
# The release always contains a leading reserved number, start it at 1.
|
# The release always contains a leading reserved number, start it at 1.
|
||||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
|
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
|
||||||
Group: Development/Debuggers
|
Group: Development/Debuggers
|
||||||
@ -374,6 +374,10 @@ Patch329: gdb-6.8-bz254229-gcore-prpsinfo.patch
|
|||||||
#=push+work: This fix is incorrect.
|
#=push+work: This fix is incorrect.
|
||||||
Patch330: gdb-6.8-bz436037-reg-no-longer-active.patch
|
Patch330: gdb-6.8-bz436037-reg-no-longer-active.patch
|
||||||
|
|
||||||
|
# Make the GDB quit processing non-abortable to cleanup everything properly.
|
||||||
|
#=fedora: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
||||||
|
Patch331: gdb-6.8-quit-never-aborts.patch
|
||||||
|
|
||||||
# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
|
# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
|
||||||
#=fedora
|
#=fedora
|
||||||
Patch335: gdb-rhel5-compat.patch
|
Patch335: gdb-rhel5-compat.patch
|
||||||
@ -548,6 +552,7 @@ Patch703: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
|||||||
|
|
||||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||||
# (RH BZ 795424).
|
# (RH BZ 795424).
|
||||||
|
#=push+work
|
||||||
Patch811: gdb-rhbz795424-bitpos-20of25.patch
|
Patch811: gdb-rhbz795424-bitpos-20of25.patch
|
||||||
Patch812: gdb-rhbz795424-bitpos-21of25.patch
|
Patch812: gdb-rhbz795424-bitpos-21of25.patch
|
||||||
Patch813: gdb-rhbz795424-bitpos-22of25.patch
|
Patch813: gdb-rhbz795424-bitpos-22of25.patch
|
||||||
@ -557,6 +562,7 @@ Patch817: gdb-rhbz795424-bitpos-25of25-test.patch
|
|||||||
Patch818: gdb-rhbz795424-bitpos-lazyvalue.patch
|
Patch818: gdb-rhbz795424-bitpos-lazyvalue.patch
|
||||||
|
|
||||||
# Fix gdb.fortran/common-block.exp in PIE mode.
|
# Fix gdb.fortran/common-block.exp in PIE mode.
|
||||||
|
#=push
|
||||||
Patch823: gdb-commonblock-pie.patch
|
Patch823: gdb-commonblock-pie.patch
|
||||||
|
|
||||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||||
@ -883,9 +889,11 @@ find -name "*.info*"|xargs rm -f
|
|||||||
%patch642 -p1 -R
|
%patch642 -p1 -R
|
||||||
%endif
|
%endif
|
||||||
%patch337 -p1
|
%patch337 -p1
|
||||||
|
%patch331 -p1
|
||||||
%patch335 -p1
|
%patch335 -p1
|
||||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||||
%patch335 -p1 -R
|
%patch335 -p1 -R
|
||||||
|
%patch331 -p1 -R
|
||||||
%patch337 -p1 -R
|
%patch337 -p1 -R
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -1371,6 +1379,9 @@ fi
|
|||||||
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
|
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 21 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.50.20130118-2.fc19
|
||||||
|
- [RHEL] Reintroduce gdb-6.8-quit-never-aborts.patch.
|
||||||
|
|
||||||
* Sat Jan 19 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.50.20130118-1.fc19
|
* Sat Jan 19 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.50.20130118-1.fc19
|
||||||
- Rebase to FSF GDB 7.5.50.20130118 (pre-7.6 snapshot).
|
- Rebase to FSF GDB 7.5.50.20130118 (pre-7.6 snapshot).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user