[gdb] - Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release).
Jan Kratochvil
jkratoch at fedoraproject.org
Thu Nov 18 04:11:20 UTC 2010
commit c804fb8a8f47c9bdd013a1d34b1d0de1082c0a2b
Author: Jan Kratochvil <jan.kratochvil at redhat.com>
Date: Thu Nov 18 05:11:13 2010 +0100
- Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release).
gdb-6.6-bz229517-gcore-without-terminal.patch | 171 +++++++++++++++++++++++++
gdb-bz634108-solib_address.patch | 29 ++++
gdb.spec | 11 ++-
3 files changed, 210 insertions(+), 1 deletions(-)
---
diff --git a/gdb-6.6-bz229517-gcore-without-terminal.patch b/gdb-6.6-bz229517-gcore-without-terminal.patch
new file mode 100644
index 0000000..c2d0180
--- /dev/null
+++ b/gdb-6.6-bz229517-gcore-without-terminal.patch
@@ -0,0 +1,171 @@
+2007-04-22 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ * gdb_gcore.sh: Redirect GDB from `</dev/null'.
+
+2007-04-22 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ * gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files.
+
+
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ ./gdb/testsuite/gdb.base/gcorebg.c 25 Feb 2007 12:21:20 -0000
+@@ -0,0 +1,43 @@
++#include <stdio.h>
++#include <sys/types.h>
++#include <unistd.h>
++#include <stdlib.h>
++#include <signal.h>
++
++int main (int argc, char **argv)
++{
++ pid_t pid = 0;
++ pid_t ppid;
++ char buf[256];
++
++ if (argc != 4)
++ {
++ fprintf (stderr, "Syntax: %s {standard|detached} <gcore command> <core output file>\n",
++ argv[0]);
++ exit (1);
++ }
++
++ pid = fork ();
++
++ switch (pid)
++ {
++ case 0:
++ if (strcmp (argv[1], "detached") == 0)
++ setpgrp ();
++ ppid = getppid ();
++ sprintf (buf, "sh %s -o %s %d", argv[2], argv[3], (int) ppid);
++ system (buf);
++ kill (ppid, SIGTERM);
++ break;
++
++ case -1:
++ perror ("fork err\n");
++ exit (1);
++ break;
++
++ default:
++ sleep (60);
++ }
++
++ return 0;
++}
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ ./gdb/testsuite/gdb.base/gcorebg.exp 25 Feb 2007 12:21:20 -0000
+@@ -0,0 +1,113 @@
++# Copyright 2007 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 2 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, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++
++# Please email any bugs, comments, and/or additions to this file to:
++# bug-gdb at prep.ai.mit.edu
++
++# This file was written by Jan Kratochvil <jan.kratochvil at redhat.com>.
++# This is a test for `gdb_gcore.sh' functionality.
++# It also tests a regression with `gdb_gcore.sh' being run without its
++# accessible terminal.
++
++if ![info exists GCORE] {
++ set GCORE "${srcdir}/../gdb_gcore.sh"
++}
++verbose "using GCORE = $GCORE" 2
++
++set testfile "gcorebg"
++set srcfile ${testfile}.c
++set binfile ${objdir}/${subdir}/${testfile}
++set corefile ${objdir}/${subdir}/${testfile}.test
++
++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
++ untested gcorebg.exp
++ return -1
++}
++
++# Cleanup.
++
++proc core_clean {} {
++ global corefile
++
++ foreach file [glob -nocomplain [join [list $corefile *] ""]] {
++ verbose "Delete file $file" 1
++ remote_file target delete $file
++ }
++}
++core_clean
++remote_file target delete "./gdb"
++
++# Generate the core file.
++
++# Provide `./gdb' for `gdb_gcore.sh' running it as a bare `gdb' command.
++# Setup also `$PATH' appropriately.
++# If GDB was not found let `gdb_gcore.sh' to find the system GDB by `$PATH'.
++if {$GDB != "gdb"} {
++ file link ./gdb $GDB
++}
++global env
++set oldpath $env(PATH)
++set env(PATH) [join [list . $env(PATH)] ":"]
++verbose "PATH = $env(PATH)" 2
++
++# Test file body.
++# $detached == "standard" || $detached == "detached"
++
++proc test_body { detached } {
++ global binfile
++ global GCORE
++ global corefile
++
++ set res [remote_spawn target "$binfile $detached $GCORE $corefile"]
++ if { $res < 0 || $res == "" } {
++ fail "Spawning $detached gcore"
++ return 1
++ }
++ pass "Spawning $detached gcore"
++ remote_expect target 20 {
++ timeout {
++ fail "Spawned $detached gcore finished"
++ remote_exec target "kill -9 -[exp_pid -i $res]"
++ return 1
++ }
++ eof {
++ pass "Spawned $detached gcore finished"
++ remote_wait target 20
++ }
++ }
++
++ if {1 == [llength [glob -nocomplain [join [list $corefile *] ""]]]} {
++ pass "Core file generated by $detached gcore"
++ } else {
++ fail "Core file generated by $detached gcore"
++ }
++ core_clean
++}
++
++# First a general `gdb_gcore.sh' spawn with its controlling terminal available.
++
++test_body standard
++
++# And now `gdb_gcore.sh' spawn without its controlling terminal available.
++# It is spawned through `gcorebg.c' using setpgrp ().
++
++test_body detached
++
++
++# Cleanup.
++
++set env(PATH) $oldpath
++remote_file target delete "./gdb"
diff --git a/gdb-bz634108-solib_address.patch b/gdb-bz634108-solib_address.patch
new file mode 100644
index 0000000..a442648
--- /dev/null
+++ b/gdb-bz634108-solib_address.patch
@@ -0,0 +1,29 @@
+Fix gdb.solib_address (fix by Phil Muldoon).
+
+--- /dev/null
++++ b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
+@@ -0,0 +1,24 @@
++# Copyright (C) 2008, 2009, 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/>.
++
++# https://bugzilla.redhat.com/show_bug.cgi?id=634108
++
++gdb_exit
++gdb_start
++
++# Skip all tests if Python scripting is not enabled.
++if { [skip_python_tests] } { continue }
++
++gdb_test "python print gdb.solib_address(-1)" "None" "gdb.solib_address exists"
diff --git a/gdb.spec b/gdb.spec
index c82e752..cf7131e 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -292,6 +292,10 @@ Patch235: gdb-6.3-bz231832-obstack-2gb.patch
#=push
Patch241: gdb-6.6-bz225783-gdb-debuginfo-paths.patch
+# Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
+#=fedoratest
+Patch245: gdb-6.6-bz229517-gcore-without-terminal.patch
+
# Notify user of a child forked process being detached (BZ 235197).
#=push: This is more about discussion if/what should be printed.
Patch247: gdb-6.6-bz235197-fork-detach-info.patch
@@ -550,6 +554,9 @@ Patch520: gdb-bz642879-elfread-sigint-stale.patch
#=push
Patch525: gdb-next-over-throw.patch
+# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
+Patch526: gdb-bz634108-solib_address.patch
+
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
Requires: readline%{?_isa}
BuildRequires: readline-devel%{?_isa}
@@ -735,6 +742,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch234 -p1
%patch235 -p1
%patch241 -p1
+%patch245 -p1
%patch247 -p1
%patch254 -p1
%patch258 -p1
@@ -801,6 +809,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch511 -p1
%patch520 -p1
%patch525 -p1
+%patch526 -p1
%patch393 -p1
%patch335 -p1
@@ -1171,7 +1180,7 @@ fi
%endif
%changelog
-* Wed Nov 17 2010 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.2.50.20101117-1.fc15
+* Thu Nov 18 2010 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.2.50.20101117-1.fc15
- Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release).
* Sun Nov 7 2010 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.2-25.fc14
More information about the scm-commits
mailing list