From d50521fae08a3513097689a38fb437038b6a6c83 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 7 Jan 2008 15:10:23 +0000 Subject: [PATCH] - Backport the gcc-4.3 compatibility -Werror fixes. - Fix documentation on hardware watchpoints wrt multiple threads. - Rename the patch file for BZ 235197 from its former name 234468. - Fix the vendora testcase `attach-32.exp' affecting the other tests results. - Support DW_TAG_interface_type the same way as DW_TAG_class_type (BZ 426600). --- gdb-6.3-inferior-notification-20050721.patch | 23 +- gdb-6.5-bz109921-DW_AT_decl_file-test.patch | 11 +- gdb-6.6-bz233852-attach-signalled.patch | 12 +- ...=> gdb-6.6-bz235197-fork-detach-info.patch | 0 ....patch => gdb-6.6-multifork-debugreg.patch | 169 ++++- ...7-bz426600-DW_TAG_interface_type-fix.patch | 129 ++++ ...-bz426600-DW_TAG_interface_type-test.patch | 706 ++++++++++++++++++ gdb-6.7.1-upstream.patch | 50 ++ gdb.spec | 19 +- 9 files changed, 1090 insertions(+), 29 deletions(-) rename gdb-6.6-bz234468-fork-detach-info.patch => gdb-6.6-bz235197-fork-detach-info.patch (100%) rename gdb-6.6-multifork-debugreg-for-i386-and-x86_64.patch => gdb-6.6-multifork-debugreg.patch (59%) create mode 100644 gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch create mode 100644 gdb-6.7-bz426600-DW_TAG_interface_type-test.patch diff --git a/gdb-6.3-inferior-notification-20050721.patch b/gdb-6.3-inferior-notification-20050721.patch index 3b3325c..8430958 100644 --- a/gdb-6.3-inferior-notification-20050721.patch +++ b/gdb-6.3-inferior-notification-20050721.patch @@ -1,9 +1,13 @@ 2005-07-21 Jeff Johnston - * gdb.base/attach-32.exp: New test for attaching in 32-bit - mode on 64-bit systems. - * gdb.base/attach-32.c: Ditto. - * gdb.base/attach-32b.c: Ditto. + * gdb.base/attach-32.exp: New test for attaching in 32-bit + mode on 64-bit systems. + * gdb.base/attach-32.c: Ditto. + * gdb.base/attach-32b.c: Ditto. + +2007-12-26 Jan Kratochvil + + * gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set. --- gdb-6.3/gdb/testsuite/gdb.base/attach-32.c.fix3 2005-07-21 14:23:50.000000000 -0400 +++ gdb-6.3/gdb/testsuite/gdb.base/attach-32.c 2005-07-21 14:05:56.000000000 -0400 @@ -30,7 +34,7 @@ +} --- gdb-6.3/gdb/testsuite/gdb.base/attach-32.exp.fix3 2005-07-21 14:23:45.000000000 -0400 +++ gdb-6.3/gdb/testsuite/gdb.base/attach-32.exp 2005-07-21 17:58:28.000000000 -0400 -@@ -0,0 +1,247 @@ +@@ -0,0 +1,252 @@ +# Copyright 2005 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -251,9 +255,12 @@ + # different due to the way fork/exec works. + set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ] +} -+set GDBFLAGS "--pid=$testpid" + ++set GDBFLAGS_orig $GDBFLAGS ++set GDBFLAGS "--pid=$testpid" +gdb_start ++set GDBFLAGS $GDBFLAGS_orig ++ +gdb_reinitialize_dir $srcdir/$subdir + +# This is a test of gdb's ability to attach to a running process. @@ -270,9 +277,11 @@ + # different due to the way fork/exec works. + set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ] +} -+set GDBFLAGS "--pid=$testpid" + ++set GDBFLAGS_orig $GDBFLAGS ++set GDBFLAGS "--pid=$testpid" +gdb_start ++set GDBFLAGS $GDBFLAGS_orig + +gdb_reinitialize_dir $srcdir/$subdir +do_call_attach_tests diff --git a/gdb-6.5-bz109921-DW_AT_decl_file-test.patch b/gdb-6.5-bz109921-DW_AT_decl_file-test.patch index bbf75de..70be875 100644 --- a/gdb-6.5-bz109921-DW_AT_decl_file-test.patch +++ b/gdb-6.5-bz109921-DW_AT_decl_file-test.patch @@ -1,12 +1,21 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921 +It is duplicite to its upstream variant: +http://sourceware.org/ml/gdb-cvs/2007-01/msg00157.html +http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html +2007-01-21 Jan Kratochvil + Daniel Jacobowitz + + * gdb.base/included.c, gdb.base/included.exp, + gdb.base/included.h: New files. + +------------------------------------------------------------------------------ 2007-01-09 Jan Kratochvil * gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c, gdb.dwarf2/dw2-included.h: New files. - --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ./gdb/testsuite/gdb.dwarf2/dw2-included.c 2 Jan 2007 00:20:27 -0000 @@ -0,0 +1,26 @@ diff --git a/gdb-6.6-bz233852-attach-signalled.patch b/gdb-6.6-bz233852-attach-signalled.patch index 6beeeb7..ef3d066 100644 --- a/gdb-6.6-bz233852-attach-signalled.patch +++ b/gdb-6.6-bz233852-attach-signalled.patch @@ -71,17 +71,7 @@ int status; if (ptrace (PTRACE_ATTACH, GET_LWP (ptid), 0, 0) < 0) -@@ -1002,45 +1012,23 @@ lin_lwp_attach_lwp (ptid_t ptid, int ver - creation is interrupted; as of Linux 2.6.19, a kernel - bug may place threads in the thread list and then fail - to create them. */ -- warning (_("Can't attach %s: %s"), target_pid_to_str (ptid), -- safe_strerror (errno)); -- return -1; -+ error (_("Can't attach %s: %s"), target_pid_to_str (ptid), -+ safe_strerror (errno)); - } - +@@ -1002,37 +1012,16 @@ lin_lwp_attach_lwp (ptid_t ptid, int ver if (lp == NULL) lp = add_lwp (ptid); diff --git a/gdb-6.6-bz234468-fork-detach-info.patch b/gdb-6.6-bz235197-fork-detach-info.patch similarity index 100% rename from gdb-6.6-bz234468-fork-detach-info.patch rename to gdb-6.6-bz235197-fork-detach-info.patch diff --git a/gdb-6.6-multifork-debugreg-for-i386-and-x86_64.patch b/gdb-6.6-multifork-debugreg.patch similarity index 59% rename from gdb-6.6-multifork-debugreg-for-i386-and-x86_64.patch rename to gdb-6.6-multifork-debugreg.patch index 0934b23..61d374b 100644 --- a/gdb-6.6-multifork-debugreg-for-i386-and-x86_64.patch +++ b/gdb-6.6-multifork-debugreg.patch @@ -1,3 +1,9 @@ +ia64-linux-nat.c patch is missing here, port it either from RHEL-5 for 6.7.1 or +from the commented-out HEAD patch below. + +s390x in RHEL-5 requires a patch but it is no longer required for +gdb-6.7.1-6.fc9 - the patch was not ported. + 2007-10-14 Jan Kratochvil Handle multiple different PIDs for the DR registers. @@ -11,12 +17,104 @@ (i386_stopped_by_hwbp): Call DR_MIRROR_FETCH. * Makefile.in (i386-nat.o): Update dependencies. -2007-10-14 Jan Kratochvil +2007-12-30 Jan Kratochvil * gdb.base/watchpoint-fork.exp, gdb.base/watchpoint-fork.c: New files. [ Backported for GDB-6.6 (only removed the new file inclusion). ] +2007-09-16 Daniel Jacobowitz + Jeff Johnston + + * gdb.texinfo (Setting Watchpoints): Adjust warning text about + multi-threaded watchpoints. + +2007-12-15 Jan Kratochvil + + * gdb.texinfo (Setting Watchpoints): New paragraph on the software + watchpoints safety wrt `set scheduler-locking'. + +#--- ./gdb/ia64-linux-nat.c 13 Oct 2007 00:49:15 -0000 1.43 +#+++ ./gdb/ia64-linux-nat.c 29 Dec 2007 23:52:05 -0000 +#@@ -493,7 +493,49 @@ enable_watchpoints_in_psr (ptid_t ptid) +# } +# } +# +#-static long debug_registers[8]; +#+struct dr_mirror_status +#+ { +#+ /* Cyclic list. */ +#+ struct dr_mirror_status *next; +#+ long lwp; +#+ long content[8]; +#+ }; +#+struct dr_mirror_status *dr_mirror_active; +#+#define debug_registers (dr_mirror_active->content) +#+ +#+static void +#+dr_mirror_fetch (void) +#+{ +#+ long lwp; +#+ int i; +#+ +#+ lwp = ptid_get_lwp (inferior_ptid); +#+ if (lwp == 0) +#+ lwp = ptid_get_pid (inferior_ptid); +#+ +#+ if (dr_mirror_active == NULL) +#+ { +#+ dr_mirror_active = xzalloc (sizeof *dr_mirror_active); +#+ dr_mirror_active->next = dr_mirror_active; +#+ } +#+ else +#+ { +#+ struct dr_mirror_status *first = dr_mirror_active; +#+ do +#+ { +#+ if (dr_mirror_active->lwp == lwp) +#+ return; +#+ dr_mirror_active = dr_mirror_active->next; +#+ } +#+ while (dr_mirror_active != first); +#+ dr_mirror_active = xzalloc (sizeof *dr_mirror_active); +#+ dr_mirror_active->next = first->next; +#+ first->next = dr_mirror_active; +#+ } +#+ dr_mirror_active->lwp = lwp; +#+ +#+ /* All the registers left 0. */ +#+} +# +# static void +# store_debug_register (ptid_t ptid, int idx, long val) +#@@ -538,6 +580,8 @@ ia64_linux_insert_watchpoint (CORE_ADDR +# long dbr_addr, dbr_mask; +# int max_watchpoints = 4; +# +#+ dr_mirror_fetch (); +#+ +# if (len <= 0 || !is_power_of_2 (len)) +# return -1; +# +#@@ -590,6 +634,8 @@ ia64_linux_remove_watchpoint (CORE_ADDR +# long dbr_addr, dbr_mask; +# int max_watchpoints = 4; +# +#+ dr_mirror_fetch (); +#+ +# if (len <= 0 || !is_power_of_2 (len)) +# return -1; +# +#@@ -621,6 +667,8 @@ ia64_linux_new_thread (ptid_t ptid) +# { +# int i, any; +# +#+ dr_mirror_fetch (); +#+ +# any = 0; +# for (i = 0; i < 8; i++) +# { + --- ./gdb/i386-nat.c 23 Aug 2007 18:08:34 -0000 1.16 +++ ./gdb/i386-nat.c 14 Oct 2007 15:00:31 -0000 @@ -165,11 +166,22 @@ @@ -235,7 +333,7 @@ +} --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ./gdb/testsuite/gdb.base/watchpoint-fork.exp 14 Oct 2007 15:00:32 -0000 -@@ -0,0 +1,46 @@ +@@ -0,0 +1,53 @@ +# Copyright 2007 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -273,12 +371,69 @@ +gdb_reinitialize_dir $srcdir/$subdir +gdb_load ${binfile} + -+gdb_test "watch var" "atchpoint 1: var" ++if { ![runto_main] } then { ++ gdb_suppress_tests; ++} ++ ++# Install the watchpoint only after getting into MAIN - workaround some PPC ++# problem. ++gdb_test "watch var" "atchpoint 2: var" ++ +# It is never hit but it should not be left over in the fork()ed-off child. +gdb_breakpoint "breakpoint" -+gdb_run_cmd -+gdb_test "" \ -+ "atchpoint 1: var.*Old value = 0.*New value = 1.*" "watchpoint first hit" ++ +gdb_test "continue" \ -+ "atchpoint 1: var.*Old value = 1.*New value = 2.*" "watchpoint second hit" ++ "atchpoint 2: var.*Old value = 0.*New value = 1.*" "watchpoint first hit" ++gdb_test "continue" \ ++ "atchpoint 2: var.*Old value = 1.*New value = 2.*" "watchpoint second hit" +gdb_test "continue" "Continuing..*Program exited normally." "finish" +=================================================================== +RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v +retrieving revision 1.434 +retrieving revision 1.435 +diff -u -r1.434 -r1.435 +--- src/gdb/doc/gdb.texinfo 2007/09/28 11:09:55 1.434 ++++ src/gdb/doc/gdb.texinfo 2007/10/01 00:17:58 1.435 +@@ -3346,20 +3346,13 @@ + way of doing that would be to set a code breakpoint at the entry to the + @code{main} function and when it breaks, set all the watchpoints. + +-@quotation + @cindex watchpoints and threads + @cindex threads and watchpoints +-@emph{Warning:} In multi-thread programs, watchpoints have only limited +-usefulness. With the current watchpoint implementation, @value{GDBN} +-can only watch the value of an expression @emph{in a single thread}. If +-you are confident that the expression can only change due to the current +-thread's activity (and if you are also confident that no other thread +-can become current), then you can use watchpoints as usual. However, +-@value{GDBN} may not notice when a non-current thread's activity changes +-the expression. ++In multi-threaded programs, watchpoints will detect changes to the ++watched expression from every thread. + +-@c FIXME: this is almost identical to the previous paragraph. +-@emph{HP-UX Warning:} In multi-thread programs, software watchpoints ++@quotation ++@emph{Warning:} In multi-threaded programs, software watchpoints + have only limited usefulness. If @value{GDBN} creates a software + watchpoint, it can only watch the value of an expression @emph{in a + single thread}. If you are confident that the expression can only + +--- gdb-6.5/gdb/doc/gdb.texinfo-orig 2007-12-15 13:25:14.000000000 +0100 ++++ gdb-6.5/gdb/doc/gdb.texinfo 2007-12-15 13:45:25.000000000 +0100 +@@ -3261,6 +3261,14 @@ + software watchpoints as usual. However, @value{GDBN} may not notice + when a non-current thread's activity changes the expression. (Hardware + watchpoints, in contrast, watch an expression in all threads.) ++ ++Software watchpoints single-step the current thread to track the changes. ++Other threads are left freely running on @code{continue}; therefore, their ++changes cannot be caught. To get more reliable software watchpoints, please ++use @code{set scheduler-locking on}. The default for Red Hat/Fedora ++@value{GDBN} is @code{set scheduler-locking step}, which makes the software ++watchpoints safe for the @code{step} command, but not for the @code{continue} ++command. @xref{Thread Stops}. + @end quotation + + @xref{set remote hardware-watchpoint-limit}. diff --git a/gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch b/gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch new file mode 100644 index 0000000..a371b39 --- /dev/null +++ b/gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch @@ -0,0 +1,129 @@ +http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html +http://sourceware.org/ml/gdb-cvs/2007-12/msg00123.html + +2007-12-22 Jan Kratochvil + + * dwarf2read.c (scan_partial_symbols partial_die_parent_scope) + (add_partial_symbol, pdi_needs_namespace, process_die) + (is_type_tag_for_partial, load_partial_dies, new_symbol) + (read_type_die, determine_prefix): Extend the current code of + `DW_TAG_class_type' also for `DW_TAG_interface_type'. + +2007-12-28 Jan Kratochvil + + * dwarf2read.c (fixup_partial_die): Provide full + `DW_TAG_class_type'-type backing for `DW_TAG_interface_type', even for + namespaces which should not apply for Java `DW_TAG_interface_type'. + +=================================================================== +RCS file: /cvs/src/src/gdb/dwarf2read.c,v +retrieving revision 1.242 +retrieving revision 1.243 +diff -u -r1.242 -r1.243 +--- src/gdb/dwarf2read.c 2007/12/17 18:38:30 1.242 ++++ src/gdb/dwarf2read.c 2007/12/22 20:58:30 1.243 +@@ -1747,6 +1747,7 @@ + } + break; + case DW_TAG_class_type: ++ case DW_TAG_interface_type: + case DW_TAG_structure_type: + if (!pdi->is_declaration) + { +@@ -1829,6 +1830,7 @@ + if (parent->tag == DW_TAG_namespace + || parent->tag == DW_TAG_structure_type + || parent->tag == DW_TAG_class_type ++ || parent->tag == DW_TAG_interface_type + || parent->tag == DW_TAG_union_type) + { + if (grandparent_scope == NULL) +@@ -1976,6 +1978,7 @@ + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + case DW_TAG_class_type: ++ case DW_TAG_interface_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: +@@ -2057,6 +2060,7 @@ + case DW_TAG_namespace: + case DW_TAG_typedef: + case DW_TAG_class_type: ++ case DW_TAG_interface_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: +@@ -2676,6 +2680,7 @@ + read_lexical_block_scope (die, cu); + break; + case DW_TAG_class_type: ++ case DW_TAG_interface_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); +@@ -5403,6 +5408,7 @@ + #endif + case DW_TAG_base_type: + case DW_TAG_class_type: ++ case DW_TAG_interface_type: + case DW_TAG_enumeration_type: + case DW_TAG_structure_type: + case DW_TAG_subrange_type: +@@ -5608,6 +5614,7 @@ + || last_die->tag == DW_TAG_enumeration_type + || (cu->language != language_c + && (last_die->tag == DW_TAG_class_type ++ || last_die->tag == DW_TAG_interface_type + || last_die->tag == DW_TAG_structure_type + || last_die->tag == DW_TAG_union_type)))) + { +@@ -7358,6 +7365,7 @@ + (FIXME?) */ + break; + case DW_TAG_class_type: ++ case DW_TAG_interface_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_set_type: +@@ -7677,6 +7685,7 @@ + switch (die->tag) + { + case DW_TAG_class_type: ++ case DW_TAG_interface_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); +@@ -7781,6 +7790,7 @@ + } + break; + case DW_TAG_class_type: ++ case DW_TAG_interface_type: + case DW_TAG_structure_type: + { + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) +Index: ./gdb/dwarf2read.c +=================================================================== +RCS file: /cvs/src/src/gdb/dwarf2read.c,v +retrieving revision 1.245 +diff -u -p -r1.245 dwarf2read.c +--- ./gdb/dwarf2read.c 26 Dec 2007 12:36:18 -0000 1.245 ++++ ./gdb/dwarf2read.c 27 Dec 2007 23:25:49 -0000 +@@ -5887,7 +5887,8 @@ fixup_partial_die (struct partial_die_in + + /* Set default names for some unnamed DIEs. */ + if (part_die->name == NULL && (part_die->tag == DW_TAG_structure_type +- || part_die->tag == DW_TAG_class_type)) ++ || part_die->tag == DW_TAG_class_type ++ || part_die->tag == DW_TAG_interface_type)) + part_die->name = "(anonymous class)"; + + if (part_die->name == NULL && part_die->tag == DW_TAG_namespace) +@@ -5895,6 +5896,7 @@ fixup_partial_die (struct partial_die_in + + if (part_die->tag == DW_TAG_structure_type + || part_die->tag == DW_TAG_class_type ++ || part_die->tag == DW_TAG_interface_type + || part_die->tag == DW_TAG_union_type) + guess_structure_name (part_die, cu); + } diff --git a/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch b/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch new file mode 100644 index 0000000..52c9472 --- /dev/null +++ b/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch @@ -0,0 +1,706 @@ +http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html + +2007-12-22 Jan Kratochvil + + * gdb.arch/i386-interface.S, gdb.arch/i386-interface.exp: New files. + +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ ./gdb/testsuite/gdb.arch/i386-interface.S 22 Dec 2007 19:07:28 -0000 +@@ -0,0 +1,628 @@ ++/* 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 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 . ++ ++ Please email any bugs, comments, and/or additions to this file to: ++ bug-gdb@gnu.org ++ ++ This file is part of the gdb testsuite. ++ ++ This file was produced by: ++ $ gcj -S interface.java -ggdb2 -Wall -m32 ++ from the .java file: ++ interface Interface ++ { ++ } ++ class Class implements Interface ++ { ++ } ++*/ ++ ++ .file "cc28Pp2B.jar" ++ .section .debug_abbrev,"",@progbits ++.Ldebug_abbrev0: ++ .section .debug_info,"",@progbits ++.Ldebug_info0: ++ .section .debug_line,"",@progbits ++.Ldebug_line0: ++ .text ++.Ltext0: ++ .local _MT_Interface ++ .comm _MT_Interface,0,4 ++ .data ++ .align 4 ++ .type _catch_classes_Interface, @object ++ .size _catch_classes_Interface, 24 ++_catch_classes_Interface: ++ .zero 24 ++ .section .rodata ++ .align 2 ++ .type _Utf1, @object ++ .size _Utf1, 4 ++_Utf1: ++ .value 36121 ++ .value 9 ++ .ascii "Interface" ++ .zero 1 ++.globl _ZN9Interface6class$E ++ .data ++ .align 32 ++ .type _ZN9Interface6class$E, @object ++ .size _ZN9Interface6class$E, 144 ++_ZN9Interface6class$E: ++ .long _ZTVN4java4lang5ClassE+8 ++ .long 403000 ++ .long _Utf1 ++ .value 1536 ++ .zero 2 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long _MT_Interface ++ .value 0 ++ .value 6 ++ .long 0 ++ .long 4 ++ .value 0 ++ .value 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long _catch_classes_Interface ++ .long 0 ++ .long 0 ++ .value 0 ++ .byte 1 ++ .zero 1 ++ .long 0 ++ .value 0 ++ .zero 2 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .hidden _ZN9Interface7class$$E ++.globl _ZN9Interface7class$$E ++ .section .rodata ++ .align 4 ++ .type _ZN9Interface7class$$E, @object ++ .size _ZN9Interface7class$$E, 4 ++_ZN9Interface7class$$E: ++ .long _ZN9Interface6class$E ++ .text ++ .align 2 ++.globl _ZN5ClassC1Ev ++ .type _ZN5ClassC1Ev, @function ++_ZN5ClassC1Ev: ++.LFB2: ++ pushl %ebp ++.LCFI0: ++ movl %esp, %ebp ++.LCFI1: ++ subl $24, %esp ++.LCFI2: ++.LBB2: ++#if 0 ++ .file 1 "interface.java" ++#else ++ .file "interface.java" ++#endif ++ .loc 1 4 0 ++ movl 8(%ebp), %eax ++ movl %eax, -4(%ebp) ++ movl -4(%ebp), %eax ++ movl %eax, (%esp) ++ call _ZN4java4lang6ObjectC1Ev ++.LBE2: ++ leave ++ ret ++.LFE2: ++ .size _ZN5ClassC1Ev, .-_ZN5ClassC1Ev ++ .hidden _ZTVN5ClassE ++.globl _ZTVN5ClassE ++ .data ++ .align 32 ++ .type _ZTVN5ClassE, @object ++ .size _ZTVN5ClassE, 40 ++_ZTVN5ClassE: ++ .long 0 ++ .long 0 ++ .long _ZN5Class6class$E ++ .long 4 ++ .long _ZN4java4lang6Object8finalizeEJvv ++ .long _ZN4java4lang6Object8hashCodeEJiv ++ .long _ZN4java4lang6Object6equalsEJbPS1_ ++ .long _ZN4java4lang6Object8toStringEJPNS0_6StringEv ++ .long _ZN4java4lang6Object5cloneEJPS1_v ++ .long _ZN4java4lang6Object22throwNoSuchMethodErrorEJvv ++ .set .L_ZN5ClassC1Ev0,_ZN5ClassC1Ev ++ .section .rodata ++ .align 2 ++ .type _Utf2, @object ++ .size _Utf2, 4 ++_Utf2: ++ .value 626 ++ .value 6 ++ .ascii "" ++ .zero 1 ++ .align 2 ++ .type _Utf3, @object ++ .size _Utf3, 4 ++_Utf3: ++ .value 39797 ++ .value 3 ++ .ascii "()V" ++ .zero 1 ++ .data ++ .align 4 ++ .type _MT_Class, @object ++ .size _MT_Class, 20 ++_MT_Class: ++ .long _Utf2 ++ .long _Utf3 ++ .value 16384 ++ .value -1 ++ .long .L_ZN5ClassC1Ev0 ++ .long 0 ++ .align 4 ++ .type _IF_Class, @object ++ .size _IF_Class, 4 ++_IF_Class: ++ .long _ZN9Interface6class$E ++ .align 4 ++ .type _catch_classes_Class, @object ++ .size _catch_classes_Class, 24 ++_catch_classes_Class: ++ .zero 24 ++ .section .rodata ++ .align 2 ++ .type _Utf4, @object ++ .size _Utf4, 4 ++_Utf4: ++ .value 47448 ++ .value 5 ++ .ascii "Class" ++ .zero 1 ++.globl _ZN5Class6class$E ++ .data ++ .align 32 ++ .type _ZN5Class6class$E, @object ++ .size _ZN5Class6class$E, 144 ++_ZN5Class6class$E: ++ .long _ZTVN4java4lang5ClassE+8 ++ .long 403000 ++ .long _Utf4 ++ .value 32 ++ .zero 2 ++ .long _ZN4java4lang6Object6class$E ++ .long 0 ++ .long 0 ++ .long 0 ++ .long _MT_Class ++ .value 1 ++ .value 6 ++ .long 0 ++ .long 4 ++ .value 0 ++ .value 0 ++ .long _ZTVN5ClassE+8 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long _catch_classes_Class ++ .long _IF_Class ++ .long 0 ++ .value 1 ++ .byte 1 ++ .zero 1 ++ .long 0 ++ .value 0 ++ .zero 2 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .long 0 ++ .hidden _ZN5Class7class$$E ++.globl _ZN5Class7class$$E ++ .section .rodata ++ .align 4 ++ .type _ZN5Class7class$$E, @object ++ .size _ZN5Class7class$$E, 4 ++_ZN5Class7class$$E: ++ .long _ZN5Class6class$E ++ .section .jcr,"aw",@progbits ++ .align 4 ++ .long _ZN9Interface6class$E ++ .long _ZN5Class6class$E ++ .section .debug_frame,"",@progbits ++.Lframe0: ++ .long .LECIE0-.LSCIE0 ++.LSCIE0: ++ .long 0xffffffff ++ .byte 0x1 ++ .string "" ++ .uleb128 0x1 ++ .sleb128 -4 ++ .byte 0x8 ++ .byte 0xc ++ .uleb128 0x4 ++ .uleb128 0x4 ++ .byte 0x88 ++ .uleb128 0x1 ++ .align 4 ++.LECIE0: ++.LSFDE0: ++ .long .LEFDE0-.LASFDE0 ++.LASFDE0: ++ .long .Lframe0 ++ .long .LFB2 ++ .long .LFE2-.LFB2 ++ .byte 0x4 ++ .long .LCFI0-.LFB2 ++ .byte 0xe ++ .uleb128 0x8 ++ .byte 0x85 ++ .uleb128 0x2 ++ .byte 0x4 ++ .long .LCFI1-.LCFI0 ++ .byte 0xd ++ .uleb128 0x5 ++ .align 4 ++.LEFDE0: ++ .section .eh_frame,"a",@progbits ++.Lframe1: ++ .long .LECIE1-.LSCIE1 ++.LSCIE1: ++ .long 0x0 ++ .byte 0x1 ++.globl __gcj_personality_v0 ++ .string "zP" ++ .uleb128 0x1 ++ .sleb128 -4 ++ .byte 0x8 ++ .uleb128 0x5 ++ .byte 0x0 ++ .long __gcj_personality_v0 ++ .byte 0xc ++ .uleb128 0x4 ++ .uleb128 0x4 ++ .byte 0x88 ++ .uleb128 0x1 ++ .align 4 ++.LECIE1: ++.LSFDE1: ++ .long .LEFDE1-.LASFDE1 ++.LASFDE1: ++ .long .LASFDE1-.Lframe1 ++ .long .LFB2 ++ .long .LFE2-.LFB2 ++ .uleb128 0x0 ++ .byte 0x4 ++ .long .LCFI0-.LFB2 ++ .byte 0xe ++ .uleb128 0x8 ++ .byte 0x85 ++ .uleb128 0x2 ++ .byte 0x4 ++ .long .LCFI1-.LCFI0 ++ .byte 0xd ++ .uleb128 0x5 ++ .align 4 ++.LEFDE1: ++ .text ++.Letext0: ++ .section .debug_loc,"",@progbits ++.Ldebug_loc0: ++.LLST0: ++ .long .LFB2-.Ltext0 ++ .long .LCFI0-.Ltext0 ++ .value 0x2 ++ .byte 0x74 ++ .sleb128 4 ++ .long .LCFI0-.Ltext0 ++ .long .LCFI1-.Ltext0 ++ .value 0x2 ++ .byte 0x74 ++ .sleb128 8 ++ .long .LCFI1-.Ltext0 ++ .long .LFE2-.Ltext0 ++ .value 0x2 ++ .byte 0x75 ++ .sleb128 8 ++ .long 0x0 ++ .long 0x0 ++ .section .debug_info ++ .long 0x117 ++ .value 0x2 ++ .long .Ldebug_abbrev0 ++ .byte 0x4 ++ .uleb128 0x1 ++ .string "GNU Java 4.3.0 20071221 (experimental)" ++ .byte 0xb ++ .string "interface.java" ++ .string "/home/jkratoch/redhat/bz371831" ++ .long .Ltext0 ++ .long .Letext0 ++ .long .Ldebug_line0 ++ .uleb128 0x2 ++ .string "Interface" ++ .byte 0x4 ++ .byte 0x1 ++ .byte 0x0 ++ .long 0x8e ++ .long 0x8e ++ .uleb128 0x3 ++ .long 0x8e ++ .byte 0x2 ++ .byte 0x23 ++ .uleb128 0x0 ++ .byte 0x1 ++ .byte 0x0 ++ .uleb128 0x4 ++ .string "java.lang.Object" ++ .byte 0x1 ++ .uleb128 0x5 ++ .string "Class" ++ .byte 0x4 ++ .byte 0x1 ++ .byte 0x0 ++ .long 0x8e ++ .long 0xe8 ++ .uleb128 0x3 ++ .long 0x8e ++ .byte 0x2 ++ .byte 0x23 ++ .uleb128 0x0 ++ .byte 0x1 ++ .uleb128 0x6 ++ .long 0x6e ++ .byte 0x2 ++ .byte 0x23 ++ .uleb128 0x0 ++ .byte 0x1 ++ .byte 0x1 ++ .uleb128 0x7 ++ .byte 0x1 ++ .string "" ++ .byte 0x1 ++ .byte 0x0 ++ .string "_ZN5ClassC1Ev" ++ .byte 0x1 ++ .uleb128 0x8 ++ .long 0xe8 ++ .byte 0x1 ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x9 ++ .byte 0x4 ++ .long 0xa1 ++ .uleb128 0xa ++ .long 0xc6 ++ .long .LFB2 ++ .long .LFE2 ++ .long .LLST0 ++ .long 0x114 ++ .uleb128 0xb ++ .long 0xe8 ++ .byte 0x2 ++ .byte 0x91 ++ .sleb128 0 ++ .uleb128 0xc ++ .long 0x114 ++ .byte 0x2 ++ .byte 0x91 ++ .sleb128 -12 ++ .byte 0x0 ++ .uleb128 0x9 ++ .byte 0x4 ++ .long 0x8e ++ .byte 0x0 ++ .section .debug_abbrev ++ .uleb128 0x1 ++ .uleb128 0x11 ++ .byte 0x1 ++ .uleb128 0x25 ++ .uleb128 0x8 ++ .uleb128 0x13 ++ .uleb128 0xb ++ .uleb128 0x3 ++ .uleb128 0x8 ++ .uleb128 0x1b ++ .uleb128 0x8 ++ .uleb128 0x11 ++ .uleb128 0x1 ++ .uleb128 0x12 ++ .uleb128 0x1 ++ .uleb128 0x10 ++ .uleb128 0x6 ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x2 ++ .uleb128 0x38 ++ .byte 0x1 ++ .uleb128 0x3 ++ .uleb128 0x8 ++ .uleb128 0xb ++ .uleb128 0xb ++ .uleb128 0x3a ++ .uleb128 0xb ++ .uleb128 0x3b ++ .uleb128 0xb ++ .uleb128 0x1d ++ .uleb128 0x13 ++ .uleb128 0x1 ++ .uleb128 0x13 ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x3 ++ .uleb128 0x1c ++ .byte 0x0 ++ .uleb128 0x49 ++ .uleb128 0x13 ++ .uleb128 0x38 ++ .uleb128 0xa ++ .uleb128 0x32 ++ .uleb128 0xb ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x4 ++ .uleb128 0x2 ++ .byte 0x0 ++ .uleb128 0x3 ++ .uleb128 0x8 ++ .uleb128 0x3c ++ .uleb128 0xc ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x5 ++ .uleb128 0x2 ++ .byte 0x1 ++ .uleb128 0x3 ++ .uleb128 0x8 ++ .uleb128 0xb ++ .uleb128 0xb ++ .uleb128 0x3a ++ .uleb128 0xb ++ .uleb128 0x3b ++ .uleb128 0xb ++ .uleb128 0x1d ++ .uleb128 0x13 ++ .uleb128 0x1 ++ .uleb128 0x13 ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x6 ++ .uleb128 0x1c ++ .byte 0x0 ++ .uleb128 0x49 ++ .uleb128 0x13 ++ .uleb128 0x38 ++ .uleb128 0xa ++ .uleb128 0x4c ++ .uleb128 0xb ++ .uleb128 0x32 ++ .uleb128 0xb ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x7 ++ .uleb128 0x2e ++ .byte 0x1 ++ .uleb128 0x3f ++ .uleb128 0xc ++ .uleb128 0x3 ++ .uleb128 0x8 ++ .uleb128 0x3a ++ .uleb128 0xb ++ .uleb128 0x3b ++ .uleb128 0xb ++ .uleb128 0x2007 ++ .uleb128 0x8 ++ .uleb128 0x3c ++ .uleb128 0xc ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x8 ++ .uleb128 0x5 ++ .byte 0x0 ++ .uleb128 0x49 ++ .uleb128 0x13 ++ .uleb128 0x34 ++ .uleb128 0xc ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x9 ++ .uleb128 0xf ++ .byte 0x0 ++ .uleb128 0xb ++ .uleb128 0xb ++ .uleb128 0x49 ++ .uleb128 0x13 ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0xa ++ .uleb128 0x2e ++ .byte 0x1 ++ .uleb128 0x47 ++ .uleb128 0x13 ++ .uleb128 0x11 ++ .uleb128 0x1 ++ .uleb128 0x12 ++ .uleb128 0x1 ++ .uleb128 0x40 ++ .uleb128 0x6 ++ .uleb128 0x1 ++ .uleb128 0x13 ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0xb ++ .uleb128 0x5 ++ .byte 0x0 ++ .uleb128 0x49 ++ .uleb128 0x13 ++ .uleb128 0x2 ++ .uleb128 0xa ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0xc ++ .uleb128 0x34 ++ .byte 0x0 ++ .uleb128 0x49 ++ .uleb128 0x13 ++ .uleb128 0x2 ++ .uleb128 0xa ++ .byte 0x0 ++ .byte 0x0 ++ .byte 0x0 ++ .section .debug_pubnames,"",@progbits ++ .long 0x15 ++ .value 0x2 ++ .long .Ldebug_info0 ++ .long 0x11b ++ .long 0xee ++ .string "()" ++ .long 0x0 ++ .section .debug_aranges,"",@progbits ++ .long 0x1c ++ .value 0x2 ++ .long .Ldebug_info0 ++ .byte 0x4 ++ .byte 0x0 ++ .value 0x0 ++ .value 0x0 ++ .long .Ltext0 ++ .long .Letext0-.Ltext0 ++ .long 0x0 ++ .long 0x0 ++ .ident "GCC: (GNU) 4.3.0 20071221 (experimental)" ++ .section .note.GNU-stack,"",@progbits +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ ./gdb/testsuite/gdb.arch/i386-interface.exp 22 Dec 2007 19:07:28 -0000 +@@ -0,0 +1,66 @@ ++# 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 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 . ++ ++# Please email any bugs, comments, and/or additions to this file to: ++# bug-gdb@gnu.org ++ ++# This file is part of the gdb testsuite. ++ ++# Test basis recognization of DW_TAG_interface_type. ++# GCC java_classify_record() produces it if returns RECORD_IS_INTERFACE. ++ ++if $tracelevel { ++ strace $tracelevel ++} ++ ++set prms_id 0 ++set bug_id 0 ++ ++if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]} then { ++ verbose "Skipping i386 Java DW_TAG_interface_type test." ++ return ++} ++ ++set testfile "i386-interface" ++set srcfile ${testfile}.S ++set binfile ${objdir}/${subdir}/${testfile}.o ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug additional_flags=-m32}] != "" } { ++ untested i386-gnu-cfi.exp ++ return -1 ++} ++ ++# Get things started. ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++gdb_load ${binfile} ++ ++gdb_test "set language java" ++ ++set test "ptype Interface" ++gdb_test_multiple $test $test { ++ -re "type = class Interface *extends java.lang.Object \{" { ++ pass $test ++ } ++} ++ ++set test "ptype Class" ++gdb_test_multiple $test $test { ++ -re "type = class Class *extends java.lang.Object implements Interface \{" { ++ pass $test ++ } ++} diff --git a/gdb-6.7.1-upstream.patch b/gdb-6.7.1-upstream.patch index 4bcb872..86aa474 100644 --- a/gdb-6.7.1-upstream.patch +++ b/gdb-6.7.1-upstream.patch @@ -5344,3 +5344,53 @@ diff -u -r1.271 -r1.272 # Skip the NOTE header. read $fi 16 set data [read $fi] + +http://sourceware.org/ml/gdb-patches/2007-12/msg00485.html +http://sourceware.org/ml/gdb-cvs/2007-12/msg00166.html + +2007-12-31 Daniel Jacobowitz + + * remote.c (unpack_nibble): Use fromhex. + * symtab.c (find_line_common): Always set exact_match. + +=================================================================== +RCS file: /cvs/src/src/gdb/remote.c,v +retrieving revision 1.273 +retrieving revision 1.274 +diff -u -r1.273 -r1.274 +--- src/gdb/remote.c 2007/12/07 15:02:12 1.273 ++++ src/gdb/remote.c 2007/12/31 18:38:43 1.274 +@@ -1353,7 +1353,7 @@ + static char * + unpack_nibble (char *buf, int *val) + { +- ishex (*buf++, val); ++ *val = fromhex (*buf++); + return buf; + } + +=================================================================== +RCS file: /cvs/src/src/gdb/symtab.c,v +retrieving revision 1.168 +retrieving revision 1.169 +diff -u -r1.168 -r1.169 +--- src/gdb/symtab.c 2007/12/18 16:02:54 1.168 ++++ src/gdb/symtab.c 2007/12/31 18:38:43 1.169 +@@ -2424,6 +2424,8 @@ + int best_index = -1; + int best = 0; + ++ *exact_match = 0; ++ + if (lineno <= 0) + return -1; + if (l == 0) +@@ -2449,8 +2451,6 @@ + } + + /* If we got here, we didn't get an exact match. */ +- +- *exact_match = 0; + return best_index; + } + diff --git a/gdb.spec b/gdb.spec index 4f3b239..bdd09e0 100644 --- a/gdb.spec +++ b/gdb.spec @@ -11,7 +11,7 @@ Name: gdb Version: 6.7.1 # The release always contains a leading reserved number, start it at 1. -Release: 6%{?dist} +Release: 7%{?dist} License: GPL Group: Development/Debuggers @@ -274,7 +274,7 @@ Patch245: gdb-6.6-bz229517-gcore-without-terminal.patch Patch246: gdb-6.6-bz237096-watchthreads-testcasefix.patch # Notify user of a child forked process being detached (BZ 235197). -Patch247: gdb-6.6-bz234468-fork-detach-info.patch +Patch247: gdb-6.6-bz235197-fork-detach-info.patch # New testcase for gcore of 32bit inferiors on 64bit hosts. Patch249: gdb-6.6-gcore32-test.patch @@ -315,7 +315,7 @@ Patch277: gdb-6.6-vdso-i386-on-amd64-warning.patch Patch278: gdb-6.6-cu-ranges.patch # Fix hardware watchpoints after inferior forks-off some process. -Patch280: gdb-6.6-multifork-debugreg-for-i386-and-x86_64.patch +Patch280: gdb-6.6-multifork-debugreg.patch # Fix displaying of numeric char arrays as strings (BZ 224128). Patch282: gdb-6.7-charsign-test.patch @@ -329,6 +329,10 @@ Patch284: gdb-6.7-ppc-clobbered-registers-O2-test.patch # Testsuite fixes for more stable/comparable results. Patch287: gdb-6.7-testsuite-stable-results.patch +# Support DW_TAG_interface_type the same way as DW_TAG_class_type (BZ 426600). +Patch293: gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch +Patch294: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch + BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext BuildRequires: flex bison sharutils expat-devel Requires: readline @@ -475,6 +479,8 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c %patch283 -p1 %patch284 -p1 %patch287 -p1 +%patch293 -p1 +%patch294 -p1 # Change the version that gets printed at GDB startup, so it is RedHat # specific. @@ -633,6 +639,13 @@ fi # don't include the files in include, they are part of binutils %changelog +* Mon Jan 7 2008 Jan Kratochvil - 6.7.1-7 +- Backport the gcc-4.3 compatibility -Werror fixes. +- Fix documentation on hardware watchpoints wrt multiple threads. +- Rename the patch file for BZ 235197 from its former name 234468. +- Fix the vendora testcase `attach-32.exp' affecting the other tests results. +- Support DW_TAG_interface_type the same way as DW_TAG_class_type (BZ 426600). + * Mon Dec 10 2007 Jan Kratochvil - 6.7.1-6 - Testsuite fixes for more stable/comparable results.