diff --git a/gdb-6.6-bz230000-power6-disassembly-test.patch b/gdb-6.6-bz230000-power6-disassembly-test.patch new file mode 100644 index 0000000..192522d --- /dev/null +++ b/gdb-6.6-bz230000-power6-disassembly-test.patch @@ -0,0 +1,63 @@ +https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000 + +The original testcase + https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1 +requires too recent GCC. + + +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ ./gdb/testsuite/gdb.arch/powerpc-power6.exp 25 Feb 2007 18:27:39 -0000 +@@ -0,0 +1,44 @@ ++# 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. ++ ++# Test PowerPC Power6 instructions disassembly. ++ ++if {![istarget "powerpc*-*-*"]} then { ++ verbose "Skipping PowerPC Power6 instructions disassembly." ++ return ++} ++ ++set testfile "powerpc-power6" ++set srcfile ${testfile}.s ++set objfile ${objdir}/${subdir}/${testfile}.o ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } { ++ untested "PowerPC prologue tests" ++ return -1 ++} ++ ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++gdb_load ${objfile} ++ ++# Disassemble the function. ++ ++gdb_test "disass func" ":\tblr\r\n.*" "Basic disassembly" ++ ++gdb_test "disass func" ":\tdcbzl *r8,r9\r\n.*" "Power6 disassembly 1" ++gdb_test "disass func" ":\tfrsqrtes *f10,f11\r\n.*" "Power6 disassembly 2" +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ ./gdb/testsuite/gdb.arch/powerpc-power6.s 25 Feb 2007 18:27:39 -0000 +@@ -0,0 +1,6 @@ ++ .text ++ .globl func ++func: ++ blr ++ .long 0x7c284fec ++ .long 0xed405834 diff --git a/gdb-6.6-upstream.patch b/gdb-6.6-upstream.patch index c219d59..19f4a47 100644 --- a/gdb-6.6-upstream.patch +++ b/gdb-6.6-upstream.patch @@ -498,3 +498,26 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=209445 /* Enable thread event reporting for this thread. */ err = td_thr_event_enable_p (th_p, 1); + + +https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000 + + +2007-02-08 Thiago Jung Bauermann + + * rs6000-tdep.c (gdb_print_insn_powerpc): Set + info->disassembler_options to "any". + + +--- ./gdb/rs6000-tdep.c 8 Feb 2007 14:22:53 -0000 1.261 ++++ ./gdb/rs6000-tdep.c 8 Feb 2007 18:05:23 -0000 1.262 +@@ -2924,6 +2924,9 @@ find_variant_by_arch (enum bfd_architect + static int + gdb_print_insn_powerpc (bfd_vma memaddr, disassemble_info *info) + { ++ if (!info->disassembler_options) ++ info->disassembler_options = "any"; ++ + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) + return print_insn_big_powerpc (memaddr, info); + else diff --git a/gdb.spec b/gdb.spec index eb21838..c4d23f5 100644 --- a/gdb.spec +++ b/gdb.spec @@ -11,7 +11,7 @@ Name: gdb Version: 6.6 # The release always contains a leading reserved number, start it at 1. -Release: 3%{?dist} +Release: 4%{?dist} License: GPL Group: Development/Debuggers @@ -305,6 +305,9 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch # Backported post gdb-6.6 release fixups. Patch232: gdb-6.6-upstream.patch +# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). +Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch + BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext BuildRequires: flex bison sharutils @@ -429,6 +432,7 @@ and printing their data. %patch230 -p1 %patch231 -p1 %patch232 -p1 +%patch234 -p1 # Change the version that gets printed at GDB startup, so it is RedHat # specific. @@ -591,6 +595,9 @@ fi # don't include the files in include, they are part of binutils %changelog +* Sun Feb 25 2007 Jan Kratochvil - 6.6-4 +- Backport + testcase for PPC Power6/DFP instructions disassembly (BZ 230000). + * Mon Feb 5 2007 Jan Kratochvil - 6.6-3 - Fix a race during attaching to dying threads; backport (BZ 209445). - Testcase of unwinding has now marked its unsolvable cases (for BZ 140532).