- Fix follow-exec for C++ programs (bugreported by Martin Stransky).
This commit is contained in:
parent
2897558ca7
commit
5e502f39e4
|
@ -0,0 +1,100 @@
|
|||
Archer-upstreamed:
|
||||
http://sourceware.org/ml/archer/2010-q2/msg00031.html
|
||||
|
||||
--- ./gdb/breakpoint.c 2010-05-29 01:12:32.000000000 +0200
|
||||
+++ ./gdb/breakpoint.c 2010-05-29 01:22:21.000000000 +0200
|
||||
@@ -1679,14 +1679,11 @@ create_exception_master_breakpoint (void
|
||||
debug_hook = lookup_minimal_symbol_text ("_Unwind_DebugHook", objfile);
|
||||
if (debug_hook != NULL)
|
||||
{
|
||||
- CORE_ADDR pc;
|
||||
struct breakpoint *b;
|
||||
|
||||
- pc = find_function_start_pc (get_objfile_arch (objfile),
|
||||
- SYMBOL_VALUE_ADDRESS (debug_hook),
|
||||
- SYMBOL_OBJ_SECTION (debug_hook));
|
||||
b = create_internal_breakpoint (get_objfile_arch (objfile),
|
||||
- pc, bp_exception_master);
|
||||
+ SYMBOL_VALUE_ADDRESS (debug_hook),
|
||||
+ bp_exception_master);
|
||||
b->addr_string = xstrdup ("_Unwind_DebugHook");
|
||||
b->enable_state = bp_disabled;
|
||||
}
|
||||
--- ./gdb/testsuite/gdb.cp/cxxexec.cc 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ ./gdb/testsuite/gdb.cp/cxxexec.cc 2010-05-29 01:18:56.000000000 +0200
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* This test script is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int
|
||||
+main()
|
||||
+{
|
||||
+ execlp ("true", "true", NULL);
|
||||
+ return 1;
|
||||
+}
|
||||
--- ./gdb/testsuite/gdb.cp/cxxexec.exp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ ./gdb/testsuite/gdb.cp/cxxexec.exp 2010-05-29 01:29:25.000000000 +0200
|
||||
@@ -0,0 +1,47 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if { [skip_cplus_tests] } { continue }
|
||||
+
|
||||
+set testfile cxxexec
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${testfile}.cc {c++ debug}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+runto_main
|
||||
+
|
||||
+set test "p _Unwind_DebugHook"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re " = .* 0x\[0-9a-f\].*\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "\r\nNo symbol .*\r\n$gdb_prompt $" {
|
||||
+ xfail $test
|
||||
+ untested ${testfile}.exp
|
||||
+ return -1
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+set test continue
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "Cannot access memory at address 0x\[0-9a-f\]+\r\n$gdb_prompt $" {
|
||||
+ fail $test
|
||||
+ }
|
||||
+ -re "\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_test "info inferiors" "No inferiors." "program finished"
|
9
gdb.spec
9
gdb.spec
|
@ -36,7 +36,7 @@ Version: 7.0.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.
|
||||
Release: 46%{?_with_upstream:.upstream}%{dist}
|
||||
Release: 47%{?_with_upstream:.upstream}%{dist}
|
||||
|
||||
License: GPLv3+
|
||||
Group: Development/Debuggers
|
||||
|
@ -500,6 +500,9 @@ Patch454: gdb-bz539590-gnu-ifunc-fix-cond.patch
|
|||
# Import fix of TUI layout internal error (BZ 595475).
|
||||
Patch462: gdb-bz595475-tui-layout.patch
|
||||
|
||||
# Fix follow-exec for C++ programs (bugreported by Martin Stransky).
|
||||
Patch470: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
|
||||
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
|
||||
Requires: readline%{?_isa}
|
||||
BuildRequires: readline-devel%{?_isa}
|
||||
|
@ -771,6 +774,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
|||
%patch450 -p1
|
||||
%patch454 -p1
|
||||
%patch462 -p1
|
||||
%patch470 -p1
|
||||
# Always verify their applicability.
|
||||
%patch393 -p1
|
||||
%patch335 -p1
|
||||
|
@ -1096,6 +1100,9 @@ fi
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat May 29 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0.1-47.fc12
|
||||
- Fix follow-exec for C++ programs (bugreported by Martin Stransky).
|
||||
|
||||
* Mon May 24 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0.1-46.fc12
|
||||
- Fix lock up on loops in the solib chain (BZ 593926).
|
||||
- Import fix of TUI layout internal error (BZ 595475).
|
||||
|
|
Loading…
Reference in New Issue