diff --git a/gdb-6.3-gcore-thread-20050204.patch b/gdb-6.3-gcore-thread-20050204.patch deleted file mode 100644 index ab0bf0e..0000000 --- a/gdb-6.3-gcore-thread-20050204.patch +++ /dev/null @@ -1,25 +0,0 @@ -2005-02-07 Jeff Johnston - - * linux-nat.c (linux_nat_xfer_memory): Don't use - linux_proc_xfer_memory for ia64. - -Index: gdb-6.8.50.20090803/gdb/linux-nat.c -=================================================================== ---- gdb-6.8.50.20090803.orig/gdb/linux-nat.c 2009-08-04 06:29:47.000000000 +0200 -+++ gdb-6.8.50.20090803/gdb/linux-nat.c 2009-08-04 06:29:55.000000000 +0200 -@@ -4495,10 +4495,15 @@ linux_xfer_partial (struct target_ops *o - offset &= ((ULONGEST) 1 << addr_bit) - 1; - } - -+#ifndef NATIVE_XFER_UNWIND_TABLE -+ /* FIXME: For ia64, we cannot currently use linux_proc_xfer_memory -+ for accessing thread storage. Revert when Bugzilla 147436 -+ is fixed. */ - xfer = linux_proc_xfer_partial (ops, object, annex, readbuf, writebuf, - offset, len); - if (xfer != 0) - return xfer; -+#endif - - return super_xfer_partial (ops, object, annex, readbuf, writebuf, - offset, len); diff --git a/gdb-6.3-gstack-20050411.patch b/gdb-6.3-gstack-20050411.patch index 13fddd5..ebda89b 100644 --- a/gdb-6.3-gstack-20050411.patch +++ b/gdb-6.3-gstack-20050411.patch @@ -4,11 +4,11 @@ to install and uninstall. * gstack.sh, gstack.1: New files. -Index: gdb-7.4.50.20120103/gdb/Makefile.in +Index: gdb-7.6/gdb/Makefile.in =================================================================== ---- gdb-7.4.50.20120103.orig/gdb/Makefile.in 2012-01-03 05:52:15.000000000 +0100 -+++ gdb-7.4.50.20120103/gdb/Makefile.in 2012-01-03 05:53:25.974210230 +0100 -@@ -1017,7 +1017,7 @@ gdb.z:gdb.1 +--- gdb-7.6.orig/gdb/Makefile.in 2013-05-21 13:26:33.496820763 +0200 ++++ gdb-7.6/gdb/Makefile.in 2013-05-21 13:26:33.609819579 +0200 +@@ -1029,7 +1029,7 @@ info install-info clean-info dvi pdf ins install: all @$(MAKE) $(FLAGS_TO_PASS) install-only @@ -17,7 +17,7 @@ Index: gdb-7.4.50.20120103/gdb/Makefile.in transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e "$$t"` ; \ if test "x$$transformed_name" = x; then \ -@@ -1039,7 +1039,25 @@ install-only: $(CONFIG_INSTALL) +@@ -1060,7 +1060,25 @@ install-only: $(CONFIG_INSTALL) install-python: $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb @@ -44,8 +44,8 @@ Index: gdb-7.4.50.20120103/gdb/Makefile.in transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e $$t` ; \ if test "x$$transformed_name" = x; then \ -@@ -1051,6 +1069,18 @@ uninstall: force $(CONFIG_UNINSTALL) - $(DESTDIR)$(man1dir)/$$transformed_name.1 +@@ -1083,6 +1101,18 @@ uninstall: force $(CONFIG_UNINSTALL) + fi @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: uninstall-gstack @@ -63,10 +63,10 @@ Index: gdb-7.4.50.20120103/gdb/Makefile.in # The C++ name parser can be built standalone for testing. test-cp-name-parser.o: cp-name-parser.c $(COMPILE) -DTEST_CPNAMES cp-name-parser.c -Index: gdb-7.4.50.20120103/gdb/gstack.sh +Index: gdb-7.6/gdb/gstack.sh =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120103/gdb/gstack.sh 2012-01-03 05:52:37.278385632 +0100 ++++ gdb-7.6/gdb/gstack.sh 2013-05-21 13:26:55.434625908 +0200 @@ -0,0 +1,43 @@ +#!/bin/sh + @@ -101,7 +101,7 @@ Index: gdb-7.4.50.20120103/gdb/gstack.sh + +# Run GDB, strip out unwanted noise. +# --readnever is no longer used since .gdb_index is now in use. -+$GDB --quiet -nx /proc/$1/exe $1 <&1 | ++$GDB --quiet -nx $GDBARGS /proc/$1/exe $1 <&1 | +set width 0 +set height 0 +set pagination no @@ -111,10 +111,10 @@ Index: gdb-7.4.50.20120103/gdb/gstack.sh + -e 's/^\((gdb) \)*//' \ + -e '/^#/p' \ + -e '/^Thread/p' -Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp +Index: gdb-7.6/gdb/testsuite/gdb.base/gstack.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp 2012-01-03 05:52:37.279385629 +0100 ++++ gdb-7.6/gdb/testsuite/gdb.base/gstack.exp 2013-05-21 13:26:55.434625908 +0200 @@ -0,0 +1,66 @@ +# Copyright (C) 2012 Free Software Foundation, Inc. + @@ -167,7 +167,7 @@ Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp +# exiting the function. Still we could retry the gstack command if we fail. + +set test "spawn gstack" -+set command "sh -c GDB=$GDB\\ sh\\ ${srcdir}/../gstack.sh\\ $pid\\;echo\\ GSTACK-END" ++set command "sh -c GDB=$GDB\\ GDBARGS=-data-directory\\\\\\ $BUILD_DATA_DIRECTORY\\ sh\\ ${srcdir}/../gstack.sh\\ $pid\\;echo\\ GSTACK-END" +set res [remote_spawn host $command]; +if { $res < 0 || $res == "" } { + perror "Spawning $command failed." @@ -182,10 +182,10 @@ Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp +gdb_exit + +remote_exec host "kill -9 $pid" -Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.c +Index: gdb-7.6/gdb/testsuite/gdb.base/gstack.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.c 2012-01-03 05:52:37.279385629 +0100 ++++ gdb-7.6/gdb/testsuite/gdb.base/gstack.c 2013-05-21 13:26:33.610819569 +0200 @@ -0,0 +1,43 @@ +/* This testcase is part of GDB, the GNU debugger. + diff --git a/gdb-6.3-ia64-gcore-page0-20050421.patch b/gdb-6.3-ia64-gcore-page0-20050421.patch deleted file mode 100644 index adda392..0000000 --- a/gdb-6.3-ia64-gcore-page0-20050421.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: gdb-7.5.50.20130118/gdb/gcore.c -=================================================================== ---- gdb-7.5.50.20130118.orig/gdb/gcore.c 2013-01-18 23:50:56.698573186 +0100 -+++ gdb-7.5.50.20130118/gdb/gcore.c 2013-01-18 23:52:29.636705040 +0100 -@@ -549,8 +549,14 @@ gcore_copy_callback (bfd *obfd, asection - if (size > total_size) - size = total_size; - -+ /* Warn if read error occurs except if we were trying to read the -+ first page for ia64. The first page is marked readable, but it cannot -+ be read. */ - if (target_read_memory (bfd_section_vma (obfd, osec) + offset, -- memhunk, size) != 0) -+ memhunk, size) != 0 -+ && (strcmp (gdbarch_bfd_arch_info (target_gdbarch ())->arch_name, -+ "ia64") -+ || bfd_section_vma (obfd, osec) != 0)) - { - warning (_("Memory read failed for corefile " - "section, %s bytes at %s."), diff --git a/gdb-6.3-ia64-gcore-speedup-20050714.patch b/gdb-6.3-ia64-gcore-speedup-20050714.patch deleted file mode 100644 index 5c7942d..0000000 --- a/gdb-6.3-ia64-gcore-speedup-20050714.patch +++ /dev/null @@ -1,126 +0,0 @@ -2005-07-14 Jeff Johnsotn - - * linux-nat.c (linux_nat_xfer_memory): Incorporate Fujitsu - work-around to use /proc/mem for storage, but to fall-back - to PTRACE for ia64 rse register areas. - * ia64-linux-nat.c (ia64_rse_slot_num): New static function. - (ia64_rse_skip_regs): Ditto. - (ia64_linux_check_stack_region): New function. - -Index: gdb-6.8.50.20090803/gdb/linux-nat.c -=================================================================== ---- gdb-6.8.50.20090803.orig/gdb/linux-nat.c 2009-08-04 06:29:55.000000000 +0200 -+++ gdb-6.8.50.20090803/gdb/linux-nat.c 2009-08-04 06:30:53.000000000 +0200 -@@ -4495,15 +4495,38 @@ linux_xfer_partial (struct target_ops *o - offset &= ((ULONGEST) 1 << addr_bit) - 1; - } - --#ifndef NATIVE_XFER_UNWIND_TABLE -- /* FIXME: For ia64, we cannot currently use linux_proc_xfer_memory -- for accessing thread storage. Revert when Bugzilla 147436 -- is fixed. */ - xfer = linux_proc_xfer_partial (ops, object, annex, readbuf, writebuf, - offset, len); - if (xfer != 0) -- return xfer; -+ { -+#ifdef NATIVE_XFER_UNWIND_TABLE -+ struct mem_region range; -+ range.lo = memaddr; -+ range.hi = memaddr + len; -+ -+ /* FIXME: For ia64, we cannot currently use -+ linux_proc_xfer_partial for accessing rse register storage. -+ Revert when Bugzilla 147436 is fixed. */ -+#ifdef NATIVE_XFER_UNWIND_TABLE -+ extern int ia64_linux_check_stack_region (struct lwp_info *lwp, -+ void *range); -+#endif -+ if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL) -+ { /* This region contains ia64 rse registers, we have to re-read. */ -+ int xxfer; -+ -+ /* Re-read register stack area. */ -+ xxfer = super_xfer_partial (ops, object, annex, -+ readbuf + (range.lo - memaddr), -+ writebuf + (range.lo - memaddr), -+ offset + (range.lo - memaddr), -+ range.hi - range.lo); -+ if (xxfer == 0) -+ xfer = 0; -+ } - #endif -+ return xfer; -+ } - - return super_xfer_partial (ops, object, annex, readbuf, writebuf, - offset, len); -Index: gdb-6.8.50.20090803/gdb/ia64-linux-nat.c -=================================================================== ---- gdb-6.8.50.20090803.orig/gdb/ia64-linux-nat.c 2009-02-23 01:03:49.000000000 +0100 -+++ gdb-6.8.50.20090803/gdb/ia64-linux-nat.c 2009-08-04 06:30:53.000000000 +0200 -@@ -809,6 +809,64 @@ ia64_linux_xfer_partial (struct target_o - - void _initialize_ia64_linux_nat (void); - -+/* -+ * Note: taken from ia64_tdep.c -+ * -+ */ -+ -+static __inline__ unsigned long -+ia64_rse_slot_num (unsigned long addr) -+{ -+ return (addr >> 3) & 0x3f; -+} -+ -+/* Skip over a designated number of registers in the backing -+ store, remembering every 64th position is for NAT. */ -+static __inline__ unsigned long -+ia64_rse_skip_regs (unsigned long addr, long num_regs) -+{ -+ long delta = ia64_rse_slot_num(addr) + num_regs; -+ -+ if (num_regs < 0) -+ delta -= 0x3e; -+ return addr + ((num_regs + delta/0x3f) << 3); -+} -+ -+/* -+ * Check mem_region is stack or not. If stack, /proc//mem cannot return -+ * expected value. -+ */ -+int ia64_linux_check_stack_region(struct lwp_info *ti, struct mem_region *range) -+{ -+ CORE_ADDR addr; -+ int error; -+ unsigned long bsp, cfm, bspstore; -+ long sof; -+ pid_t pid = ptid_get_lwp(ti->ptid); -+ bsp = ptrace(PTRACE_PEEKUSER, pid, PT_AR_BSP ,NULL); -+ if (bsp == (unsigned long)-1) { -+ return 1; -+ } -+ /* stack is allocated by one-segment, not separated into several segments. -+ So, we only have to check whether bsp is in *range* or not. */ -+ if((range->lo <= bsp) && (bsp <= range->hi)) { -+ bspstore = ptrace(PTRACE_PEEKUSER, pid, PT_AR_BSPSTORE, NULL); -+ cfm = ptrace(PTRACE_PEEKUSER, pid, PT_CFM, NULL); -+ sof = cfm & 0x3f; -+ bsp = ia64_rse_skip_regs(bsp, -sof); -+ range->lo = bspstore; -+ range->hi = bsp; -+ /* we have to check the size of dirty register stack area */ -+ /* -+ fprintf_unfiltered(gdb_stdlog, "<%d> <%p> <%lx> <%p> <%p>\n", -+ pid, bsp, sof, range->lo, range->hi); -+ */ -+ return 1; -+ } -+ -+ return 0; -+} -+ - void - _initialize_ia64_linux_nat (void) - { diff --git a/gdb-6.3-ia64-info-frame-fix-20050725.patch b/gdb-6.3-ia64-info-frame-fix-20050725.patch deleted file mode 100644 index 5941979..0000000 --- a/gdb-6.3-ia64-info-frame-fix-20050725.patch +++ /dev/null @@ -1,107 +0,0 @@ -2005-07-25 Jeff Johnstno - - * libunwind-frame.c (libunwind_frame_prev_register): Check valuep - is not NULL before copying cursor address into it. - -testsuite: -2005-07-25 Jeff Johnstno - - * gdb.arch/ia64-sigtramp.exp: New test. - * gdb.arch/ia64-sigtramp.c: Ditto. - -2008-02-24 Jan Kratochvil - - Port to GDB-6.8pre. (Only the testcase has remained.) - ---- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c.fix 2005-07-25 16:42:46.000000000 -0400 -+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c 2005-07-25 16:42:08.000000000 -0400 -@@ -0,0 +1,23 @@ -+#include -+#include -+ -+int *l; -+ -+void x (int sig) -+{ -+ printf ("in signal handler for signal %d\n", sig); -+} -+ -+int main() -+{ -+ int k; -+ -+ signal (SIGSEGV, &x); -+ -+ k = *l; -+ -+ printf ("k is %d\n", k); -+ -+ return 0; -+} -+ ---- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp.fix 2005-07-25 16:42:50.000000000 -0400 -+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp 2005-07-25 16:42:01.000000000 -0400 -@@ -0,0 +1,63 @@ -+# Copyright 2005 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@prep.ai.mit.edu -+ -+# This file was written by Jeff Johnston (jjohnstn@redhat.com) -+ -+if ![istarget "ia64-*-*"] then { -+ return -+} -+ -+set testfile "ia64-sigtramp" -+set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } { -+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -+} -+ -+if [get_compiler_info ${binfile}] { -+ return -1 -+} -+ -+gdb_exit -+set match_max_old [match_max] -+match_max -d 1000000 -+gdb_start -+match_max -d $match_max_old -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+if ![runto_main] then { -+ fail "Can't run to main" -+ return 0 -+} -+ -+gdb_test "handle SIGSEGV" "SIGSEGV.*Yes.*Yes.*Yes.*Segmentation fault" -+gdb_test "next" "" "first next" -+gdb_test "next" "Program received signal SIGSEGV.*" "getting SIGSEGV" -+gdb_breakpoint "x" -+gdb_test "continue" "Breakpoint.*x.*" "continue to x" -+ -+gdb_test "f 1" ".*signal handler called.*" "frame 1" -+ -+# gdb-7.0+ no longer prints the pseudo registers as they are computed. -+# frame_info says: /* For moment, only display registers that were saved on the -+# stack. */ -+gdb_test "set debug frame 1" -+gdb_test "info frame" "Stack level 1, .*frame_unwind_register_value \\(frame=1,regnum=750\\(p63\\),\[^\r\n\]*\r\n\[^\r\n\]*-> computed bytes=.*" "info sigtramp frame" diff --git a/gdb-6.3-ia64-sigill-20051115.patch b/gdb-6.3-ia64-sigill-20051115.patch deleted file mode 100644 index b1cd07b..0000000 --- a/gdb-6.3-ia64-sigill-20051115.patch +++ /dev/null @@ -1,95 +0,0 @@ -2005-11-15 Jeff Johnston - - * linux-thread-db.c (thread_db_wait): Don't bother continuing if - the wait result indicates the program terminated with a signal. - * linux-nat.c (linux_nat_wait): For SIGILL and SIGTRAP, don't - throw away the event if the user has specified nostop noprint. - -gdb/testsuite: - -2005-11-15 Jeff Johnston - - * gdb.arch/ia64-sigill.c: New test. - * gdb.arch/ia64-sigill.exp: Ditto. - -Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.exp 2011-07-22 19:16:13.000000000 +0200 -@@ -0,0 +1,49 @@ -+# Copyright 2005 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@prep.ai.mit.edu -+ -+# This file was written by Jeff Johnston (jjohnstn@redhat.com) -+ -+if ![istarget "ia64-*-*"] then { -+ return -+} -+ -+set testfile "ia64-sigill" -+set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} -+ -+# Deliberately compile with pthreads, even though test is single-threaded. -+# We want to force gdb thread code to be exercised. -+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } { -+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -+} -+ -+if [get_compiler_info ${binfile}] { -+ return -1 -+} -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+# We set up SIGILL nostop, noprint, pass and then run the program. -+# We expect to just see a normal run. -+gdb_test "handle SIGILL nostop noprint" "SIGILL.*No.*No.*Yes.*" "handle sigill" -+gdb_test "run" "Starting program.*ia64-sigill.*\[New thread.*\].*hello world.*Program exited normally." "run to exit" -+ -Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.c 2011-07-22 19:16:13.000000000 +0200 -@@ -0,0 +1,8 @@ -+#include -+ -+int main() -+{ -+ printf ("hello world\n"); -+ return 0; -+} -+ -Index: gdb-7.3.50.20110722/gdb/linux-nat.c -=================================================================== ---- gdb-7.3.50.20110722.orig/gdb/linux-nat.c 2011-07-22 19:15:05.000000000 +0200 -+++ gdb-7.3.50.20110722/gdb/linux-nat.c 2011-07-22 19:16:13.000000000 +0200 -@@ -3733,7 +3733,8 @@ retry: - threads can be a bit time-consuming so if we want decent - performance with heavily multi-threaded programs, especially when - they're using a high frequency timer, we'd better avoid it if we -- can. */ -+ can. For possible trap signals like SIGTRAP and SIGILL, don't -+ avoid reporting. */ - - if (WIFSTOPPED (status)) - { diff --git a/gdb-6.3-ia64-sigtramp-frame-20050708.patch b/gdb-6.3-ia64-sigtramp-frame-20050708.patch deleted file mode 100644 index e22e460..0000000 --- a/gdb-6.3-ia64-sigtramp-frame-20050708.patch +++ /dev/null @@ -1,158 +0,0 @@ -2005-07-08 Jeff Johnston - - * ia64-tdep.c (ia64_sigtramp_frame_prev_register): Build - pseudo-registers the same as ia64_pseudo_register_read. - -2008-04-16 Yi Zhan - - * ia64-tdep.c (ia64_sigtramp_frame_prev_register): Fix an - ISO C compliance compilation error. - -2008-02-12 Jan Kratochvil - - Port to gdb-6.8.50.20081128, follow the upstream change: - http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ia64-tdep.c.diff?cvsroot=src&r1=1.176&r2=1.177 - -Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c -=================================================================== ---- gdb-6.8.50.20081128.orig/gdb/ia64-tdep.c 2008-11-26 06:27:48.000000000 +0100 -+++ gdb-6.8.50.20081128/gdb/ia64-tdep.c 2008-12-02 19:04:32.000000000 +0100 -@@ -2107,6 +2107,94 @@ ia64_sigtramp_frame_prev_register (struc - return frame_unwind_got_constant (this_frame, regnum, pc); - } - -+ /* Red Hat patch begin. */ -+ else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM) -+ { -+ /* NAT pseudo registers 0-31: get them from UNAT. -+ * "copied" from ia64_pseudo_register_read() */ -+ ULONGEST unatN_val; -+ ULONGEST unat; -+ read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat, -+ register_size (target_gdbarch, IA64_UNAT_REGNUM)); -+ unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0; -+ return frame_unwind_got_constant (this_frame, regnum, unatN_val); -+ } -+ else if (IA64_NAT32_REGNUM <= regnum && regnum <= IA64_NAT127_REGNUM) -+ { -+ /* NAT pseudo registers 32-127. -+ * "copied" from ia64_pseudo_register_read() -+ * FIXME: Not currently tested -- cannot get the frame to include -+ * NAT32-NAT127. */ -+ ULONGEST bsp; -+ ULONGEST cfm; -+ ULONGEST natN_val = 0; -+ CORE_ADDR gr_addr = 0, nat_addr = 0; -+ -+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp, -+ register_size (target_gdbarch, IA64_BSP_REGNUM)); -+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm, -+ register_size (target_gdbarch, IA64_CFM_REGNUM)); -+ -+ /* The bsp points at the end of the register frame so we -+ subtract the size of frame from it to get start of register frame. */ -+ bsp = rse_address_add (bsp, -(cfm & 0x7f)); -+ -+ if ((cfm & 0x7f) > regnum - V32_REGNUM) -+ gr_addr = rse_address_add (bsp, (regnum - V32_REGNUM)); -+ -+ if (gr_addr != 0) -+ { -+ /* Compute address of nat collection bits */ -+ CORE_ADDR nat_collection; -+ int nat_bit; -+ nat_addr = gr_addr | 0x1f8; -+ /* If our nat collection address is bigger than bsp, we have to get -+ the nat collection from rnat. Otherwise, we fetch the nat -+ collection from the computed address. FIXME: Do not know if -+ RNAT can be not stored in the frame--being extra cautious. */ -+ if (nat_addr >= bsp) -+ { -+ nat_addr = cache->saved_regs[IA64_RNAT_REGNUM]; -+ if (nat_addr != 0) -+ read_memory (nat_addr, (char *) &nat_collection, -+ register_size (target_gdbarch, IA64_RNAT_REGNUM)); -+ } -+ else -+ nat_collection = read_memory_integer (nat_addr, 8, BFD_ENDIAN_LITTLE); -+ if (nat_addr != 0) -+ { -+ nat_bit = (gr_addr >> 3) & 0x3f; -+ natN_val = (nat_collection >> nat_bit) & 1; -+ return frame_unwind_got_constant (this_frame, regnum, natN_val); -+ } -+ } -+ warning (_("ia64_sigtramp_frame_prev_register: unhandled register %d"), -+ regnum); -+ } -+ else if (regnum == VBOF_REGNUM) -+ { -+ /* BOF pseudo register. -+ * "copied" from ia64_pseudo_register_read() -+ * -+ * A virtual register frame start is provided for user convenience. -+ * It can be calculated as the bsp - sof (sizeof frame). */ -+ ULONGEST bsp; -+ ULONGEST cfm; -+ ULONGEST bof; -+ -+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp, -+ register_size (target_gdbarch, IA64_BSP_REGNUM)); -+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm, -+ register_size (target_gdbarch, IA64_CFM_REGNUM)); -+ -+ /* The bsp points at the end of the register frame so we -+ subtract the size of frame from it to get beginning of frame. */ -+ bof = rse_address_add (bsp, -(cfm & 0x7f)); -+ -+ return frame_unwind_got_constant (this_frame, regnum, bof); -+ } -+ /* Red Hat patch end. */ -+ - else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM) - || (regnum >= V32_REGNUM && regnum <= V127_REGNUM)) - { -@@ -2121,7 +2209,42 @@ ia64_sigtramp_frame_prev_register (struc - return frame_unwind_got_constant (this_frame, regnum, 0); - } - -- else /* All other registers not listed above. */ -+ /* Red Hat patch begin. */ -+ else if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM) -+ { -+ /* VP 0-63. -+ * "copied" from ia64_pseudo_register_read() -+ * -+ * FIXME: Not currently tested--cannot get the frame to include PR. */ -+ CORE_ADDR pr_addr = 0; -+ -+ pr_addr = cache->saved_regs[IA64_PR_REGNUM]; -+ if (pr_addr != 0) -+ { -+ ULONGEST pr; -+ ULONGEST cfm; -+ ULONGEST prN_val; -+ read_memory (pr_addr, (char *) &pr, -+ register_size (target_gdbarch, IA64_PR_REGNUM)); -+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm, -+ register_size (target_gdbarch, IA64_CFM_REGNUM)); -+ -+ /* Get the register rename base for this frame and adjust the -+ * register name to take rotation into account. */ -+ if (VP16_REGNUM <= regnum && regnum <= VP63_REGNUM) -+ { -+ int rrb_pr = (cfm >> 32) & 0x3f; -+ regnum = VP16_REGNUM + ((regnum - VP16_REGNUM) + rrb_pr) % 48; -+ } -+ prN_val = (pr & (1LL << (regnum - VP0_REGNUM))) != 0; -+ return frame_unwind_got_constant (this_frame, regnum, prN_val); -+ } -+ warning (_("ia64_sigtramp_frame_prev_register: unhandled register %d"), -+ regnum); -+ } -+ /* Red Hat patch end. */ -+ -+ /* All other registers not listed above. */ - { - CORE_ADDR addr = cache->saved_regs[regnum]; - diff --git a/gdb-6.3-mapping-zero-inode-test.patch b/gdb-6.3-mapping-zero-inode-test.patch index 5393ab3..f274f06 100644 --- a/gdb-6.3-mapping-zero-inode-test.patch +++ b/gdb-6.3-mapping-zero-inode-test.patch @@ -1,8 +1,8 @@ -Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp 2009-06-29 16:24:36.000000000 +0200 -@@ -0,0 +1,96 @@ ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.exp 2013-08-02 22:24:04.747745133 +0200 +@@ -0,0 +1,101 @@ +# Copyright 2007, 2009 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -46,16 +46,21 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp +gdb_breakpoint "initialized" +gdb_breakpoint "unresolved" + ++set oldtimeout $timeout ++set timeout [expr $oldtimeout + 120] ++ +set test "Continue to initialized." +gdb_test_multiple "continue" $test { + -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" { + pass $test + } + -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" { ++ set timeout $oldtimeout + unsupported $test + return -1 + } +} ++set timeout $oldtimeout + +set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore-shmid0.test] + @@ -99,11 +104,11 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp + fail $test + } +} -Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c 2009-06-29 16:22:49.000000000 +0200 -@@ -0,0 +1,123 @@ ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.c 2013-08-02 22:22:17.573599496 +0200 +@@ -0,0 +1,127 @@ +/* Copyright 2007, 2009 Free Software Foundation, Inc. + + This file is part of GDB. @@ -140,14 +145,18 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c + +#define TIMEOUT_SEC 10 + ++static volatile int v; ++ +static void +initialized (void) +{ ++ v++; +} + +static void +unresolved (void) +{ ++ v++; +} + +int @@ -189,7 +198,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c + } + + printf ("Problem is not reproducible on this kernel (attempt %d, " -+ "round %d))\n", attempt, round); ++ "round %d)\n", attempt, round); + unresolved (); + exit (1); + } diff --git a/gdb-6.3-readnever-20050907.patch b/gdb-6.3-readnever-20050907.patch index 8459019..1e9ef89 100644 --- a/gdb-6.3-readnever-20050907.patch +++ b/gdb-6.3-readnever-20050907.patch @@ -11,11 +11,11 @@ * gdb.texinfo (File Options): Document --readnever. -Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo +Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/doc/gdb.texinfo 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/doc/gdb.texinfo 2013-02-15 22:34:22.381165443 +0100 -@@ -1026,6 +1026,12 @@ Read each symbol file's entire symbol ta +--- gdb-7.6.50.20130731-cvs.orig/gdb/doc/gdb.texinfo 2013-08-02 16:12:54.970085942 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo 2013-08-02 16:20:21.164687886 +0200 +@@ -1030,6 +1030,12 @@ Read each symbol file's entire symbol ta the default, which is to read it incrementally as it is needed. This makes startup slower, but makes future operations faster. @@ -28,11 +28,11 @@ Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo @end table @node Mode Options -Index: gdb-7.5.50.20130215/gdb/main.c +Index: gdb-7.6.50.20130731-cvs/gdb/main.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/main.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/main.c 2013-02-15 22:34:22.382165445 +0100 -@@ -447,6 +447,7 @@ captured_main (void *data) +--- gdb-7.6.50.20130731-cvs.orig/gdb/main.c 2013-08-02 16:12:54.974085948 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/main.c 2013-08-02 16:20:53.704731449 +0200 +@@ -459,6 +459,7 @@ captured_main (void *data) {"xdb", no_argument, &xdb_commands, 1}, {"dbx", no_argument, &dbx_commands, 1}, {"readnow", no_argument, &readnow_symbol_files, 1}, @@ -40,19 +40,19 @@ Index: gdb-7.5.50.20130215/gdb/main.c {"r", no_argument, &readnow_symbol_files, 1}, {"quiet", no_argument, &quiet, 1}, {"q", no_argument, &quiet, 1}, -@@ -1165,6 +1166,7 @@ Options:\n\n\ - fputs_unfiltered (_("\ - --quiet Do not print version number on startup.\n\ +@@ -1154,6 +1155,7 @@ Selection of debuggee and its files:\n\n + --se=FILE Use FILE as symbol file and executable file.\n\ + --symbols=SYMFILE Read symbols from SYMFILE.\n\ --readnow Fully read symbol files on first access.\n\ + --readnever Do not read symbol files.\n\ + --write Set writing into executable and core files.\n\n\ "), stream); fputs_unfiltered (_("\ - --se=FILE Use FILE as symbol file and executable file.\n\ -Index: gdb-7.5.50.20130215/gdb/symfile.c +Index: gdb-7.6.50.20130731-cvs/gdb/symfile.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/symfile.c 2013-02-01 20:39:03.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/symfile.c 2013-02-15 22:34:22.383165447 +0100 -@@ -81,6 +81,7 @@ static void clear_symtab_users_cleanup ( +--- gdb-7.6.50.20130731-cvs.orig/gdb/symfile.c 2013-08-02 16:12:54.975085949 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/symfile.c 2013-08-02 16:20:21.165687888 +0200 +@@ -82,6 +82,7 @@ static void clear_symtab_users_cleanup ( /* Global variables owned by this file. */ int readnow_symbol_files; /* Read full symbols immediately. */ @@ -60,19 +60,19 @@ Index: gdb-7.5.50.20130215/gdb/symfile.c /* Functions this file defines. */ -Index: gdb-7.5.50.20130215/gdb/dwarf2read.c +Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/dwarf2read.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/dwarf2read.c 2013-02-15 22:34:34.479181584 +0100 -@@ -68,6 +68,7 @@ - #include "gdb_bfd.h" +--- gdb-7.6.50.20130731-cvs.orig/gdb/dwarf2read.c 2013-08-02 16:12:54.979085954 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c 2013-08-02 16:20:37.190709689 +0200 +@@ -69,6 +69,7 @@ #include "f-lang.h" #include "source.h" + #include "filestuff.h" +#include "top.h" #include #include "gdb_string.h" -@@ -1793,8 +1794,9 @@ dwarf2_has_info (struct objfile *objfile +@@ -1834,8 +1835,9 @@ dwarf2_has_info (struct objfile *objfile (void *) names); dwarf2_per_objfile->objfile = objfile; } @@ -84,11 +84,11 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2read.c } /* When loading sections, we look either for uncompressed section or for -Index: gdb-7.5.50.20130215/gdb/top.h +Index: gdb-7.6.50.20130731-cvs/gdb/top.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/top.h 2013-01-07 17:40:36.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/top.h 2013-02-15 22:34:22.389165459 +0100 -@@ -58,6 +58,7 @@ extern void set_prompt (const char *s); +--- gdb-7.6.50.20130731-cvs.orig/gdb/top.h 2013-08-02 16:12:54.980085956 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/top.h 2013-08-02 16:20:21.169687893 +0200 +@@ -59,6 +59,7 @@ extern void set_prompt (const char *s); /* From random places. */ extern int readnow_symbol_files; diff --git a/gdb-6.3-rh-testlibunwind-20041202.patch b/gdb-6.3-rh-testlibunwind-20041202.patch deleted file mode 100644 index 6830557..0000000 --- a/gdb-6.3-rh-testlibunwind-20041202.patch +++ /dev/null @@ -1,103 +0,0 @@ -2003-11-17 Elena Zannoni - - From Jeff Johnston - * gdb.arch/ia64-libunwind.exp: New file. - * gdb.arch/ia64-libunwind.c: New file. - -2004-08-03 Jeff Johnston - - * gdb.arch/ia64-libunwind.exp: Fix test string to match - current code base. - - [ acquire_unwind_info -> ia64_find_proc_info_x ] - -2009-04-30 Jan Kratochvil - - Remove a race from send_gdb "COMMAND\n". - Cleanup. - Merge in: Patch4: gdb-6.3-rh-testlibunwind1fix-20041202.patch - ---- /dev/null 2009-04-19 08:52:54.499000000 +0200 -+++ gdb-6.8/gdb/testsuite/gdb.arch/ia64-libunwind.c 2009-04-30 19:15:16.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* Copyright 2003, 2009 Free Software Foundation, Inc. -+ -+ This file is part of GDB. -+ -+ 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 . */ -+ -+#include -+ -+int -+main () -+{ -+ printf ("hello world\n"); -+ -+ return 0; -+} ---- /dev/null 2009-04-19 08:52:54.499000000 +0200 -+++ gdb-6.8/gdb/testsuite/gdb.arch/ia64-libunwind.exp 2009-04-30 19:19:22.000000000 +0200 -@@ -0,0 +1,52 @@ -+# Copyright 2003, 2009 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@prep.ai.mit.edu -+ -+# This file was written by Jeff Johnston (jjohnstn@redhat.com) -+ -+if ![istarget "ia64-*-*"] then { -+ return -+} -+ -+set testfile "ia64-libunwind" -+set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } { -+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -+} -+ -+if [get_compiler_info ${binfile}] { -+ return -1 -+} -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+gdb_test "set debug arch 1" -+gdb_breakpoint "main" -+gdb_run_cmd -+ -+set test "libunwind message" -+gdb_test_multiple "" $test { -+ -re "ia64_find_proc_info_x.*$gdb_prompt $" { -+ pass $test -+ } -+} diff --git a/gdb-6.3-test-pie-20050107.patch b/gdb-6.3-test-pie-20050107.patch index 23a0e02..bb4acf7 100644 --- a/gdb-6.3-test-pie-20050107.patch +++ b/gdb-6.3-test-pie-20050107.patch @@ -1,7 +1,7 @@ -Index: gdb-7.4.50.20120602/gdb/testsuite/configure.ac +Index: gdb-7.5.91.20130323/gdb/testsuite/configure.ac =================================================================== ---- gdb-7.4.50.20120602.orig/gdb/testsuite/configure.ac 2012-04-25 16:07:22.000000000 +0200 -+++ gdb-7.4.50.20120602/gdb/testsuite/configure.ac 2012-06-02 18:24:38.456266545 +0200 +--- gdb-7.5.91.20130323.orig/gdb/testsuite/configure.ac 2013-03-11 09:59:00.000000000 +0100 ++++ gdb-7.5.91.20130323/gdb/testsuite/configure.ac 2013-03-23 19:47:24.189683555 +0100 @@ -96,6 +96,6 @@ AC_OUTPUT([Makefile \ gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \ gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile \ @@ -10,20 +10,20 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/configure.ac + gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \ gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \ gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile]) -Index: gdb-7.4.50.20120602/gdb/testsuite/configure +Index: gdb-7.5.91.20130323/gdb/testsuite/configure =================================================================== ---- gdb-7.4.50.20120602.orig/gdb/testsuite/configure 2012-04-25 16:07:21.000000000 +0200 -+++ gdb-7.4.50.20120602/gdb/testsuite/configure 2012-06-02 18:25:06.200258240 +0200 +--- gdb-7.5.91.20130323.orig/gdb/testsuite/configure 2013-03-11 09:59:00.000000000 +0100 ++++ gdb-7.5.91.20130323/gdb/testsuite/configure 2013-03-23 19:47:47.256822312 +0100 @@ -3448,7 +3448,7 @@ done --ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile" -+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile" +-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile" ++ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure -@@ -4175,6 +4175,7 @@ do +@@ -4176,6 +4176,7 @@ do "gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;; "gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;; "gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;; @@ -31,10 +31,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/configure "gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;; "gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;; "gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;; -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach.c +Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach.c 2012-06-02 18:24:38.497266532 +0200 ++++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach.c 2013-03-23 19:47:24.191683466 +0100 @@ -0,0 +1,20 @@ +/* This program is intended to be started outside of gdb, and then + attached to by gdb. Thus, it simply spins in a loop. The loop @@ -56,10 +56,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach.c + } + return 0; +} -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach2.c +Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach2.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach2.c 2012-06-02 18:24:38.504266529 +0200 ++++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach2.c 2013-03-23 19:47:24.192683421 +0100 @@ -0,0 +1,24 @@ +/* This program is intended to be started outside of gdb, and then + attached to by gdb. Thus, it simply spins in a loop. The loop @@ -85,10 +85,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach2.c + } + return (0); +} -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break.c +Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break.c 2012-06-02 18:24:38.505266529 +0200 ++++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break.c 2013-03-23 19:47:24.192683421 +0100 @@ -0,0 +1,146 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -236,10 +236,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break.c + } + return 0; +} -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break1.c +Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break1.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break1.c 2012-06-02 18:24:38.506266530 +0200 ++++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break1.c 2013-03-23 19:47:24.192683421 +0100 @@ -0,0 +1,44 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -285,10 +285,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break1.c +void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */ +void marker4 (d) long d; {} /* set breakpoint 13 here */ +#endif -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/coremaker.c +Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/coremaker.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/coremaker.c 2012-06-02 18:24:38.506266530 +0200 ++++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/coremaker.c 2013-03-23 19:47:24.192683421 +0100 @@ -0,0 +1,142 @@ +/* Copyright 1992, 1993, 1994, 1995, 1996, 1999 + Free Software Foundation, Inc. @@ -432,10 +432,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/coremaker.c + return 0; +} + -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach.exp +Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach.exp 2012-06-02 18:24:38.508266531 +0200 ++++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach.exp 2013-03-23 19:47:24.193683377 +0100 @@ -0,0 +1,417 @@ +# Copyright 1997, 1999, 2002 Free Software Foundation, Inc. + @@ -854,10 +854,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach.exp +do_call_attach_tests + +return 0 -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break.exp +Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break.exp 2012-06-02 18:24:38.510266529 +0200 ++++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break.exp 2013-03-23 19:47:24.194683332 +0100 @@ -0,0 +1,962 @@ +# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2002, 2003, 2004 @@ -1821,10 +1821,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break.exp + send_gdb "set args main\n" + gdb_expect -re ".*$gdb_prompt $" {} +} -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/corefile.exp +Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/corefile.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/corefile.exp 2012-06-02 18:24:38.511266528 +0200 ++++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/corefile.exp 2013-03-23 19:47:24.194683332 +0100 @@ -0,0 +1,233 @@ +# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Free Software Foundation, Inc. @@ -2059,10 +2059,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/corefile.exp +gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)" + +gdb_test "core" "No core file now." -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/Makefile.in +Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/Makefile.in =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/Makefile.in 2012-06-02 18:24:38.512266527 +0200 ++++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/Makefile.in 2013-03-23 19:47:24.194683332 +0100 @@ -0,0 +1,19 @@ +VPATH = @srcdir@ +srcdir = @srcdir@ diff --git a/gdb-6.3-test-self-20050110.patch b/gdb-6.3-test-self-20050110.patch index 7dccbe6..e36e70c 100644 --- a/gdb-6.3-test-self-20050110.patch +++ b/gdb-6.3-test-self-20050110.patch @@ -6,96 +6,30 @@ * gdb.gdb/xfullpath.exp: Ditto. * gdb.gdb/observer.exp: Ditto. -Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/complaints.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/selftest-support.exp =================================================================== ---- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/complaints.exp 2009-01-03 06:58:04.000000000 +0100 -+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/complaints.exp 2009-02-26 22:10:48.000000000 +0100 -@@ -302,13 +302,13 @@ proc find_gdb { arg } { - set GDB_FULLPATH [find_gdb $GDB] +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/lib/selftest-support.exp 2013-08-02 16:11:29.195971922 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/selftest-support.exp 2013-08-02 16:12:20.404040378 +0200 +@@ -130,18 +130,18 @@ proc do_self_tests {function body} { + set GDB_FULLPATH [find_gdb $GDB] - # Remove any old copy lying around. --remote_file host delete x$tool -+#remote_file host delete x$tool + # Remove any old copy lying around. +- remote_file host delete x$tool ++ #remote_file host delete x$tool - gdb_start + gdb_start +- set file [remote_download host $GDB_FULLPATH x$tool] ++ #set file [remote_download host $GDB_FULLPATH x$tool] --set file [remote_download host $GDB_FULLPATH x$tool] -+#set file [remote_download host $GDB_FULLPATH x$tool] +- set result [selftest_setup $file $function] ++ set result [selftest_setup $GDB_FULLPATH $function] + if {$result == 0} then { + set result [uplevel $body] + } --set setup_result [setup_test $file ] -+set setup_result [setup_test $GDB_FULLPATH ] - if {$setup_result <0} then { - return -1 - } -@@ -319,4 +319,4 @@ test_short_complaints - test_empty_complaints + gdb_exit +- catch "remote_file host delete $file" ++ #catch "remote_file host delete $file" - gdb_exit; --catch "remote_file host delete $file"; -+#catch "remote_file host delete $file"; -Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/observer.exp -=================================================================== ---- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/observer.exp 2009-02-17 20:52:27.000000000 +0100 -+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/observer.exp 2009-02-26 22:11:40.000000000 +0100 -@@ -258,13 +258,13 @@ proc find_gdb { arg } { - set GDB_FULLPATH [find_gdb $GDB] - - # Remove any old copy lying around. --remote_file host delete x$tool -+#remote_file host delete x$tool - - gdb_start --set file [remote_download host $GDB_FULLPATH x$tool] --set result [test_observer $file]; -+#set file [remote_download host $GDB_FULLPATH x$tool] -+set result [test_observer $GDB_FULLPATH]; - gdb_exit; --catch "remote_file host delete $file"; -+#catch "remote_file host delete $file"; - - if {$result <0} then { - warning "Couldn't test self" -Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/selftest.exp -=================================================================== ---- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/selftest.exp 2009-02-26 22:09:59.000000000 +0100 -+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/selftest.exp 2009-02-26 22:10:48.000000000 +0100 -@@ -551,13 +551,13 @@ proc find_gdb { arg } { - set GDB_FULLPATH [find_gdb $GDB] - - # Remove any old copy lying around. --remote_file host delete x$tool -+#remote_file host delete x$tool - - gdb_start --set file [remote_download host $GDB_FULLPATH x$tool] --set result [test_with_self $file]; -+#set file [remote_download host $GDB_FULLPATH x$tool] -+set result [test_with_self $GDB_FULLPATH]; - gdb_exit; --catch "remote_file host delete $file"; -+#catch "remote_file host delete $file"; - - if {$result <0} then { - warning "Couldn't test self" -Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/xfullpath.exp -=================================================================== ---- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/xfullpath.exp 2009-01-03 06:58:04.000000000 +0100 -+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/xfullpath.exp 2009-02-26 22:10:48.000000000 +0100 -@@ -179,13 +179,13 @@ proc find_gdb { arg } { - set GDB_FULLPATH [find_gdb $GDB] - - # Remove any old copy lying around. --remote_file host delete x$tool -+#remote_file host delete x$tool - - gdb_start --set file [remote_download host $GDB_FULLPATH x$tool] --set result [test_with_self $file]; -+#set file [remote_download host $GDB_FULLPATH x$tool] -+set result [test_with_self $GDB_FULLPATH]; - gdb_exit; --catch "remote_file host delete $file"; -+#catch "remote_file host delete $file"; - - if {$result <0} then { - warning "Couldn't test self" + if {$result < 0} then { + warning "Couldn't test self" diff --git a/gdb-6.5-BEA-testsuite.patch b/gdb-6.5-BEA-testsuite.patch index d30e0fe..b2b4277 100644 --- a/gdb-6.5-BEA-testsuite.patch +++ b/gdb-6.5-BEA-testsuite.patch @@ -1,9 +1,7 @@ -Index: ./gdb/testsuite/gdb.threads/threadcrash.c +Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.c =================================================================== -RCS file: gdb/testsuite/gdb.threads/threadcrash.c -diff -N gdb/testsuite/gdb.threads/threadcrash.c ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.threads/threadcrash.c 31 Oct 2006 17:54:38 -0000 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.c 2013-05-21 13:35:45.592059786 +0200 @@ -0,0 +1,301 @@ +/* + * The point of this program is to crash in a multi-threaded app. @@ -306,12 +304,10 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.c + + return 0; +} -Index: ./gdb/testsuite/gdb.threads/threadcrash.exp +Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.exp =================================================================== -RCS file: gdb/testsuite/gdb.threads/threadcrash.exp -diff -N gdb/testsuite/gdb.threads/threadcrash.exp ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.threads/threadcrash.exp 31 Oct 2006 17:54:38 -0000 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.exp 2013-05-21 13:36:01.451056746 +0200 @@ -0,0 +1,37 @@ +# threadcrash.exp - The point of this program is to crash in a multi-threaded app. + @@ -337,7 +333,7 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.exp +} + +# ${shellfile} argument must not contain any directories. -+set fd [open "|bash ${shellfile} ${binfile} $GDB -nw $GDBFLAGS" r] ++set fd [open "|bash ${shellfile} ${binfile} $GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]" r] +while { [gets $fd line] >= 0 } { + if [regexp " PASS: (.*)$" $line trash message] { + pass $message @@ -350,12 +346,10 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.exp +} + +return 0 -Index: ./gdb/testsuite/gdb.threads/threadcrash.sh +Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh =================================================================== -RCS file: gdb/testsuite/gdb.threads/threadcrash.sh -diff -N gdb/testsuite/gdb.threads/threadcrash.sh ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.threads/threadcrash.sh 31 Oct 2006 17:54:38 -0000 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh 2013-05-21 13:35:45.593059786 +0200 @@ -0,0 +1,324 @@ +#! /bin/bash + @@ -681,12 +675,10 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.sh +rm -rf $WORKDIR + +exit $FAILURES -Index: ./gdb/testsuite/gdb.threads/threadcrash.sh-orig +Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh-orig =================================================================== -RCS file: gdb/testsuite/gdb.threads/threadcrash.sh-orig -diff -N gdb/testsuite/gdb.threads/threadcrash.sh-orig ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.threads/threadcrash.sh-orig 31 Oct 2006 17:54:38 -0000 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh-orig 2013-05-21 13:35:45.593059786 +0200 @@ -0,0 +1,248 @@ +#! /bin/bash + diff --git a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch index 46e93b4..00ea55c 100644 --- a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +++ b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch @@ -32,21 +32,23 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug: <81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location <81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location ---- a/gdb/printcmd.c -+++ b/gdb/printcmd.c -@@ -967,6 +967,8 @@ print_command_1 (char *exp, int inspect, int voidprint) +Index: gdb-7.6.50.20130731-cvs/gdb/printcmd.c +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/printcmd.c 2013-08-02 16:21:13.665758324 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/printcmd.c 2013-08-02 16:22:24.367853322 +0200 +@@ -982,6 +982,8 @@ print_command_1 (const char *exp, int vo if (exp && *exp) { + if (strcmp (exp, "errno") == 0) + exp = "*((int *(*) (void)) __errno_location) ()"; expr = parse_expression (exp); - old_chain = make_cleanup (free_current_contents, &expr); - cleanup = 1; -Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.c + make_cleanup (free_current_contents, &expr); + val = evaluate_expression (expr); +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2011-03-29 10:55:35.000000000 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2013-08-02 16:21:13.665758324 +0200 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -76,10 +78,10 @@ Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.c + + return 0; /* breakpoint */ +} -Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2011-03-29 10:55:35.000000000 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2013-08-02 16:21:13.665758324 +0200 @@ -0,0 +1,60 @@ +# Copyright 2007 Free Software Foundation, Inc. + diff --git a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch index 049c98e..6153cec 100644 --- a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch +++ b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch @@ -1,11 +1,11 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379 -Index: gdb-7.5.50.20130118/gdb/symtab.c +Index: gdb-7.6.50.20130731-cvs/gdb/symtab.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/symtab.c 2013-01-18 23:53:22.009797788 +0100 -+++ gdb-7.5.50.20130118/gdb/symtab.c 2013-01-18 23:53:51.044846777 +0100 -@@ -2356,6 +2356,13 @@ find_pc_sect_line (CORE_ADDR pc, struct +--- gdb-7.6.50.20130731-cvs.orig/gdb/symtab.c 2013-08-02 17:06:19.854663801 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/symtab.c 2013-08-02 17:07:04.317721471 +0200 +@@ -2327,6 +2327,13 @@ find_pc_sect_line (CORE_ADDR pc, struct SYMBOL_LINKAGE_NAME (msymbol)); */ ; /* fall through */ @@ -14,7 +14,7 @@ Index: gdb-7.5.50.20130118/gdb/symtab.c + Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop. + Red Hat Bug 218379. */ + else if (SYMBOL_VALUE (mfunsym) == pc) -+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", SYMBOL_LINKAGE_NAME (msymbol), paddress (target_gdbarch (), pc)); ++ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", SYMBOL_LINKAGE_NAME (msymbol.minsym), paddress (target_gdbarch (), pc)); + /* fall through */ else return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0); diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch index b0b627c..532d92c 100644 --- a/gdb-6.6-buildid-locate-core-as-arg.patch +++ b/gdb-6.6-buildid-locate-core-as-arg.patch @@ -58,13 +58,13 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html * exec.c (exec_file_attach): Print a more useful error message if the user did "gdb core". -Index: gdb-7.4.91.20120801/gdb/exceptions.h +Index: gdb-7.6.50.20130731-cvs/gdb/exceptions.h =================================================================== ---- gdb-7.4.91.20120801.orig/gdb/exceptions.h 2012-01-04 09:17:01.000000000 +0100 -+++ gdb-7.4.91.20120801/gdb/exceptions.h 2012-08-01 18:43:39.806959992 +0200 -@@ -86,6 +86,9 @@ enum errors { - /* DW_OP_GNU_entry_value resolving failed. */ - NO_ENTRY_VALUE_ERROR, +--- gdb-7.6.50.20130731-cvs.orig/gdb/exceptions.h 2013-08-02 16:29:44.770440262 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/exceptions.h 2013-08-02 16:30:06.197468727 +0200 +@@ -90,6 +90,9 @@ enum errors { + aborted as the inferior state is no longer valid. */ + TARGET_CLOSE_ERROR, + /* Attempt to load a core file as executable. */ + IS_CORE_ERROR, @@ -72,10 +72,10 @@ Index: gdb-7.4.91.20120801/gdb/exceptions.h /* Add more errors here. */ NR_ERRORS }; -Index: gdb-7.4.91.20120801/gdb/exec.c +Index: gdb-7.6.50.20130731-cvs/gdb/exec.c =================================================================== ---- gdb-7.4.91.20120801.orig/gdb/exec.c 2012-08-01 18:36:51.000000000 +0200 -+++ gdb-7.4.91.20120801/gdb/exec.c 2012-08-01 18:44:39.928627287 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/exec.c 2013-08-02 16:29:44.771440264 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/exec.c 2013-08-02 16:31:30.100618657 +0200 @@ -34,6 +34,7 @@ #include "gdbthread.h" #include "progspace.h" @@ -84,7 +84,7 @@ Index: gdb-7.4.91.20120801/gdb/exec.c #include #include "readline/readline.h" -@@ -242,12 +243,27 @@ exec_file_attach (char *filename, int fr +@@ -217,12 +218,27 @@ exec_file_attach (char *filename, int fr if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) { @@ -114,12 +114,12 @@ Index: gdb-7.4.91.20120801/gdb/exec.c + gdb_bfd_errmsg (bfd_get_error (), matching)); } - /* FIXME - This should only be run for RS6000, but the ifdef is a poor -Index: gdb-7.4.91.20120801/gdb/main.c + if (build_section_table (exec_bfd, §ions, §ions_end)) +Index: gdb-7.6.50.20130731-cvs/gdb/main.c =================================================================== ---- gdb-7.4.91.20120801.orig/gdb/main.c 2012-08-01 18:36:51.000000000 +0200 -+++ gdb-7.4.91.20120801/gdb/main.c 2012-08-01 18:43:39.810959970 +0200 -@@ -266,6 +266,36 @@ typedef struct cmdarg { +--- gdb-7.6.50.20130731-cvs.orig/gdb/main.c 2013-08-02 16:29:44.772440265 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/main.c 2013-08-02 16:30:06.199468730 +0200 +@@ -300,6 +300,36 @@ typedef struct cmdarg { /* Define type VEC (cmdarg_s). */ DEF_VEC_O (cmdarg_s); @@ -156,7 +156,7 @@ Index: gdb-7.4.91.20120801/gdb/main.c static int captured_main (void *data) { -@@ -762,6 +792,8 @@ captured_main (void *data) +@@ -810,6 +840,8 @@ captured_main (void *data) { symarg = argv[optind]; execarg = argv[optind]; @@ -165,7 +165,7 @@ Index: gdb-7.4.91.20120801/gdb/main.c optind++; } -@@ -917,11 +949,25 @@ captured_main (void *data) +@@ -975,11 +1007,25 @@ captured_main (void *data) && symarg != NULL && strcmp (execarg, symarg) == 0) { diff --git a/gdb-6.6-buildid-locate-rpm-scl.patch b/gdb-6.6-buildid-locate-rpm-scl.patch new file mode 100644 index 0000000..86ebfb6 --- /dev/null +++ b/gdb-6.6-buildid-locate-rpm-scl.patch @@ -0,0 +1,105 @@ +warning: Skipping deprecated .gdb_index section +https://bugzilla.redhat.com/show_bug.cgi?id=953585 + +--- gdb-7.5.91.20130407-orig/gdb/dwarf2read.c 2013-04-22 15:47:18.837806752 +0200 ++++ gdb-7.5.91.20130407/gdb/dwarf2read.c 2013-04-22 16:12:55.043171881 +0200 +@@ -2700,6 +2700,14 @@ read_index_from_section (struct objfile + "set use-deprecated-index-sections on". */ + if (version < 6 && !deprecated_ok) + { ++ extern int rpm_verify_vendor (const char *filename); ++ ++ /* Red Hat Developer Toolset exception. */ ++ if (rpm_verify_vendor (filename)) ++ {} ++ else ++ { ++ + static int warning_printed = 0; + if (!warning_printed) + { +@@ -2711,6 +2719,8 @@ to use the section anyway."), + warning_printed = 1; + } + return 0; ++ ++ } + } + /* Version 7 indices generated by gold refer to the CU for a symbol instead + of the TU (for symbols coming from TUs). It's just a performance bug, and +--- gdb-7.5.91.20130407-orig/gdb/elfread.c 2013-04-22 15:47:18.637807200 +0200 ++++ gdb-7.5.91.20130407/gdb/elfread.c 2013-04-22 16:04:09.259429034 +0200 +@@ -1674,7 +1674,7 @@ static int missing_rpm_list_entries; + /* Returns the count of newly added rpms. */ + + static int +-missing_rpm_enlist (const char *filename) ++missing_rpm_enlist_1 (const char *filename, int verify_vendor) + { + static int rpm_init_done = 0; + rpmts ts; +@@ -1778,7 +1778,7 @@ missing_rpm_enlist (const char *filename + mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); + if (mi != NULL) + { +- for (;;) ++ if (!verify_vendor) for (;;) + { + Header h; + char *debuginfo, **slot, *s, *s2; +@@ -1897,6 +1897,35 @@ missing_rpm_enlist (const char *filename + xfree (debuginfo); + count++; + } ++ else /* verify_vendor */ ++ { ++ int vendor_pass = 0, vendor_fail = 0; ++ ++ for (;;) ++ { ++ Header h; ++ errmsg_t err; ++ char *vendor; ++ ++ h = rpmdbNextIterator_p (mi); ++ if (h == NULL) ++ break; ++ ++ vendor = headerFormat_p (h, "%{vendor}", &err); ++ if (!vendor) ++ { ++ warning (_("Error querying the rpm file `%s': %s"), filename, ++ err); ++ continue; ++ } ++ if (strcmp (vendor, "Red Hat, Inc.") == 0) ++ vendor_pass = 1; ++ else ++ vendor_fail = 1; ++ xfree (vendor); ++ } ++ count = vendor_pass != 0 && vendor_fail == 0; ++ } + + rpmdbFreeIterator_p (mi); + } +@@ -1907,6 +1936,19 @@ missing_rpm_enlist (const char *filename + } + + static int ++missing_rpm_enlist (const char *filename) ++{ ++ return missing_rpm_enlist_1 (filename, 0); ++} ++ ++extern int rpm_verify_vendor (const char *filename); ++int ++rpm_verify_vendor (const char *filename) ++{ ++ return missing_rpm_enlist_1 (filename, 1); ++} ++ ++static int + missing_rpm_list_compar (const char *const *ap, const char *const *bp) + { + return strcoll (*ap, *bp); diff --git a/gdb-6.6-buildid-locate-rpm-suse.patch b/gdb-6.6-buildid-locate-rpm-suse.patch index 2af302b..53b46f4 100644 --- a/gdb-6.6-buildid-locate-rpm-suse.patch +++ b/gdb-6.6-buildid-locate-rpm-suse.patch @@ -1,8 +1,8 @@ -Index: gdb-7.4.50.20120603/gdb/elfread.c +Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c =================================================================== ---- gdb-7.4.50.20120603.orig/gdb/elfread.c 2012-06-12 15:12:05.000000000 +0200 -+++ gdb-7.4.50.20120603/gdb/elfread.c 2012-06-12 15:13:39.678712939 +0200 -@@ -1809,9 +1809,9 @@ missing_rpm_enlist (const char *filename +--- gdb-7.6.50.20130731-cvs.orig/gdb/elfread.c 2013-08-07 14:59:00.000000000 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/elfread.c 2013-08-07 15:01:35.000000000 +0200 +@@ -1863,9 +1863,9 @@ missing_rpm_enlist_1 (const char *filena if (h == NULL) break; @@ -15,7 +15,7 @@ Index: gdb-7.4.50.20120603/gdb/elfread.c &err); if (!debuginfo) { -@@ -1819,60 +1819,19 @@ missing_rpm_enlist (const char *filename +@@ -1873,60 +1873,19 @@ missing_rpm_enlist_1 (const char *filena err); continue; } @@ -77,8 +77,8 @@ Index: gdb-7.4.50.20120603/gdb/elfread.c - /* Base package name for `debuginfo-install'. We do not use the `yum' command directly as the line - yum --disablerepo='*' --enablerepo='*debug*' \ -@@ -1958,7 +1917,7 @@ missing_rpm_list_print (void) + yum --enablerepo='*debug*' install NAME-debuginfo.ARCH +@@ -2053,7 +2012,7 @@ missing_rpm_list_print (void) (int (*) (const void *, const void *)) missing_rpm_list_compar); printf_unfiltered (_("Missing separate debuginfos, use: %s"), @@ -87,13 +87,12 @@ Index: gdb-7.4.50.20120603/gdb/elfread.c for (array_iter = array; array_iter < array + missing_rpm_list_entries; array_iter++) { -@@ -2171,9 +2130,12 @@ debug_print_missing (const char *binary, +@@ -2266,8 +2225,12 @@ debug_print_missing (const char *binary, fprintf_unfiltered (gdb_stdlog, _("Missing separate debuginfo for %s\n"), binary); if (debug != NULL) - fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"), -- "yum --disablerepo='*' --enablerepo='*debug*'" -- " install", debug); +- "yum --enablerepo='*debug*' install", debug); + { + const char *p = strrchr (debug, '/'); + fprintf_unfiltered (gdb_stdlog, _("Try: %s%.2s%.38s\"\n"), diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index b91650c..e4c91cb 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -1,16 +1,16 @@ -Index: gdb-7.5.50.20130215/gdb/event-top.c +Index: gdb-7.6.50.20130731-cvs/gdb/event-top.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/event-top.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/event-top.c 2013-02-15 22:36:11.217308539 +0100 -@@ -36,6 +36,7 @@ - #include "continuations.h" +--- gdb-7.6.50.20130731-cvs.orig/gdb/event-top.c 2013-08-02 16:25:24.968094398 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/event-top.c 2013-08-02 16:25:38.638112874 +0200 +@@ -37,6 +37,7 @@ #include "gdbcmd.h" /* for dont_repeat() */ #include "annotate.h" + #include "maint.h" +#include "symfile.h" /* readline include files. */ #include "readline/readline.h" -@@ -170,6 +171,8 @@ rl_callback_read_char_wrapper (gdb_clien +@@ -171,6 +172,8 @@ rl_callback_read_char_wrapper (gdb_clien void cli_command_loop (void) { @@ -19,7 +19,7 @@ Index: gdb-7.5.50.20130215/gdb/event-top.c display_gdb_prompt (0); /* Now it's time to start the event loop. */ -@@ -237,6 +240,8 @@ display_gdb_prompt (char *new_prompt) +@@ -238,6 +241,8 @@ display_gdb_prompt (char *new_prompt) /* Reset the nesting depth used when trace-commands is set. */ reset_command_nest_depth (); @@ -28,10 +28,10 @@ Index: gdb-7.5.50.20130215/gdb/event-top.c /* Each interpreter has its own rules on displaying the command prompt. */ if (!current_interp_display_prompt_p ()) -Index: gdb-7.5.50.20130215/gdb/elfread.c +Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/elfread.c 2013-02-15 22:35:36.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/elfread.c 2013-02-15 22:35:59.414292874 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/elfread.c 2013-08-02 16:25:24.970094401 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/elfread.c 2013-08-02 16:25:27.336097557 +0200 @@ -49,6 +49,7 @@ #include "gdbcore.h" #include "gdbcmd.h" @@ -40,7 +40,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c #include extern void _initialize_elfread (void); -@@ -1649,8 +1650,361 @@ build_id_to_filename (struct build_id *b +@@ -1701,8 +1702,360 @@ build_id_to_filename (const struct elf_b return retval; } @@ -258,8 +258,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + + /* Base package name for `debuginfo-install'. We do not use the + `yum' command directly as the line -+ yum --disablerepo='*' --enablerepo='*debug*' \ -+ install NAME-debuginfo.ARCH ++ yum --enablerepo='*debug*' install NAME-debuginfo.ARCH + would be more complicated than just: + debuginfo-install NAME-VERSION-RELEASE.ARCH + Do not supply the rpm base name (derived from .src.rpm name) as @@ -399,11 +398,11 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + /* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages - Try to install the hash file ... -+ yum --disablerepo='*' --enablerepo='*debug*' install ... ++ yum --enablerepo='*debug*' install ... avoidance. */ struct missing_filepair -@@ -1704,11 +2058,17 @@ missing_filepair_change (void) +@@ -1756,11 +2109,17 @@ missing_filepair_change (void) /* All their memory came just from missing_filepair_OBSTACK. */ missing_filepair_hash = NULL; } @@ -421,7 +420,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c missing_filepair_change (); } -@@ -1775,14 +2135,35 @@ debug_print_missing (const char *binary, +@@ -1827,14 +2186,34 @@ debug_print_missing (const char *binary, *slot = missing_filepair; @@ -458,18 +457,17 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + _("Missing separate debuginfo for %s\n"), binary); + if (debug != NULL) + fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"), -+ "yum --disablerepo='*' --enablerepo='*debug*'" -+ " install", debug); ++ "yum --enablerepo='*debug*' install", debug); + } } static char * -Index: gdb-7.5.50.20130215/gdb/symfile.h +Index: gdb-7.6.50.20130731-cvs/gdb/symfile.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/symfile.h 2013-02-15 22:35:03.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/symfile.h 2013-02-15 22:35:59.414292874 +0100 -@@ -599,6 +599,8 @@ extern struct build_id *build_id_addr_ge - extern char *build_id_to_filename (struct build_id *build_id, +--- gdb-7.6.50.20130731-cvs.orig/gdb/symfile.h 2013-08-02 16:25:24.971094402 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/symfile.h 2013-08-02 16:25:27.336097557 +0200 +@@ -602,6 +602,8 @@ extern struct elf_build_id *build_id_add + extern char *build_id_to_filename (const struct elf_build_id *build_id, char **link_return, int add_debug_suffix); extern void debug_print_missing (const char *binary, const char *debug); +extern void debug_flush_missing (void); @@ -477,10 +475,10 @@ Index: gdb-7.5.50.20130215/gdb/symfile.h /* From dwarf2read.c */ -Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:03.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:59.415292878 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/lib/gdb.exp 2013-08-02 16:25:24.972094404 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/gdb.exp 2013-08-02 16:25:27.337097559 +0200 @@ -1482,7 +1482,7 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } @@ -490,10 +488,10 @@ Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp send_gdb "set build-id-verbose 0\n" gdb_expect 10 { -re "$gdb_prompt $" { -Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/mi-support.exp =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:03.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:59.416292881 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/lib/mi-support.exp 2013-08-02 16:25:24.973094405 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/mi-support.exp 2013-08-02 16:25:27.338097560 +0200 @@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } { warning "Couldn't set the width to 0." } @@ -503,10 +501,10 @@ Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp send_gdb "190-gdb-set build-id-verbose 0\n" gdb_expect 10 { -re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" { -Index: gdb-7.5.50.20130215/gdb/tui/tui-interp.c +Index: gdb-7.6.50.20130731-cvs/gdb/tui/tui-interp.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/tui/tui-interp.c 2013-01-01 07:41:30.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/tui/tui-interp.c 2013-02-15 22:35:59.416292881 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/tui/tui-interp.c 2013-08-02 16:25:24.974094406 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/tui/tui-interp.c 2013-08-02 16:25:27.338097560 +0200 @@ -30,6 +30,7 @@ #include "tui/tui.h" #include "tui/tui-io.h" @@ -515,10 +513,10 @@ Index: gdb-7.5.50.20130215/gdb/tui/tui-interp.c /* Set to 1 when the TUI mode must be activated when we first start gdb. */ -Index: gdb-7.5.50.20130215/gdb/aclocal.m4 +Index: gdb-7.6.50.20130731-cvs/gdb/aclocal.m4 =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/aclocal.m4 2013-01-17 12:06:26.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/aclocal.m4 2013-02-15 22:35:59.417292883 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/aclocal.m4 2013-08-02 16:25:24.974094406 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/aclocal.m4 2013-08-02 16:25:27.339097561 +0200 @@ -11,6 +11,164 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @@ -684,10 +682,10 @@ Index: gdb-7.5.50.20130215/gdb/aclocal.m4 # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -Index: gdb-7.5.50.20130215/gdb/config.in +Index: gdb-7.6.50.20130731-cvs/gdb/config.in =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/config.in 2012-12-09 19:39:58.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/config.in 2013-02-15 22:35:59.417292883 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/config.in 2013-08-02 16:25:24.975094407 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/config.in 2013-08-02 16:25:27.339097561 +0200 @@ -33,6 +33,9 @@ /* Define to BFD's default target vector. */ #undef DEFAULT_BFD_VEC @@ -698,7 +696,7 @@ Index: gdb-7.5.50.20130215/gdb/config.in /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS -@@ -210,6 +213,9 @@ +@@ -219,6 +222,9 @@ /* Define if Python 2.7 is being used. */ #undef HAVE_LIBPYTHON2_7 @@ -708,12 +706,12 @@ Index: gdb-7.5.50.20130215/gdb/config.in /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -Index: gdb-7.5.50.20130215/gdb/configure +Index: gdb-7.6.50.20130731-cvs/gdb/configure =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/configure 2013-01-09 18:21:33.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/configure 2013-02-15 22:35:59.422292893 +0100 -@@ -683,6 +683,11 @@ REPORT_BUGS_TO - PKGVERSION +--- gdb-7.6.50.20130731-cvs.orig/gdb/configure 2013-08-02 16:25:24.981094415 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/configure 2013-08-02 16:25:27.343097567 +0200 +@@ -689,6 +689,11 @@ PKGVERSION + HAVE_NATIVE_GCORE_TARGET TARGET_OBS subdirs +RPM_LIBS @@ -724,7 +722,7 @@ Index: gdb-7.5.50.20130215/gdb/configure GDB_DATADIR DEBUGDIR MAKEINFO_EXTRA_FLAGS -@@ -783,6 +788,7 @@ with_gdb_datadir +@@ -789,6 +794,7 @@ with_gdb_datadir with_relocated_sources with_auto_load_dir with_auto_load_safe_path @@ -732,7 +730,7 @@ Index: gdb-7.5.50.20130215/gdb/configure enable_targets enable_64_bit_bfd enable_gdbcli -@@ -831,6 +837,11 @@ CPPFLAGS +@@ -839,6 +845,11 @@ CPPFLAGS CPP MAKEINFO MAKEINFOFLAGS @@ -744,7 +742,7 @@ Index: gdb-7.5.50.20130215/gdb/configure YACC YFLAGS XMKMF' -@@ -1501,6 +1512,8 @@ Optional Packages: +@@ -1509,6 +1520,8 @@ Optional Packages: [--with-auto-load-dir] --without-auto-load-safe-path do not restrict auto-loaded files locations @@ -753,7 +751,7 @@ Index: gdb-7.5.50.20130215/gdb/configure --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets --with-curses use the curses library instead of the termcap library -@@ -1545,6 +1558,13 @@ Some influential environment variables: +@@ -1556,6 +1569,13 @@ Some influential environment variables: MAKEINFO Parent configure detects if it is of sufficient version. MAKEINFOFLAGS Parameters for MAKEINFO. @@ -767,7 +765,7 @@ Index: gdb-7.5.50.20130215/gdb/configure YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. -@@ -5030,6 +5050,491 @@ _ACEOF +@@ -5039,6 +5059,491 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 $as_echo "$with_auto_load_safe_path" >&6; } @@ -1259,11 +1257,11 @@ Index: gdb-7.5.50.20130215/gdb/configure subdirs="$subdirs testsuite" -Index: gdb-7.5.50.20130215/gdb/configure.ac +Index: gdb-7.6.50.20130731-cvs/gdb/configure.ac =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/configure.ac 2013-01-09 18:21:35.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/configure.ac 2013-02-15 22:35:59.423292895 +0100 -@@ -166,6 +166,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap +--- gdb-7.6.50.20130731-cvs.orig/gdb/configure.ac 2013-08-02 16:25:24.983094418 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/configure.ac 2013-08-02 16:25:27.344097568 +0200 +@@ -164,6 +164,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap [Directories safe to hold auto-loaded files.]) AC_MSG_RESULT([$with_auto_load_safe_path]) @@ -1463,11 +1461,11 @@ Index: gdb-7.5.50.20130215/gdb/configure.ac AC_CONFIG_SUBDIRS(testsuite) # Check whether to support alternative target configurations -Index: gdb-7.5.50.20130215/gdb/corelow.c +Index: gdb-7.6.50.20130731-cvs/gdb/corelow.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/corelow.c 2013-02-15 22:35:03.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/corelow.c 2013-02-15 22:35:59.423292895 +0100 -@@ -313,7 +313,7 @@ build_id_locate_exec (int from_tty) +--- gdb-7.6.50.20130731-cvs.orig/gdb/corelow.c 2013-08-02 16:25:24.984094419 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/corelow.c 2013-08-02 16:25:27.344097568 +0200 +@@ -316,7 +316,7 @@ build_id_locate_exec (int from_tty) symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; } else diff --git a/gdb-6.6-buildid-locate-solib-missing-ids.patch b/gdb-6.6-buildid-locate-solib-missing-ids.patch index e60b706..4af8da5 100644 --- a/gdb-6.6-buildid-locate-solib-missing-ids.patch +++ b/gdb-6.6-buildid-locate-solib-missing-ids.patch @@ -1,11 +1,13 @@ ---- gdb-7.4.50.20120120/gdb/solib-svr4.c.orig 2012-03-17 10:23:11.000000000 +0100 -+++ gdb-7.4.50.20120120/gdb/solib-svr4.c 2012-03-17 10:36:22.265628529 +0100 -@@ -1228,14 +1228,27 @@ svr4_read_so_list (CORE_ADDR lm, struct +Index: gdb-7.5.50.20130310/gdb/solib-svr4.c +=================================================================== +--- gdb-7.5.50.20130310.orig/gdb/solib-svr4.c 2013-03-10 16:37:49.000000000 +0100 ++++ gdb-7.5.50.20130310/gdb/solib-svr4.c 2013-03-10 16:43:45.498585091 +0100 +@@ -1225,14 +1225,27 @@ svr4_read_so_list (CORE_ADDR lm, struct } { -- struct build_id *build_id; -+ struct build_id *build_id = NULL; +- struct elf_build_id *build_id; ++ struct elf_build_id *build_id = NULL; strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1); new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; @@ -30,7 +32,7 @@ if (build_id != NULL) { char *name, *build_id_filename; -@@ -1250,23 +1263,7 @@ svr4_read_so_list (CORE_ADDR lm, struct +@@ -1247,23 +1260,7 @@ svr4_read_so_list (CORE_ADDR lm, struct xfree (name); } else diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index c22c539..e966a03 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -1,18 +1,18 @@ -Index: gdb-7.5.50.20130215/gdb/corelow.c +Index: gdb-7.6.50.20130731-cvs/gdb/corelow.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/corelow.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/corelow.c 2013-02-15 22:35:03.278219844 +0100 -@@ -46,6 +46,9 @@ - #include "progspace.h" - #include "objfiles.h" +--- gdb-7.6.50.20130731-cvs.orig/gdb/corelow.c 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/corelow.c 2013-08-02 17:07:28.434753293 +0200 +@@ -48,6 +48,9 @@ #include "gdb_bfd.h" + #include "completer.h" + #include "filestuff.h" +#include "auxv.h" +#include "elf/common.h" +#include "gdbcmd.h" #ifndef O_LARGEFILE #define O_LARGEFILE 0 -@@ -271,6 +274,52 @@ add_to_thread_list (bfd *abfd, asection +@@ -273,6 +276,53 @@ add_to_thread_list (bfd *abfd, asection inferior_ptid = ptid; /* Yes, make it current. */ } @@ -22,7 +22,7 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c +build_id_locate_exec (int from_tty) +{ + CORE_ADDR at_entry; -+ struct build_id *build_id; ++ struct elf_build_id *build_id; + char *exec_filename, *debug_filename; + char *build_id_filename; + struct cleanup *back_to; @@ -36,6 +36,7 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c + build_id = build_id_addr_get (at_entry); + if (build_id == NULL) + return; ++ back_to = make_cleanup (xfree, build_id); + + /* SYMFILE_OBJFILE should refer to the main executable (not only to its + separate debug info file). gcc44+ keeps .eh_frame only in the main @@ -44,7 +45,7 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c + directly to the separate debug info file. */ + + exec_filename = build_id_to_filename (build_id, &build_id_filename, 0); -+ back_to = make_cleanup (xfree, build_id_filename); ++ make_cleanup (xfree, build_id_filename); + + if (exec_filename != NULL) + { @@ -65,7 +66,7 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c /* This routine opens and sets up the core file bfd. */ static void -@@ -409,6 +458,14 @@ core_open (char *filename, int from_tty) +@@ -411,6 +461,14 @@ core_open (char *filename, int from_tty) switch_to_thread (thread->ptid); } @@ -80,10 +81,10 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c post_create_inferior (&core_ops, from_tty); /* Now go through the target stack looking for threads since there -@@ -978,4 +1035,11 @@ _initialize_corelow (void) +@@ -974,4 +1032,11 @@ _initialize_corelow (void) init_core_ops (); - add_target (&core_ops); + add_target_with_completer (&core_ops, filename_completer); + + add_setshow_boolean_cmd ("build-id-core-loads", class_files, + &build_id_core_loads, _("\ @@ -92,11 +93,11 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c + NULL, NULL, NULL, + &setlist, &showlist); } -Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo +Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/doc/gdb.texinfo 2013-02-15 22:34:22.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/doc/gdb.texinfo 2013-02-15 22:35:03.287219863 +0100 -@@ -16662,6 +16662,27 @@ information files. +--- gdb-7.6.50.20130731-cvs.orig/gdb/doc/gdb.texinfo 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo 2013-08-02 17:07:28.443753304 +0200 +@@ -17119,6 +17119,27 @@ information files. @end table @@ -124,11 +125,11 @@ Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo @cindex @code{.gnu_debuglink} sections @cindex debug link sections A debug link is a special section of the executable file named -Index: gdb-7.5.50.20130215/gdb/solib-svr4.c +Index: gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/solib-svr4.c 2013-01-31 14:52:52.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/solib-svr4.c 2013-02-15 22:35:03.287219863 +0100 -@@ -1224,9 +1224,52 @@ svr4_read_so_list (CORE_ADDR lm, struct +--- gdb-7.6.50.20130731-cvs.orig/gdb/solib-svr4.c 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c 2013-08-02 17:07:28.444753305 +0200 +@@ -1365,9 +1365,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD continue; } @@ -136,7 +137,7 @@ Index: gdb-7.5.50.20130215/gdb/solib-svr4.c - new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; - strcpy (new->so_original_name, new->so_name); + { -+ struct build_id *build_id; ++ struct elf_build_id *build_id; + + strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1); + new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; @@ -184,10 +185,10 @@ Index: gdb-7.5.50.20130215/gdb/solib-svr4.c xfree (buffer); /* If this entry has no name, or its name matches the name -Index: gdb-7.5.50.20130215/gdb/elfread.c +Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/elfread.c 2013-02-01 20:39:03.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/elfread.c 2013-02-15 22:35:36.826263354 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/elfread.c 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/elfread.c 2013-08-02 17:09:06.460881503 +0200 @@ -45,6 +45,11 @@ #include "regcache.h" #include "bcache.h" @@ -200,10 +201,11 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c extern void _initialize_elfread (void); -@@ -1074,16 +1079,65 @@ elf_gnu_ifunc_resolver_return_stop (stru +@@ -1087,10 +1092,59 @@ elf_gnu_ifunc_resolver_return_stop (stru update_breakpoint_locations (b, sals, sals_end); } +-/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */ +#define BUILD_ID_VERBOSE_NONE 0 +#define BUILD_ID_VERBOSE_FILENAMES 1 +#define BUILD_ID_VERBOSE_BINARY_PARSE 2 @@ -216,18 +218,10 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + value); +} + - struct build_id - { - size_t size; - gdb_byte data[1]; - }; - --/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */ +/* Locate NT_GNU_BUILD_ID and return its matching debug filename. + FIXME: NOTE decoding should be unified with the BFD core notes decoding. */ - - static struct build_id * --build_id_bfd_get (bfd *abfd) ++ ++static struct elf_build_id * +build_id_buf_get (bfd *templ, gdb_byte *buf, bfd_size_type size) +{ + bfd_byte *p; @@ -239,7 +233,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + Elf_External_Note *xnp = (Elf_External_Note *) p; + size_t namesz = H_GET_32 (templ, xnp->namesz); + size_t descsz = H_GET_32 (templ, xnp->descsz); -+ bfd_byte *descdata = xnp->name + BFD_ALIGN (namesz, 4); ++ bfd_byte *descdata = (gdb_byte *) xnp->name + BFD_ALIGN (namesz, 4); + + if (H_GET_32 (templ, xnp->type) == NT_GNU_BUILD_ID + && namesz == sizeof "GNU" @@ -247,7 +241,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + { + size_t size = descsz; + gdb_byte *data = (void *) descdata; -+ struct build_id *retval; ++ struct elf_build_id *retval; + + retval = xmalloc (sizeof *retval - 1 + size); + retval->size = size; @@ -262,26 +256,27 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + +/* Separate debuginfo files have corrupted PHDR but SHDR is correct there. + Locate NT_GNU_BUILD_ID from ABFD and return its content. */ -+ -+static struct build_id * + + static const struct elf_build_id * +-build_id_bfd_get (bfd *abfd) +build_id_bfd_shdr_get (bfd *abfd) { - struct build_id *retval; - -@@ -1099,6 +1153,348 @@ build_id_bfd_get (bfd *abfd) - return retval; + if (!bfd_check_format (abfd, bfd_object) + || bfd_get_flavour (abfd) != bfd_target_elf_flavour +@@ -1100,6 +1154,348 @@ build_id_bfd_get (bfd *abfd) + return elf_tdata (abfd)->build_id; } +/* Core files may have missing (corrupt) SHDR but PDHR is correct there. + bfd_elf_bfd_from_remote_memory () has too much overhead by + allocating/reading all the available ELF PT_LOADs. */ + -+static struct build_id * ++static struct elf_build_id * +build_id_phdr_get (bfd *templ, bfd_vma loadbase, unsigned e_phnum, + Elf_Internal_Phdr *i_phdr) +{ + int i; -+ struct build_id *retval = NULL; ++ struct elf_build_id *retval = NULL; + + for (i = 0; i < e_phnum; i++) + if (i_phdr[i].p_type == PT_NOTE && i_phdr[i].p_filesz > 0) @@ -568,11 +563,11 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + } +} + -+struct build_id * ++struct elf_build_id * +build_id_addr_get (CORE_ADDR addr) +{ + struct build_id_addr_sect *candidate; -+ struct build_id *retval = NULL; ++ struct elf_build_id *retval = NULL; + Elf_Internal_Phdr *i_phdr = NULL; + bfd_vma loadbase = 0; + unsigned e_phnum = 0; @@ -617,7 +612,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c /* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */ static int -@@ -1113,7 +1509,7 @@ build_id_verify (const char *filename, s +@@ -1114,7 +1510,7 @@ build_id_verify (const char *filename, c if (abfd == NULL) return 0; @@ -626,14 +621,48 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c if (found == NULL) warning (_("File \"%s\" has no build-id, file skipped"), filename); -@@ -1131,17 +1527,18 @@ build_id_verify (const char *filename, s - return retval; +@@ -1131,16 +1527,53 @@ build_id_verify (const char *filename, c } --static char * --build_id_to_debug_filename (struct build_id *build_id) + static char * +-build_id_to_debug_filename (const struct elf_build_id *build_id) ++link_resolve (const char *symlink, int level) ++{ ++ char buf[PATH_MAX + 1], *target, *retval; ++ ssize_t got; ++ ++ if (level > 10) ++ return xstrdup (symlink); ++ ++ got = readlink (symlink, buf, sizeof (buf)); ++ if (got < 0 || got >= sizeof (buf)) ++ return xstrdup (symlink); ++ buf[got] = '\0'; ++ ++ if (IS_ABSOLUTE_PATH (buf)) ++ target = xstrdup (buf); ++ else ++ { ++ char *dir = ldirname (symlink); ++ ++ if (dir == NULL) ++ return xstrdup (symlink); ++ target = xstrprintf ("%s" ++#ifndef HAVE_DOS_BASED_FILE_SYSTEM ++ "/" ++#else /* HAVE_DOS_BASED_FILE_SYSTEM */ ++ "\\" ++#endif /* HAVE_DOS_BASED_FILE_SYSTEM */ ++ "%s", dir, buf); ++ } ++ ++ retval = link_resolve (target, level + 1); ++ xfree (target); ++ return retval; ++} ++ +char * -+build_id_to_filename (struct build_id *build_id, char **link_return, ++build_id_to_filename (const struct elf_build_id *build_id, char **link_return, + int add_debug_suffix) { char *link, *debugdir, *retval = NULL; @@ -649,16 +678,19 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will cause "/.build-id/..." lookups. */ -@@ -1154,6 +1551,8 @@ build_id_to_debug_filename (struct build +@@ -1153,7 +1586,10 @@ build_id_to_debug_filename (const struct size_t debugdir_len = strlen (debugdir); - gdb_byte *data = build_id->data; + const gdb_byte *data = build_id->data; size_t size = build_id->size; +- char *s; + unsigned seqno; + struct stat statbuf_trash; - char *s; ++ /* Initialize it just to avoid a GCC false warning. */ ++ char *s, *link0 = NULL, *link0_resolved; memcpy (link, debugdir, debugdir_len); -@@ -1168,37 +1567,240 @@ build_id_to_debug_filename (struct build + s = &link[debugdir_len]; +@@ -1167,37 +1603,256 @@ build_id_to_debug_filename (const struct *s++ = '/'; while (size-- > 0) s += sprintf (s, "%02x", (unsigned) *data++); @@ -686,8 +718,14 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + strcpy (s2, ".debug"); + else + *s2 = 0; - -- if (retval != NULL && !build_id_verify (retval, build_id)) ++ ++ if (!seqno) ++ { ++ /* If none of the real files is found report as missing file ++ always the non-.%u-suffixed file. */ ++ link0 = xstrdup (link); ++ } ++ + /* `access' automatically dereferences LINK. */ + if (lstat (link, &statbuf_trash) != 0) + { @@ -708,42 +746,52 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + } + + if (retval != NULL) ++ { ++ /* LINK_ALL is not used below in this non-NULL RETVAL case. */ ++ xfree (link0); ++ break; ++ } ++ ++ /* If the symlink has target request to install the target. ++ BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing. ++ https://bugzilla.redhat.com/show_bug.cgi?id=981154 */ ++ link0_resolved = link_resolve (link0, 0); ++ xfree (link0); + +- if (retval != NULL && !build_id_verify (retval, build_id)) ++ if (link_all == NULL) ++ link_all = xstrdup (link0_resolved); ++ else { - xfree (retval); - retval = NULL; -+ /* LINK_ALL is not used below in this non-NULL RETVAL case. */ -+ break; ++ size_t len_orig = strlen (link_all); ++ ++ link_all = xrealloc (link_all, ++ len_orig + 1 + strlen (link0_resolved) + 1); ++ ++ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with ++ its possible use as an argument for installation command. */ ++ link_all[len_orig] = ' '; ++ ++ strcpy (&link_all[len_orig + 1], link0_resolved); } - -+ if (link_all == NULL) -+ link_all = xstrdup (link); -+ else -+ { -+ size_t len_orig = strlen (link_all); -+ -+ link_all = xrealloc (link_all, len_orig + 1 + strlen (link) + 1); -+ -+ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with -+ its possible use as an argument for installation command. */ -+ link_all[len_orig] = ' '; -+ -+ strcpy (&link_all[len_orig + 1], link); -+ } ++ xfree (link0_resolved); + } -+ + + if (link_return != NULL) + { if (retval != NULL) - break; -+ { -+ *link_return = link; -+ link = NULL; -+ } ++ { ++ *link_return = link; ++ link = NULL; ++ } + else -+ { -+ *link_return = link_all; -+ link_all = NULL; -+ } ++ { ++ *link_return = link_all; ++ link_all = NULL; ++ } } + xfree (link); + xfree (link_all); @@ -893,7 +941,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c +find_separate_debug_file_by_buildid (struct objfile *objfile, + char **build_id_filename_return) { - struct build_id *build_id; + const struct elf_build_id *build_id; - build_id = build_id_bfd_get (objfile->obfd); + if (build_id_filename_return) @@ -907,10 +955,10 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c - build_id_name = build_id_to_debug_filename (build_id); + build_id_name = build_id_to_filename (build_id, build_id_filename_return, + 1); - xfree (build_id); /* Prevent looping on a stripped .debug file. */ if (build_id_name != NULL -@@ -1209,7 +1811,7 @@ find_separate_debug_file_by_buildid (str + && filename_cmp (build_id_name, objfile->name) == 0) +@@ -1207,7 +1862,7 @@ find_separate_debug_file_by_buildid (str xfree (build_id_name); } else if (build_id_name != NULL) @@ -919,7 +967,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c } return NULL; } -@@ -1444,9 +2046,10 @@ elf_symfile_read (struct objfile *objfil +@@ -1445,9 +2100,10 @@ elf_symfile_read (struct objfile *objfil && objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile_backlink == NULL) { @@ -932,7 +980,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c if (debugfile == NULL) debugfile = find_separate_debug_file_by_debuglink (objfile); -@@ -1460,6 +2063,12 @@ elf_symfile_read (struct objfile *objfil +@@ -1461,6 +2117,12 @@ elf_symfile_read (struct objfile *objfil symbol_file_add_separate (abfd, symfile_flags, objfile); do_cleanups (cleanup); } @@ -943,9 +991,9 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + + xfree (build_id_filename); } + } - if (symtab_create_debug) -@@ -1782,4 +2391,16 @@ _initialize_elfread (void) +@@ -1790,4 +2452,16 @@ _initialize_elfread (void) elf_objfile_gnu_ifunc_cache_data = register_objfile_data (); gnu_ifunc_fns_p = &elf_gnu_ifunc_fns; @@ -962,28 +1010,27 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c + + observer_attach_executable_changed (debug_print_executable_changed); } -Index: gdb-7.5.50.20130215/gdb/symfile.h +Index: gdb-7.6.50.20130731-cvs/gdb/symfile.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/symfile.h 2013-02-03 17:20:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/symfile.h 2013-02-15 22:35:03.288219867 +0100 -@@ -593,6 +593,13 @@ void free_symfile_segment_data (struct s +--- gdb-7.6.50.20130731-cvs.orig/gdb/symfile.h 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/symfile.h 2013-08-02 17:07:28.446753308 +0200 +@@ -597,6 +597,12 @@ void free_symfile_segment_data (struct s extern struct cleanup *increment_reading_symtab (void); +/* build-id support. */ -+struct build_id; -+extern struct build_id *build_id_addr_get (CORE_ADDR addr); -+extern char *build_id_to_filename (struct build_id *build_id, ++extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr); ++extern char *build_id_to_filename (const struct elf_build_id *build_id, + char **link_return, int add_debug_suffix); +extern void debug_print_missing (const char *binary, const char *debug); + /* From dwarf2read.c */ /* Names for a dwarf2 debugging section. The field NORMAL is the normal -Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/gdb.exp 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:03.289219870 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/lib/gdb.exp 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/gdb.exp 2013-08-02 17:07:28.446753308 +0200 @@ -1482,6 +1482,16 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } @@ -998,13 +1045,13 @@ Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp + warning "Could not disable the missing debug infos warnings.." + } + } - return 0; + return 0 } -Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/mi-support.exp =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/mi-support.exp 2013-01-22 00:57:59.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:03.289219870 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/lib/mi-support.exp 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/mi-support.exp 2013-08-02 17:07:28.447753310 +0200 @@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } { warning "Couldn't set the width to 0." } @@ -1022,11 +1069,11 @@ Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp # If allowing the inferior to have its own PTY then assign the inferior # its own terminal device here. if { $separate_inferior_pty } { -Index: gdb-7.5.50.20130215/gdb/objfiles.h +Index: gdb-7.6.50.20130731-cvs/gdb/objfiles.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/objfiles.h 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/objfiles.h 2013-02-15 22:35:03.290219872 +0100 -@@ -432,6 +432,10 @@ struct objfile +--- gdb-7.6.50.20130731-cvs.orig/gdb/objfiles.h 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/objfiles.h 2013-08-02 17:07:28.447753310 +0200 +@@ -429,6 +429,10 @@ struct objfile #define OBJF_MAINLINE (1 << 5) @@ -1037,11 +1084,11 @@ Index: gdb-7.5.50.20130215/gdb/objfiles.h /* The object file that contains the runtime common minimal symbols for SunOS4. Note that this objfile has no associated BFD. */ -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/corefile.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/corefile.exp =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/testsuite/gdb.base/corefile.exp 2013-01-01 07:33:25.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/corefile.exp 2013-02-15 22:35:03.290219872 +0100 -@@ -256,3 +256,33 @@ if ![is_remote target] { +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/corefile.exp 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/corefile.exp 2013-08-02 17:07:28.447753310 +0200 +@@ -255,3 +255,33 @@ if ![is_remote target] { gdb_exit } diff --git a/gdb-6.6-testsuite-timeouts.patch b/gdb-6.6-testsuite-timeouts.patch index 86d07ef..1d36448 100644 --- a/gdb-6.6-testsuite-timeouts.patch +++ b/gdb-6.6-testsuite-timeouts.patch @@ -1,23 +1,23 @@ -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota1.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota1.exp =================================================================== ---- gdb-7.4.50.20120602.orig/gdb/testsuite/gdb.base/annota1.exp 2012-03-16 17:47:33.000000000 +0100 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota1.exp 2012-06-02 18:27:46.623210711 +0200 -@@ -45,6 +45,8 @@ gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${binfile} +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/annota1.exp 2013-08-02 16:23:26.559936258 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota1.exp 2013-08-02 16:23:56.590976418 +0200 +@@ -41,6 +41,8 @@ if { [gdb_compile "${srcdir}/${subdir}/ + + clean_restart ${binfile} +gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions" + # The commands we test here produce many lines of output; disable "press # to continue" prompts. gdb_test_no_output "set height 0" -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota3.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota3.exp =================================================================== ---- gdb-7.4.50.20120602.orig/gdb/testsuite/gdb.base/annota3.exp 2012-02-28 23:40:48.000000000 +0100 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota3.exp 2012-06-02 18:28:00.375206457 +0200 -@@ -45,6 +45,8 @@ gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${binfile} +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/annota3.exp 2013-08-02 16:23:26.560936259 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota3.exp 2013-08-02 16:24:11.654996267 +0200 +@@ -40,6 +40,8 @@ if { [gdb_compile "${srcdir}/${subdir}/ + + clean_restart ${binfile} +gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions" + diff --git a/gdb-6.7-testsuite-stable-results.patch b/gdb-6.7-testsuite-stable-results.patch index 8049ec6..27e01f7 100644 --- a/gdb-6.7-testsuite-stable-results.patch +++ b/gdb-6.7-testsuite-stable-results.patch @@ -20,10 +20,10 @@ random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp: frames-invalid can happen asynchronously. -Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.c +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/fileio.c =================================================================== ---- gdb-7.4.50.20120103.orig/gdb/testsuite/gdb.base/fileio.c 2009-10-01 17:39:13.000000000 +0200 -+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.c 2012-01-03 15:21:28.122729249 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/fileio.c 2013-08-02 16:25:49.466127074 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/fileio.c 2013-08-02 16:26:11.724156750 +0200 @@ -58,6 +58,8 @@ system (const char * string); 1) Invalid string/command. - returns 127. */ static const char *strerrno (int err); @@ -71,12 +71,12 @@ Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.c /* Don't change the order of the calls. They partly depend on each other */ test_open (); test_write (); -Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/fileio.exp =================================================================== ---- gdb-7.4.50.20120103.orig/gdb/testsuite/gdb.base/fileio.exp 2011-12-26 12:24:55.000000000 +0100 -+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp 2012-01-03 15:22:02.716601956 +0100 -@@ -42,8 +42,8 @@ if [get_compiler_info ${binfile}] { - return -1; +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/fileio.exp 2013-08-02 16:25:49.467127075 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/fileio.exp 2013-08-02 16:27:10.142234618 +0200 +@@ -35,8 +35,8 @@ if [get_compiler_info] { + return -1 } -remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test} @@ -86,7 +86,7 @@ Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp set oldtimeout $timeout set timeout [expr "$timeout + 60"] -@@ -85,7 +85,7 @@ gdb_test continue \ +@@ -78,7 +78,7 @@ gdb_test continue \ gdb_test "continue" ".*" "" @@ -95,7 +95,7 @@ Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp gdb_test continue \ "Continuing\\..*open 5:.*EACCES$stop_msg" \ -@@ -251,8 +251,8 @@ gdb_exit +@@ -244,8 +244,8 @@ gdb_exit # Wait till GDB really exits. sleep 1 diff --git a/gdb-6.8-quit-never-aborts.patch b/gdb-6.8-quit-never-aborts.patch index e6ec404..11317a2 100644 --- a/gdb-6.8-quit-never-aborts.patch +++ b/gdb-6.8-quit-never-aborts.patch @@ -5,11 +5,11 @@ 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 +Index: gdb-7.6.50.20130731-cvs/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); +--- gdb-7.6.50.20130731-cvs.orig/gdb/defs.h 2013-08-02 16:58:31.453016573 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/defs.h 2013-08-02 16:58:41.221030412 +0200 +@@ -177,6 +177,7 @@ extern int check_quit_flag (void); /* Set the quit flag. */ extern void set_quit_flag (void); @@ -17,26 +17,26 @@ Index: gdb-7.5.50.20130118/gdb/defs.h extern int immediate_quit; extern void quit (void); -Index: gdb-7.5.50.20130118/gdb/top.c +Index: gdb-7.6.50.20130731-cvs/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; +--- gdb-7.6.50.20130731-cvs.orig/gdb/top.c 2013-08-02 16:58:41.222030414 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/top.c 2013-08-02 16:59:06.321066228 +0200 +@@ -1415,7 +1415,9 @@ quit_force (char *args, int from_tty) + if (ex.reason < 0) \ + exception_print (gdb_stderr, ex) - /* 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 + /* Get out of tfind mode, and kill or detach all inferiors. */ + DO_TRY +Index: gdb-7.6.50.20130731-cvs/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; +--- gdb-7.6.50.20130731-cvs.orig/gdb/utils.c 2013-08-02 16:58:31.455016575 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/utils.c 2013-08-02 16:58:41.223030415 +0200 +@@ -136,6 +136,11 @@ int quit_flag; int immediate_quit; @@ -48,7 +48,7 @@ Index: gdb-7.5.50.20130118/gdb/utils.c #ifndef HAVE_PYTHON /* Clear the quit flag. */ -@@ -164,6 +169,9 @@ set_quit_flag (void) +@@ -159,6 +164,9 @@ set_quit_flag (void) int check_quit_flag (void) { @@ -58,11 +58,11 @@ Index: gdb-7.5.50.20130118/gdb/utils.c /* This is written in a particular way to avoid races. */ if (quit_flag) { -Index: gdb-7.5.50.20130118/gdb/python/python.c +Index: gdb-7.6.50.20130731-cvs/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) +--- gdb-7.6.50.20130731-cvs.orig/gdb/python/python.c 2013-08-02 16:58:31.456016577 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/python/python.c 2013-08-02 16:58:41.224030416 +0200 +@@ -191,6 +191,9 @@ set_quit_flag (void) int check_quit_flag (void) { diff --git a/gdb-7.5.50.20130215.tar.bz2 b/gdb-7.5.50.20130215.tar.bz2 deleted file mode 100644 index b590305..0000000 --- a/gdb-7.5.50.20130215.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f1d77fa5fdc14f4f933010dfadfb4895d84a92dd038a1c1425cf9d75e147afe9 -size 24229281 diff --git a/gdb-7.6.50.20130731-cvs.tar.bz2 b/gdb-7.6.50.20130731-cvs.tar.bz2 new file mode 100644 index 0000000..09ddf06 --- /dev/null +++ b/gdb-7.6.50.20130731-cvs.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ba2ee6049f792f7df7d8148f03bbb8126607ef40f59a6c5d65a08c744415d40 +size 24639930 diff --git a/gdb-aarch64-hw-break.patch b/gdb-aarch64-hw-break.patch new file mode 100644 index 0000000..02240f9 --- /dev/null +++ b/gdb-aarch64-hw-break.patch @@ -0,0 +1,17 @@ +http://permalink.gmane.org/gmane.comp.gdb.patches/88728 + +Index: gdb/aarch64-linux-nat.c +=================================================================== +RCS file: /cvs/src/src/gdb/aarch64-linux-nat.c,v +retrieving revision 1.4 +diff -u -p -r1.4 aarch64-linux-nat.c +--- gdb/aarch64-linux-nat.c 14 Feb 2013 13:50:30 -0000 1.4 ++++ gdb/aarch64-linux-nat.c 27 Jul 2013 22:42:18 -0000 +@@ -312,6 +312,7 @@ aarch64_linux_set_debug_regs (const stru + const CORE_ADDR *addr; + const unsigned int *ctrl; + ++ memset (®s, 0, sizeof (regs)); + iov.iov_base = ®s; + iov.iov_len = sizeof (regs); + count = watchpoint ? aarch64_num_wp_regs : aarch64_num_bp_regs; diff --git a/gdb-archer-pie-addons-keep-disabled.patch b/gdb-archer-pie-addons-keep-disabled.patch index 44be6c5..217acff 100644 --- a/gdb-archer-pie-addons-keep-disabled.patch +++ b/gdb-archer-pie-addons-keep-disabled.patch @@ -1,8 +1,8 @@ -Index: gdb-7.5.50.20130215/gdb/breakpoint.c +Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/breakpoint.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/breakpoint.c 2013-02-15 22:37:08.216381988 +0100 -@@ -16020,6 +16020,50 @@ initialize_breakpoint_ops (void) +--- gdb-7.6.50.20130731-cvs.orig/gdb/breakpoint.c 2013-08-02 16:29:16.065402116 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/breakpoint.c 2013-08-02 16:29:17.073403456 +0200 +@@ -15963,6 +15963,50 @@ initialize_breakpoint_ops (void) static struct cmd_list_element *enablebreaklist = NULL; void @@ -53,23 +53,23 @@ Index: gdb-7.5.50.20130215/gdb/breakpoint.c _initialize_breakpoint (void) { struct cmd_list_element *c; -Index: gdb-7.5.50.20130215/gdb/breakpoint.h +Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/breakpoint.h 2013-02-03 16:57:06.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/breakpoint.h 2013-02-15 22:37:19.025395693 +0100 -@@ -1556,4 +1556,7 @@ extern void handle_solib_event (void); +--- gdb-7.6.50.20130731-cvs.orig/gdb/breakpoint.h 2013-08-02 16:29:17.074403457 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/breakpoint.h 2013-08-02 16:29:30.221420896 +0200 +@@ -1555,4 +1555,7 @@ extern void breakpoint_free_objfile (str - extern void breakpoint_free_objfile (struct objfile *objfile); + extern char *ep_parse_optional_if_clause (char **arg); +extern void breakpoints_relocate (struct objfile *objfile, + struct section_offsets *delta); + #endif /* !defined (BREAKPOINT_H) */ -Index: gdb-7.5.50.20130215/gdb/objfiles.c +Index: gdb-7.6.50.20130731-cvs/gdb/objfiles.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/objfiles.c 2013-02-03 16:57:07.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/objfiles.c 2013-02-15 22:37:08.217381990 +0100 -@@ -831,6 +831,11 @@ objfile_relocate1 (struct objfile *objfi +--- gdb-7.6.50.20130731-cvs.orig/gdb/objfiles.c 2013-08-02 16:29:16.068402120 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/objfiles.c 2013-08-02 16:29:17.075403458 +0200 +@@ -851,6 +851,11 @@ objfile_relocate1 (struct objfile *objfi objfile->sf->sym_probe_fns->sym_relocate_probe (objfile, new_offsets, delta); diff --git a/gdb-archer.patch b/gdb-archer.patch index cfc42d5..30207a5 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -2,18 +2,37 @@ http://sourceware.org/gdb/wiki/ProjectArcher http://sourceware.org/gdb/wiki/ArcherBranchManagement GIT snapshot: -commit e72ce29f8e339fc6fffd73e9ff4b854b6f2f1452 +commit a980be3b9cc66774adfb9a25da805f65cfed4245 -branch `archer' - the merge of branches: -archer-jankratochvil-vla -archer-tromey-python +branch jankratochvil/fedora20 - the merge of branches: +jankratochvil/vla +tromey/python +diff --git a/README.archer b/README.archer +new file mode 100644 +index 0000000..21357e4 +--- /dev/null ++++ b/README.archer +@@ -0,0 +1,13 @@ ++Merge for Fedora 20: http://pkgs.fedoraproject.org/cgit/gdb.git/ ++ ++jankratochvil/vla ++tromey/python ++ ++================================================================ ++This branch originally held the Python code for gdb. It still exists ++because a small amount of code here has not yet been merged upstream. ++ ++================================================================ ++C variable length arrays / DW_FORM_block / Fortran dynamic arrays. ++implementation plan: http://sourceware.org/ml/gdb/2012-11/msg00094.html ++explanation of its merge status: http://sourceware.org/ml/gdb/2011-03/msg00021.html diff --git a/gdb/Makefile.in b/gdb/Makefile.in -index ed30db5..4356be7 100644 +index 8f4ee9e..e914dfb 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in -@@ -1313,6 +1313,12 @@ stamp-h: $(srcdir)/config.in config.status +@@ -1351,6 +1351,12 @@ stamp-h: $(srcdir)/config.in config.status CONFIG_LINKS= \ $(SHELL) config.status @@ -23,14 +42,14 @@ index ed30db5..4356be7 100644 + CONFIG_HEADERS= \ + $(SHELL) config.status + - config.status: $(srcdir)/configure configure.tgt configure.host + config.status: $(srcdir)/configure configure.tgt configure.host development.sh $(SHELL) config.status --recheck diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c -index 634e761..60276dc 100644 +index dc5f2b6..5feac49 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c -@@ -12262,6 +12262,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp, +@@ -12309,6 +12309,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp, static int ada_operator_check (struct expression *exp, int pos, @@ -38,7 +57,7 @@ index 634e761..60276dc 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data) { -@@ -12276,12 +12277,15 @@ ada_operator_check (struct expression *exp, int pos, +@@ -12323,12 +12324,15 @@ ada_operator_check (struct expression *exp, int pos, break; default: @@ -57,10 +76,10 @@ index 634e761..60276dc 100644 return 1; diff --git a/gdb/block.c b/gdb/block.c -index 2638de8..b296ae0 100644 +index 643e144..74c516b 100644 --- a/gdb/block.c +++ b/gdb/block.c -@@ -692,3 +692,21 @@ block_iter_match_next (const char *name, +@@ -693,3 +693,21 @@ block_iter_match_next (const char *name, return block_iter_match_step (iterator, name, compare, 0); } @@ -94,10 +113,10 @@ index 02e7e8b..2931401 100644 + #endif /* BLOCK_H */ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c -index fb57a57..5c03b1c 100644 +index 1e89407..1f4de33 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -15656,6 +15656,24 @@ all_tracepoints (void) +@@ -15605,6 +15605,24 @@ all_tracepoints (void) return tp_vec; } @@ -122,7 +141,7 @@ index fb57a57..5c03b1c 100644 /* This help string is used for the break, hbreak, tbreak and thbreak commands. It is defined as a macro to prevent duplication. -@@ -16639,4 +16657,7 @@ agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\ +@@ -16568,4 +16586,7 @@ agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\ automatic_hardware_breakpoints = 1; observer_attach_about_to_proceed (breakpoint_about_to_proceed); @@ -131,7 +150,7 @@ index fb57a57..5c03b1c 100644 +#endif } diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c -index ca8d89b..811ad72 100644 +index bf4564f..e8d0281 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -689,7 +689,13 @@ c_type_print_varspec_suffix (struct type *type, @@ -149,25 +168,33 @@ index ca8d89b..811ad72 100644 fprintf_filtered (stream, "%s", plongest (high_bound - low_bound + 1)); fprintf_filtered (stream, (is_vector ? ")))" : "]")); +diff --git a/gdb/cleanups.c b/gdb/cleanups.c +index 898e526..18ebaee 100644 +--- a/gdb/cleanups.c ++++ b/gdb/cleanups.c +@@ -261,9 +261,11 @@ save_final_cleanups (void) + static void + restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain) + { ++#if 0 /* archer-jankratochvil-vla */ + if (*pmy_chain != SENTINEL_CLEANUP) + internal_warning (__FILE__, __LINE__, + _("restore_my_cleanups has found a stale cleanup")); ++#endif + + *pmy_chain = chain; + } diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in -index d98ac77..e248399 100644 +index dec6207..fbb4dc0 100644 --- a/gdb/data-directory/Makefile.in +++ b/gdb/data-directory/Makefile.in -@@ -52,17 +52,28 @@ SYSCALLS_FILES = \ - PYTHON_DIR = python - PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR) - PYTHON_FILES = \ -+ gdb/FrameIterator.py \ -+ gdb/FrameWrapper.py \ - gdb/__init__.py \ -- gdb/types.py \ -- gdb/printing.py \ -- gdb/prompt.py \ -+ gdb/backtrace.py \ +@@ -61,13 +61,21 @@ PYTHON_FILES = \ + gdb/printing.py \ + gdb/prompt.py \ gdb/command/__init__.py \ -+ gdb/command/backtrace.py \ + gdb/command/ignore_errors.py \ + gdb/command/pahole.py \ + gdb/command/frame_filters.py \ gdb/command/type_printers.py \ gdb/command/pretty_printers.py \ gdb/command/prompt.py \ @@ -175,8 +202,6 @@ index d98ac77..e248399 100644 gdb/function/__init__.py \ - gdb/function/strfns.py + gdb/function/strfns.py \ -+ gdb/command/require.py \ -+ gdb/command/upto.py \ + gdb/function/__init__.py \ + gdb/function/caller_is.py \ + gdb/function/in_scope.py \ @@ -184,13 +209,13 @@ index d98ac77..e248399 100644 + gdb/prompt.py \ + gdb/types.py - FLAGS_TO_PASS = \ - "prefix=$(prefix)" \ + SYSTEM_GDBINIT_DIR = system-gdbinit + SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo -index e8ac8c5..b18ccd6 100644 +index cb393e8..1dfca22 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo -@@ -1217,6 +1217,16 @@ for remote debugging. +@@ -1221,6 +1221,16 @@ for remote debugging. Run using @var{device} for your program's standard input and output. @c FIXME: kingdon thinks there is more to -tty. Investigate. @@ -207,7 +232,7 @@ index e8ac8c5..b18ccd6 100644 @c resolve the situation of these eventually @item -tui @cindex @code{--tui} -@@ -22786,8 +22796,6 @@ containing @code{end}. For example: +@@ -23189,8 +23199,6 @@ containing @code{end}. For example: @smallexample (@value{GDBP}) python @@ -216,7 +241,7 @@ index e8ac8c5..b18ccd6 100644 >print 23 >end 23 -@@ -22801,6 +22809,14 @@ controlled using @code{set python print-stack}: if @code{full}, then +@@ -23204,6 +23212,14 @@ controlled using @code{set python print-stack}: if @code{full}, then full Python stack printing is enabled; if @code{none}, then Python stack and message printing is disabled; if @code{message}, the default, only the message component of the error is printed. @@ -231,26 +256,11 @@ index e8ac8c5..b18ccd6 100644 @end table It is also possible to execute a Python script from the @value{GDBN} -@@ -22822,6 +22838,14 @@ and thus is always available. - @cindex python api - @cindex programming in python - -+You can get quick online help for @value{GDBN}'s Python API by issuing -+the command @w{@kbd{python help (gdb)}}. -+ -+Functions and methods which have two or more optional arguments allow -+them to be specified using keyword syntax. This allows passing some -+optional arguments while skipping others. Example: -+@w{@code{gdb.some_function ('foo', bar = 1, baz = 2)}}. -+ - @cindex python stdout - @cindex python pagination - At startup, @value{GDBN} overrides Python's @code{sys.stdout} and diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo -index 4a75c26..91446fe 100644 +index 60805ad..5411012 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo -@@ -2101,6 +2101,18 @@ time, and so we attempt to handle symbols incrementally. For instance, +@@ -2146,6 +2146,18 @@ time, and so we attempt to handle symbols incrementally. For instance, we create @dfn{partial symbol tables} consisting of only selected symbols, and only expand them to full symbol tables when necessary. @@ -269,7 +279,7 @@ index 4a75c26..91446fe 100644 @section Symbol Reading @cindex symbol reading -@@ -2193,6 +2205,7 @@ symtab. Upon return, @code{pst->readin} should have been set to 1, and +@@ -2238,6 +2250,7 @@ symtab. Upon return, @code{pst->readin} should have been set to 1, and zero if there were no symbols in that part of the symbol file. @end table @@ -277,7 +287,7 @@ index 4a75c26..91446fe 100644 @section Partial Symbol Tables @value{GDBN} has three types of symbol tables: -@@ -2294,6 +2307,7 @@ and partial symbol tables behind a set of function pointers known as +@@ -2339,6 +2352,7 @@ and partial symbol tables behind a set of function pointers known as the @dfn{quick symbol functions}. These are documented in @file{symfile.h}. @@ -285,7 +295,7 @@ index 4a75c26..91446fe 100644 @section Types @unnumberedsubsec Fundamental Types (e.g., @code{FT_VOID}, @code{FT_BOOLEAN}). -@@ -2316,6 +2330,7 @@ types map to one @code{TYPE_CODE_*} type, and are distinguished by +@@ -2361,6 +2375,7 @@ types map to one @code{TYPE_CODE_*} type, and are distinguished by other members of the type struct, such as whether the type is signed or unsigned, and how many bits it uses. @@ -293,7 +303,7 @@ index 4a75c26..91446fe 100644 @unnumberedsubsec Builtin Types (e.g., @code{builtin_type_void}, @code{builtin_type_char}). These are instances of type structs that roughly correspond to -@@ -2330,6 +2345,7 @@ only one instance exists, while @file{c-lang.c} builds as many +@@ -2375,6 +2390,7 @@ only one instance exists, while @file{c-lang.c} builds as many @code{TYPE_CODE_INT} types as needed, with each one associated with some particular objfile. @@ -301,7 +311,7 @@ index 4a75c26..91446fe 100644 @section Object File Formats @cindex object file formats -@@ -2415,6 +2431,7 @@ SOM, which is a cross-language ABI). +@@ -2460,6 +2476,7 @@ SOM, which is a cross-language ABI). The SOM reader is in @file{somread.c}. @@ -309,7 +319,7 @@ index 4a75c26..91446fe 100644 @section Debugging File Formats This section describes characteristics of debugging information that -@@ -2486,6 +2503,7 @@ DWARF 3 is an improved version of DWARF 2. +@@ -2531,6 +2548,7 @@ DWARF 3 is an improved version of DWARF 2. @cindex SOM debugging info Like COFF, the SOM definition includes debugging information. @@ -317,7 +327,7 @@ index 4a75c26..91446fe 100644 @section Adding a New Symbol Reader to @value{GDBN} @cindex adding debugging info reader -@@ -2508,6 +2526,7 @@ will only ever be implemented by one object file format may be called +@@ -2553,6 +2571,7 @@ will only ever be implemented by one object file format may be called directly. This interface should be described in a file @file{bfd/lib@var{xyz}.h}, which is included by @value{GDBN}. @@ -325,7 +335,7 @@ index 4a75c26..91446fe 100644 @section Memory Management for Symbol Files Most memory associated with a loaded symbol file is stored on -@@ -2519,10 +2538,45 @@ released when the objfile is unloaded or reloaded. Therefore one +@@ -2564,10 +2583,45 @@ released when the objfile is unloaded or reloaded. Therefore one objfile must not reference symbol or type data from another objfile; they could be unloaded at different times. @@ -428,10 +438,10 @@ index e85486a..e7ac799 100644 /* The location of a value. */ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c -index 002387e..2e0e722 100644 +index 02afcdf..5a21629 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c -@@ -298,6 +298,9 @@ struct dwarf_expr_baton +@@ -306,6 +306,9 @@ struct dwarf_expr_baton { struct frame_info *frame; struct dwarf2_per_cu_data *per_cu; @@ -441,42 +451,7 @@ index 002387e..2e0e722 100644 }; /* Helper functions for dwarf2_evaluate_loc_desc. */ -@@ -361,16 +364,14 @@ static void - dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, - const gdb_byte **start, size_t *length) - { -- if (SYMBOL_LOCATION_BATON (framefunc) == NULL) -- *length = 0; -- else if (SYMBOL_COMPUTED_OPS (framefunc) == &dwarf2_loclist_funcs) -+ if (SYMBOL_COMPUTED_OPS (framefunc) == &dwarf2_loclist_funcs) - { - struct dwarf2_loclist_baton *symbaton; - - symbaton = SYMBOL_LOCATION_BATON (framefunc); - *start = dwarf2_find_location_expression (symbaton, length, pc); - } -- else -+ else if (SYMBOL_COMPUTED_OPS (framefunc) == &dwarf2_locexpr_funcs) - { - struct dwarf2_locexpr_baton *symbaton; - -@@ -383,10 +384,23 @@ dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, - else - *length = 0; - } -+ else if (SYMBOL_COMPUTED_OPS (framefunc) == &dwarf2_missing_funcs) -+ { -+ struct dwarf2_locexpr_baton *symbaton; -+ -+ symbaton = SYMBOL_LOCATION_BATON (framefunc); -+ gdb_assert (symbaton == NULL); -+ *length = 0; -+ } -+ else -+ internal_error (__FILE__, __LINE__, -+ _("Unsupported SYMBOL_COMPUTED_OPS %p for \"%s\""), -+ SYMBOL_COMPUTED_OPS (framefunc), -+ SYMBOL_PRINT_NAME (framefunc)); +@@ -421,7 +424,7 @@ dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, if (*length == 0) error (_("Could not find the frame base for \"%s\"."), @@ -485,7 +460,7 @@ index 002387e..2e0e722 100644 } /* Helper function for dwarf2_evaluate_loc_desc. Computes the CFA for -@@ -453,6 +467,85 @@ dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset) +@@ -488,6 +491,85 @@ dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset) ctx->funcs->get_frame_pc, ctx->baton); } @@ -571,7 +546,7 @@ index 002387e..2e0e722 100644 /* Callback function for dwarf2_evaluate_loc_desc. */ static struct type * -@@ -1155,10 +1248,12 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, +@@ -1202,10 +1284,12 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, saved_ctx.gdbarch = ctx->gdbarch; saved_ctx.addr_size = ctx->addr_size; @@ -584,7 +559,7 @@ index 002387e..2e0e722 100644 ctx->offset = dwarf2_per_cu_text_offset (baton_local.per_cu); ctx->baton = &baton_local; -@@ -1166,10 +1261,95 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, +@@ -1213,10 +1297,95 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, ctx->gdbarch = saved_ctx.gdbarch; ctx->addr_size = saved_ctx.addr_size; @@ -680,9 +655,9 @@ index 002387e..2e0e722 100644 /* Callback function for dwarf2_evaluate_loc_desc. Fetch the address indexed by DW_OP_GNU_addr_index. */ -@@ -2105,22 +2285,6 @@ invalid_synthetic_pointer (void) - "referenced via synthetic pointer")); - } +@@ -2177,22 +2346,6 @@ static const struct lval_funcs pieced_value_funcs = { + free_pieced_value_closure + }; -/* Virtual method table for dwarf2_evaluate_loc_desc_full below. */ - @@ -703,7 +678,7 @@ index 002387e..2e0e722 100644 /* Evaluate a location description, starting at DATA and with length SIZE, to find the current location of variable of TYPE in the context of FRAME. BYTE_OFFSET is applied after the contents are -@@ -2133,7 +2297,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2205,7 +2358,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, LONGEST byte_offset) { struct value *retval; @@ -711,7 +686,7 @@ index 002387e..2e0e722 100644 struct dwarf_expr_context *ctx; struct cleanup *old_chain, *value_chain; struct objfile *objfile = dwarf2_per_cu_objfile (per_cu); -@@ -2145,29 +2308,18 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2217,29 +2369,18 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, if (size == 0) return allocate_optimized_out_value (type); @@ -742,7 +717,7 @@ index 002387e..2e0e722 100644 retval = allocate_value (type); mark_value_bytes_unavailable (retval, 0, TYPE_LENGTH (type)); return retval; -@@ -2231,6 +2383,16 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2303,6 +2444,16 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0); do_cleanups (value_chain); @@ -759,7 +734,7 @@ index 002387e..2e0e722 100644 retval = allocate_value_lazy (type); VALUE_LVAL (retval) = lval_memory; if (in_stack_memory) -@@ -4147,8 +4309,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, +@@ -4204,8 +4355,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, dlbaton->per_cu); } @@ -769,60 +744,11 @@ index 002387e..2e0e722 100644 const struct symbol_computed_ops dwarf2_loclist_funcs = { loclist_read_variable, loclist_read_variable_at_entry, -@@ -4157,6 +4318,48 @@ const struct symbol_computed_ops dwarf2_loclist_funcs = { - loclist_tracepoint_var_ref - }; - -+static struct value * -+missing_read_variable (struct symbol *symbol, struct frame_info *frame) -+{ -+ struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol); -+ -+ gdb_assert (dlbaton == NULL); -+ error (_("Unable to resolve variable \"%s\""), SYMBOL_PRINT_NAME (symbol)); -+} -+ -+static int -+missing_read_needs_frame (struct symbol *symbol) -+{ -+ return 0; -+} -+ -+static void -+missing_describe_location (struct symbol *symbol, CORE_ADDR addr, -+ struct ui_file *stream) -+{ -+ fprintf_filtered (stream, _("a variable we are unable to resolve")); -+} -+ -+static void -+missing_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, -+ struct agent_expr *ax, struct axs_value *value) -+{ -+ struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol); -+ -+ gdb_assert (dlbaton == NULL); -+ error (_("Unable to resolve variable \"%s\""), SYMBOL_PRINT_NAME (symbol)); -+} -+ -+/* The set of location functions used with the DWARF-2 evaluator when we are -+ unable to resolve the symbols. */ -+const struct symbol_computed_ops dwarf2_missing_funcs = { -+ missing_read_variable, -+ missing_read_variable, /* read_variable_at_entry */ -+ missing_read_needs_frame, -+ missing_describe_location, -+ missing_tracepoint_var_ref -+}; -+ - /* Provide a prototype to silence -Wmissing-prototypes. */ - extern initialize_file_ftype _initialize_dwarf2loc; - diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h -index 36641b3..1394578 100644 +index 9bc8ca5..28467dc 100644 --- a/gdb/dwarf2loc.h +++ b/gdb/dwarf2loc.h -@@ -132,6 +132,15 @@ struct dwarf2_loclist_baton +@@ -137,6 +137,15 @@ struct dwarf2_loclist_baton extern const struct symbol_computed_ops dwarf2_locexpr_funcs; extern const struct symbol_computed_ops dwarf2_loclist_funcs; @@ -836,23 +762,23 @@ index 36641b3..1394578 100644 +extern int dwarf_loclist_baton_eval (struct dwarf2_loclist_baton *dllbaton, + struct type *type, CORE_ADDR *addrp); - /* Compile a DWARF location expression to an agent expression. - + extern const struct symbol_block_ops dwarf2_block_frame_base_locexpr_funcs; + extern const struct symbol_block_ops dwarf2_block_frame_base_loclist_funcs; diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index d26e7c8..9fbe61e 100644 +index d18eaed..91c476c 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -1624,6 +1624,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu, +@@ -1661,6 +1661,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu, struct dwarf2_loclist_baton *baton, - struct attribute *attr); + const struct attribute *attr); +static struct dwarf2_loclist_baton *dwarf2_attr_to_loclist_baton -+ (struct attribute *attr, struct dwarf2_cu *cu); ++ (const struct attribute *attr, struct dwarf2_cu *cu); + - static void dwarf2_symbol_mark_computed (struct attribute *attr, + static void dwarf2_symbol_mark_computed (const struct attribute *attr, struct symbol *sym, - struct dwarf2_cu *cu); -@@ -1656,6 +1659,9 @@ static void age_cached_comp_units (void); + struct dwarf2_cu *cu, +@@ -1694,6 +1697,9 @@ static void age_cached_comp_units (void); static void free_one_cached_comp_unit (struct dwarf2_per_cu_data *); @@ -862,17 +788,17 @@ index d26e7c8..9fbe61e 100644 static struct type *set_die_type (struct die_info *, struct type *, struct dwarf2_cu *); -@@ -1684,6 +1690,9 @@ static struct type *get_die_type_at_offset (sect_offset, +@@ -1722,6 +1728,9 @@ static struct type *get_die_type_at_offset (sect_offset, static struct type *get_die_type (struct die_info *die, struct dwarf2_cu *cu); +static struct dwarf2_locexpr_baton *dwarf2_attr_to_locexpr_baton -+ (struct attribute *attr, struct dwarf2_cu *cu); ++ (const struct attribute *attr, struct dwarf2_cu *cu); + static void dwarf2_release_queue (void *dummy); static void queue_comp_unit (struct dwarf2_per_cu_data *per_cu, -@@ -11702,6 +11711,29 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) +@@ -12263,6 +12272,29 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) new_symbol (die, this_type, cu); } @@ -902,7 +828,7 @@ index d26e7c8..9fbe61e 100644 /* Extract all information from a DW_TAG_array_type DIE and put it in the DIE's type field. For now, this only handles one dimensional arrays. */ -@@ -11715,7 +11747,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -12276,7 +12308,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) struct type *element_type, *range_type, *index_type; struct type **range_types = NULL; struct attribute *attr; @@ -911,7 +837,7 @@ index d26e7c8..9fbe61e 100644 struct cleanup *back_to; const char *name; -@@ -11768,17 +11800,19 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -12329,17 +12361,19 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) type = element_type; if (read_array_order (die, cu) == DW_ORD_col_major) @@ -942,7 +868,7 @@ index d26e7c8..9fbe61e 100644 /* Understand Dwarf2 support for vector types (like they occur on the PowerPC w/ AltiVec). Gcc just adds another attribute to the -@@ -12413,29 +12447,114 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -12973,29 +13007,114 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) struct gdbarch *gdbarch = get_objfile_arch (objfile); struct type *type, *range_type, *index_type, *char_type; struct attribute *attr; @@ -1070,8 +996,8 @@ index d26e7c8..9fbe61e 100644 char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -12739,7 +12858,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) - struct type *base_type; +@@ -13320,7 +13439,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) + struct type *base_type, *orig_base_type; struct type *range_type; struct attribute *attr; - LONGEST low, high; @@ -1079,14 +1005,14 @@ index d26e7c8..9fbe61e 100644 int low_default_is_valid; const char *name; LONGEST negative_mask; -@@ -12795,42 +12914,6 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -13379,42 +13498,6 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) "- DIE at 0x%x [in module %s]"), die->offset.sect_off, cu->objfile->name); - attr = dwarf2_attr (die, DW_AT_upper_bound, cu); - if (attr) - { -- if (attr_form_is_block (attr) || is_ref_attr (attr)) +- if (attr_form_is_block (attr) || attr_form_is_ref (attr)) - { - /* GCC encodes arrays with unspecified or dynamic length - with a DW_FORM_block1 attribute or a reference attribute. @@ -1122,13 +1048,13 @@ index d26e7c8..9fbe61e 100644 /* Dwarf-2 specifications explicitly allows to create subrange types without specifying a base type. In that case, the base type must be set to the type of -@@ -12869,24 +12952,163 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -13453,24 +13536,163 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) } } - negative_mask = + /* LOW_BOUND and HIGH_BOUND are set for real below. */ -+ range_type = create_range_type (NULL, base_type, 0, -1); ++ range_type = create_range_type (NULL, orig_base_type, 0, -1); + TYPE_UNSIGNED (range_type) = 0; + + negative_mask = @@ -1138,7 +1064,7 @@ index d26e7c8..9fbe61e 100644 - if (!TYPE_UNSIGNED (base_type) && (high & negative_mask)) - high |= negative_mask; -- range_type = create_range_type (NULL, base_type, low, high); +- range_type = create_range_type (NULL, orig_base_type, low, high); + /* Exclude language_ada from any TYPE_DYNAMIC constructs below. GDB Ada + supports implements the dynamic bounds in a non-DWARF way and the + existing DWARF dynamic bounds are invalid, leading to memory access @@ -1159,7 +1085,7 @@ index d26e7c8..9fbe61e 100644 + /* For setting a default if DW_AT_UPPER_BOUND would be missing. */ + low = 0; + } -+ else if (attr && is_ref_attr (attr) && cu->language != language_ada) ++ else if (attr && attr_form_is_ref (attr) && cu->language != language_ada) + { + struct die_info *target_die; + struct dwarf2_cu *target_cu = cu; @@ -1208,7 +1134,7 @@ index d26e7c8..9fbe61e 100644 - TYPE_HIGH_BOUND_UNDEFINED (range_type) = 1; + attr = dwarf2_attr (die, DW_AT_upper_bound, cu); + if (!attr || (!attr_form_is_block (attr) && !attr_form_is_constant (attr) -+ && !is_ref_attr (attr))) ++ && !attr_form_is_ref (attr))) + { + attr = dwarf2_attr (die, DW_AT_count, cu); + /* It does not hurt but it is needlessly ineffective in check_typedef. */ @@ -1227,7 +1153,7 @@ index d26e7c8..9fbe61e 100644 + dwarf2_attr_to_locexpr_baton (attr, cu); + TYPE_DYNAMIC (range_type) = 1; + } -+ else if (attr && is_ref_attr (attr) && cu->language != language_ada) ++ else if (attr && attr_form_is_ref (attr) && cu->language != language_ada) + { + struct die_info *target_die; + struct dwarf2_cu *target_cu = cu; @@ -1272,7 +1198,7 @@ index d26e7c8..9fbe61e 100644 + dwarf2_attr_to_locexpr_baton (attr, cu); + TYPE_DYNAMIC (range_type) = 1; + } -+ else if (attr && is_ref_attr (attr) && cu->language != language_ada) ++ else if (attr && attr_form_is_ref (attr) && cu->language != language_ada) + { + struct die_info *target_die; + struct dwarf2_cu *target_cu = cu; @@ -1300,7 +1226,7 @@ index d26e7c8..9fbe61e 100644 name = dwarf2_name (die, cu); if (name) -@@ -15746,10 +15968,12 @@ var_decode_location (struct attribute *attr, struct symbol *sym, +@@ -16380,11 +16602,14 @@ var_decode_location (struct attribute *attr, struct symbol *sym, (i.e. when the value of a register or memory location is referenced, or a thread-local block, etc.). Then again, it might not be worthwhile. I'm assuming that it isn't unless performance @@ -1309,22 +1235,15 @@ index d26e7c8..9fbe61e 100644 + + SYMBOL_CLASS may get overriden by dwarf2_symbol_mark_computed. */ -- dwarf2_symbol_mark_computed (attr, sym, cu); - SYMBOL_CLASS (sym) = LOC_COMPUTED; -+ dwarf2_symbol_mark_computed (attr, sym, cu); + dwarf2_symbol_mark_computed (attr, sym, cu, 0); - if (SYMBOL_COMPUTED_OPS (sym) == &dwarf2_loclist_funcs) +- if (SYMBOL_COMPUTED_OPS (sym)->location_has_loclist) ++ if (SYMBOL_COMPUTED_OPS (sym) != NULL ++ && SYMBOL_COMPUTED_OPS (sym)->location_has_loclist) cu->has_loclist = 1; -@@ -15790,6 +16014,8 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu, - else - sym = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symbol); - OBJSTAT (objfile, n_syms++); -+ /* Some methods are called w/o checking SYMBOL_COMPUTED_OPS validity. */ -+ SYMBOL_COMPUTED_OPS (sym) = &dwarf2_missing_funcs; + } - /* Cache this symbol's name and the name's demangled form (if any). */ - SYMBOL_SET_LANGUAGE (sym, cu->language); -@@ -16599,6 +16825,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu) +@@ -17225,6 +17450,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu) break; } @@ -1334,23 +1253,24 @@ index d26e7c8..9fbe61e 100644 return this_type; } -@@ -19043,62 +19272,100 @@ fill_in_loclist_baton (struct dwarf2_cu *cu, +@@ -19910,66 +20138,109 @@ fill_in_loclist_baton (struct dwarf2_cu *cu, baton->from_dwo = cu->dwo_unit != NULL; } -static void --dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, -- struct dwarf2_cu *cu) +-dwarf2_symbol_mark_computed (const struct attribute *attr, struct symbol *sym, +- struct dwarf2_cu *cu, int is_block) +/* Convert DW_BLOCK into struct dwarf2_locexpr_baton. ATTR must be a DW_BLOCK + attribute type. */ + +static struct dwarf2_locexpr_baton * -+dwarf2_attr_to_locexpr_baton (struct attribute *attr, struct dwarf2_cu *cu) ++dwarf2_attr_to_locexpr_baton (const struct attribute *attr, ++ struct dwarf2_cu *cu) +{ + struct objfile *objfile = dwarf2_per_objfile->objfile; + struct dwarf2_locexpr_baton *baton; + -+ gdb_assert (attr_form_is_block (attr)); ++ gdb_assert (attr == NULL || attr_form_is_block (attr)); + + baton = obstack_alloc (&objfile->objfile_obstack, sizeof (*baton)); + baton->per_cu = cu->per_cu; @@ -1361,15 +1281,24 @@ index d26e7c8..9fbe61e 100644 + info_buffer for SYM's objfile; right now we never release + that buffer, but when we do clean up properly this may + need to change. */ -+ baton->size = DW_BLOCK (attr)->size; -+ baton->data = DW_BLOCK (attr)->data; ++ if (attr != NULL) ++ { ++ baton->size = DW_BLOCK (attr)->size; ++ baton->data = DW_BLOCK (attr)->data; ++ } ++ else ++ { ++ baton->size = 0; ++ baton->data = NULL; ++ } + gdb_assert (baton->size == 0 || baton->data != NULL); + + return baton; +} + +static struct dwarf2_loclist_baton * -+dwarf2_attr_to_loclist_baton (struct attribute *attr, struct dwarf2_cu *cu) ++dwarf2_attr_to_loclist_baton (const struct attribute *attr, ++ struct dwarf2_cu *cu) { struct objfile *objfile = dwarf2_per_objfile->objfile; struct dwarf2_section_info *section = cu_debug_loc_section (cu); @@ -1416,35 +1345,36 @@ index d26e7c8..9fbe61e 100644 +/* SYM may get its SYMBOL_CLASS overriden on invalid ATTR content. */ + +static void -+dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, -+ struct dwarf2_cu *cu) ++dwarf2_symbol_mark_computed (const struct attribute *attr, struct symbol *sym, ++ struct dwarf2_cu *cu, int is_block) +{ + struct dwarf2_loclist_baton *loclist_baton; + loclist_baton = dwarf2_attr_to_loclist_baton (attr, cu); + if (loclist_baton) + { - SYMBOL_COMPUTED_OPS (sym) = &dwarf2_loclist_funcs; + SYMBOL_ACLASS_INDEX (sym) = (is_block + ? dwarf2_loclist_block_index + : dwarf2_loclist_index); - SYMBOL_LOCATION_BATON (sym) = baton; + SYMBOL_LOCATION_BATON (sym) = loclist_baton; + } + else if (attr_form_is_block (attr)) + { -+ SYMBOL_COMPUTED_OPS (sym) = &dwarf2_locexpr_funcs; ++ SYMBOL_ACLASS_INDEX (sym) = (is_block ++ ? dwarf2_locexpr_block_index ++ : dwarf2_locexpr_index); + SYMBOL_LOCATION_BATON (sym) = dwarf2_attr_to_locexpr_baton (attr, cu); } else { - struct dwarf2_locexpr_baton *baton; -+ dwarf2_invalid_attrib_class_complaint ("location description", -+ SYMBOL_NATURAL_NAME (sym)); - +- - baton = obstack_alloc (&objfile->objfile_obstack, - sizeof (struct dwarf2_locexpr_baton)); - baton->per_cu = cu->per_cu; - gdb_assert (baton->per_cu); -+ /* Some methods are called w/o checking SYMBOL_COMPUTED_OPS validity. */ - +- - if (attr_form_is_block (attr)) - { - /* Note that we're just copying the block's data pointer @@ -1461,19 +1391,18 @@ index d26e7c8..9fbe61e 100644 - SYMBOL_NATURAL_NAME (sym)); - baton->size = 0; - } -+ SYMBOL_COMPUTED_OPS (sym) = &dwarf2_missing_funcs; -+ SYMBOL_LOCATION_BATON (sym) = NULL; ++ dwarf2_invalid_attrib_class_complaint ("location description", ++ SYMBOL_NATURAL_NAME (sym)); -- SYMBOL_COMPUTED_OPS (sym) = &dwarf2_locexpr_funcs; + SYMBOL_ACLASS_INDEX (sym) = (is_block + ? dwarf2_locexpr_block_index + : dwarf2_locexpr_index); - SYMBOL_LOCATION_BATON (sym) = baton; -+ /* For functions a missing DW_AT_frame_base does not optimize out the -+ whole function definition, only its frame base resolving. */ -+ if (attr->name == DW_AT_location) -+ SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT; ++ SYMBOL_LOCATION_BATON (sym) = dwarf2_attr_to_locexpr_baton (NULL, cu); } } -@@ -19469,6 +19736,25 @@ per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs) +@@ -20342,6 +20613,25 @@ per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs) && ofs_lhs->offset.sect_off == ofs_rhs->offset.sect_off); } @@ -1499,7 +1428,7 @@ index d26e7c8..9fbe61e 100644 /* Set the type associated with DIE to TYPE. Save it in CU's hash table if necessary. For convenience, return TYPE. -@@ -19493,6 +19779,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -20366,6 +20656,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) struct dwarf2_per_cu_offset_and_type **slot, ofs; struct objfile *objfile = cu->objfile; @@ -1509,7 +1438,7 @@ index d26e7c8..9fbe61e 100644 initialized (if not already set). There are a few types where we should not be doing so, because the type-specific area is diff --git a/gdb/eval.c b/gdb/eval.c -index d7f80e2..8eca4c8 100644 +index 539489f..13ba1a9 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -41,6 +41,7 @@ @@ -1520,7 +1449,7 @@ index d7f80e2..8eca4c8 100644 #include "gdb_assert.h" -@@ -393,27 +394,217 @@ init_array_element (struct value *array, struct value *element, +@@ -393,27 +394,221 @@ init_array_element (struct value *array, struct value *element, } static struct value * @@ -1640,11 +1569,11 @@ index d7f80e2..8eca4c8 100644 + else + { + struct value *val; -+ -+ index->kind = SUBSCRIPT_NUMBER; - if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT) - high_bound = TYPE_HIGH_BOUND (range); ++ index->kind = SUBSCRIPT_NUMBER; ++ + /* Evaluate each subscript; it must be a legal integer in F77. */ + val = evaluate_subexp_with_coercion (exp, pos, noside); + index->number = value_as_long (val); @@ -1738,23 +1667,27 @@ index d7f80e2..8eca4c8 100644 + if (VALUE_LVAL (array) != lval_internalvar) + set_value_address (array, value_byte_address + value_byte_offset); + -+ if (!value_lazy (saved_array)) ++ if (!value_lazy (saved_array) ++ && TYPE_LENGTH (value_type (saved_array)) > 0 ++ && TYPE_LENGTH (new_array_type) > 0) + { ++ gdb_assert (TYPE_LENGTH (new_array_type) ++ <= TYPE_LENGTH (value_type (saved_array))); + allocate_value_contents (array); + set_value_lazy (array, 0); - -- return value_slice (array, low_bound, high_bound - low_bound + 1); ++ + memcpy (value_contents_writeable (array), + value_contents (saved_array) + value_byte_offset, + TYPE_LENGTH (new_array_type)); + } -+ + +- return value_slice (array, low_bound, high_bound - low_bound + 1); + do_cleanups (old_chain); + return array; } -@@ -710,6 +901,7 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -710,6 +905,7 @@ evaluate_subexp_standard (struct type *expect_type, int save_pos1; struct symbol *function = NULL; char *function_name = NULL; @@ -1762,7 +1695,7 @@ index d7f80e2..8eca4c8 100644 pc = (*pos)++; op = exp->elts[pc].opcode; -@@ -1776,6 +1968,8 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1776,6 +1972,8 @@ evaluate_subexp_standard (struct type *expect_type, /* First determine the type code we are dealing with. */ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); @@ -1771,7 +1704,7 @@ index d7f80e2..8eca4c8 100644 type = check_typedef (value_type (arg1)); code = TYPE_CODE (type); -@@ -1796,23 +1990,13 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1796,23 +1994,13 @@ evaluate_subexp_standard (struct type *expect_type, code = TYPE_CODE (type); } } @@ -1797,7 +1730,7 @@ index d7f80e2..8eca4c8 100644 case TYPE_CODE_PTR: case TYPE_CODE_FUNC: -@@ -2239,49 +2423,6 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2225,49 +2413,6 @@ evaluate_subexp_standard (struct type *expect_type, } return (arg1); @@ -1847,7 +1780,7 @@ index d7f80e2..8eca4c8 100644 case BINOP_LOGICAL_AND: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); if (noside == EVAL_SKIP) -@@ -2513,15 +2654,23 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2499,15 +2644,23 @@ evaluate_subexp_standard (struct type *expect_type, if (expect_type && TYPE_CODE (expect_type) == TYPE_CODE_PTR) expect_type = TYPE_TARGET_TYPE (check_typedef (expect_type)); arg1 = evaluate_subexp (expect_type, exp, pos, noside); @@ -1873,7 +1806,7 @@ index d7f80e2..8eca4c8 100644 else if (noside == EVAL_AVOID_SIDE_EFFECTS) { type = check_typedef (value_type (arg1)); -@@ -2530,12 +2679,18 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2516,12 +2669,18 @@ evaluate_subexp_standard (struct type *expect_type, /* In C you can dereference an array to get the 1st elt. */ || TYPE_CODE (type) == TYPE_CODE_ARRAY ) @@ -1897,7 +1830,7 @@ index d7f80e2..8eca4c8 100644 else error (_("Attempt to take contents of a non-pointer value.")); } -@@ -2545,9 +2700,14 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2531,9 +2690,14 @@ evaluate_subexp_standard (struct type *expect_type, do. "long long" variables are rare enough that BUILTIN_TYPE_LONGEST would seem to be a mistake. */ if (TYPE_CODE (type) == TYPE_CODE_INT) @@ -1915,7 +1848,7 @@ index d7f80e2..8eca4c8 100644 case UNOP_ADDR: /* C++: check for and handle pointer to members. */ -@@ -2960,7 +3120,7 @@ evaluate_subexp_with_coercion (struct expression *exp, +@@ -2963,7 +3127,7 @@ evaluate_subexp_with_coercion (struct expression *exp, { enum exp_opcode op; int pc; @@ -1924,7 +1857,7 @@ index d7f80e2..8eca4c8 100644 struct symbol *var; struct type *type; -@@ -2971,13 +3131,18 @@ evaluate_subexp_with_coercion (struct expression *exp, +@@ -2974,13 +3138,18 @@ evaluate_subexp_with_coercion (struct expression *exp, { case OP_VAR_VALUE: var = exp->elts[pc + 2].symbol; @@ -1944,7 +1877,7 @@ index d7f80e2..8eca4c8 100644 return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)), val); } -@@ -3035,9 +3200,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos) +@@ -3038,9 +3207,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos) case OP_VAR_VALUE: (*pos) += 4; @@ -1961,7 +1894,7 @@ index d7f80e2..8eca4c8 100644 default: val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS); -@@ -3068,18 +3237,25 @@ parse_and_eval_type (char *p, int length) +@@ -3071,18 +3244,25 @@ parse_and_eval_type (char *p, int length) int calc_f77_array_dims (struct type *array_type) { @@ -2235,7 +2168,7 @@ index d01d6ec..8a21149 100644 switch (TYPE_CODE (type)) { diff --git a/gdb/findvar.c b/gdb/findvar.c -index fb66e0f..45684f0 100644 +index f586ce2..8fd5a08 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -34,6 +34,7 @@ @@ -2246,7 +2179,7 @@ index fb66e0f..45684f0 100644 /* Basic byte-swapping routines. All 'extract' functions return a host-format integer from a target-format integer at ADDR which is -@@ -437,7 +438,10 @@ minsym_lookup_iterator_cb (struct objfile *objfile, void *cb_data) +@@ -443,7 +444,10 @@ minsym_lookup_iterator_cb (struct objfile *objfile, void *cb_data) } /* A default implementation for the "la_read_var_value" hook in @@ -2258,7 +2191,7 @@ index fb66e0f..45684f0 100644 struct value * default_read_var_value (struct symbol *var, struct frame_info *frame) -@@ -446,13 +450,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -452,13 +456,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) struct type *type = SYMBOL_TYPE (var); CORE_ADDR addr; @@ -2272,15 +2205,15 @@ index fb66e0f..45684f0 100644 if (symbol_read_needs_frame (var)) gdb_assert (frame); -@@ -492,7 +489,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -502,7 +499,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) return v; case LOC_STATIC: - v = allocate_value_lazy (type); if (overlay_debugging) addr = symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (var), - SYMBOL_OBJ_SECTION (var)); -@@ -506,7 +502,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) + SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (var), +@@ -517,7 +513,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) error (_("Unknown argument list address for `%s'."), SYMBOL_PRINT_NAME (var)); addr += SYMBOL_VALUE (var); @@ -2288,7 +2221,7 @@ index fb66e0f..45684f0 100644 break; case LOC_REF_ARG: -@@ -521,14 +516,12 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -532,14 +527,12 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) argref += SYMBOL_VALUE (var); ref = value_at (lookup_pointer_type (type), argref); addr = value_as_address (ref); @@ -2303,15 +2236,15 @@ index fb66e0f..45684f0 100644 break; case LOC_TYPEDEF: -@@ -537,7 +530,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -548,7 +541,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) break; case LOC_BLOCK: - v = allocate_value_lazy (type); if (overlay_debugging) addr = symbol_overlayed_address - (BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_OBJ_SECTION (var)); -@@ -563,7 +555,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) + (BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (var), +@@ -575,7 +567,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) SYMBOL_PRINT_NAME (var)); addr = value_as_address (regval); @@ -2319,7 +2252,7 @@ index fb66e0f..45684f0 100644 } else { -@@ -612,7 +603,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -620,7 +611,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) if (obj_section && (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0) addr = target_translate_tls_address (obj_section->objfile, addr); @@ -2327,7 +2260,7 @@ index fb66e0f..45684f0 100644 } break; -@@ -625,6 +615,10 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -633,6 +623,10 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) break; } @@ -2338,7 +2271,7 @@ index fb66e0f..45684f0 100644 VALUE_LVAL (v) = lval_memory; set_value_address (v, addr); return v; -@@ -729,10 +723,11 @@ struct value * +@@ -737,10 +731,11 @@ struct value * value_from_register (struct type *type, int regnum, struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2352,7 +2285,7 @@ index fb66e0f..45684f0 100644 { int optim, unavail, ok; -@@ -747,7 +742,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame) +@@ -755,7 +750,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame) VALUE_LVAL (v) = lval_register; VALUE_FRAME_ID (v) = get_frame_id (frame); VALUE_REGNUM (v) = regnum; @@ -2362,7 +2295,7 @@ index fb66e0f..45684f0 100644 &unavail); diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in -index ffb7f53..a2e7e94 100644 +index 05a38b2..9801fdf 100644 --- a/gdb/gdb-gdb.gdb.in +++ b/gdb/gdb-gdb.gdb.in @@ -1,5 +1,15 @@ @@ -2378,24 +2311,24 @@ index ffb7f53..a2e7e94 100644 +end +source @srcdir@/python/lib/gdb/__init__.py + - set complaints 1 + if !$gdb_init_done + set variable $gdb_init_done = 1 - b internal_error diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c -index 12730d7..5a614e0 100644 +index d19c593..3995913 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -37,6 +37,9 @@ - #include "gdb_assert.h" +@@ -38,6 +38,9 @@ #include "hashtab.h" #include "exceptions.h" + #include "cp-support.h" +#include "observer.h" +#include "dwarf2expr.h" +#include "dwarf2loc.h" /* Initialize BADNESS constants. */ -@@ -185,6 +188,43 @@ alloc_type (struct objfile *objfile) +@@ -186,6 +189,43 @@ alloc_type (struct objfile *objfile) return type; } @@ -2439,7 +2372,7 @@ index 12730d7..5a614e0 100644 /* Allocate a new GDBARCH-associated type structure and fill it with some defaults. Space for the type structure is allocated on the heap. */ -@@ -310,7 +350,7 @@ make_pointer_type (struct type *type, struct type **typeptr) +@@ -311,7 +351,7 @@ make_pointer_type (struct type *type, struct type **typeptr) if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */ { @@ -2448,7 +2381,7 @@ index 12730d7..5a614e0 100644 if (typeptr) *typeptr = ntype; } -@@ -383,7 +423,7 @@ make_reference_type (struct type *type, struct type **typeptr) +@@ -384,7 +424,7 @@ make_reference_type (struct type *type, struct type **typeptr) if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */ { @@ -2457,7 +2390,7 @@ index 12730d7..5a614e0 100644 if (typeptr) *typeptr = ntype; } -@@ -806,6 +846,7 @@ create_range_type (struct type *result_type, struct type *index_type, +@@ -807,6 +847,7 @@ create_range_type (struct type *result_type, struct type *index_type, TYPE_ZALLOC (result_type, sizeof (struct range_bounds)); TYPE_LOW_BOUND (result_type) = low_bound; TYPE_HIGH_BOUND (result_type) = high_bound; @@ -2465,7 +2398,7 @@ index 12730d7..5a614e0 100644 if (low_bound >= 0) TYPE_UNSIGNED (result_type) = 1; -@@ -926,6 +967,10 @@ get_array_bounds (struct type *type, LONGEST *low_bound, LONGEST *high_bound) +@@ -927,6 +968,10 @@ get_array_bounds (struct type *type, LONGEST *low_bound, LONGEST *high_bound) return 1; } @@ -2476,7 +2409,7 @@ index 12730d7..5a614e0 100644 /* Create an array type using either a blank type supplied in RESULT_TYPE, or creating a new type, inheriting the objfile from RANGE_TYPE. -@@ -949,26 +994,31 @@ create_array_type (struct type *result_type, +@@ -950,26 +995,31 @@ create_array_type (struct type *result_type, TYPE_CODE (result_type) = TYPE_CODE_ARRAY; TYPE_TARGET_TYPE (result_type) = element_type; @@ -2521,7 +2454,7 @@ index 12730d7..5a614e0 100644 return result_type; } -@@ -1489,6 +1539,105 @@ stub_noname_complaint (void) +@@ -1490,6 +1540,105 @@ stub_noname_complaint (void) complaint (&symfile_complaints, _("stub type has NULL name")); } @@ -2627,7 +2560,7 @@ index 12730d7..5a614e0 100644 /* Find the real type of TYPE. This function returns the real type, after removing all layers of typedefs, and completing opaque or stub types. Completion changes the TYPE argument, but stripping of -@@ -1655,52 +1804,37 @@ check_typedef (struct type *type) +@@ -1656,52 +1805,37 @@ check_typedef (struct type *type) } } @@ -2701,7 +2634,7 @@ index 12730d7..5a614e0 100644 TYPE_TARGET_STUB (type) = 0; } else if (TYPE_CODE (type) == TYPE_CODE_RANGE) -@@ -1708,6 +1842,7 @@ check_typedef (struct type *type) +@@ -1709,6 +1843,7 @@ check_typedef (struct type *type) TYPE_LENGTH (type) = TYPE_LENGTH (target_type); TYPE_TARGET_STUB (type) = 0; } @@ -2709,7 +2642,7 @@ index 12730d7..5a614e0 100644 } type = make_qualified_type (type, instance_flags, NULL); -@@ -3384,33 +3519,42 @@ type_pair_eq (const void *item_lhs, const void *item_rhs) +@@ -3404,33 +3539,42 @@ type_pair_eq (const void *item_lhs, const void *item_rhs) } /* Allocate the hash table used by copy_type_recursive to walk @@ -2767,7 +2700,7 @@ index 12730d7..5a614e0 100644 return type; /* This type shouldn't be pointing to any types in other objfiles; -@@ -3425,9 +3569,10 @@ copy_type_recursive (struct objfile *objfile, +@@ -3445,9 +3589,10 @@ copy_type_recursive (struct objfile *objfile, new_type = alloc_type_arch (get_type_arch (type)); /* We must add the new type to the hash table immediately, in case @@ -2781,7 +2714,7 @@ index 12730d7..5a614e0 100644 stored->old = type; stored->new = new_type; *slot = stored; -@@ -3438,6 +3583,21 @@ copy_type_recursive (struct objfile *objfile, +@@ -3458,6 +3603,21 @@ copy_type_recursive (struct objfile *objfile, TYPE_OBJFILE_OWNED (new_type) = 0; TYPE_OWNER (new_type).gdbarch = get_type_arch (type); @@ -2803,7 +2736,7 @@ index 12730d7..5a614e0 100644 if (TYPE_NAME (type)) TYPE_NAME (new_type) = xstrdup (TYPE_NAME (type)); if (TYPE_TAG_NAME (type)) -@@ -3446,12 +3606,48 @@ copy_type_recursive (struct objfile *objfile, +@@ -3466,12 +3626,48 @@ copy_type_recursive (struct objfile *objfile, TYPE_INSTANCE_FLAGS (new_type) = TYPE_INSTANCE_FLAGS (type); TYPE_LENGTH (new_type) = TYPE_LENGTH (type); @@ -2852,7 +2785,7 @@ index 12730d7..5a614e0 100644 TYPE_FIELDS (new_type) = XCALLOC (nfields, struct field); for (i = 0; i < nfields; i++) { -@@ -3460,8 +3656,8 @@ copy_type_recursive (struct objfile *objfile, +@@ -3480,8 +3676,8 @@ copy_type_recursive (struct objfile *objfile, TYPE_FIELD_BITSIZE (new_type, i) = TYPE_FIELD_BITSIZE (type, i); if (TYPE_FIELD_TYPE (type, i)) TYPE_FIELD_TYPE (new_type, i) @@ -2863,7 +2796,7 @@ index 12730d7..5a614e0 100644 if (TYPE_FIELD_NAME (type, i)) TYPE_FIELD_NAME (new_type, i) = xstrdup (TYPE_FIELD_NAME (type, i)); -@@ -3492,24 +3688,184 @@ copy_type_recursive (struct objfile *objfile, +@@ -3512,24 +3708,184 @@ copy_type_recursive (struct objfile *objfile, } } @@ -3055,7 +2988,7 @@ index 12730d7..5a614e0 100644 /* Maybe copy the type_specific bits. NOTE drow/2005-12-09: We do not copy the C++-specific bits like -@@ -3526,6 +3882,17 @@ copy_type_recursive (struct objfile *objfile, +@@ -3546,6 +3902,17 @@ copy_type_recursive (struct objfile *objfile, return new_type; } @@ -3073,7 +3006,7 @@ index 12730d7..5a614e0 100644 /* Make a copy of the given TYPE, except that the pointer & reference types are not preserved. -@@ -4090,6 +4457,13 @@ void +@@ -4110,6 +4477,13 @@ void _initialize_gdbtypes (void) { gdbtypes_data = gdbarch_data_register_post_init (gdbtypes_post_init); @@ -3320,7 +3253,7 @@ index 0ca7a87..c6029dc 100644 extern struct type *copy_type (const struct type *type); diff --git a/gdb/main.c b/gdb/main.c -index 06f3feb..141a01b 100644 +index 677f587..30b849e 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -37,6 +37,7 @@ @@ -3331,7 +3264,7 @@ index 06f3feb..141a01b 100644 #include "source.h" #include "cli/cli-cmds.h" #include "python/python.h" -@@ -314,6 +315,8 @@ captured_main (void *data) +@@ -318,6 +319,8 @@ captured_main (void *data) char *cdarg = NULL; char *ttyarg = NULL; @@ -3340,7 +3273,7 @@ index 06f3feb..141a01b 100644 /* These are static so that we can take their address in an initializer. */ static int print_help; -@@ -504,10 +507,14 @@ captured_main (void *data) +@@ -517,10 +520,14 @@ captured_main (void *data) {"args", no_argument, &set_args, 1}, {"l", required_argument, 0, 'l'}, {"return-child-result", no_argument, &return_child_result, 1}, @@ -3356,7 +3289,7 @@ index 06f3feb..141a01b 100644 { int option_index; -@@ -525,6 +532,9 @@ captured_main (void *data) +@@ -538,6 +545,9 @@ captured_main (void *data) case 0: /* Long option that just sets a flag. */ break; @@ -3366,7 +3299,7 @@ index 06f3feb..141a01b 100644 case OPT_SE: symarg = optarg; execarg = optarg; -@@ -733,7 +743,31 @@ captured_main (void *data) +@@ -747,7 +757,31 @@ captured_main (void *data) /* Now that gdb_init has created the initial inferior, we're in position to set args for that inferior. */ @@ -3399,7 +3332,7 @@ index 06f3feb..141a01b 100644 { /* The remaining options are the command-line options for the inferior. The first one is the sym/exec file, and the rest -@@ -1013,7 +1047,8 @@ captured_main (void *data) +@@ -1037,7 +1071,8 @@ captured_main (void *data) /* Read in the old history after all the command files have been read. */ @@ -3409,7 +3342,7 @@ index 06f3feb..141a01b 100644 if (batch_flag) { -@@ -1024,13 +1059,25 @@ captured_main (void *data) +@@ -1048,13 +1083,25 @@ captured_main (void *data) /* Show time and/or space usage. */ do_cleanups (pre_stat_chain); @@ -3441,37 +3374,35 @@ index 06f3feb..141a01b 100644 } /* No exit -- exit is through quit_command. */ } -@@ -1062,7 +1109,12 @@ print_gdb_help (struct ui_file *stream) +@@ -1089,6 +1136,12 @@ print_gdb_help (struct ui_file *stream) fputs_unfiltered (_("\ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\ -- gdb [options] --args executable-file [inferior-arguments ...]\n\n\ + gdb [options] --args executable-file [inferior-arguments ...]\n"), stream); +#if HAVE_PYTHON + fputs_unfiltered (_("\ + gdb [options] [--python|-P] script-file [script-arguments ...]\n"), stream); +#endif + fputs_unfiltered (_("\n\ - Options:\n\n\ + gdb [options] --args executable-file [inferior-arguments ...]\n\n\ "), stream); fputs_unfiltered (_("\ -@@ -1104,7 +1156,13 @@ Options:\n\n\ - fputs_unfiltered (_(" files.\n\ - --nh Do not read "), stream); - fputs_unfiltered (gdbinit, stream); -- fputs_unfiltered (_(" file from home directory.\n\ -+ fputs_unfiltered (_(" file from home directory.\n"), stream); +@@ -1134,6 +1187,13 @@ Output and user interface control:\n\n\ + fputs_unfiltered (_("\ + --dbx DBX compatibility mode.\n\ + --xdb XDB compatibility mode.\n\ ++"), stream); +#if HAVE_PYTHON + fputs_unfiltered (_("\ + --python, -P Following argument is Python script file; remaining\n\ + arguments are passed to script.\n"), stream); +#endif + fputs_unfiltered (_("\ - --quiet Do not print version number on startup.\n\ - --readnow Fully read symbol files on first access.\n\ + --quiet Do not print version number on startup.\n\n\ "), stream); + fputs_unfiltered (_("\ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c -index bcc055e..8a9d645 100644 +index 05d4c6f..acec2a2 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -38,6 +38,7 @@ @@ -3534,7 +3465,7 @@ index bcc055e..8a9d645 100644 return; } -@@ -270,6 +295,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, +@@ -271,6 +296,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, } } @@ -3542,7 +3473,7 @@ index bcc055e..8a9d645 100644 return; case TYPE_CODE_REF: -@@ -410,6 +436,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, +@@ -411,6 +437,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, TYPE_CODE (type)); } gdb_flush (stream); @@ -3551,10 +3482,10 @@ index bcc055e..8a9d645 100644 void diff --git a/gdb/parse.c b/gdb/parse.c -index 09c378b..93c434f 100644 +index 13699a8..7b930c1 100644 --- a/gdb/parse.c +++ b/gdb/parse.c -@@ -1757,6 +1757,7 @@ parser_fprintf (FILE *x, const char *y, ...) +@@ -1780,6 +1780,7 @@ parser_fprintf (FILE *x, const char *y, ...) int operator_check_standard (struct expression *exp, int pos, @@ -3562,7 +3493,7 @@ index 09c378b..93c434f 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data) -@@ -1796,7 +1797,7 @@ operator_check_standard (struct expression *exp, int pos, +@@ -1819,7 +1820,7 @@ operator_check_standard (struct expression *exp, int pos, struct type *type = elts[pos + 2 + arg].type; struct objfile *objfile = TYPE_OBJFILE (type); @@ -3571,7 +3502,7 @@ index 09c378b..93c434f 100644 return 1; } } -@@ -1814,7 +1815,8 @@ operator_check_standard (struct expression *exp, int pos, +@@ -1837,7 +1838,8 @@ operator_check_standard (struct expression *exp, int pos, /* Check objfile where the variable itself is placed. SYMBOL_OBJ_SECTION (symbol) may be NULL. */ @@ -3581,7 +3512,7 @@ index 09c378b..93c434f 100644 return 1; /* Check objfile where is placed the code touching the variable. */ -@@ -1827,24 +1829,27 @@ operator_check_standard (struct expression *exp, int pos, +@@ -1850,24 +1852,27 @@ operator_check_standard (struct expression *exp, int pos, /* Invoke callbacks for TYPE and OBJFILE if they were set as non-NULL. */ @@ -3617,7 +3548,7 @@ index 09c378b..93c434f 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data) { -@@ -1859,7 +1864,9 @@ exp_iterate (struct expression *exp, +@@ -1882,7 +1887,9 @@ exp_iterate (struct expression *exp, pos = endpos - oplen; if (exp->language_defn->la_exp_desc->operator_check (exp, pos, @@ -3628,7 +3559,7 @@ index 09c378b..93c434f 100644 return 1; endpos = pos; -@@ -1890,8 +1897,29 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile) +@@ -1913,8 +1920,29 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile) { gdb_assert (objfile->separate_debug_objfile_backlink == NULL); @@ -3660,10 +3591,10 @@ index 09c378b..93c434f 100644 void _initialize_parse (void) diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h -index 8d25311..233ed46 100644 +index 5fbae0d..1fdad46 100644 --- a/gdb/parser-defs.h +++ b/gdb/parser-defs.h -@@ -244,6 +244,8 @@ extern void operator_length_standard (const struct expression *, int, int *, +@@ -245,6 +245,8 @@ extern void operator_length_standard (const struct expression *, int, int *, int *); extern int operator_check_standard (struct expression *exp, int pos, @@ -3672,7 +3603,7 @@ index 8d25311..233ed46 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data); -@@ -330,6 +332,7 @@ struct exp_descriptor +@@ -331,6 +333,7 @@ struct exp_descriptor value should be immediately returned to the caller. Otherwise zero should be returned. */ int (*operator_check) (struct expression *exp, int pos, @@ -3681,7 +3612,7 @@ index 8d25311..233ed46 100644 void *data), void *data); diff --git a/gdb/printcmd.c b/gdb/printcmd.c -index 155703d..545a615 100644 +index 1cc248d..eef0c66 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -51,6 +51,7 @@ @@ -3692,7 +3623,7 @@ index 155703d..545a615 100644 #ifdef TUI #include "tui/tui.h" /* For tui_active et al. */ -@@ -967,6 +968,11 @@ print_command_1 (char *exp, int voidprint) +@@ -980,6 +981,11 @@ print_command_1 (const char *exp, int voidprint) else val = access_value_history (0); @@ -3704,7 +3635,7 @@ index 155703d..545a615 100644 if (voidprint || (val && value_type (val) && TYPE_CODE (value_type (val)) != TYPE_CODE_VOID)) { -@@ -1039,6 +1045,9 @@ output_command (char *exp, int from_tty) +@@ -1061,6 +1067,9 @@ output_command_const (const char *exp, int from_tty) val = evaluate_expression (expr); @@ -3714,7 +3645,7 @@ index 155703d..545a615 100644 annotate_value_begin (value_type (val)); get_formatted_print_options (&opts, format); -@@ -1467,6 +1476,24 @@ x_command (char *exp, int from_tty) +@@ -1495,6 +1504,24 @@ x_command (char *exp, int from_tty) set_internalvar (lookup_internalvar ("__"), last_examine_value); } } @@ -3739,7 +3670,7 @@ index 155703d..545a615 100644 /* Add an expression to the auto-display chain. -@@ -1964,6 +1991,10 @@ print_variable_and_value (const char *name, struct symbol *var, +@@ -1993,6 +2020,10 @@ print_variable_and_value (const char *name, struct symbol *var, struct value_print_options opts; val = read_var_value (var, frame); @@ -3750,7 +3681,7 @@ index 155703d..545a615 100644 get_user_print_options (&opts); opts.deref_ref = 1; common_val_print (val, stream, indent, &opts, current_language); -@@ -2613,4 +2644,8 @@ Show printing of source filename and line number with ."), NULL, +@@ -2648,4 +2679,8 @@ Show printing of source filename and line number with ."), NULL, add_com ("eval", no_class, eval_command, _("\ Convert \"printf format string\", arg1, arg2, arg3, ..., argn to\n\ a command line, and call it.")); @@ -3759,323 +3690,6 @@ index 155703d..545a615 100644 + observer_attach_mark_used (print_types_mark_used); +#endif } -diff --git a/gdb/python/lib/gdb/FrameIterator.py b/gdb/python/lib/gdb/FrameIterator.py -new file mode 100644 -index 0000000..5654546 ---- /dev/null -+++ b/gdb/python/lib/gdb/FrameIterator.py -@@ -0,0 +1,33 @@ -+# Iterator over frames. -+ -+# Copyright (C) 2008, 2009 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 . -+ -+class FrameIterator: -+ """An iterator that iterates over frames.""" -+ -+ def __init__ (self, frame): -+ "Initialize a FrameIterator. FRAME is the starting frame." -+ self.frame = frame -+ -+ def __iter__ (self): -+ return self -+ -+ def next (self): -+ result = self.frame -+ if result is None: -+ raise StopIteration -+ self.frame = result.older () -+ return result -diff --git a/gdb/python/lib/gdb/FrameWrapper.py b/gdb/python/lib/gdb/FrameWrapper.py -new file mode 100644 -index 0000000..b790a54 ---- /dev/null -+++ b/gdb/python/lib/gdb/FrameWrapper.py -@@ -0,0 +1,112 @@ -+# Wrapper API for frames. -+ -+# Copyright (C) 2008, 2009 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 . -+ -+import gdb -+ -+# FIXME: arguably all this should be on Frame somehow. -+class FrameWrapper: -+ def __init__ (self, frame): -+ self.frame = frame; -+ -+ def write_symbol (self, stream, sym, block): -+ if len (sym.linkage_name): -+ nsym, is_field_of_this = gdb.lookup_symbol (sym.linkage_name, block) -+ if nsym.addr_class != gdb.SYMBOL_LOC_REGISTER: -+ sym = nsym -+ -+ stream.write (sym.print_name + "=") -+ try: -+ val = self.read_var (sym) -+ if val != None: -+ val = str (val) -+ # FIXME: would be nice to have a more precise exception here. -+ except RuntimeError, text: -+ val = text -+ if val == None: -+ stream.write ("???") -+ else: -+ stream.write (str (val)) -+ -+ def print_frame_locals (self, stream, func): -+ if not func: -+ return -+ -+ first = True -+ block = func.value -+ -+ for sym in block: -+ if sym.is_argument: -+ continue; -+ -+ self.write_symbol (stream, sym, block) -+ stream.write ('\n') -+ -+ def print_frame_args (self, stream, func): -+ if not func: -+ return -+ -+ first = True -+ block = func.value -+ -+ for sym in block: -+ if not sym.is_argument: -+ continue; -+ -+ if not first: -+ stream.write (", ") -+ -+ self.write_symbol (stream, sym, block) -+ first = False -+ -+ # FIXME: this should probably just be a method on gdb.Frame. -+ # But then we need stream wrappers. -+ def describe (self, stream, full): -+ if self.type () == gdb.DUMMY_FRAME: -+ stream.write (" \n") -+ elif self.type () == gdb.SIGTRAMP_FRAME: -+ stream.write (" \n") -+ else: -+ sal = self.find_sal () -+ pc = self.pc () -+ name = self.name () -+ if not name: -+ name = "??" -+ if pc != sal.pc or not sal.symtab: -+ stream.write (" 0x%08x in" % pc) -+ stream.write (" " + name + " (") -+ -+ func = self.function () -+ self.print_frame_args (stream, func) -+ -+ stream.write (")") -+ -+ if sal.symtab and sal.symtab.filename: -+ stream.write (" at " + sal.symtab.filename) -+ stream.write (":" + str (sal.line)) -+ -+ if not self.name () or (not sal.symtab or not sal.symtab.filename): -+ lib = gdb.solib_address (pc) -+ if lib: -+ stream.write (" from " + lib) -+ -+ stream.write ("\n") -+ -+ if full: -+ self.print_frame_locals (stream, func) -+ -+ def __getattr__ (self, name): -+ return getattr (self.frame, name) -diff --git a/gdb/python/lib/gdb/backtrace.py b/gdb/python/lib/gdb/backtrace.py -new file mode 100644 -index 0000000..6bb4fb1 ---- /dev/null -+++ b/gdb/python/lib/gdb/backtrace.py -@@ -0,0 +1,42 @@ -+# Filtering backtrace. -+ -+# Copyright (C) 2008, 2011 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 . -+ -+import gdb -+import itertools -+ -+# Our only exports. -+__all__ = ['push_frame_filter', 'create_frame_filter'] -+ -+frame_filter = None -+ -+def push_frame_filter (constructor): -+ """Register a new backtrace filter class with the 'backtrace' command. -+The filter will be passed an iterator as an argument. The iterator -+will return gdb.Frame-like objects. The filter should in turn act as -+an iterator returning such objects.""" -+ global frame_filter -+ if frame_filter == None: -+ frame_filter = constructor -+ else: -+ frame_filter = lambda iterator, filter = frame_filter: constructor (filter (iterator)) -+ -+def create_frame_filter (iter): -+ global frame_filter -+ if frame_filter is None: -+ return iter -+ return frame_filter (iter) -+ -diff --git a/gdb/python/lib/gdb/command/backtrace.py b/gdb/python/lib/gdb/command/backtrace.py -new file mode 100644 -index 0000000..eeea909 ---- /dev/null -+++ b/gdb/python/lib/gdb/command/backtrace.py -@@ -0,0 +1,106 @@ -+# New backtrace command. -+ -+# Copyright (C) 2008, 2009, 2011 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 . -+ -+import gdb -+import gdb.backtrace -+import itertools -+from gdb.FrameIterator import FrameIterator -+from gdb.FrameWrapper import FrameWrapper -+import sys -+ -+class ReverseBacktraceParameter (gdb.Parameter): -+ """The new-backtrace command can show backtraces in 'reverse' order. -+This means that the innermost frame will be printed last. -+Note that reverse backtraces are more expensive to compute.""" -+ -+ set_doc = "Enable or disable reverse backtraces." -+ show_doc = "Show whether backtraces will be printed in reverse order." -+ -+ def __init__(self): -+ gdb.Parameter.__init__ (self, "reverse-backtrace", -+ gdb.COMMAND_STACK, gdb.PARAM_BOOLEAN) -+ # Default to compatibility with gdb. -+ self.value = False -+ -+class FilteringBacktrace (gdb.Command): -+ """Print backtrace of all stack frames, or innermost COUNT frames. -+With a negative argument, print outermost -COUNT frames. -+Use of the 'full' qualifier also prints the values of the local variables. -+Use of the 'raw' qualifier avoids any filtering by loadable modules. -+""" -+ -+ def __init__ (self): -+ # FIXME: this is not working quite well enough to replace -+ # "backtrace" yet. -+ gdb.Command.__init__ (self, "new-backtrace", gdb.COMMAND_STACK) -+ self.reverse = ReverseBacktraceParameter() -+ -+ def reverse_iter (self, iter): -+ result = [] -+ for item in iter: -+ result.append (item) -+ result.reverse() -+ return result -+ -+ def final_n (self, iter, x): -+ result = [] -+ for item in iter: -+ result.append (item) -+ return result[x:] -+ -+ def invoke (self, arg, from_tty): -+ i = 0 -+ count = 0 -+ filter = True -+ full = False -+ -+ for word in arg.split (" "): -+ if word == '': -+ continue -+ elif word == 'raw': -+ filter = False -+ elif word == 'full': -+ full = True -+ else: -+ count = int (word) -+ -+ # FIXME: provide option to start at selected frame -+ # However, should still number as if starting from newest -+ newest_frame = gdb.newest_frame() -+ iter = itertools.imap (FrameWrapper, -+ FrameIterator (newest_frame)) -+ if filter: -+ iter = gdb.backtrace.create_frame_filter (iter) -+ -+ # Now wrap in an iterator that numbers the frames. -+ iter = itertools.izip (itertools.count (0), iter) -+ -+ # Reverse if the user wanted that. -+ if self.reverse.value: -+ iter = self.reverse_iter (iter) -+ -+ # Extract sub-range user wants. -+ if count < 0: -+ iter = self.final_n (iter, count) -+ elif count > 0: -+ iter = itertools.islice (iter, 0, count) -+ -+ for pair in iter: -+ sys.stdout.write ("#%-2d" % pair[0]) -+ pair[1].describe (sys.stdout, full) -+ -+FilteringBacktrace() diff --git a/gdb/python/lib/gdb/command/ignore_errors.py b/gdb/python/lib/gdb/command/ignore_errors.py new file mode 100644 index 0000000..6fa48ff @@ -4206,204 +3820,6 @@ index 0000000..636f99d + self.pahole (type, 0, '') + +Pahole() -diff --git a/gdb/python/lib/gdb/command/require.py b/gdb/python/lib/gdb/command/require.py -new file mode 100644 -index 0000000..1fbc1e8 ---- /dev/null -+++ b/gdb/python/lib/gdb/command/require.py -@@ -0,0 +1,57 @@ -+# Demand-loading commands. -+ -+# Copyright (C) 2008, 2009 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 . -+ -+import gdb -+import os -+ -+class RequireCommand (gdb.Command): -+ """Prefix command for requiring features.""" -+ -+ def __init__ (self): -+ super (RequireCommand, self).__init__ ("require", -+ gdb.COMMAND_SUPPORT, -+ gdb.COMPLETE_NONE, -+ True) -+ -+class RequireSubcommand (gdb.Command): -+ """Demand-load a command by name.""" -+ -+ def __init__ (self, name): -+ self.__doc__ = "Demand-load a %s by name." % name -+ super (RequireSubcommand, self).__init__ ("require %s" % name, -+ gdb.COMMAND_SUPPORT) -+ self.name = name -+ -+ def invoke (self, arg, from_tty): -+ for cmd in arg.split(): -+ exec ('import gdb.' + self.name + '.' + cmd, globals ()) -+ -+ def complete (self, text, word): -+ dir = gdb.pythondir + '/gdb/' + self.name -+ result = [] -+ for file in os.listdir(dir): -+ if not file.startswith (word) or not file.endswith ('.py'): -+ continue -+ feature = file[0:-3] -+ if feature == 'require' or feature == '__init__': -+ continue -+ result.append (feature) -+ return result -+ -+RequireCommand() -+RequireSubcommand("command") -+RequireSubcommand("function") -diff --git a/gdb/python/lib/gdb/command/upto.py b/gdb/python/lib/gdb/command/upto.py -new file mode 100644 -index 0000000..faf54ed ---- /dev/null -+++ b/gdb/python/lib/gdb/command/upto.py -@@ -0,0 +1,129 @@ -+# upto command. -+ -+# Copyright (C) 2009 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 . -+ -+import gdb -+import re -+from gdb.FrameIterator import FrameIterator -+from gdb.FrameWrapper import FrameWrapper -+ -+class UptoPrefix (gdb.Command): -+ def __init__ (self): -+ super (UptoPrefix, self).__init__ ("upto", gdb.COMMAND_STACK, -+ prefix = True) -+ -+class UptoImplementation (gdb.Command): -+ def __init__ (self, subcommand): -+ super (UptoImplementation, self).__init__ ("upto " + subcommand, -+ gdb.COMMAND_STACK) -+ -+ def search (self): -+ saved = gdb.selected_frame () -+ iter = FrameIterator (saved) -+ found = False -+ try: -+ for frame in iter: -+ frame.select () -+ try: -+ if self.filter (frame): -+ wrapper = FrameWrapper (frame) -+ wrapper.describe (sys.stdout, False) -+ return -+ except: -+ pass -+ except: -+ pass -+ saved.select () -+ raise RuntimeError, 'Could not find a matching frame' -+ -+ def invoke (self, arg, from_tty): -+ self.rx = re.compile (arg) -+ self.search () -+ -+class UptoSymbolCommand (UptoImplementation): -+ """Select and print some calling stack frame, based on symbol. -+The argument is a regular expression. This command moves up the -+stack, stopping at the first frame whose symbol matches the regular -+expression.""" -+ -+ def __init__ (self): -+ super (UptoSymbolCommand, self).__init__ ("symbol") -+ -+ def filter (self, frame): -+ name = frame.name () -+ if name is not None: -+ if self.rx.search (name) is not None: -+ return True -+ return False -+ -+class UptoSourceCommand (UptoImplementation): -+ """Select and print some calling stack frame, based on source file. -+The argument is a regular expression. This command moves up the -+stack, stopping at the first frame whose source file name matches the -+regular expression.""" -+ -+ def __init__ (self): -+ super (UptoSourceCommand, self).__init__ ("source") -+ -+ def filter (self, frame): -+ name = frame.find_sal ().symtab.filename -+ if name is not None: -+ if self.rx.search (name) is not None: -+ return True -+ return False -+ -+class UptoObjectCommand (UptoImplementation): -+ """Select and print some calling stack frame, based on object file. -+The argument is a regular expression. This command moves up the -+stack, stopping at the first frame whose object file name matches the -+regular expression.""" -+ -+ def __init__ (self): -+ super (UptoObjectCommand, self).__init__ ("object") -+ -+ def filter (self, frame): -+ name = frame.find_sal ().symtab.objfile.filename -+ if name is not None: -+ if self.rx.search (name) is not None: -+ return True -+ return False -+ -+class UptoWhereCommand (UptoImplementation): -+ """Select and print some calling stack frame, based on expression. -+The argument is an expression. This command moves up the stack, -+parsing and evaluating the expression in each frame. This stops when -+the expression evaluates to a non-zero (true) value.""" -+ -+ def __init__ (self): -+ super (UptoWhereCommand, self).__init__ ("where") -+ -+ def filter (self, frame): -+ try: -+ if gdb.parse_and_eval (self.expression): -+ return True -+ except: -+ pass -+ return False -+ -+ def invoke (self, arg, from_tty): -+ self.expression = arg -+ self.search () -+ -+UptoPrefix () -+UptoSymbolCommand () -+UptoSourceCommand () -+UptoObjectCommand () -+UptoWhereCommand () diff --git a/gdb/python/lib/gdb/function/caller_is.py b/gdb/python/lib/gdb/function/caller_is.py new file mode 100644 index 0000000..2b9c5c7 @@ -4522,7 +3938,7 @@ index 0000000..debb3bb + +InScope () diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c -index 051cff0..e2f2ebe 100644 +index 337e307..be91c5a 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -31,6 +31,8 @@ @@ -4552,10 +3968,10 @@ index 051cff0..e2f2ebe 100644 +static type_object *pyty_objects_discardable; +#endif + - static PyTypeObject type_object_type; + static PyTypeObject type_object_type + CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("type_object"); - /* A Field object. */ -@@ -1192,8 +1202,63 @@ typy_richcompare (PyObject *self, PyObject *other, int op) +@@ -1180,8 +1190,63 @@ typy_richcompare (PyObject *self, PyObject *other, int op) @@ -4619,7 +4035,7 @@ index 051cff0..e2f2ebe 100644 static void save_objfile_types (struct objfile *objfile, void *datum) { -@@ -1211,12 +1276,13 @@ save_objfile_types (struct objfile *objfile, void *datum) +@@ -1202,12 +1267,13 @@ save_objfile_types (struct objfile *objfile, void *datum) { type_object *next = obj->next; @@ -4637,7 +4053,7 @@ index 051cff0..e2f2ebe 100644 obj = next; } -@@ -1227,43 +1293,28 @@ save_objfile_types (struct objfile *objfile, void *datum) +@@ -1218,43 +1284,28 @@ save_objfile_types (struct objfile *objfile, void *datum) } static void @@ -4695,7 +4111,7 @@ index 051cff0..e2f2ebe 100644 /* Return number of fields ("length" of the field dictionary). */ -@@ -1483,7 +1534,10 @@ type_to_type_object (struct type *type) +@@ -1474,7 +1525,10 @@ type_to_type_object (struct type *type) type_obj = PyObject_New (type_object, &type_object_type); if (type_obj) @@ -4707,19 +4123,8 @@ index 051cff0..e2f2ebe 100644 return (PyObject *) type_obj; } -@@ -1563,6 +1617,10 @@ gdbpy_initialize_types (void) - - Py_INCREF (&field_object_type); - PyModule_AddObject (gdb_module, "Field", (PyObject *) &field_object_type); -+ -+#if 0 -+ observer_attach_mark_used (typy_types_mark_used); -+#endif - } - - diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c -index 11cc038..ef238f6 100644 +index 0d87219..c019184 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -29,6 +29,7 @@ @@ -4730,7 +4135,7 @@ index 11cc038..ef238f6 100644 #ifdef HAVE_PYTHON -@@ -1385,6 +1386,19 @@ gdbpy_is_value_object (PyObject *obj) +@@ -1385,12 +1386,28 @@ gdbpy_is_value_object (PyObject *obj) return PyObject_TypeCheck (obj, &value_object_type); } @@ -4747,25 +4152,23 @@ index 11cc038..ef238f6 100644 +} +#endif + - void + int gdbpy_initialize_values (void) { -@@ -1395,6 +1409,10 @@ gdbpy_initialize_values (void) - PyModule_AddObject (gdb_module, "Value", (PyObject *) &value_object_type); + if (PyType_Ready (&value_object_type) < 0) + return -1; - values_in_python = NULL; -+ +#if 0 + observer_attach_mark_used (python_types_mark_used); +#endif + return gdb_pymodule_addobject (gdb_module, "Value", + (PyObject *) &value_object_type); } - - diff --git a/gdb/python/python.c b/gdb/python/python.c -index 8dd65a1..82c6c86 100644 +index 00092c7..ec49fc9 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c -@@ -66,6 +66,8 @@ static const char *gdbpy_should_print_stack = python_excp_message; +@@ -67,6 +67,8 @@ static const char *gdbpy_should_print_stack = python_excp_message; #include "linespec.h" #include "source.h" #include "version.h" @@ -4774,7 +4177,7 @@ index 8dd65a1..82c6c86 100644 #include "target.h" #include "gdbthread.h" #include "observer.h" -@@ -1082,6 +1084,53 @@ gdbpy_print_stack (void) +@@ -1116,6 +1118,53 @@ gdbpy_print_stack (void) /* Return the current Progspace. There always is one. */ @@ -4828,7 +4231,7 @@ index 8dd65a1..82c6c86 100644 static PyObject * gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2) -@@ -1733,6 +1782,8 @@ static PyMethodDef GdbMethods[] = +@@ -1826,6 +1875,8 @@ static PyMethodDef GdbMethods[] = "Get a value from history" }, { "execute", (PyCFunction) execute_gdb_command, METH_VARARGS | METH_KEYWORDS, "Execute a gdb command" }, @@ -4838,10 +4241,10 @@ index 8dd65a1..82c6c86 100644 "Return a gdb parameter's value" }, diff --git a/gdb/python/python.h b/gdb/python/python.h -index 24e3077..0443087 100644 +index 1a1e5c2..312be94 100644 --- a/gdb/python/python.h +++ b/gdb/python/python.h -@@ -34,6 +34,8 @@ void eval_python_from_control_command (struct command_line *); +@@ -95,6 +95,8 @@ void eval_python_from_control_command (struct command_line *); void source_python_script (FILE *file, const char *filename); @@ -4851,10 +4254,10 @@ index 24e3077..0443087 100644 int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, diff --git a/gdb/stack.c b/gdb/stack.c -index 147d815..51115cf 100644 +index d89ff89..301d569 100644 --- a/gdb/stack.c +++ b/gdb/stack.c -@@ -508,6 +508,10 @@ print_frame_args (struct symbol *func, struct frame_info *frame, +@@ -511,6 +511,10 @@ print_frame_args (struct symbol *func, struct frame_info *frame, stb = mem_fileopen (); old_chain = make_cleanup_ui_file_delete (stb); @@ -6064,10 +5467,10 @@ index 2cc935b..30c7f85 100644 main (void) { diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp -index 387b34f..d5956ce 100644 +index 37ed4c3..82f30cb 100644 --- a/gdb/testsuite/gdb.base/arrayidx.exp +++ b/gdb/testsuite/gdb.base/arrayidx.exp -@@ -53,4 +53,12 @@ gdb_test "print array" \ +@@ -49,4 +49,12 @@ gdb_test "print array" \ "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \ "Print array with array-indexes on" @@ -7929,10 +7332,10 @@ index 0000000..4747ea9 + write (*,*) a ! break-static +end diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp -index 55e13cf..441c28b 100644 +index d700715..6ebca0a 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp -@@ -91,6 +91,10 @@ proc do_steps_and_nexts {} { +@@ -92,6 +92,10 @@ proc do_steps_and_nexts {} { set description "step over cmdarg_vec initialization" set command "step" } @@ -8376,7 +7779,7 @@ index 9142c72..2855220 100644 # Test either C or C++ values. test_subscript_regression "${binfile}" "c" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp -index 8b16b38..f6e59b0 100644 +index 70b797e..3588e1d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -143,6 +143,11 @@ proc gdb_unload {} { @@ -8392,7 +7795,7 @@ index 8b16b38..f6e59b0 100644 send_gdb "y\n" exp_continue diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp -index 569fb02..cacecf4 100644 +index 784ab6c..9e0a844 100644 --- a/gdb/testsuite/lib/pascal.exp +++ b/gdb/testsuite/lib/pascal.exp @@ -37,6 +37,9 @@ proc pascal_init {} { @@ -8427,10 +7830,10 @@ index 569fb02..cacecf4 100644 set pascal_init_done 1 } diff --git a/gdb/top.c b/gdb/top.c -index e9a40fc..de051c8 100644 +index 33a78da..22992ba 100644 --- a/gdb/top.c +++ b/gdb/top.c -@@ -350,6 +350,9 @@ prepare_execute_command (void) +@@ -342,6 +342,9 @@ prepare_execute_command (void) mark = value_mark (); cleanup = make_cleanup_value_free_to_mark (mark); @@ -8441,7 +7844,7 @@ index e9a40fc..de051c8 100644 /* With multiple threads running while the one we're examining is stopped, the dcache can get stale without us being able to detect diff --git a/gdb/typeprint.c b/gdb/typeprint.c -index 2d5a6af..5251e3f 100644 +index 4e70593..e8402a2 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -34,6 +34,7 @@ @@ -8479,10 +7882,10 @@ index 2d5a6af..5251e3f 100644 get_user_print_options (&opts); diff --git a/gdb/utils.c b/gdb/utils.c -index eb99f4b..2e17e8e 100644 +index 94ebce8..23a4986 100644 --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -1804,6 +1804,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void) +@@ -1725,6 +1725,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void) return back_to; } @@ -8520,12 +7923,12 @@ index eb99f4b..2e17e8e 100644 static void diff --git a/gdb/utils.h b/gdb/utils.h -index 52bcaff..6ab417b 100644 +index 0f6bb06..283137e 100644 --- a/gdb/utils.h +++ b/gdb/utils.h -@@ -375,4 +375,6 @@ extern int myread (int, char *, int); - extern ULONGEST align_up (ULONGEST v, int n); - extern ULONGEST align_down (ULONGEST v, int n); +@@ -384,4 +384,6 @@ extern ULONGEST align_down (ULONGEST v, int n); + + extern LONGEST gdb_sign_extend (LONGEST value, int bit); +extern struct cleanup *make_cleanup_restore_selected_frame (void); + @@ -8558,10 +7961,10 @@ index 18c14fc..0a3a3aa 100644 } diff --git a/gdb/valops.c b/gdb/valops.c -index 93c09d8..aef0991 100644 +index a3ab24f..53af842 100644 --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -45,6 +45,7 @@ +@@ -44,6 +44,7 @@ #include "objfiles.h" #include "symtab.h" #include "exceptions.h" @@ -8569,7 +7972,7 @@ index 93c09d8..aef0991 100644 extern unsigned int overload_debug; /* Local functions. */ -@@ -903,6 +904,65 @@ value_one (struct type *type) +@@ -902,6 +903,65 @@ value_one (struct type *type) return val; } @@ -8635,48 +8038,7 @@ index 93c09d8..aef0991 100644 /* Helper function for value_at, value_at_lazy, and value_at_lazy_stack. */ static struct value * -@@ -965,7 +1025,8 @@ int - value_fetch_lazy (struct value *val) - { - gdb_assert (value_lazy (val)); -- allocate_value_contents (val); -+ if (VALUE_LVAL (val) != lval_memory) -+ allocate_value_contents (val); - if (value_bitsize (val)) - { - /* To read a lazy bitfield, read the entire enclosing value. This -@@ -998,13 +1059,24 @@ value_fetch_lazy (struct value *val) - } - else if (VALUE_LVAL (val) == lval_memory) - { -- CORE_ADDR addr = value_address (val); -- struct type *type = check_typedef (value_enclosing_type (val)); -+ CORE_ADDR addr = value_raw_address (val); - -- if (TYPE_LENGTH (type)) -- read_value_memory (val, 0, value_stack (val), -- addr, value_contents_all_raw (val), -- TYPE_LENGTH (type)); -+ if (object_address_get_data (value_type (val), &addr)) -+ { -+ struct type *type = value_enclosing_type (val); -+ int length = TYPE_LENGTH (check_typedef (type)); -+ -+ if (length) -+ { -+ /* Delay it after object_address_get_data above. */ -+ allocate_value_contents (val); -+ addr += value_offset (val); -+ read_value_memory (val, 0, value_stack (val), -+ addr, value_contents_all_raw (val), length); -+ } -+ } -+ /* Just to be sure it has been called. */ -+ allocate_value_contents (val); - } - else if (VALUE_LVAL (val) == lval_register) - { -@@ -1529,7 +1601,18 @@ address_of_variable (struct symbol *var, const struct block *b) +@@ -1366,7 +1426,18 @@ address_of_variable (struct symbol *var, const struct block *b) if ((VALUE_LVAL (val) == lval_memory && value_lazy (val)) || TYPE_CODE (type) == TYPE_CODE_FUNC) { @@ -8696,7 +8058,7 @@ index 93c09d8..aef0991 100644 return value_from_pointer (lookup_pointer_type (type), addr); } -@@ -1636,6 +1719,7 @@ struct value * +@@ -1473,6 +1544,7 @@ struct value * value_coerce_array (struct value *arg1) { struct type *type = check_typedef (value_type (arg1)); @@ -8704,7 +8066,7 @@ index 93c09d8..aef0991 100644 /* If the user tries to do something requiring a pointer with an array that has not yet been pushed to the target, then this would -@@ -1645,8 +1729,12 @@ value_coerce_array (struct value *arg1) +@@ -1482,8 +1554,12 @@ value_coerce_array (struct value *arg1) if (VALUE_LVAL (arg1) != lval_memory) error (_("Attempt to take address of value not located in memory.")); @@ -8718,7 +8080,7 @@ index 93c09d8..aef0991 100644 } /* Given a value which is a function, return a value which is a pointer -@@ -3721,6 +3809,8 @@ value_slice (struct value *array, int lowbound, int length) +@@ -3558,6 +3634,8 @@ value_slice (struct value *array, int lowbound, int length) TYPE_TARGET_TYPE (range_type), lowbound, lowbound + length - 1); @@ -8728,7 +8090,7 @@ index 93c09d8..aef0991 100644 { struct type *element_type = TYPE_TARGET_TYPE (array_type); diff --git a/gdb/valprint.c b/gdb/valprint.c -index 05d6c3e..5430e66 100644 +index 753ae34..6d87d9c 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -37,6 +37,7 @@ @@ -8739,7 +8101,7 @@ index 05d6c3e..5430e66 100644 #include -@@ -287,7 +288,6 @@ scalar_type_p (struct type *type) +@@ -290,7 +291,6 @@ scalar_type_p (struct type *type) case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: case TYPE_CODE_SET: @@ -8747,7 +8109,7 @@ index 05d6c3e..5430e66 100644 return 0; default: return 1; -@@ -1604,6 +1604,7 @@ val_print_array_elements (struct type *type, +@@ -1607,6 +1607,7 @@ val_print_array_elements (struct type *type, { unsigned int things_printed = 0; unsigned len; @@ -8755,7 +8117,7 @@ index 05d6c3e..5430e66 100644 struct type *elttype, *index_type; unsigned eltlen; /* Position of the array element we are examining to see -@@ -1612,9 +1613,33 @@ val_print_array_elements (struct type *type, +@@ -1615,9 +1616,33 @@ val_print_array_elements (struct type *type, /* Number of repetitions we have detected so far. */ unsigned int reps; LONGEST low_bound, high_bound; @@ -8791,7 +8153,7 @@ index 05d6c3e..5430e66 100644 index_type = TYPE_INDEX_TYPE (type); if (get_array_bounds (type, &low_bound, &high_bound)) -@@ -1701,6 +1726,8 @@ val_print_array_elements (struct type *type, +@@ -1704,6 +1729,8 @@ val_print_array_elements (struct type *type, { fprintf_filtered (stream, "..."); } @@ -8801,18 +8163,18 @@ index 05d6c3e..5430e66 100644 /* Read LEN bytes of target memory at address MEMADDR, placing the diff --git a/gdb/value.c b/gdb/value.c -index 4b70ece..7449c2a 100644 +index 8d635c7..cce87c6 100644 --- a/gdb/value.c +++ b/gdb/value.c -@@ -42,6 +42,7 @@ - #include +@@ -43,6 +43,7 @@ #include "tracepoint.h" #include "cp-abi.h" + #include "user-regs.h" +#include "observer.h" /* Prototypes for exported functions. */ -@@ -1435,12 +1436,15 @@ void +@@ -1448,12 +1449,15 @@ void set_value_component_location (struct value *component, const struct value *whole) { @@ -8828,7 +8190,7 @@ index 4b70ece..7449c2a 100644 if (whole->lval == lval_computed) { const struct lval_funcs *funcs = whole->location.computed.funcs; -@@ -1448,6 +1452,12 @@ set_value_component_location (struct value *component, +@@ -1461,6 +1465,12 @@ set_value_component_location (struct value *component, if (funcs->copy_closure) component->location.computed.closure = funcs->copy_closure (whole); } @@ -8841,7 +8203,7 @@ index 4b70ece..7449c2a 100644 } -@@ -1581,6 +1591,31 @@ show_values (char *num_exp, int from_tty) +@@ -1594,6 +1604,31 @@ show_values (char *num_exp, int from_tty) num_exp[1] = '\0'; } } @@ -8873,7 +8235,7 @@ index 4b70ece..7449c2a 100644 /* Internal variables. These are variables within the debugger that hold values assigned by debugger commands. -@@ -2116,6 +2151,38 @@ call_internal_function (struct gdbarch *gdbarch, +@@ -2129,6 +2164,38 @@ call_internal_function (struct gdbarch *gdbarch, return (*ifn->handler) (gdbarch, language, ifn->cookie, argc, argv); } @@ -8912,7 +8274,7 @@ index 4b70ece..7449c2a 100644 /* The 'function' command. This does nothing -- it is just a placeholder to let "help function NAME" work. This is also used as the implementation of the sub-command that is created when -@@ -2163,11 +2230,10 @@ preserve_one_value (struct value *value, struct objfile *objfile, +@@ -2176,11 +2243,10 @@ preserve_one_value (struct value *value, struct objfile *objfile, htab_t copied_types) { if (TYPE_OBJFILE (value->type) == objfile) @@ -8926,7 +8288,7 @@ index 4b70ece..7449c2a 100644 copied_types); } -@@ -2182,7 +2248,7 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile, +@@ -2195,7 +2261,7 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile, case INTERNALVAR_INTEGER: if (var->u.integer.type && TYPE_OBJFILE (var->u.integer.type) == objfile) var->u.integer.type @@ -8935,7 +8297,7 @@ index 4b70ece..7449c2a 100644 break; case INTERNALVAR_VALUE: -@@ -3280,10 +3346,27 @@ readjust_indirect_value_type (struct value *value, struct type *enc_type, +@@ -3308,10 +3374,27 @@ readjust_indirect_value_type (struct value *value, struct type *enc_type, struct value * coerce_ref (struct value *arg) { @@ -8964,7 +8326,48 @@ index 4b70ece..7449c2a 100644 retval = coerce_ref_if_computed (arg); if (retval) return retval; -@@ -3405,4 +3488,10 @@ VARIABLE is already initialized.")); +@@ -3419,7 +3502,8 @@ int + value_fetch_lazy (struct value *val) + { + gdb_assert (value_lazy (val)); +- allocate_value_contents (val); ++ if (VALUE_LVAL (val) != lval_memory) ++ allocate_value_contents (val); + if (value_bitsize (val)) + { + /* To read a lazy bitfield, read the entire enclosing value. This +@@ -3454,13 +3538,24 @@ value_fetch_lazy (struct value *val) + } + else if (VALUE_LVAL (val) == lval_memory) + { +- CORE_ADDR addr = value_address (val); +- struct type *type = check_typedef (value_enclosing_type (val)); ++ CORE_ADDR addr = value_raw_address (val); ++ ++ if (object_address_get_data (value_type (val), &addr)) ++ { ++ struct type *type = value_enclosing_type (val); ++ int length = TYPE_LENGTH (check_typedef (type)); + +- if (TYPE_LENGTH (type)) +- read_value_memory (val, 0, value_stack (val), +- addr, value_contents_all_raw (val), +- TYPE_LENGTH (type)); ++ if (length) ++ { ++ /* Delay it after object_address_get_data above. */ ++ allocate_value_contents (val); ++ addr += value_offset (val); ++ read_value_memory (val, 0, value_stack (val), ++ addr, value_contents_all_raw (val), length); ++ } ++ } ++ /* Just to be sure it has been called. */ ++ allocate_value_contents (val); + } + else if (VALUE_LVAL (val) == lval_register) + { +@@ -3599,4 +3694,10 @@ VARIABLE is already initialized.")); add_prefix_cmd ("function", no_class, function_command, _("\ Placeholder command for showing help on convenience functions."), &functionlist, "function ", 0, &cmdlist); @@ -8976,10 +8379,10 @@ index 4b70ece..7449c2a 100644 +#endif } diff --git a/gdb/value.h b/gdb/value.h -index c10c3ec..8d07348 100644 +index 5e00c89..d9efe3e 100644 --- a/gdb/value.h +++ b/gdb/value.h -@@ -537,6 +537,10 @@ extern struct value *value_from_decfloat (struct type *type, +@@ -548,6 +548,10 @@ extern struct value *value_from_decfloat (struct type *type, const gdb_byte *decbytes); extern struct value *value_from_history_ref (char *, char **); diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index a56f62d..24042ad 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -37,10 +37,10 @@ gdb/gdbserver/ (linux_create_inferior, linux_tracefork_child): Call it instead of direct ptrace. -Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c +Index: gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/common/linux-ptrace.c 2013-01-08 20:38:51.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/common/linux-ptrace.c 2013-02-15 22:38:05.782456279 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/common/linux-ptrace.c 2013-08-02 16:33:52.767872412 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.c 2013-08-02 16:34:16.122910934 +0200 @@ -29,6 +29,10 @@ #include "gdb_assert.h" #include "gdb_wait.h" @@ -61,7 +61,7 @@ Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c } #if defined __i386__ || defined __x86_64__ -@@ -243,3 +249,19 @@ linux_ptrace_init_warnings (void) +@@ -236,3 +242,19 @@ linux_ptrace_init_warnings (void) linux_ptrace_test_ret_to_nx (); } @@ -81,10 +81,10 @@ Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c + "(gdb) shell sudo setsebool deny_ptrace=0")); +#endif /* HAVE_LIBSELINUX */ +} -Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.h +Index: gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/common/linux-ptrace.h 2013-01-01 07:32:54.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/common/linux-ptrace.h 2013-02-15 22:38:05.782456279 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/common/linux-ptrace.h 2013-08-02 16:33:52.768872414 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.h 2013-08-02 16:34:16.122910934 +0200 @@ -69,5 +69,6 @@ struct buffer; extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer); @@ -92,13 +92,13 @@ Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.h +extern void linux_ptrace_create_warnings (struct buffer *buffer); #endif /* COMMON_LINUX_PTRACE_H */ -Index: gdb-7.5.50.20130215/gdb/configure.ac +Index: gdb-7.6.50.20130731-cvs/gdb/configure.ac =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/configure.ac 2013-02-15 22:37:57.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/configure.ac 2013-02-15 22:38:05.783456281 +0100 -@@ -2068,6 +2068,10 @@ then - [Define if you support the personality syscall.]) - fi +--- gdb-7.6.50.20130731-cvs.orig/gdb/configure.ac 2013-08-02 16:34:16.123910936 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/configure.ac 2013-08-02 16:34:46.519960063 +0200 +@@ -2071,6 +2071,10 @@ case $host_os in + esac + AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) +dnl Check security_get_boolean_active availability. +AC_CHECK_HEADERS(selinux/selinux.h) @@ -107,11 +107,11 @@ Index: gdb-7.5.50.20130215/gdb/configure.ac dnl Handle optional features that can be enabled. # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, -Index: gdb-7.5.50.20130215/gdb/gdbserver/configure.ac +Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure.ac =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gdbserver/configure.ac 2013-01-01 07:33:00.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gdbserver/configure.ac 2013-02-15 22:38:05.783456281 +0100 -@@ -451,6 +451,10 @@ if $want_ipa ; then +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/configure.ac 2013-08-02 16:34:16.124910938 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure.ac 2013-08-02 16:35:06.634991892 +0200 +@@ -471,6 +471,10 @@ if $want_ipa ; then fi fi @@ -121,12 +121,12 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/configure.ac + AC_SUBST(GDBSERVER_DEPFILES) AC_SUBST(GDBSERVER_LIBS) - AC_SUBST(USE_THREAD_DB) -Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c + AC_SUBST(srv_xmlbuiltin) +Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/linux-low.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gdbserver/linux-low.c 2013-02-04 18:47:00.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c 2013-02-15 22:39:54.256591069 +0100 -@@ -602,6 +602,29 @@ add_lwp (ptid_t ptid) +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/linux-low.c 2013-08-02 16:33:52.772872421 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/linux-low.c 2013-08-02 16:34:16.126910941 +0200 +@@ -622,6 +622,29 @@ add_lwp (ptid_t ptid) return lwp; } @@ -156,7 +156,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c /* Start an inferior process and returns its pid. ALLARGS is a vector of program-name and args. */ -@@ -642,7 +665,7 @@ linux_create_inferior (char *program, ch +@@ -662,7 +685,7 @@ linux_create_inferior (char *program, ch if (pid == 0) { @@ -165,7 +165,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c #ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */ signal (__SIGRTMIN + 1, SIG_DFL); -@@ -4587,7 +4610,7 @@ linux_tracefork_grandchild (void *arg) +@@ -4685,7 +4708,7 @@ linux_tracefork_grandchild (void *arg) static int linux_tracefork_child (void *arg) { @@ -174,10 +174,10 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c kill (getpid (), SIGSTOP); #if !(defined(__UCLIBC__) && defined(HAS_NOMMU)) -Index: gdb-7.5.50.20130215/gdb/inf-ptrace.c +Index: gdb-7.6.50.20130731-cvs/gdb/inf-ptrace.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/inf-ptrace.c 2013-01-01 07:32:45.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/inf-ptrace.c 2013-02-15 22:38:05.786456289 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/inf-ptrace.c 2013-08-02 16:33:52.772872421 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/inf-ptrace.c 2013-08-02 16:34:16.126910941 +0200 @@ -104,7 +104,15 @@ static void inf_ptrace_me (void) { @@ -194,11 +194,11 @@ Index: gdb-7.5.50.20130215/gdb/inf-ptrace.c } /* Start a new inferior Unix child process. EXEC_FILE is the file to -Index: gdb-7.5.50.20130215/gdb/linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-15 22:34:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:38:05.787456291 +0100 -@@ -1557,6 +1557,7 @@ linux_nat_create_inferior (struct target +--- gdb-7.6.50.20130731-cvs.orig/gdb/linux-nat.c 2013-08-02 16:33:52.774872424 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/linux-nat.c 2013-08-02 16:34:16.128910944 +0200 +@@ -1554,6 +1554,7 @@ linux_nat_create_inferior (struct target #ifdef HAVE_PERSONALITY int personality_orig = 0, personality_set = 0; #endif /* HAVE_PERSONALITY */ @@ -206,7 +206,7 @@ Index: gdb-7.5.50.20130215/gdb/linux-nat.c /* The fork_child mechanism is synchronous and calls target_wait, so we have to mask the async mode. */ -@@ -1581,7 +1582,10 @@ linux_nat_create_inferior (struct target +@@ -1578,7 +1579,10 @@ linux_nat_create_inferior (struct target /* Make sure we report all signals during startup. */ linux_nat_pass_signals (0, NULL); @@ -218,7 +218,7 @@ Index: gdb-7.5.50.20130215/gdb/linux-nat.c #ifdef HAVE_PERSONALITY if (personality_set) -@@ -1593,6 +1597,24 @@ linux_nat_create_inferior (struct target +@@ -1590,6 +1594,24 @@ linux_nat_create_inferior (struct target safe_strerror (errno)); } #endif /* HAVE_PERSONALITY */ @@ -243,3 +243,192 @@ Index: gdb-7.5.50.20130215/gdb/linux-nat.c } static void +Index: gdb-7.6.50.20130731-cvs/gdb/config.in +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/config.in 2013-08-02 16:25:27.339097561 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/config.in 2013-08-02 16:36:16.249099841 +0200 +@@ -225,6 +225,9 @@ + /* Define if librpm library is being used. */ + #undef HAVE_LIBRPM + ++/* Define to 1 if you have the `selinux' library (-lselinux). */ ++#undef HAVE_LIBSELINUX ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_LIBUNWIND_IA64_H + +@@ -372,6 +375,9 @@ + /* Define to 1 if you have the `sbrk' function. */ + #undef HAVE_SBRK + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SELINUX_SELINUX_H ++ + /* Define to 1 if you have the `setlocale' function. */ + #undef HAVE_SETLOCALE + +Index: gdb-7.6.50.20130731-cvs/gdb/configure +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/configure 2013-08-02 16:25:27.343097567 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/configure 2013-08-02 16:36:14.665097434 +0200 +@@ -12851,6 +12851,64 @@ cat >>confdefs.h <<_ACEOF + _ACEOF + + ++for ac_header in selinux/selinux.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" ++if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SELINUX_SELINUX_H 1 ++_ACEOF ++ ++fi ++ ++done ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5 ++$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; } ++if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lselinux $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char security_get_boolean_active (); ++int ++main () ++{ ++return security_get_boolean_active (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_selinux_security_get_boolean_active=yes ++else ++ ac_cv_lib_selinux_security_get_boolean_active=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5 ++$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; } ++if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBSELINUX 1 ++_ACEOF ++ ++ LIBS="-lselinux $LIBS" ++ ++fi ++ ++ + + # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, + # except that the argument to --with-sysroot is optional. +Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/config.in +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/config.in 2013-07-31 21:41:54.000000000 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/config.in 2013-08-02 16:36:21.719108141 +0200 +@@ -76,6 +76,12 @@ + /* Define to 1 if you have the `dl' library (-ldl). */ + #undef HAVE_LIBDL + ++/* Define to 1 if you have the `mcheck' library (-lmcheck). */ ++#undef HAVE_LIBMCHECK ++ ++/* Define to 1 if you have the `selinux' library (-lselinux). */ ++#undef HAVE_LIBSELINUX ++ + /* Define if the target supports branch tracing. */ + #undef HAVE_LINUX_BTRACE + +@@ -146,6 +152,9 @@ + /* Define to 1 if you have the `readlink' function. */ + #undef HAVE_READLINK + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SELINUX_SELINUX_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_SGTTY_H + +Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/configure 2013-07-31 21:41:54.000000000 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure 2013-08-02 16:36:20.237105894 +0200 +@@ -6003,6 +6003,64 @@ if $want_ipa ; then + fi + fi + ++for ac_header in selinux/selinux.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" ++if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SELINUX_SELINUX_H 1 ++_ACEOF ++ ++fi ++ ++done ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5 ++$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; } ++if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lselinux $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char security_get_boolean_active (); ++int ++main () ++{ ++return security_get_boolean_active (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_selinux_security_get_boolean_active=yes ++else ++ ac_cv_lib_selinux_security_get_boolean_active=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5 ++$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; } ++if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBSELINUX 1 ++_ACEOF ++ ++ LIBS="-lselinux $LIBS" ++ ++fi ++ ++ + + + diff --git a/gdb-attach-fail-reasons-5of5configure.patch b/gdb-attach-fail-reasons-5of5configure.patch deleted file mode 100644 index fff6646..0000000 --- a/gdb-attach-fail-reasons-5of5configure.patch +++ /dev/null @@ -1,186 +0,0 @@ -Index: gdb-7.4.50.20120602/gdb/config.in -=================================================================== ---- gdb-7.4.50.20120602.orig/gdb/config.in 2012-06-02 21:49:26.147399232 +0200 -+++ gdb-7.4.50.20120602/gdb/config.in 2012-06-02 21:49:27.206398845 +0200 -@@ -222,6 +222,9 @@ - /* Define if librpm library is being used. */ - #undef HAVE_LIBRPM - -+/* Define to 1 if you have the `selinux' library (-lselinux). */ -+#undef HAVE_LIBSELINUX -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_LIBUNWIND_IA64_H - -@@ -363,6 +366,9 @@ - /* Define to 1 if you have the `sbrk' function. */ - #undef HAVE_SBRK - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SELINUX_SELINUX_H -+ - /* Define to 1 if you have the `setlocale' function. */ - #undef HAVE_SETLOCALE - -Index: gdb-7.4.50.20120602/gdb/configure -=================================================================== ---- gdb-7.4.50.20120602.orig/gdb/configure 2012-06-02 21:49:27.139398869 +0200 -+++ gdb-7.4.50.20120602/gdb/configure 2012-06-02 21:49:50.890390179 +0200 -@@ -12745,6 +12745,64 @@ $as_echo "#define HAVE_PERSONALITY 1" >> - - fi - -+for ac_header in selinux/selinux.h -+do : -+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" -+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_SELINUX_SELINUX_H 1 -+_ACEOF -+ -+fi -+ -+done -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5 -+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; } -+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lselinux $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char security_get_boolean_active (); -+int -+main () -+{ -+return security_get_boolean_active (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_selinux_security_get_boolean_active=yes -+else -+ ac_cv_lib_selinux_security_get_boolean_active=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5 -+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; } -+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LIBSELINUX 1 -+_ACEOF -+ -+ LIBS="-lselinux $LIBS" -+ -+fi -+ -+ - - # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, - # except that the argument to --with-sysroot is optional. -Index: gdb-7.4.50.20120602/gdb/gdbserver/config.in -=================================================================== ---- gdb-7.4.50.20120602.orig/gdb/gdbserver/config.in 2012-04-19 21:34:51.000000000 +0200 -+++ gdb-7.4.50.20120602/gdb/gdbserver/config.in 2012-06-02 21:49:55.945388329 +0200 -@@ -69,6 +69,9 @@ - /* Define to 1 if you have the `dl' library (-ldl). */ - #undef HAVE_LIBDL - -+/* Define to 1 if you have the `selinux' library (-lselinux). */ -+#undef HAVE_LIBSELINUX -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_LINUX_ELF_H - -@@ -130,6 +133,9 @@ - /* Define to 1 if you have the `readlink' function. */ - #undef HAVE_READLINK - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SELINUX_SELINUX_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_SGTTY_H - -Index: gdb-7.4.50.20120602/gdb/gdbserver/configure -=================================================================== ---- gdb-7.4.50.20120602.orig/gdb/gdbserver/configure 2012-04-20 19:58:49.000000000 +0200 -+++ gdb-7.4.50.20120602/gdb/gdbserver/configure 2012-06-02 21:49:54.485388864 +0200 -@@ -5532,6 +5532,64 @@ if $want_ipa ; then - fi - fi - -+for ac_header in selinux/selinux.h -+do : -+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" -+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_SELINUX_SELINUX_H 1 -+_ACEOF -+ -+fi -+ -+done -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5 -+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; } -+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lselinux $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char security_get_boolean_active (); -+int -+main () -+{ -+return security_get_boolean_active (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_selinux_security_get_boolean_active=yes -+else -+ ac_cv_lib_selinux_security_get_boolean_active=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5 -+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; } -+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LIBSELINUX 1 -+_ACEOF -+ -+ LIBS="-lselinux $LIBS" -+ -+fi -+ -+ - - - diff --git a/gdb-bz533176-fortran-omp-step.patch b/gdb-bz533176-fortran-omp-step.patch index a72f547..a0cfd27 100644 --- a/gdb-bz533176-fortran-omp-step.patch +++ b/gdb-bz533176-fortran-omp-step.patch @@ -21,16 +21,16 @@ debugging problem of GOMP outside of the scope of this Bug. -Index: gdb-7.5.50.20130118/gdb/infrun.c +Index: gdb-7.6.50.20130731-cvs/gdb/infrun.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/infrun.c 2013-01-19 23:38:22.329371410 +0100 -+++ gdb-7.5.50.20130118/gdb/infrun.c 2013-01-19 23:39:03.322429041 +0100 -@@ -4918,6 +4918,16 @@ process_event_stop_test: +--- gdb-7.6.50.20130731-cvs.orig/gdb/infrun.c 2013-08-02 17:10:08.446962958 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/infrun.c 2013-08-02 17:10:49.109016685 +0200 +@@ -4930,6 +4930,16 @@ process_event_stop_test: if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL) { + struct symbol *stop_fn = find_pc_function (stop_pc); -+ struct minimal_symbol *stopf = lookup_minimal_symbol_by_pc (stop_pc); ++ struct minimal_symbol *stopf = lookup_minimal_symbol_by_pc (stop_pc).minsym; + + if ((stop_fn == NULL + || strstr (SYMBOL_LINKAGE_NAME (stop_fn), ".omp_fn.") == NULL) @@ -42,7 +42,7 @@ Index: gdb-7.5.50.20130118/gdb/infrun.c /* We're doing a "next". Normal (forward) execution: set a breakpoint at the -@@ -4953,6 +4963,7 @@ process_event_stop_test: +@@ -4965,6 +4975,7 @@ process_event_stop_test: keep_going (ecs); return; @@ -50,10 +50,10 @@ Index: gdb-7.5.50.20130118/gdb/infrun.c } /* If we are in a function call trampoline (a stub between the -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp 2013-01-19 23:38:23.213372622 +0100 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.exp 2013-08-02 17:10:37.063000571 +0200 @@ -0,0 +1,31 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -86,10 +86,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp + +gdb_breakpoint [gdb_get_line_number "success"] +gdb_continue_to_breakpoint "success" ".*success.*" -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.f90 +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.f90 2013-01-19 23:38:23.213372622 +0100 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.f90 2013-08-02 17:10:37.063000571 +0200 @@ -0,0 +1,32 @@ +! Copyright 2009 Free Software Foundation, Inc. + diff --git a/gdb-bz541866-rwatch-before-run.patch b/gdb-bz541866-rwatch-before-run.patch index 25bf2ac..682c288 100644 --- a/gdb-bz541866-rwatch-before-run.patch +++ b/gdb-bz541866-rwatch-before-run.patch @@ -1,20 +1,20 @@ -Index: gdb-7.4.50.20120602/gdb/config/i386/linux64.mh +Index: gdb-7.5.91.20130323/gdb/config/i386/linux64.mh =================================================================== ---- gdb-7.4.50.20120602.orig/gdb/config/i386/linux64.mh 2012-03-13 16:00:34.000000000 +0100 -+++ gdb-7.4.50.20120602/gdb/config/i386/linux64.mh 2012-06-02 19:56:03.196172503 +0200 +--- gdb-7.5.91.20130323.orig/gdb/config/i386/linux64.mh 2013-03-11 09:25:58.000000000 +0100 ++++ gdb-7.5.91.20130323/gdb/config/i386/linux64.mh 2013-03-23 19:48:37.707761117 +0100 @@ -4,7 +4,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \ linux-nat.o linux-osdata.o \ proc-service.o linux-thread-db.o linux-fork.o \ - linux-procfs.o linux-ptrace.o + linux-procfs.o linux-ptrace.o linux-btrace.o -NAT_FILE= config/nm-linux.h +NAT_FILE= nm-linux64.h NAT_CDEPS = $(srcdir)/proc-service.list # The dynamically loaded libthread_db needs access to symbols in the -Index: gdb-7.4.50.20120602/gdb/config/i386/linux.mh +Index: gdb-7.5.91.20130323/gdb/config/i386/linux.mh =================================================================== ---- gdb-7.4.50.20120602.orig/gdb/config/i386/linux.mh 2012-03-13 16:00:33.000000000 +0100 -+++ gdb-7.4.50.20120602/gdb/config/i386/linux.mh 2012-06-02 19:55:42.418178412 +0200 +--- gdb-7.5.91.20130323.orig/gdb/config/i386/linux.mh 2013-03-11 09:25:58.000000000 +0100 ++++ gdb-7.5.91.20130323/gdb/config/i386/linux.mh 2013-03-23 19:48:22.757990256 +0100 @@ -1,6 +1,6 @@ # Host: Intel 386 running GNU/Linux. @@ -23,10 +23,10 @@ Index: gdb-7.4.50.20120602/gdb/config/i386/linux.mh NATDEPFILES= inf-ptrace.o fork-child.o \ i386-nat.o i386-linux-nat.o \ proc-service.o linux-thread-db.o \ -Index: gdb-7.4.50.20120602/gdb/config/i386/nm-linux.h +Index: gdb-7.5.91.20130323/gdb/config/i386/nm-linux.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/config/i386/nm-linux.h 2012-06-02 19:55:42.433178408 +0200 ++++ gdb-7.5.91.20130323/gdb/config/i386/nm-linux.h 2013-03-23 19:48:22.757990256 +0100 @@ -0,0 +1,28 @@ +/* Native support for GNU/Linux i386. + @@ -56,10 +56,10 @@ Index: gdb-7.4.50.20120602/gdb/config/i386/nm-linux.h +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 + +#endif /* NM_LINUX64_H */ -Index: gdb-7.4.50.20120602/gdb/config/i386/nm-linux64.h +Index: gdb-7.5.91.20130323/gdb/config/i386/nm-linux64.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/config/i386/nm-linux64.h 2012-06-02 19:55:42.434178407 +0200 ++++ gdb-7.5.91.20130323/gdb/config/i386/nm-linux64.h 2013-03-23 19:48:22.757990256 +0100 @@ -0,0 +1,28 @@ +/* Native support for GNU/Linux amd64. + @@ -89,11 +89,11 @@ Index: gdb-7.4.50.20120602/gdb/config/i386/nm-linux64.h +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 + +#endif /* NM_LINUX64_H */ -Index: gdb-7.4.50.20120602/gdb/target.h +Index: gdb-7.5.91.20130323/gdb/target.h =================================================================== ---- gdb-7.4.50.20120602.orig/gdb/target.h 2012-06-01 18:37:59.000000000 +0200 -+++ gdb-7.4.50.20120602/gdb/target.h 2012-06-02 19:55:42.436178407 +0200 -@@ -1470,8 +1470,10 @@ extern char *target_thread_name (struct +--- gdb-7.5.91.20130323.orig/gdb/target.h 2013-03-11 09:50:05.000000000 +0100 ++++ gdb-7.5.91.20130323/gdb/target.h 2013-03-23 19:48:22.758990238 +0100 +@@ -1563,8 +1563,10 @@ extern char *target_thread_name (struct bp_hardware_breakpoint. CNT is the number of such watchpoints used so far (including this one?). OTHERTYPE is who knows what... */ @@ -104,10 +104,10 @@ Index: gdb-7.4.50.20120602/gdb/target.h /* Returns the number of debug registers needed to watch the given memory region, or zero if not supported. */ -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp +Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2012-06-02 19:55:42.442178406 +0200 ++++ gdb-7.5.91.20130323/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2013-03-23 19:48:22.758990238 +0100 @@ -0,0 +1,40 @@ +# Copyright 2009, 2010 Free Software Foundation, Inc. + diff --git a/gdb-core-open-vdso-warning.patch b/gdb-core-open-vdso-warning.patch index f9579e0..4d7a80d 100644 --- a/gdb-core-open-vdso-warning.patch +++ b/gdb-core-open-vdso-warning.patch @@ -3,11 +3,11 @@ Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Inp [ New patch variant. ] -Index: gdb-7.5.50.20130118/gdb/solib-svr4.c +Index: gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/solib-svr4.c 2013-01-18 23:05:19.414210015 +0100 -+++ gdb-7.5.50.20130118/gdb/solib-svr4.c 2013-01-18 23:05:34.813231664 +0100 -@@ -1221,8 +1221,17 @@ svr4_read_so_list (CORE_ADDR lm, struct +--- gdb-7.6.50.20130731-cvs.orig/gdb/solib-svr4.c 2013-08-02 16:27:28.831259468 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c 2013-08-02 16:27:47.871284813 +0200 +@@ -1359,8 +1359,17 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD SO_NAME_MAX_PATH_SIZE - 1, &errcode); if (errcode != 0) { @@ -27,20 +27,20 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c do_cleanups (old_chain); continue; } -Index: gdb-7.5.50.20130118/gdb/solib.c +Index: gdb-7.6.50.20130731-cvs/gdb/solib.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/solib.c 2013-01-18 23:05:19.415210017 +0100 -+++ gdb-7.5.50.20130118/gdb/solib.c 2013-01-18 23:05:57.421263173 +0100 -@@ -666,7 +666,7 @@ solib_used (const struct so_list *const +--- gdb-7.6.50.20130731-cvs.orig/gdb/solib.c 2013-08-02 16:27:28.832259470 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/solib.c 2013-08-02 16:28:50.421367694 +0200 +@@ -669,7 +669,7 @@ solib_used (const struct so_list *const processes we've just attached to, so that's okay. */ static void -update_solib_list (int from_tty, struct target_ops *target) +update_solib_list_1 (int from_tty, struct target_ops *target) { - struct target_so_ops *ops = solib_ops (target_gdbarch ()); + const struct target_so_ops *ops = solib_ops (target_gdbarch ()); struct so_list *inferior = ops->current_sos(); -@@ -837,6 +837,21 @@ Do you need \"set solib-search-path\" or +@@ -840,6 +840,21 @@ Do you need \"set solib-search-path\" or } } @@ -62,11 +62,11 @@ Index: gdb-7.5.50.20130118/gdb/solib.c /* Return non-zero if NAME is the libpthread shared library. -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/corefile.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/corefile.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.base/corefile.exp 2013-01-18 23:05:19.416210020 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/corefile.exp 2013-01-18 23:05:34.814231667 +0100 -@@ -286,3 +286,19 @@ if {$buildid == ""} { +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/corefile.exp 2013-08-02 16:27:28.833259471 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/corefile.exp 2013-08-02 16:27:47.872284814 +0200 +@@ -285,3 +285,19 @@ if {$buildid == ""} { gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*" pass $wholetest } @@ -86,20 +86,18 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/corefile.exp + pass $test + } +} -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/solib-symbol.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/solib-symbol.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.base/solib-symbol.exp 2013-01-18 23:05:19.416210020 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/solib-symbol.exp 2013-01-18 23:05:34.814231667 +0100 -@@ -27,7 +27,8 @@ set lib_flags [list debug ldflags=-Wl,-B - # Binary file. - set testfile "solib-symbol-main" +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/solib-symbol.exp 2013-08-02 16:27:28.833259471 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/solib-symbol.exp 2013-08-02 16:28:22.549330973 +0200 +@@ -29,6 +29,7 @@ set testfile "solib-symbol-main" set srcfile ${srcdir}/${subdir}/${testfile}.c --set binfile ${objdir}/${subdir}/${testfile} -+set executable ${testfile} -+set binfile ${objdir}/${subdir}/${executable} + set binfile [standard_output_file ${testfile}] set bin_flags [list debug shlib=${binfile_lib}] ++set executable ${testfile} if [get_compiler_info] { + return -1 @@ -72,8 +73,26 @@ gdb_test "br foo2" \ "Breakpoint.*: foo2. .2 locations..*" \ "foo2 in mdlib" diff --git a/gdb-dlopen-stap-probe-3of7.patch b/gdb-dlopen-stap-probe-3of7.patch deleted file mode 100644 index 4a34589..0000000 --- a/gdb-dlopen-stap-probe-3of7.patch +++ /dev/null @@ -1,98 +0,0 @@ -2012-07-19 Gary Benson - - * probe.h (get_probe_argument_count): New declaration. - (evaluate_probe_argument): Likewise. - * probe.c (get_probe_argument_count): New function. - (evaluate_probe_argument): Likewise. - (probe_safe_evaluate_at_pc): Use the above new functions. - -diff --git a/gdb/probe.h b/gdb/probe.h -index 8d44ca2..1d29b87 100644 ---- a/gdb/probe.h -+++ b/gdb/probe.h -@@ -214,6 +214,16 @@ extern void info_probes_for_ops (char *arg, int from_tty, - - extern struct cmd_list_element **info_probes_cmdlist_get (void); - -+/* Return the argument count of the specified probe. */ -+ -+extern unsigned get_probe_argument_count (struct probe *probe); -+ -+/* Evaluate argument N of the specified probe. N must be between 0 -+ inclusive and get_probe_argument_count exclusive. */ -+ -+extern struct value *evaluate_probe_argument (struct probe *probe, -+ unsigned n); -+ - /* A convenience function that finds a probe at the PC in FRAME and - evaluates argument N, with 0 <= N < number_of_args. If there is no - probe at that location, or if the probe does not have enough arguments, -diff --git a/gdb/probe.c b/gdb/probe.c -index 77f3b13..a61f4ea 100644 ---- a/gdb/probe.c -+++ b/gdb/probe.c -@@ -632,28 +632,55 @@ info_probes_command (char *arg, int from_tty) - - /* See comments in probe.h. */ - -+unsigned -+get_probe_argument_count (struct probe *probe) -+{ -+ const struct sym_probe_fns *probe_fns; -+ -+ gdb_assert (probe->objfile != NULL); -+ gdb_assert (probe->objfile->sf != NULL); -+ -+ probe_fns = probe->objfile->sf->sym_probe_fns; -+ -+ gdb_assert (probe_fns != NULL); -+ -+ return probe_fns->sym_get_probe_argument_count (probe); -+} -+ -+/* See comments in probe.h. */ -+ -+struct value * -+evaluate_probe_argument (struct probe *probe, unsigned n) -+{ -+ const struct sym_probe_fns *probe_fns; -+ -+ gdb_assert (probe->objfile != NULL); -+ gdb_assert (probe->objfile->sf != NULL); -+ -+ probe_fns = probe->objfile->sf->sym_probe_fns; -+ -+ gdb_assert (probe_fns != NULL); -+ -+ return probe_fns->sym_evaluate_probe_argument (probe, n); -+} -+ -+/* See comments in probe.h. */ -+ - struct value * - probe_safe_evaluate_at_pc (struct frame_info *frame, unsigned n) - { - struct probe *probe; -- const struct sym_probe_fns *probe_fns; - unsigned n_args; - - probe = find_probe_by_pc (get_frame_pc (frame)); - if (!probe) - return NULL; - -- gdb_assert (probe->objfile != NULL); -- gdb_assert (probe->objfile->sf != NULL); -- gdb_assert (probe->objfile->sf->sym_probe_fns != NULL); -- -- probe_fns = probe->objfile->sf->sym_probe_fns; -- n_args = probe_fns->sym_get_probe_argument_count (probe); -- -+ n_args = get_probe_argument_count (probe); - if (n >= n_args) - return NULL; - -- return probe_fns->sym_evaluate_probe_argument (probe, n); -+ return evaluate_probe_argument (probe, n); - } - - /* See comment in probe.h. */ diff --git a/gdb-dlopen-stap-probe-4of7.patch b/gdb-dlopen-stap-probe-4of7.patch deleted file mode 100644 index fb99f07..0000000 --- a/gdb-dlopen-stap-probe-4of7.patch +++ /dev/null @@ -1,131 +0,0 @@ -2012-07-19 Gary Benson - - * solib-svr4.c (svr4_info): Move earlier. - (solib_svr4_pspace_data): Likewise. - (svr4_pspace_data_cleanup): Likewise. - (get_svr4_info): Likewise. - -diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c -index 307e483..c88b9cb 100644 ---- a/gdb/solib-svr4.c -+++ b/gdb/solib-svr4.c -@@ -106,6 +106,59 @@ static const char * const main_name_list[] = - NULL - }; - -+/* Per pspace SVR4 specific data. */ -+ -+struct svr4_info -+{ -+ CORE_ADDR debug_base; /* Base of dynamic linker structures. */ -+ -+ /* Validity flag for debug_loader_offset. */ -+ int debug_loader_offset_p; -+ -+ /* Load address for the dynamic linker, inferred. */ -+ CORE_ADDR debug_loader_offset; -+ -+ /* Name of the dynamic linker, valid if debug_loader_offset_p. */ -+ char *debug_loader_name; -+ -+ /* Load map address for the main executable. */ -+ CORE_ADDR main_lm_addr; -+ -+ CORE_ADDR interp_text_sect_low; -+ CORE_ADDR interp_text_sect_high; -+ CORE_ADDR interp_plt_sect_low; -+ CORE_ADDR interp_plt_sect_high; -+}; -+ -+/* Per-program-space data key. */ -+static const struct program_space_data *solib_svr4_pspace_data; -+ -+static void -+svr4_pspace_data_cleanup (struct program_space *pspace, void *arg) -+{ -+ struct svr4_info *info; -+ -+ info = program_space_data (pspace, solib_svr4_pspace_data); -+ xfree (info); -+} -+ -+/* Get the current svr4 data. If none is found yet, add it now. This -+ function always returns a valid object. */ -+ -+static struct svr4_info * -+get_svr4_info (void) -+{ -+ struct svr4_info *info; -+ -+ info = program_space_data (current_program_space, solib_svr4_pspace_data); -+ if (info != NULL) -+ return info; -+ -+ info = XZALLOC (struct svr4_info); -+ set_program_space_data (current_program_space, solib_svr4_pspace_data, info); -+ return info; -+} -+ - /* Return non-zero if GDB_SO_NAME and INFERIOR_SO_NAME represent - the same shared library. */ - -@@ -291,59 +344,6 @@ lm_addr_check (struct so_list *so, bfd *abfd) - return so->lm_info->l_addr; - } - --/* Per pspace SVR4 specific data. */ -- --struct svr4_info --{ -- CORE_ADDR debug_base; /* Base of dynamic linker structures. */ -- -- /* Validity flag for debug_loader_offset. */ -- int debug_loader_offset_p; -- -- /* Load address for the dynamic linker, inferred. */ -- CORE_ADDR debug_loader_offset; -- -- /* Name of the dynamic linker, valid if debug_loader_offset_p. */ -- char *debug_loader_name; -- -- /* Load map address for the main executable. */ -- CORE_ADDR main_lm_addr; -- -- CORE_ADDR interp_text_sect_low; -- CORE_ADDR interp_text_sect_high; -- CORE_ADDR interp_plt_sect_low; -- CORE_ADDR interp_plt_sect_high; --}; -- --/* Per-program-space data key. */ --static const struct program_space_data *solib_svr4_pspace_data; -- --static void --svr4_pspace_data_cleanup (struct program_space *pspace, void *arg) --{ -- struct svr4_info *info; -- -- info = program_space_data (pspace, solib_svr4_pspace_data); -- xfree (info); --} -- --/* Get the current svr4 data. If none is found yet, add it now. This -- function always returns a valid object. */ -- --static struct svr4_info * --get_svr4_info (void) --{ -- struct svr4_info *info; -- -- info = program_space_data (current_program_space, solib_svr4_pspace_data); -- if (info != NULL) -- return info; -- -- info = XZALLOC (struct svr4_info); -- set_program_space_data (current_program_space, solib_svr4_pspace_data, info); -- return info; --} -- - /* Local function prototypes */ - - static int match_main (const char *); diff --git a/gdb-dlopen-stap-probe-5of7.patch b/gdb-dlopen-stap-probe-5of7.patch deleted file mode 100644 index eee8d93..0000000 --- a/gdb-dlopen-stap-probe-5of7.patch +++ /dev/null @@ -1,17 +0,0 @@ -2012-07-19 Gary Benson - - * solib-svr4.c (svr4_info): Made debug_loader_offset_p a bitfield. - -diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c -index c88b9cb..8e41f19 100644 ---- a/gdb/solib-svr4.c -+++ b/gdb/solib-svr4.c -@@ -113,7 +113,7 @@ struct svr4_info - CORE_ADDR debug_base; /* Base of dynamic linker structures. */ - - /* Validity flag for debug_loader_offset. */ -- int debug_loader_offset_p; -+ unsigned int debug_loader_offset_p : 1; - - /* Load address for the dynamic linker, inferred. */ - CORE_ADDR debug_loader_offset; diff --git a/gdb-dlopen-stap-probe-6of7.patch b/gdb-dlopen-stap-probe-6of7.patch deleted file mode 100644 index 33d8d98..0000000 --- a/gdb-dlopen-stap-probe-6of7.patch +++ /dev/null @@ -1,1989 +0,0 @@ -gdb/ -2012-07-30 Gary Benson - - * breakpoint.h (handle_solib_event): Moved function definition - to solib.h, and added a new parameter. - * breakpoint.c (handle_solib_event): Moved function to solib.c - and added a new parameter. - (bpstat_stop_status): Pass new argument to handle_solib_event. - * solib.h (breakpoint.h): New include. - (handle_solib_event): Moved function definition from breakpoint.h - and added a new parameter. - (update_solib_breakpoints): New function definition. - * solib.c (handle_solib_event): Moved function from breakpoint.c - and added a new parameter. - (update_solib_breakpoints): New function. - * solist.h (breakpoint.h): New include. - (target_so_ops): New fields "handle_solib_event" and - "update_breakpoints". - * infrun.c (set_stop_on_solib_events): New function. - (_initialize_infrun): Use the above for "set stop-on-solib-events". - (handle_inferior_event): Pass new argument to handle_solib_event. - * solib-svr4.c (probe.h): New include. - (namespace_table_flatten): New forward declaration. - (lm_info): New fields "lmid" and "in_initial_ns". - (probe_action): New enum. - (probe_info): New struct. - (probe_info): New static variable. - (NUM_PROBES): New definition. - (svr4_info): New fields "using_probes", "probes" and - "namespace_table". - (free_probes): New function. - (free_namespace_table): Likewise. - (svr4_pspace_data_cleanup): Free probes and namespace table. - (svr4_same): Also compare namespaces if using probes. - (lm_addr_check): Only print .dynamic section at wrong address - warning for initial namespace if using probes. - (r_map_from_debug_base): New function. - (solib_svr4_r_map): Call the above. - (svr4_read_so_list): New parameter "prev_lm". - Changed return type from void to int. - Return nonzero on success, zero on error. - (svr4_current_sos_from_debug_base): New function. - (svr4_current_sos): Create result from namespace table if available. - Use svr4_current_sos_from_debug_base to generate list otherwise. - (probe_and_info): New struct. - (solib_event_probe_at): New function. - (solib_event_probe_action): Likewise. - (namespace): New struct. - (hash_namespace): New function. - (equal_namespace): Likewise. - (free_namespace): Likewise. - (namespace_update_full): Likewise. - (namespace_update_incremental): Likewise. - (svr4_handle_solib_event): Likewise. - (namespace_table_flatten_helper): Likewise. - (namespace_table_flatten): Likewise. - (svr4_update_solib_event_breakpoint): Likewise. - (svr4_update_solib_event_breakpoints): Likewise. - (svr4_create_solib_event_breakpoints): Likewise. - (enable_break): Free probes before creating breakpoints. - Use svr4_create_solib_event_breakpoints to create breakpoints. - (svr4_solib_create_inferior_hook): Free the namespace table. - (_initialize_svr4_solib): Initialise svr4_so_ops.handle_solib_event - and svr4_so_ops.update_breakpoints. - -gdb/testsuite -2012-07-30 Gary Benson - - * gdb.base/break-interp.exp (solib_bp): New constant. - (reach_1): Use the above instead of "_dl_debug_state". - (test_attach): Likewise. - (test_ld): Likewise. - * gdb.base/break-probes.exp: New file. - * gdb.base/break-probes.c: Likewise. - * gdb.base/break-probes-solib.c: Likewise. - * gdb.base/info-shared.exp: New file. - * gdb.base/info-shared.c: Likewise. - * gdb.base/info-shared-solib1.c: Likewise. - * gdb.base/info-shared-solib2.c: Likewise. - * gdb.base/break-dlmopen.exp: Likewise. - * gdb.base/break-dlmopen.c: Likewise. - * gdb.base/break-dlmopen-solib.c: Likewise. - -Index: gdb-7.5.50.20130215/gdb/breakpoint.h -=================================================================== ---- gdb-7.5.50.20130215.orig/gdb/breakpoint.h 2013-02-15 22:37:19.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/breakpoint.h 2013-02-15 22:37:47.185432296 +0100 -@@ -1552,8 +1552,6 @@ extern int user_breakpoint_p (struct bre - /* Attempt to determine architecture of location identified by SAL. */ - extern struct gdbarch *get_sal_arch (struct symtab_and_line sal); - --extern void handle_solib_event (void); -- - extern void breakpoint_free_objfile (struct objfile *objfile); - - extern void breakpoints_relocate (struct objfile *objfile, -Index: gdb-7.5.50.20130215/gdb/breakpoint.c -=================================================================== ---- gdb-7.5.50.20130215.orig/gdb/breakpoint.c 2013-02-15 22:37:30.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/breakpoint.c 2013-02-15 22:37:35.755417584 +0100 -@@ -5250,7 +5250,7 @@ bpstat_stop_status (struct address_space - { - if (bs->breakpoint_at && bs->breakpoint_at->type == bp_shlib_event) - { -- handle_solib_event (); -+ handle_solib_event (bs); - break; - } - } -@@ -5346,25 +5346,6 @@ handle_jit_event (void) - target_terminal_inferior (); - } - --/* Handle an solib event by calling solib_add. */ -- --void --handle_solib_event (void) --{ -- clear_program_space_solib_cache (current_inferior ()->pspace); -- -- /* Check for any newly added shared libraries if we're supposed to -- be adding them automatically. Switch terminal for any messages -- produced by breakpoint_re_set. */ -- target_terminal_ours_for_output (); --#ifdef SOLIB_ADD -- SOLIB_ADD (NULL, 0, ¤t_target, auto_solib_add); --#else -- solib_add (NULL, 0, ¤t_target, auto_solib_add); --#endif -- target_terminal_inferior (); --} -- - /* Prepare WHAT final decision for infrun. */ - - /* Decide what infrun needs to do with this bpstat. */ -Index: gdb-7.5.50.20130215/gdb/solib.h -=================================================================== ---- gdb-7.5.50.20130215.orig/gdb/solib.h 2013-01-01 07:32:51.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/solib.h 2013-02-15 22:37:35.757417588 +0100 -@@ -20,6 +20,9 @@ - #ifndef SOLIB_H - #define SOLIB_H - -+/* For bpstat. */ -+#include "breakpoint.h" -+ - /* Forward decl's for prototypes */ - struct so_list; - struct target_ops; -@@ -90,4 +93,15 @@ extern CORE_ADDR gdb_bfd_lookup_symbol_f - void *), - void *data); - -+/* Handle an solib event by calling solib_add. Targets which handle -+ solib events using breakpoints must pass a valid bpstat. Targets -+ which handle solib events using some other mechanism should pass -+ NULL. */ -+ -+extern void handle_solib_event (bpstat bs); -+ -+/* Enable or disable optional solib event breakpoints as appropriate. */ -+ -+extern void update_solib_breakpoints (void); -+ - #endif /* SOLIB_H */ -Index: gdb-7.5.50.20130215/gdb/solib.c -=================================================================== ---- gdb-7.5.50.20130215.orig/gdb/solib.c 2013-02-15 22:37:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/solib.c 2013-02-15 22:37:35.757417588 +0100 -@@ -1221,6 +1221,42 @@ no_shared_libraries (char *ignored, int - objfile_purge_solibs (); - } - -+/* See solib.h. */ -+ -+void -+handle_solib_event (bpstat bs) -+{ -+ struct target_so_ops *ops = solib_ops (target_gdbarch ()); -+ -+ if (ops->handle_solib_event != NULL) -+ ops->handle_solib_event (bs); -+ -+ clear_program_space_solib_cache (current_inferior ()->pspace); -+ -+ /* Check for any newly added shared libraries if we're supposed to -+ be adding them automatically. Switch terminal for any messages -+ produced by breakpoint_re_set. */ -+ target_terminal_ours_for_output (); -+#ifdef SOLIB_ADD -+ SOLIB_ADD (NULL, 0, ¤t_target, auto_solib_add); -+#else -+ solib_add (NULL, 0, ¤t_target, auto_solib_add); -+#endif -+ target_terminal_inferior (); -+} -+ -+/* See solib.h. */ -+ -+void -+update_solib_breakpoints (void) -+{ -+ struct target_so_ops *ops = solib_ops (target_gdbarch ()); -+ -+ if (ops->update_breakpoints != NULL) -+ ops->update_breakpoints (); -+} -+ -+ - /* Reload shared libraries, but avoid reloading the same symbol file - we already have loaded. */ - -Index: gdb-7.5.50.20130215/gdb/solist.h -=================================================================== ---- gdb-7.5.50.20130215.orig/gdb/solist.h 2013-01-01 07:32:51.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/solist.h 2013-02-15 22:37:35.758417590 +0100 -@@ -22,6 +22,8 @@ - #define SO_NAME_MAX_PATH_SIZE 512 /* FIXME: Should be dynamic */ - /* For domain_enum domain. */ - #include "symtab.h" -+/* For bpstat. */ -+#include "breakpoint.h" - - /* Forward declaration for target specific link map information. This - struct is opaque to all but the target specific file. */ -@@ -148,6 +150,20 @@ struct target_so_ops - core file (in particular, for readonly sections). */ - int (*keep_data_in_core) (CORE_ADDR vaddr, - unsigned long size); -+ -+ /* Target-specific handling of solib events. For targets which -+ handle solib events using breakpoints a valid bpstat must be -+ passed. Targets which handle solib events using some other -+ mechanism should pass NULL. This pointer can be NULL, in which -+ case no specific handling is necessary for this target. */ -+ void (*handle_solib_event) (bpstat bs); -+ -+ /* Enable or disable optional solib event breakpoints as -+ appropriate. This should be called whenever -+ stop_on_solib_events is changed. This pointer can be -+ NULL, in which case no enabling or disabling is necessary -+ for this target. */ -+ void (*update_breakpoints) (void); - }; - - /* Free the memory associated with a (so_list *). */ -Index: gdb-7.5.50.20130215/gdb/infrun.c -=================================================================== ---- gdb-7.5.50.20130215.orig/gdb/infrun.c 2013-02-15 22:37:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/infrun.c 2013-02-15 22:37:35.760417594 +0100 -@@ -369,6 +369,16 @@ static struct symbol *step_start_functio - /* Nonzero if we want to give control to the user when we're notified - of shared library events by the dynamic linker. */ - int stop_on_solib_events; -+ -+/* Enable or disable optional shared library event breakpoints -+ as appropriate when the above flag is changed. */ -+ -+static void -+set_stop_on_solib_events (char *args, int from_tty, struct cmd_list_element *c) -+{ -+ update_solib_breakpoints (); -+} -+ - static void - show_stop_on_solib_events (struct ui_file *file, int from_tty, - struct cmd_list_element *c, const char *value) -@@ -3346,7 +3356,7 @@ handle_inferior_event (struct execution_ - context_switch (ecs->ptid); - regcache = get_thread_regcache (ecs->ptid); - -- handle_solib_event (); -+ handle_solib_event (NULL); - - ecs->event_thread->control.stop_bpstat - = bpstat_stop_status (get_regcache_aspace (regcache), -@@ -7334,7 +7344,7 @@ Show stopping for shared library events. - If nonzero, gdb will give control to the user when the dynamic linker\n\ - notifies gdb of shared library events. The most common event of interest\n\ - to the user would be loading/unloading of a new library."), -- NULL, -+ set_stop_on_solib_events, - show_stop_on_solib_events, - &setlist, &showlist); - -Index: gdb-7.5.50.20130215/gdb/solib-svr4.c -=================================================================== ---- gdb-7.5.50.20130215.orig/gdb/solib-svr4.c 2013-02-15 22:37:30.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/solib-svr4.c 2013-02-15 22:37:35.761417596 +0100 -@@ -46,10 +46,12 @@ - #include "auxv.h" - #include "exceptions.h" - #include "gdb_bfd.h" -+#include "probe.h" - - static struct link_map_offsets *svr4_fetch_link_map_offsets (void); - static int svr4_have_link_map_offsets (void); - static void svr4_relocate_main_executable (void); -+static struct so_list *namespace_table_flatten (htab_t namespace_table); - - /* Link map info to include in an allocated so_list entry. */ - -@@ -70,6 +72,16 @@ struct lm_info - - /* Values read in from inferior's fields of the same name. */ - CORE_ADDR l_ld, l_next, l_prev, l_name; -+ -+ /* Numeric link-map ID of the namespace this object is loaded -+ into. This value is only valid when using the probes-based -+ interface. */ -+ LONGEST lmid; -+ -+ /* Nonzero if the namespace list this object is loaded into is the -+ application's initial namespace (LM_ID_BASE). This value is -+ only valid when using the probes-based interface. */ -+ unsigned int in_initial_ns : 1; - }; - - /* On SVR4 systems, a list of symbols in the dynamic linker where -@@ -106,6 +118,53 @@ static const char * const main_name_lis - NULL - }; - -+/* What to do with the namespace table when a probe stop occurs. */ -+ -+enum probe_action -+ { -+ /* Something went seriously wrong. Stop using probes and -+ revert to using the older interface. */ -+ NAMESPACE_TABLE_INVALIDATE, -+ -+ /* No action is required. This namespace is still valid. */ -+ NAMESPACE_NO_ACTION, -+ -+ /* This namespace should be reloaded entirely. */ -+ NAMESPACE_RELOAD, -+ -+ /* Attempt to incrementally update this namespace. If the -+ update fails or is not possible, fall back to reloading -+ the namespace in full. */ -+ NAMESPACE_UPDATE_OR_RELOAD, -+ }; -+ -+/* A probe's name and its associated action. */ -+ -+struct probe_info -+{ -+ /* The name of the probe. */ -+ const char *name; -+ -+ /* What to do with the namespace table when a probe stop occurs. */ -+ enum probe_action action; -+}; -+ -+/* A list of named probes and their associated actions. If all -+ probes are present in the dynamic linker then the probes-based -+ interface will be used. */ -+ -+static const struct probe_info probe_info[] = -+{ -+ { "init_start", NAMESPACE_NO_ACTION }, -+ { "init_complete", NAMESPACE_RELOAD }, -+ { "map_start", NAMESPACE_NO_ACTION }, -+ { "reloc_complete", NAMESPACE_UPDATE_OR_RELOAD }, -+ { "unmap_start", NAMESPACE_NO_ACTION }, -+ { "unmap_complete", NAMESPACE_RELOAD }, -+}; -+ -+#define NUM_PROBES ARRAY_SIZE (probe_info) -+ - /* Per pspace SVR4 specific data. */ - - struct svr4_info -@@ -128,17 +187,58 @@ struct svr4_info - CORE_ADDR interp_text_sect_high; - CORE_ADDR interp_plt_sect_low; - CORE_ADDR interp_plt_sect_high; -+ -+ /* Nonzero if we are using the probes-based interface. */ -+ unsigned int using_probes : 1; -+ -+ /* Named probes in the dynamic linker. */ -+ VEC (probe_p) *probes[NUM_PROBES]; -+ -+ /* Table of dynamic linker namespaces, used by the probes-based -+ interface. */ -+ htab_t namespace_table; - }; - - /* Per-program-space data key. */ - static const struct program_space_data *solib_svr4_pspace_data; - -+/* Free any allocated probe vectors. */ -+ -+static void -+free_probes (struct svr4_info *info) -+{ -+ int i; -+ -+ for (i = 0; i < NUM_PROBES; i++) -+ VEC_free (probe_p, info->probes[i]); -+ -+ memset (info->probes, 0, sizeof (info->probes)); -+} -+ -+/* Free the namespace table. */ -+ -+static void -+free_namespace_table (struct svr4_info *info) -+{ -+ if (info->namespace_table == NULL) -+ return; -+ -+ htab_delete (info->namespace_table); -+ info->namespace_table = NULL; -+} -+ - static void - svr4_pspace_data_cleanup (struct program_space *pspace, void *arg) - { - struct svr4_info *info; - - info = program_space_data (pspace, solib_svr4_pspace_data); -+ if (info == NULL) -+ return; -+ -+ free_probes (info); -+ free_namespace_table (info); -+ - xfree (info); - } - -@@ -187,10 +287,21 @@ svr4_same_1 (const char *gdb_so_name, co - return 0; - } - -+/* Return non-zero if GDB and INFERIOR represent the same shared -+ library. */ -+ - static int - svr4_same (struct so_list *gdb, struct so_list *inferior) - { -- return (svr4_same_1 (gdb->so_original_name, inferior->so_original_name)); -+ struct svr4_info *info = get_svr4_info (); -+ -+ if (info->using_probes) -+ { -+ if (gdb->lm_info->lmid != inferior->lm_info->lmid) -+ return 0; -+ } -+ -+ return svr4_same_1 (gdb->so_original_name, inferior->so_original_name); - } - - static struct lm_info * -@@ -321,18 +432,26 @@ lm_addr_check (struct so_list *so, bfd * - } - else - { -- /* There is no way to verify the library file matches. prelink -- can during prelinking of an unprelinked file (or unprelinking -- of a prelinked file) shift the DYNAMIC segment by arbitrary -- offset without any page size alignment. There is no way to -- find out the ELF header and/or Program Headers for a limited -- verification if it they match. One could do a verification -- of the DYNAMIC segment. Still the found address is the best -- one GDB could find. */ -- -- warning (_(".dynamic section for \"%s\" " -- "is not at the expected address " -- "(wrong library or version mismatch?)"), so->so_name); -+ struct svr4_info *info = get_svr4_info (); -+ -+ if (!info->using_probes || so->lm_info->in_initial_ns) -+ { -+ /* There is no way to verify the library file -+ matches. prelink can during prelinking of an -+ unprelinked file (or unprelinking of a prelinked -+ file) shift the DYNAMIC segment by arbitrary -+ offset without any page size alignment. There is -+ no way to find out the ELF header and/or Program -+ Headers for a limited verification if it they -+ match. One could do a verification of the -+ DYNAMIC segment. Still the found address is the -+ best one GDB could find. */ -+ -+ warning (_(".dynamic section for \"%s\" " -+ "is not at the expected address " -+ "(wrong library or version mismatch?)"), -+ so->so_name); -+ } - } - } - -@@ -774,16 +893,10 @@ locate_base (struct svr4_info *info) - return info->debug_base; - } - --/* Find the first element in the inferior's dynamic link map, and -- return its address in the inferior. Return zero if the address -- could not be determined. -- -- FIXME: Perhaps we should validate the info somehow, perhaps by -- checking r_version for a known version number, or r_state for -- RT_CONSISTENT. */ -+/* Read the r_map field from the supplied r_debug structure. */ - - static CORE_ADDR --solib_svr4_r_map (struct svr4_info *info) -+r_map_from_debug_base (CORE_ADDR debug_base) - { - struct link_map_offsets *lmo = svr4_fetch_link_map_offsets (); - struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr; -@@ -792,13 +905,27 @@ solib_svr4_r_map (struct svr4_info *info - - TRY_CATCH (ex, RETURN_MASK_ERROR) - { -- addr = read_memory_typed_address (info->debug_base + lmo->r_map_offset, -+ addr = read_memory_typed_address (debug_base + lmo->r_map_offset, - ptr_type); - } - exception_print (gdb_stderr, ex); - return addr; - } - -+/* Find the first element in the inferior's dynamic link map, and -+ return its address in the inferior. Return zero if the address -+ could not be determined. -+ -+ FIXME: Perhaps we should validate the info somehow, perhaps by -+ checking r_version for a known version number, or r_state for -+ RT_CONSISTENT. */ -+ -+static CORE_ADDR -+solib_svr4_r_map (struct svr4_info *info) -+{ -+ return r_map_from_debug_base (info->debug_base); -+} -+ - /* Find r_brk from the inferior's debug base. */ - - static CORE_ADDR -@@ -1161,15 +1288,17 @@ svr4_default_sos (void) - return new; - } - --/* Read the whole inferior libraries chain starting at address LM. Add the -- entries to the tail referenced by LINK_PTR_PTR. Ignore the first entry if -- IGNORE_FIRST and set global MAIN_LM_ADDR according to it. */ -+/* Read the whole inferior libraries chain starting at address LM. -+ Expect the first entry in the chain's previous entry to be PREV_LM. -+ Add the entries to the tail referenced by LINK_PTR_PTR. Ignore the -+ first entry if IGNORE_FIRST and set global MAIN_LM_ADDR according -+ to it. Returns nonzero upon success. */ - --static void --svr4_read_so_list (CORE_ADDR lm, struct so_list ***link_ptr_ptr, -- int ignore_first) -+static int -+svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, -+ struct so_list ***link_ptr_ptr, int ignore_first) - { -- CORE_ADDR prev_lm = 0, next_lm; -+ CORE_ADDR next_lm; - - for (; lm != 0; prev_lm = lm, lm = next_lm) - { -@@ -1185,7 +1314,7 @@ svr4_read_so_list (CORE_ADDR lm, struct - if (new->lm_info == NULL) - { - do_cleanups (old_chain); -- break; -+ return 0; - } - - next_lm = new->lm_info->l_next; -@@ -1196,7 +1325,7 @@ svr4_read_so_list (CORE_ADDR lm, struct - paddress (target_gdbarch (), prev_lm), - paddress (target_gdbarch (), new->lm_info->l_prev)); - do_cleanups (old_chain); -- break; -+ return 0; - } - - /* For SVR4 versions, the first entry in the link map is for the -@@ -1291,20 +1420,61 @@ svr4_read_so_list (CORE_ADDR lm, struct - **link_ptr_ptr = new; - *link_ptr_ptr = &new->next; - } -+ -+ return 1; - } - --/* Implement the "current_sos" target_so_ops method. */ -+/* Read the list of loaded libraries from the dynamic linker's base -+ structure. */ - - static struct so_list * --svr4_current_sos (void) -+svr4_current_sos_from_debug_base (void) - { -+ struct svr4_info *info = get_svr4_info (); - CORE_ADDR lm; - struct so_list *head = NULL; - struct so_list **link_ptr = &head; -- struct svr4_info *info; - struct cleanup *back_to; - int ignore_first; -+ -+ gdb_assert (info->debug_base); -+ -+ /* Assume that everything is a library if the dynamic loader was loaded -+ late by a static executable. */ -+ if (exec_bfd && bfd_get_section_by_name (exec_bfd, ".dynamic") == NULL) -+ ignore_first = 0; -+ else -+ ignore_first = 1; -+ -+ back_to = make_cleanup (svr4_free_library_list, &head); -+ -+ /* Walk the inferior's link map list, and build our list of -+ `struct so_list' nodes. */ -+ lm = solib_svr4_r_map (info); -+ if (lm) -+ svr4_read_so_list (lm, 0, &link_ptr, ignore_first); -+ -+ /* On Solaris, the dynamic linker is not in the normal list of -+ shared objects, so make sure we pick it up too. Having -+ symbol information for the dynamic linker is quite crucial -+ for skipping dynamic linker resolver code. */ -+ lm = solib_svr4_r_ldsomap (info); -+ if (lm) -+ svr4_read_so_list (lm, 0, &link_ptr, 0); -+ -+ discard_cleanups (back_to); -+ -+ return head; -+} -+ -+/* Implement the "current_sos" target_so_ops method. */ -+ -+static struct so_list * -+svr4_current_sos (void) -+{ -+ struct svr4_info *info; - struct svr4_library_list library_list; -+ struct so_list *result; - - /* Fall back to manual examination of the target if the packet is not - supported or gdbserver failed to find DT_DEBUG. gdb.server/solib-list.exp -@@ -1327,6 +1497,10 @@ svr4_current_sos (void) - - info = get_svr4_info (); - -+ /* If we have a namespace table then return a flattened copy. */ -+ if (info->namespace_table != NULL) -+ return namespace_table_flatten (info->namespace_table); -+ - /* Always locate the debug struct, in case it has moved. */ - info->debug_base = 0; - locate_base (info); -@@ -1336,35 +1510,12 @@ svr4_current_sos (void) - if (! info->debug_base) - return svr4_default_sos (); - -- /* Assume that everything is a library if the dynamic loader was loaded -- late by a static executable. */ -- if (exec_bfd && bfd_get_section_by_name (exec_bfd, ".dynamic") == NULL) -- ignore_first = 0; -- else -- ignore_first = 1; -- -- back_to = make_cleanup (svr4_free_library_list, &head); -- -- /* Walk the inferior's link map list, and build our list of -- `struct so_list' nodes. */ -- lm = solib_svr4_r_map (info); -- if (lm) -- svr4_read_so_list (lm, &link_ptr, ignore_first); -- -- /* On Solaris, the dynamic linker is not in the normal list of -- shared objects, so make sure we pick it up too. Having -- symbol information for the dynamic linker is quite crucial -- for skipping dynamic linker resolver code. */ -- lm = solib_svr4_r_ldsomap (info); -- if (lm) -- svr4_read_so_list (lm, &link_ptr, 0); -- -- discard_cleanups (back_to); -+ result = svr4_current_sos_from_debug_base (); - -- if (head == NULL) -+ if (result == NULL) - return svr4_default_sos (); - -- return head; -+ return result; - } - - /* Get the address of the link_map for a given OBJFILE. */ -@@ -1449,6 +1600,498 @@ exec_entry_point (struct bfd *abfd, stru - return gdbarch_addr_bits_remove (target_gdbarch (), addr); - } - -+/* A probe and its associated information structure. */ -+ -+struct probe_and_info -+{ -+ /* The probe. */ -+ struct probe *probe; -+ -+ /* The probe_info from which the probe was created. */ -+ const struct probe_info *info; -+}; -+ -+/* Get the solib event probe at the specified location, and the -+ probe_info the probe was created with. Fills in RESULT and -+ returns nonzero if a solib event probe was found at the -+ specified location. Returns zero if no solib event probe -+ was found. */ -+ -+static int -+solib_event_probe_at (struct svr4_info *info, struct bp_location *loc, -+ struct probe_and_info *result) -+{ -+ int i; -+ -+ for (i = 0; i < NUM_PROBES; i++) -+ { -+ struct probe *probe; -+ int ix; -+ -+ for (ix = 0; VEC_iterate (probe_p, info->probes[i], ix, probe); ++ix) -+ { -+ if (loc->pspace == current_program_space -+ && loc->address == probe->address) -+ { -+ result->info = &probe_info[i]; -+ result->probe = probe; -+ -+ return 1; -+ } -+ } -+ } -+ -+ return 0; -+} -+ -+/* Decide what action to take when the specified solib event probe is -+ hit. */ -+ -+static enum probe_action -+solib_event_probe_action (struct probe_and_info *pi) -+{ -+ enum probe_action action; -+ unsigned probe_argc; -+ -+ action = pi->info->action; -+ if (action == NAMESPACE_NO_ACTION || action == NAMESPACE_TABLE_INVALIDATE) -+ return action; -+ -+ gdb_assert (action == NAMESPACE_RELOAD -+ || action == NAMESPACE_UPDATE_OR_RELOAD); -+ -+ /* Check that an appropriate number of arguments has been supplied. -+ We expect: -+ arg0: Lmid_t lmid (mandatory) -+ arg1: struct r_debug *debug_base (mandatory) -+ arg2: struct link_map *new (optional, for incremental updates) */ -+ probe_argc = get_probe_argument_count (pi->probe); -+ if (probe_argc == 2) -+ action = NAMESPACE_RELOAD; -+ else if (probe_argc < 2) -+ action = NAMESPACE_TABLE_INVALIDATE; -+ -+ return action; -+} -+ -+/* A namespace in the dynamic linker. */ -+ -+struct namespace -+{ -+ /* Numeric link-map ID of the namespace. */ -+ LONGEST lmid; -+ -+ /* List of objects loaded into the namespace. */ -+ struct so_list *solist; -+}; -+ -+/* Returns a hash code for the namespace referenced by p. */ -+ -+static hashval_t -+hash_namespace (const void *p) -+{ -+ const struct namespace *ns = p; -+ -+ return (hashval_t) ns->lmid; -+} -+ -+/* Returns non-zero if the namespaces referenced by p1 and p2 -+ are equal. */ -+ -+static int -+equal_namespace (const void *p1, const void *p2) -+{ -+ const struct namespace *ns1 = p1; -+ const struct namespace *ns2 = p2; -+ -+ return ns1->lmid == ns2->lmid; -+} -+ -+/* Free a namespace. */ -+ -+static void -+free_namespace (void *p) -+{ -+ struct namespace *ns = p; -+ -+ svr4_free_library_list (ns->solist); -+ xfree (ns); -+} -+ -+/* Populate this namespace by reading the entire list of shared -+ objects from the inferior. Returns nonzero on success. */ -+ -+static int -+namespace_update_full (struct svr4_info *info, LONGEST lmid, -+ CORE_ADDR debug_base, int is_initial_ns) -+{ -+ struct so_list *result = NULL, *so; -+ struct namespace lookup, *ns; -+ void **slot; -+ -+ /* Read the list of shared objects from the inferior. The -+ initial namespace requires extra processing and is handled -+ separately. */ -+ if (is_initial_ns) -+ { -+ result = svr4_current_sos_from_debug_base (); -+ } -+ else -+ { -+ CORE_ADDR lm = r_map_from_debug_base (debug_base); -+ struct so_list **link_ptr = &result; -+ -+ if (!svr4_read_so_list (lm, 0, &link_ptr, 0)) -+ return 0; -+ } -+ -+ /* If the namespace is empty then delete it from the table. */ -+ if (result == NULL) -+ { -+ if (info->namespace_table != NULL) -+ { -+ lookup.lmid = lmid; -+ htab_remove_elt (info->namespace_table, &lookup); -+ } -+ -+ return 1; -+ } -+ -+ /* Fill in the link-map IDs and initial namespace flags. */ -+ for (so = result; so; so = so->next) -+ { -+ so->lm_info->lmid = lmid; -+ so->lm_info->in_initial_ns = is_initial_ns; -+ } -+ -+ /* Create the namespace table, if necessary. */ -+ if (info->namespace_table == NULL) -+ { -+ info->namespace_table = htab_create_alloc (1, hash_namespace, -+ equal_namespace, -+ free_namespace, -+ xcalloc, xfree); -+ } -+ -+ /* Update the namespace table with our new list. */ -+ lookup.lmid = lmid; -+ slot = htab_find_slot (info->namespace_table, &lookup, INSERT); -+ if (*slot == HTAB_EMPTY_ENTRY) -+ { -+ ns = XCNEW (struct namespace); -+ ns->lmid = lmid; -+ *slot = ns; -+ } -+ else -+ { -+ ns = *slot; -+ svr4_free_library_list (ns->solist); -+ } -+ ns->solist = result; -+ -+ return 1; -+} -+ -+/* Update this namespace starting from the link-map entry passed by -+ the linker in the probe's third argument. Returns nonzero if the -+ list was successfully updated, or zero to indicate failure. */ -+ -+static int -+namespace_update_incremental (struct svr4_info *info, LONGEST lmid, -+ CORE_ADDR lm, int is_initial_ns) -+{ -+ struct namespace lookup, *ns; -+ struct so_list *tail, **link, *so; -+ struct value *val; -+ -+ /* Find our namespace in the table. */ -+ if (info->namespace_table == NULL) -+ return 0; -+ -+ lookup.lmid = lmid; -+ ns = htab_find (info->namespace_table, &lookup); -+ if (ns == NULL) -+ return 0; -+ -+ /* Walk to the end of the list. */ -+ tail = ns->solist; -+ if (tail == NULL) -+ return 0; -+ -+ while (tail->next) -+ tail = tail->next; -+ link = &tail->next; -+ -+ /* Read the new objects. */ -+ if (!svr4_read_so_list (lm, tail->lm_info->lm_addr, &link, 0)) -+ return 0; -+ -+ /* Fill in the link-map IDs and initial namespace flags. */ -+ for (so = tail; so; so = so->next) -+ { -+ so->lm_info->lmid = lmid; -+ so->lm_info->in_initial_ns = is_initial_ns; -+ } -+ -+ return 1; -+} -+ -+/* Update the namespace table as appropriate when using the -+ probes-based linker interface. Do nothing if using the -+ standard interface. */ -+ -+static void -+svr4_handle_solib_event (bpstat bs) -+{ -+ struct svr4_info *info = get_svr4_info (); -+ struct probe_and_info buf, *pi = &buf; -+ enum probe_action action; -+ struct value *val; -+ LONGEST lmid; -+ CORE_ADDR debug_base, lm = 0; -+ int is_initial_ns; -+ -+ /* It is possible that this function will be called incorrectly -+ by the handle_solib_event in handle_inferior_event if GDB goes -+ fully multi-target. */ -+ gdb_assert (bs != NULL); -+ -+ if (!info->using_probes) -+ return; -+ -+ if (!solib_event_probe_at (info, bs->bp_location_at, pi)) -+ goto error; -+ -+ action = solib_event_probe_action (pi); -+ if (action == NAMESPACE_TABLE_INVALIDATE) -+ goto error; -+ -+ if (action == NAMESPACE_NO_ACTION) -+ return; -+ -+ val = evaluate_probe_argument (pi->probe, 0); -+ if (val == NULL) -+ goto error; -+ -+ lmid = value_as_long (val); -+ -+ val = evaluate_probe_argument (pi->probe, 1); -+ if (val == NULL) -+ goto error; -+ -+ debug_base = value_as_address (val); -+ if (debug_base == 0) -+ goto error; -+ -+ /* Always locate the debug struct, in case it moved. */ -+ info->debug_base = 0; -+ if (locate_base (info) == 0) -+ goto error; -+ -+ is_initial_ns = (debug_base == info->debug_base); -+ -+ if (action == NAMESPACE_UPDATE_OR_RELOAD) -+ { -+ val = evaluate_probe_argument (pi->probe, 2); -+ if (val != NULL) -+ lm = value_as_address (val); -+ -+ if (lm == 0) -+ action = NAMESPACE_RELOAD; -+ } -+ -+ if (action == NAMESPACE_UPDATE_OR_RELOAD) -+ { -+ if (namespace_update_incremental (info, lmid, lm, is_initial_ns)) -+ return; -+ -+ action = NAMESPACE_RELOAD; -+ } -+ -+ gdb_assert (action == NAMESPACE_RELOAD); -+ -+ if (namespace_update_full (info, lmid, debug_base, is_initial_ns)) -+ return; -+ -+ error: -+ -+ /* We should never reach here, but if we do we disable the -+ probes interface and revert to the original interface. -+ We don't reset the breakpoints as the ones we've set up -+ are adequate. */ -+ warning (_("Probes-based dynamic linker interface failed.\n" -+ "Reverting to original interface.\n")); -+ -+ free_namespace_table (info); -+ free_probes (info); -+ info->using_probes = 0; -+} -+ -+/* Helper function for namespace_table_flatten. */ -+ -+static int -+namespace_table_flatten_helper (void **slot, void *arg) -+{ -+ struct namespace *ns = (struct namespace *) *slot; -+ struct so_list *src = ns->solist; -+ struct so_list **link = (struct so_list **) arg; -+ -+ while (*link) -+ link = &(*link)->next; -+ -+ while (src != NULL) -+ { -+ struct so_list *dst; -+ -+ dst = xmalloc (sizeof (struct so_list)); -+ memcpy (dst, src, sizeof (struct so_list)); -+ -+ dst->lm_info = xmalloc (sizeof (struct lm_info)); -+ memcpy (dst->lm_info, src->lm_info, sizeof (struct lm_info)); -+ -+ *link = dst; -+ link = &dst->next; -+ -+ src = src->next; -+ } -+ -+ *link = NULL; -+ -+ return 1; /* Continue traversal. */ -+} -+ -+/* Flatten the namespace table into a single list. */ -+ -+static struct so_list * -+namespace_table_flatten (htab_t namespace_table) -+{ -+ struct so_list *dst = NULL; -+ -+ htab_traverse (namespace_table, namespace_table_flatten_helper, &dst); -+ -+ return dst; -+} -+ -+/* Helper function for svr4_update_solib_event_breakpoints. */ -+ -+static int -+svr4_update_solib_event_breakpoint (struct breakpoint *b, void *arg) -+{ -+ struct svr4_info *info = get_svr4_info (); -+ struct bp_location *loc; -+ -+ if (b->type != bp_shlib_event) -+ return 0; /* Continue iterating. */ -+ -+ for (loc = b->loc; loc; loc = loc->next) -+ { -+ struct probe_and_info buf, *pi = &buf; -+ -+ if (solib_event_probe_at (info, loc, pi)) -+ { -+ if (pi->info->action == NAMESPACE_NO_ACTION) -+ b->enable_state = (stop_on_solib_events -+ ? bp_enabled : bp_disabled); -+ -+ return 0; /* Continue iterating. */ -+ } -+ } -+ -+ return 0; /* Continue iterating. */ -+} -+ -+/* Enable or disable optional solib event breakpoints as appropriate. -+ Called whenever stop_on_solib_events is changed. */ -+ -+static void -+svr4_update_solib_event_breakpoints (void) -+{ -+ struct svr4_info *info = get_svr4_info (); -+ -+ if (info->using_probes) -+ iterate_over_breakpoints (svr4_update_solib_event_breakpoint, NULL); -+} -+ -+/* Both the SunOS and the SVR4 dynamic linkers call a marker function -+ before and after mapping and unmapping shared libraries. The sole -+ purpose of this method is to allow debuggers to set a breakpoint so -+ they can track these changes. -+ -+ Some versions of the glibc dynamic linker contain named probes -+ to allow more fine grained stopping. Given the address of the -+ original marker function, this function attempts to find these -+ probes, and if found, sets breakpoints on those instead. If the -+ probes aren't found, a single breakpoint is set on the original -+ marker function. */ -+ -+static void -+svr4_create_solib_event_breakpoints (struct gdbarch *gdbarch, -+ CORE_ADDR address) -+{ -+ struct svr4_info *info = get_svr4_info (); -+ struct obj_section *os; -+ -+ os = find_pc_section (address); -+ if (os != NULL) -+ { -+ int with_prefix; -+ -+ for (with_prefix = 0; with_prefix <= 1; with_prefix++) -+ { -+ int all_probes_found = 1; -+ int i; -+ -+ for (i = 0; i < NUM_PROBES; i++) -+ { -+ char name[32] = { '\0' }; -+ -+ /* Fedora 17, RHEL 6.2, and RHEL 6.3 shipped with an -+ early version of the probes code in which the probes' -+ names were prefixed with "rtld_". The locations and -+ arguments of the probes are otherwise the same, so we -+ check for the prefixed version if the unprefixed -+ probes are not found. */ -+ -+ if (with_prefix) -+ strncat (name, "rtld_", sizeof (name)); -+ -+ strncat (name, probe_info[i].name, sizeof (name) - sizeof ("rtld_")); -+ -+ info->probes[i] = find_probes_in_objfile (os->objfile, "rtld", -+ name); -+ -+ if (!VEC_length (probe_p, info->probes[i])) -+ { -+ free_probes (info); -+ all_probes_found = 0; -+ break; -+ } -+ } -+ -+ if (all_probes_found) -+ { -+ info->using_probes = 1; -+ -+ for (i = 0; i < NUM_PROBES; i++) -+ { -+ struct probe *probe; -+ int ix; -+ -+ for (ix = 0; -+ VEC_iterate (probe_p, info->probes[i], ix, probe); -+ ++ix) -+ create_solib_event_breakpoint (gdbarch, probe->address); -+ } -+ -+ svr4_update_solib_event_breakpoints (); -+ return; -+ } -+ } -+ } -+ -+ create_solib_event_breakpoint (gdbarch, address); -+} -+ - /* Helper function for gdb_bfd_lookup_symbol. */ - - static int -@@ -1501,6 +2144,9 @@ enable_break (struct svr4_info *info, in - info->interp_text_sect_low = info->interp_text_sect_high = 0; - info->interp_plt_sect_low = info->interp_plt_sect_high = 0; - -+ free_probes (info); -+ info->using_probes = 0; -+ - /* If we already have a shared library list in the target, and - r_debug contains r_brk, set the breakpoint there - this should - mean r_brk has already been relocated. Assume the dynamic linker -@@ -1532,7 +2178,7 @@ enable_break (struct svr4_info *info, in - That knowledge is encoded in the address, if it's Thumb the low bit - is 1. However, we've stripped that info above and it's not clear - what all the consequences are of passing a non-addr_bits_remove'd -- address to create_solib_event_breakpoint. The call to -+ address to svr4_create_solib_event_breakpoints. The call to - find_pc_section verifies we know about the address and have some - hope of computing the right kind of breakpoint to use (via - symbol info). It does mean that GDB needs to be pointed at a -@@ -1570,7 +2216,7 @@ enable_break (struct svr4_info *info, in - + bfd_section_size (tmp_bfd, interp_sect); - } - -- create_solib_event_breakpoint (target_gdbarch (), sym_addr); -+ svr4_create_solib_event_breakpoints (target_gdbarch (), sym_addr); - return 1; - } - } -@@ -1728,7 +2374,8 @@ enable_break (struct svr4_info *info, in - - if (sym_addr != 0) - { -- create_solib_event_breakpoint (target_gdbarch (), load_addr + sym_addr); -+ svr4_create_solib_event_breakpoints (target_gdbarch (), -+ load_addr + sym_addr); - xfree (interp_name); - return 1; - } -@@ -1754,7 +2401,7 @@ enable_break (struct svr4_info *info, in - sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (), - sym_addr, - ¤t_target); -- create_solib_event_breakpoint (target_gdbarch (), sym_addr); -+ svr4_create_solib_event_breakpoints (target_gdbarch (), sym_addr); - return 1; - } - } -@@ -1770,7 +2417,7 @@ enable_break (struct svr4_info *info, in - sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (), - sym_addr, - ¤t_target); -- create_solib_event_breakpoint (target_gdbarch (), sym_addr); -+ svr4_create_solib_event_breakpoints (target_gdbarch (), sym_addr); - return 1; - } - } -@@ -2266,6 +2913,9 @@ svr4_solib_create_inferior_hook (int fro - - info = get_svr4_info (); - -+ /* Free the probes-based interface's namespace table. */ -+ free_namespace_table (info); -+ - /* Relocate the main executable if necessary. */ - svr4_relocate_main_executable (); - -@@ -2507,4 +3157,6 @@ _initialize_svr4_solib (void) - svr4_so_ops.lookup_lib_global_symbol = elf_lookup_lib_symbol; - svr4_so_ops.same = svr4_same; - svr4_so_ops.keep_data_in_core = svr4_keep_data_in_core; -+ svr4_so_ops.handle_solib_event = svr4_handle_solib_event; -+ svr4_so_ops.update_breakpoints = svr4_update_solib_event_breakpoints; - } -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen-solib.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen-solib.c 2013-02-15 22:37:35.761417596 +0100 -@@ -0,0 +1,24 @@ -+/* Copyright 2012 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 . */ -+ -+#include -+ -+int -+foo (int n) -+{ -+ printf ("foo %d\n", n); -+ -+ return 0; -+} -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.c 2013-02-15 22:37:35.762417598 +0100 -@@ -0,0 +1,58 @@ -+/* Copyright 2012 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 . */ -+ -+#define _GNU_SOURCE -+#include -+ -+void -+stop () -+{ -+} -+ -+int -+main () -+{ -+ void *handle1, *handle2, *handle3; -+ void (*func)(int); -+ -+ handle1 = dlmopen (LM_ID_NEWLM, SHLIB_NAME, RTLD_LAZY); -+ stop (); -+ -+ func = (void (*)(int)) dlsym (handle1, "foo"); -+ func (1); -+ -+ handle2 = dlmopen (LM_ID_NEWLM, SHLIB_NAME, RTLD_LAZY); -+ stop (); -+ -+ func = (void (*)(int)) dlsym (handle2, "foo"); -+ func (2); -+ -+ handle3 = dlopen (SHLIB_NAME, RTLD_LAZY); -+ stop (); -+ -+ func = (void (*)(int)) dlsym (handle3, "foo"); -+ func (3); -+ -+ dlclose (handle1); -+ stop (); -+ -+ dlclose (handle2); -+ stop (); -+ -+ dlclose (handle3); -+ stop (); -+ -+ return 0; -+} -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.exp 2013-02-15 22:37:35.762417598 +0100 -@@ -0,0 +1,125 @@ -+# Copyright 2012 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 . -+ -+if { [skip_shlib_tests] || [is_remote target] } { -+ return 0 -+} -+ -+standard_testfile -+ -+set libname $testfile-solib -+set srcfile_lib $srcdir/$subdir/$libname.c -+set binfile_lib [standard_output_file $libname.so] -+ -+set normal_bp "_dl_debug_state" -+set probes_bp "dl_main" -+ -+if { [gdb_compile_shlib $srcfile_lib $binfile_lib \ -+ [list additional_flags=-fPIC]] != "" } { -+ untested "Could not compile $binfile_lib." -+ return -1 -+} -+ -+if { [prepare_for_testing $testfile.exp $testfile $srcfile \ -+ [list additional_flags=-DSHLIB_NAME\=\"$binfile_lib\" libs=-ldl]] } { -+ return -1 -+} -+ -+# Run "info sharedlibrary" and check our library is shown the expected -+# number of times. -+proc check_info_shared { test expect } { -+ global libname -+ global gdb_prompt -+ -+ set actual 0 -+ -+ gdb_test_multiple "info sharedlibrary" $test { -+ -re $libname { -+ incr actual 1 -+ exp_continue -+ } -+ -re "\r\n$gdb_prompt $" { -+ if { $actual == $expect } { -+ pass $test -+ } else { -+ fail $test -+ } -+ } -+ } -+} -+ -+# Enable stop-on-solib-events -+gdb_test_no_output "set stop-on-solib-events 1" -+ -+# Run to the first stop -+gdb_test "run" ".*Stopped due to shared library event.*" -+ -+# XFAIL if we are not using probes -+set test "ensure using probes" -+set using_probes 0 -+gdb_test_multiple "bt" $test { -+ -re "#0 +\[^\r\n\]*\\m(__GI_)?$normal_bp\\M.*$gdb_prompt $" { -+ xfail $test -+ } -+ -re "#0 +\[^\r\n\]*\\m(__GI_)?$probes_bp\\M.*$gdb_prompt $" { -+ pass $test -+ set using_probes 1 -+ } -+} -+ -+if { $using_probes } { -+ # Set up breakpoints. -+ gdb_test_no_output "set stop-on-solib-events 0" -+ gdb_test "break stop" {Breakpoint [0-9]+ at .*} -+ gdb_test_no_output "set breakpoint pending on" -+ gdb_test "break foo" {Breakpoint [0-9]+ \(foo\) pending\.} -+ -+ # Check our library isn't loaded. -+ check_info_shared "info sharedlibrary #1" 0 -+ -+ # Run to the first stop and check our library loaded. -+ gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+ check_info_shared "info sharedlibrary #2" 1 -+ -+ # The next stop should be the function in the library. -+ gdb_test "c" {Breakpoint [0-9]+, .* in foo \(\) from .*} -+ -+ # Run to the next stop and check our library is now loaded twice. -+ gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+ check_info_shared "info sharedlibrary #3" 2 -+ -+ # The next stop should be the function in the library. -+ gdb_test "c" {Breakpoint [0-9]+, .* in foo \(\) from .*} -+ -+ # Run to the next stop and check our library is now loaded three -+ # times. -+ gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+ check_info_shared "info sharedlibrary #4" 3 -+ -+ # The next stop should be the function in the library. -+ gdb_test "c" {Breakpoint [0-9]+, .* in foo \(\) from .*} -+ -+ # Run to the next stop and check our library is now loaded twice. -+ gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+ check_info_shared "info sharedlibrary #5" 2 -+ -+ # Run to the next stop and check our library is now loaded once. -+ gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+ check_info_shared "info sharedlibrary #6" 1 -+ -+ # Run to the next stop and check our library is not loaded. -+ gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+ check_info_shared "info sharedlibrary #7" 0 -+} -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-interp.exp -=================================================================== ---- gdb-7.5.50.20130215.orig/gdb/testsuite/gdb.base/break-interp.exp 2013-01-01 07:33:25.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-interp.exp 2013-02-15 22:37:35.762417598 +0100 -@@ -109,12 +109,19 @@ proc strip_debug {dest} { - } - } - -+# The marker function for the standard runtime linker interface is -+# _dl_debug_state. The probes-based interface has no specific marker -+# function; the probe we will stop on (init_start) is in dl_main so we -+# check for that. -+ -+set solib_bp {(_dl_debug_state|dl_main)} -+ - # Implementation of reach. - - proc reach_1 {func command displacement} { -- global gdb_prompt expect_out -+ global gdb_prompt expect_out solib_bp - -- if {$func == "_dl_debug_state"} { -+ if {$func == $solib_bp} { - # Breakpoint on _dl_debug_state can have problems due to its overlap - # with the existing internal breakpoint from GDB. - gdb_test_no_output "set stop-on-solib-events 1" -@@ -142,21 +149,21 @@ proc reach_1 {func command displacement} - exp_continue - } - -re "Breakpoint \[0-9\]+, \\.?(__GI_)?$func \\(.*\\) at .*:\[0-9\]+\r\n.*$gdb_prompt $" { -- if {$func == "_dl_debug_state"} { -+ if {$func == $solib_bp} { - fail $test - } else { - pass $test - } - } - -re "Breakpoint \[0-9\]+, \[0-9xa-f\]+ in \\.?(__GI_)?$func \\(\\).*\r\n$gdb_prompt $" { -- if {$func == "_dl_debug_state"} { -+ if {$func == $solib_bp} { - fail $test - } else { - pass $test - } - } - -re "Stopped due to (spurious )?shared library event.*\r\n$gdb_prompt $" { -- if {$func == "_dl_debug_state"} { -+ if {$func == $solib_bp} { - if {$debug_state_count == 0} { - # First stop does not yet relocate the _start function - # descriptor on ppc64. -@@ -175,7 +182,7 @@ proc reach_1 {func command displacement} - fail $test_displacement - } - -- if {$func == "_dl_debug_state"} { -+ if {$func == $solib_bp} { - gdb_test_no_output "set stop-on-solib-events 0" - } - } -@@ -357,7 +364,7 @@ proc test_attach {file displacement {rel - } - - proc test_ld {file ifmain trynosym displacement} { -- global srcdir subdir gdb_prompt expect_out inferior_exited_re -+ global srcdir subdir gdb_prompt expect_out inferior_exited_re solib_bp - - # First test normal `file'-command loaded $FILE with symbols. - -@@ -385,9 +392,9 @@ proc test_ld {file ifmain trynosym displ - gdb_test_no_output "set args ${objdir}/${subdir}/$binfile_test" "set args OBJDIR/${subdir}/$binfile_test" - } - -- reach "_dl_debug_state" "run" $displacement -+ reach $solib_bp "run" $displacement - -- gdb_test "bt" "#0 +\[^\r\n\]*\\m(__GI_)?_dl_debug_state\\M.*" "dl bt" -+ gdb_test "bt" "#0 +\[^\r\n\]*\\m(__GI_)?$solib_bp\\M.*" "dl bt" - - if $ifmain { - reach "main" continue "NONE" -@@ -399,7 +406,7 @@ proc test_ld {file ifmain trynosym displ - - # Try re-run if the new PIE displacement takes effect. - gdb_test "kill" "" "kill" {Kill the program being debugged\? \(y or n\) } "y" -- reach "_dl_debug_state" "run" $displacement -+ reach $solib_bp "run" $displacement - - if $ifmain { - test_core $file $displacement -@@ -431,7 +438,7 @@ proc test_ld {file ifmain trynosym displ - gdb_test "exec-file $file" "exec-file $escapedfile" "load" - - if $ifmain { -- reach "_dl_debug_state" run $displacement -+ reach $solib_bp run $displacement - - # Use two separate gdb_test_multiple statements to avoid timeouts due - # to slow processing of wildcard capturing long output -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes-solib.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes-solib.c 2013-02-15 22:37:35.762417598 +0100 -@@ -0,0 +1,24 @@ -+/* Copyright 2012 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 . */ -+ -+#include -+ -+int -+foo (int n) -+{ -+ printf ("foo %d\n", n); -+ -+ return 0; -+} -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.c 2013-02-15 22:37:35.763417600 +0100 -@@ -0,0 +1,26 @@ -+/* Copyright 2012 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 . */ -+ -+#include -+ -+int -+main () -+{ -+ void *handle = dlopen (SHLIB_NAME, RTLD_LAZY); -+ -+ dlclose (handle); -+ -+ return 0; -+} -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.exp 2013-02-15 22:37:35.763417600 +0100 -@@ -0,0 +1,76 @@ -+# Copyright 2012 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 . -+ -+if { [skip_shlib_tests] || [is_remote target] } { -+ return 0 -+} -+ -+standard_testfile -+ -+set libname $testfile-solib -+set srcfile_lib $srcdir/$subdir/$libname.c -+set binfile_lib [standard_output_file $libname.so] -+ -+set normal_bp "_dl_debug_state" -+set probes_bp "dl_main" -+ -+if { [gdb_compile_shlib $srcfile_lib $binfile_lib \ -+ [list additional_flags=-fPIC]] != "" } { -+ untested "Could not compile $binfile_lib." -+ return -1 -+} -+ -+if { [prepare_for_testing $testfile.exp $testfile $srcfile \ -+ [list additional_flags=-DSHLIB_NAME\=\"$binfile_lib\" libs=-ldl]] } { -+ return -1 -+} -+ -+# Enable stop-on-solib-events -+gdb_test_no_output "set stop-on-solib-events 1" -+ -+# Run to the first stop -+gdb_test "run" ".*Stopped due to shared library event.*" -+ -+# XFAIL if we are not using probes -+set test "ensure using probes" -+set using_probes 0 -+gdb_test_multiple "bt" $test { -+ -re "#0 +\[^\r\n\]*\\m(__GI_)?$normal_bp\\M.*$gdb_prompt $" { -+ xfail $test -+ } -+ -re "#0 +\[^\r\n\]*\\m(__GI_)?$probes_bp\\M.*$gdb_prompt $" { -+ pass $test -+ set using_probes 1 -+ } -+} -+ -+if { $using_probes } { -+ # Run til it loads our library -+ set test "run til our library loads" -+ set loaded_library 0 -+ while { !$loaded_library } { -+ gdb_test_multiple "c" $test { -+ -re "Inferior loaded $binfile_lib\\M.*$gdb_prompt $" { -+ pass $test -+ set loaded_library 1 -+ } -+ -re "Stopped due to shared library event\\M.*$gdb_prompt $" { -+ } -+ } -+ } -+ -+ # Call something to ensure that relocation occurred -+ gdb_test "call foo(23)" "foo 23.*\\\$.* = .*" -+} -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib1.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib1.c 2013-02-15 22:37:35.763417600 +0100 -@@ -0,0 +1,24 @@ -+/* Copyright 2012 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 . */ -+ -+#include -+ -+int -+foo (int n) -+{ -+ printf ("foo %d\n", n); -+ -+ return 0; -+} -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib2.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib2.c 2013-02-15 22:37:35.763417600 +0100 -@@ -0,0 +1,24 @@ -+/* Copyright 2012 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 . */ -+ -+#include -+ -+int -+bar (int n) -+{ -+ printf ("bar %d\n", n); -+ -+ return 0; -+} -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.c 2013-02-15 22:37:35.763417600 +0100 -@@ -0,0 +1,48 @@ -+/* Copyright 2012 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 . */ -+ -+#include -+ -+void -+stop () -+{ -+} -+ -+int -+main () -+{ -+ void *handle1, *handle2; -+ void (*func)(int); -+ -+ handle1 = dlopen (SHLIB1_NAME, RTLD_LAZY); -+ stop (); -+ -+ handle2 = dlopen (SHLIB2_NAME, RTLD_LAZY); -+ stop (); -+ -+ func = (void (*)(int)) dlsym (handle1, "foo"); -+ func (1); -+ -+ func = (void (*)(int)) dlsym (handle2, "bar"); -+ func (2); -+ -+ dlclose (handle1); -+ stop (); -+ -+ dlclose (handle2); -+ stop (); -+ -+ return 0; -+} -Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.exp 2013-02-15 22:37:35.764417602 +0100 -@@ -0,0 +1,139 @@ -+# Copyright 2012 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 . -+ -+if { [skip_shlib_tests] || [is_remote target] } { -+ return 0 -+} -+ -+standard_testfile -+ -+set lib1name $testfile-solib1 -+set srcfile_lib1 $srcdir/$subdir/$lib1name.c -+set binfile_lib1 [standard_output_file $lib1name.so] -+set define1 -DSHLIB1_NAME\=\"$binfile_lib1\" -+ -+set lib2name $testfile-solib2 -+set srcfile_lib2 $srcdir/$subdir/$lib2name.c -+set binfile_lib2 [standard_output_file $lib2name.so] -+set define2 -DSHLIB2_NAME\=\"$binfile_lib2\" -+ -+if { [gdb_compile_shlib $srcfile_lib1 $binfile_lib1 \ -+ [list additional_flags=-fPIC]] != "" } { -+ untested "Could not compile $binfile_lib1." -+ return -1 -+} -+ -+if { [gdb_compile_shlib $srcfile_lib2 $binfile_lib2 \ -+ [list additional_flags=-fPIC]] != "" } { -+ untested "Could not compile $binfile_lib2." -+ return -1 -+} -+ -+set cflags "$define1 $define2" -+if { [prepare_for_testing $testfile.exp $testfile $srcfile \ -+ [list additional_flags=$cflags libs=-ldl]] } { -+ return -1 -+} -+ -+# Run "info sharedlibrary" and check for the presence or absence of -+# our libraries. -+proc check_info_shared { test expect1 expect2 } { -+ global lib1name -+ global lib2name -+ global gdb_prompt -+ -+ set actual1 0 -+ set actual2 0 -+ -+ gdb_test_multiple "info sharedlibrary" $test { -+ -re $lib1name { -+ set actual1 1 -+ exp_continue -+ } -+ -re $lib2name { -+ set actual2 1 -+ exp_continue -+ } -+ -re "\r\n$gdb_prompt $" { -+ if { $actual1 == $expect1 && $actual2 == $expect2 } { -+ pass $test -+ } else { -+ fail $test -+ } -+ } -+ } -+} -+ -+# Set up breakpoints. -+gdb_test "break stop" {Breakpoint [0-9]+ at .*} -+gdb_test_no_output "set breakpoint pending on" -+gdb_test "break foo" {Breakpoint [0-9]+ \(foo\) pending\.} -+gdb_test "break bar" {Breakpoint [0-9]+ \(bar\) pending\.} -+ -+# Check neither of the libraries are loaded at the start. -+gdb_test "start" {Temporary breakpoint [0-9]+, .* in main \(\)} -+check_info_shared "info sharedlibrary #1" 0 0 -+ -+# Run to the first stop and check that only the first library is loaded. -+gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+check_info_shared "info sharedlibrary #2" 1 0 -+ -+# Run to the second stop and check that both libraries are loaded. -+gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+check_info_shared "info sharedlibrary #3" 1 1 -+ -+# Check that the next stop is in foo. -+gdb_test "c" {Breakpoint [0-9]+, .* in foo \(\) from .*} -+ -+# Check that the next stop is in bar. -+gdb_test "c" {Breakpoint [0-9]+, .* in bar \(\) from .*} -+ -+# Restart the inferior and make sure there are no breakpoint reset -+# errors. These can happen with the probes-based runtime linker -+# interface if the cache is not cleared correctly. -+set test "restart" -+gdb_test_multiple "run" $test { -+ -re {Start it from the beginning\? \(y or n\) } { -+ send_gdb "y\n" -+ exp_continue -+ } -+ -re {Error in re-setting breakpoint} { -+ fail $test -+ } -+ -re "\r\n$gdb_prompt $" { -+ pass $test -+ } -+} -+ -+# We're at the first stop. Check that only the first library is loaded. -+check_info_shared "info sharedlibrary #4" 1 0 -+ -+# Run to the second stop and check that both libraries are loaded. -+gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+check_info_shared "info sharedlibrary #5" 1 1 -+ -+# Check that the next stop is in foo. -+gdb_test "c" {Breakpoint [0-9]+, .* in foo \(\) from .*} -+ -+# Check that the next stop is in bar. -+gdb_test "c" {Breakpoint [0-9]+, .* in bar \(\) from .*} -+ -+# Run to the next stop and check that the first library has been unloaded. -+gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+check_info_shared "info sharedlibrary #6" 0 1 -+ -+# Run to the last stop and check that both libraries are gone. -+gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)} -+check_info_shared "info sharedlibrary #7" 0 0 diff --git a/gdb-dlopen-stap-probe-7of7.patch b/gdb-dlopen-stap-probe-7of7.patch deleted file mode 100644 index fc11436..0000000 --- a/gdb-dlopen-stap-probe-7of7.patch +++ /dev/null @@ -1,147 +0,0 @@ -2012-07-30 Gary Benson - - * objfiles.h (inhibit_section_map_updates): New function - declaration. - (resume_section_map_updates): Likewise. - (resume_section_map_updates_cleanup): Likewise. - * objfiles.c (objfile_pspace_info): New field "inhibit_updates". - (find_pc_section): Do not update the section map if - inhibit_updates is set. - (inhibit_section_map_updates): New function. - (resume_section_map_updates): Likewise. - (resume_section_map_updates_cleanup): Likewise. - * solib-svr4.c (svr4_handle_solib_event): Inhibit section map - updates for calls to evaluate_probe_argument. - -Index: gdb-7.5.50.20130118/gdb/objfiles.h -=================================================================== ---- gdb-7.5.50.20130118.orig/gdb/objfiles.h 2013-01-18 23:18:16.862315673 +0100 -+++ gdb-7.5.50.20130118/gdb/objfiles.h 2013-01-18 23:18:36.702343482 +0100 -@@ -508,6 +508,22 @@ extern int in_plt_section (CORE_ADDR, ch - modules. */ - DECLARE_REGISTRY(objfile); - -+/* In normal use, the section map will be rebuilt by FIND_PC_SECTION -+ if objfiles have been added, removed or relocated since it was last -+ called. Calling INHIBIT_SECTION_MAP_UPDATES will inhibit this -+ behavior until RESUME_SECTION_MAP_UPDATES is called. If you call -+ INHIBIT_SECTION_MAP_UPDATES you must ensure that every call to -+ FIND_PC_SECTION in the inhibited region relates to a section that -+ is already in the section map and has not since been removed or -+ relocated. */ -+extern void inhibit_section_map_updates (void); -+ -+/* Resume automatically rebuilding the section map as required. */ -+extern void resume_section_map_updates (void); -+ -+/* Version of the above suitable for use as a cleanup. */ -+extern void resume_section_map_updates_cleanup (void *arg); -+ - extern void default_iterate_over_objfiles_in_search_order - (struct gdbarch *gdbarch, - iterate_over_objfiles_in_search_order_cb_ftype *cb, -Index: gdb-7.5.50.20130118/gdb/objfiles.c -=================================================================== ---- gdb-7.5.50.20130118.orig/gdb/objfiles.c 2013-01-18 23:18:13.647311006 +0100 -+++ gdb-7.5.50.20130118/gdb/objfiles.c 2013-01-18 23:18:16.862315673 +0100 -@@ -69,6 +69,9 @@ struct objfile_pspace_info - int objfiles_changed_p; - struct obj_section **sections; - int num_sections; -+ -+ /* Nonzero if section map updates should be inhibited. */ -+ int inhibit_updates; - }; - - /* Per-program-space data key. */ -@@ -1356,7 +1359,7 @@ find_pc_section (CORE_ADDR pc) - return s; - - pspace_info = get_objfile_pspace_data (current_program_space); -- if (pspace_info->objfiles_changed_p != 0) -+ if (pspace_info->objfiles_changed_p && !pspace_info->inhibit_updates) - { - update_section_map (current_program_space, - &pspace_info->sections, -@@ -1415,6 +1418,30 @@ objfiles_changed (void) - get_objfile_pspace_data (current_program_space)->objfiles_changed_p = 1; - } - -+/* See comments in objfiles.h. */ -+ -+void -+inhibit_section_map_updates (void) -+{ -+ get_objfile_pspace_data (current_program_space)->inhibit_updates = 1; -+} -+ -+/* See comments in objfiles.h. */ -+ -+void -+resume_section_map_updates (void) -+{ -+ get_objfile_pspace_data (current_program_space)->inhibit_updates = 0; -+} -+ -+/* See comments in objfiles.h. */ -+ -+void -+resume_section_map_updates_cleanup (void *arg) -+{ -+ resume_section_map_updates (); -+} -+ - /* The default implementation for the "iterate_over_objfiles_in_search_order" - gdbarch method. It is equivalent to use the ALL_OBJFILES macro, - searching the objfiles in the order they are stored internally, -Index: gdb-7.5.50.20130118/gdb/solib-svr4.c -=================================================================== ---- gdb-7.5.50.20130118.orig/gdb/solib-svr4.c 2013-01-18 23:18:13.649311010 +0100 -+++ gdb-7.5.50.20130118/gdb/solib-svr4.c 2013-01-18 23:18:16.863315675 +0100 -@@ -1849,6 +1849,7 @@ svr4_handle_solib_event (bpstat bs) - struct svr4_info *info = get_svr4_info (); - struct probe_and_info buf, *pi = &buf; - enum probe_action action; -+ struct cleanup *cleanups = NULL; - struct value *val; - LONGEST lmid; - CORE_ADDR debug_base, lm = 0; -@@ -1872,6 +1873,19 @@ svr4_handle_solib_event (bpstat bs) - if (action == NAMESPACE_NO_ACTION) - return; - -+ /* EVALUATE_PROBE_ARGUMENT looks up symbols in the dynamic linker -+ using FIND_PC_SECTION. FIND_PC_SECTION is accelerated by a cache -+ called the section map. The section map is invalidated every -+ time a shared library is loaded or unloaded, and if the inferior -+ is generating a lot of shared library events then the section map -+ will be updated every time SVR4_HANDLE_SOLIB_EVENT is called. -+ We called FIND_PC_SECTION in SVR4_CREATE_SOLIB_EVENT_BREAKPOINTS, -+ so we can guarantee that the dynamic linker's sections are in the -+ section map. We can therefore inhibit section map updates across -+ these calls to EVALUATE_PROBE_ARGUMENT and save a lot of time. */ -+ inhibit_section_map_updates (); -+ cleanups = make_cleanup (resume_section_map_updates_cleanup, NULL); -+ - val = evaluate_probe_argument (pi->probe, 0); - if (val == NULL) - goto error; -@@ -1903,6 +1917,9 @@ svr4_handle_solib_event (bpstat bs) - action = NAMESPACE_RELOAD; - } - -+ do_cleanups (cleanups); -+ cleanups = NULL; -+ - if (action == NAMESPACE_UPDATE_OR_RELOAD) - { - if (namespace_update_incremental (info, lmid, lm, is_initial_ns)) -@@ -1925,6 +1942,8 @@ svr4_handle_solib_event (bpstat bs) - warning (_("Probes-based dynamic linker interface failed.\n" - "Reverting to original interface.\n")); - -+ if (cleanups != NULL) -+ do_cleanups (cleanups); - free_namespace_table (info); - free_probes (info); - info->using_probes = 0; diff --git a/gdb-dlopen-stap-probe-mapfailed.patch b/gdb-dlopen-stap-probe-mapfailed.patch deleted file mode 100644 index 5205cee..0000000 --- a/gdb-dlopen-stap-probe-mapfailed.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 21fd080d18f280c19fdc5489726dcd6c66eb5fbf -Author: Gary Benson -Date: Tue Jan 8 12:12:14 2013 +0000 - - Also stop on "map_failed" where appropriate - -Removed a comment patch hunk. - -diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c -index 5eb84ba..a46fd74 100644 ---- a/gdb/solib-svr4.c -+++ b/gdb/solib-svr4.c -@@ -160,6 +160,7 @@ static const struct probe_info probe_info[] = - { "init_start", NAMESPACE_NO_ACTION }, - { "init_complete", NAMESPACE_RELOAD }, - { "map_start", NAMESPACE_NO_ACTION }, -+ { "map_failed", NAMESPACE_NO_ACTION }, - { "reloc_complete", NAMESPACE_UPDATE_OR_RELOAD }, - { "unmap_start", NAMESPACE_NO_ACTION }, - { "unmap_complete", NAMESPACE_RELOAD }, -@@ -2056,6 +2058,9 @@ svr4_create_solib_event_breakpoints (struct gdbarch *gdbarch, - info->probes[i] = find_probes_in_objfile (os->objfile, "rtld", - name); - -+ if (!strcmp (name, "rtld_map_failed")) -+ continue; -+ - if (!VEC_length (probe_p, info->probes[i])) - { - free_probes (info); diff --git a/gdb-dlopen-stap-probe-test.patch b/gdb-dlopen-stap-probe-test.patch deleted file mode 100644 index 87702d8..0000000 --- a/gdb-dlopen-stap-probe-test.patch +++ /dev/null @@ -1,307 +0,0 @@ -commit 5bfdc32cd3bf373c3b02e1fd864ed8ceab0292b2 -Author: Jan Kratochvil -Date: Mon Aug 8 12:08:53 2011 +0200 - - +testcase - -Index: gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c 2012-07-15 08:51:38.238701282 +0200 -@@ -0,0 +1,40 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2011 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 . */ -+ -+#include -+#include -+ -+static void * -+tfunc (void *arg) -+{ -+ void (*notifyp) (void) = arg; -+ -+ notifyp (); -+} -+ -+void -+f (void (*notifyp) (void)) -+{ -+ pthread_t t; -+ int i; -+ -+ i = pthread_create (&t, NULL, tfunc, notifyp); -+ assert (i == 0); -+ -+ i = pthread_join (t, NULL); -+ assert (i == 0); -+} -Index: gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread.c 2012-07-15 08:51:38.239701277 +0200 -@@ -0,0 +1,46 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2011 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 . */ -+ -+#include -+#include -+#include -+ -+static const char *volatile filename; -+ -+static void -+notify (void) -+{ -+ filename = NULL; /* notify-here */ -+} -+ -+int -+main (void) -+{ -+ void *h; -+ void (*fp) (void (*) (void)); -+ -+ assert (filename != NULL); -+ h = dlopen (filename, RTLD_LAZY); -+ assert (h != NULL); -+ -+ fp = dlsym (h, "f"); -+ assert (fp != NULL); -+ -+ fp (notify); -+ -+ return 0; -+} -Index: gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread.exp 2012-07-15 09:08:01.760258588 +0200 -@@ -0,0 +1,74 @@ -+# Copyright 2011 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 . -+ -+if {![istarget *-linux*] || [skip_shlib_tests]} { -+ return 0 -+} -+ -+load_lib prelink-support.exp -+ -+set testfile "dlopen-libpthread" -+set srcmainfile ${testfile}.c -+set srclibfile ${testfile}-lib.c -+set executable ${testfile} -+set binfile_lib ${objdir}/${subdir}/${executable}.so -+set binfile ${objdir}/${subdir}/${executable} -+set lib_dlopen [shlib_target_file ${executable}.so] -+ -+# Use build_executable_own_libs as prelinked libpthread.so can produce false -+# PASS - it is OK if GDB processes it still before relocation. -+ -+set relink_args [build_executable_own_libs ${testfile}.exp ${executable}.so $srclibfile {debug shlib_pthreads} no] -+if {$relink_args == "" || ![prelink_no $relink_args] -+ || [prepare_for_testing ${testfile}.exp ${executable} ${srcmainfile} {debug shlib_load}] } { -+ return -1 -+} -+gdb_load_shlibs $binfile_lib -+ -+if { ![runto_main] } { -+ return -1 -+} -+ -+set test "info probes all rtld rtld_map_complete" -+gdb_test_multiple $test $test { -+ -re "\[ \t\]rtld_map_complete\[ \t\]+0x\[0-9a-f\]+.*\r\n$gdb_prompt $" { -+ pass $test -+ } -+ -re "No probes matched\\.\r\n$gdb_prompt $" { -+ xfail $test -+ untested ${testfile}.exp -+ return -+ } -+} -+ -+set test "libpthread.so not found" -+gdb_test_multiple "info sharedlibrary" $test { -+ -re "/libpthread\\.so.*\r\n$gdb_prompt $" { -+ fail $test -+ } -+ -re "/libc\\.so.*\r\n$gdb_prompt $" { -+ pass $test -+ } -+} -+ -+gdb_test "set variable filename=\"$lib_dlopen\"" -+ -+gdb_breakpoint "notify" -+ -+# The error was: -+# Cannot find new threads: generic error -+gdb_continue_to_breakpoint "notify" ".* notify-here .*" -+ -+gdb_test "info sharedlibrary" {/libpthread\.so.*} "libpthread.so found" -Index: gdb-7.4.50.20120714/gdb/testsuite/lib/gdb.exp -=================================================================== ---- gdb-7.4.50.20120714.orig/gdb/testsuite/lib/gdb.exp 2012-07-15 08:51:36.803709222 +0200 -+++ gdb-7.4.50.20120714/gdb/testsuite/lib/gdb.exp 2012-07-15 09:02:41.983028197 +0200 -@@ -3774,22 +3774,6 @@ proc build_executable_from_specs {testna - - set binfile [standard_output_file $executable] - -- set objects {} -- set i 0 -- foreach {s local_options} $args { -- if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $local_options] != "" } { -- untested $testname -- return -1 -- } -- lappend objects "${binfile}${i}.o" -- incr i -- } -- -- if { [gdb_compile $objects "${binfile}" executable $options] != "" } { -- untested $testname -- return -1 -- } -- - set info_options "" - if { [lsearch -exact $options "c++"] >= 0 } { - set info_options "c++" -@@ -3797,6 +3781,42 @@ proc build_executable_from_specs {testna - if [get_compiler_info ${info_options}] { - return -1 - } -+ -+ set binfile [standard_output_file $executable] -+ -+ set func gdb_compile -+ set func_index [lsearch -regexp $options {^(pthreads|shlib|shlib_pthreads)$}] -+ if {$func_index != -1} { -+ set func "${func}_[lindex $options $func_index]" -+ } -+ -+ # gdb_compile_shlib and gdb_compile_shlib_pthreads do not use the 3rd -+ # parameter. They also requires $sources while gdb_compile and -+ # gdb_compile_pthreads require $objects. Moreover they ignore any options. -+ if [string match gdb_compile_shlib* $func] { -+ set sources_path {} -+ foreach {s local_options} $args { -+ lappend sources_path "${srcdir}/${subdir}/${s}" -+ } -+ set ret [$func $sources_path "${binfile}" $options] -+ } else { -+ set objects {} -+ set i 0 -+ foreach {s local_options} $args { -+ if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $local_options] != "" } { -+ untested $testname -+ return -1 -+ } -+ lappend objects "${binfile}${i}.o" -+ incr i -+ } -+ set ret [$func $objects "${binfile}" executable $options] -+ } -+ if { $ret != "" } { -+ untested $testname -+ return -1 -+ } -+ - return 0 - } - -Index: gdb-7.4.50.20120714/gdb/testsuite/lib/prelink-support.exp -=================================================================== ---- gdb-7.4.50.20120714.orig/gdb/testsuite/lib/prelink-support.exp 2012-01-04 09:27:56.000000000 +0100 -+++ gdb-7.4.50.20120714/gdb/testsuite/lib/prelink-support.exp 2012-07-15 08:51:38.243701254 +0200 -@@ -95,8 +95,9 @@ proc file_copy {src dest} { - # Wrap function build_executable so that the resulting executable is fully - # self-sufficient (without dependencies on system libraries). Parameter - # INTERP may be used to specify a loader (ld.so) to be used that is --# different from the default system one. Libraries on which the executable --# depends are copied into directory DIR. Default DIR value to -+# different from the default system one. INTERP can be set to "no" if no ld.so -+# copy should be made. Libraries on which the executable depends are copied -+# into directory DIR. Default DIR value to - # `${objdir}/${subdir}/${EXECUTABLE}.d'. - # - # In case of success, return a string containing the arguments to be used -@@ -151,8 +152,15 @@ proc build_executable_own_libs {testname - - if {$interp == ""} { - set interp_system [section_get $binfile .interp] -- set interp ${dir}/[file tail $interp_system] -- file_copy $interp_system $interp -+ if {$interp_system == ""} { -+ fail "$test could not find .interp" -+ } else { -+ set interp ${dir}/[file tail $interp_system] -+ file_copy $interp_system $interp -+ } -+ } -+ if {$interp == "no"} { -+ set interp "" - } - - set dests {} -@@ -164,13 +172,19 @@ proc build_executable_own_libs {testname - - # Do not lappend it so that "-rpath $dir" overrides any possible "-rpath"s - # specified by the caller to be able to link it for ldd" above. -- set options [linsert $options 0 "ldflags=-Wl,--dynamic-linker,$interp,-rpath,$dir"] -+ set options [linsert $options 0 "ldflags=-Wl,-rpath,$dir"] -+ if {$interp != ""} { -+ set options [linsert $options 0 "ldflags=-Wl,--dynamic-linker,$interp"] -+ } - - if {[build_executable $testname $executable $sources $options] == -1} { - return "" - } - -- set prelink_args "--dynamic-linker=$interp --ld-library-path=$dir $binfile $interp [concat $dests]" -+ set prelink_args "--ld-library-path=$dir $binfile [concat $dests]" -+ if {$interp != ""} { -+ set prelink_args "--dynamic-linker=$interp $prelink_args $interp" -+ } - return $prelink_args - } - diff --git a/gdb-dlopen-stap-probe-test2.patch b/gdb-dlopen-stap-probe-test2.patch deleted file mode 100644 index 894c067..0000000 --- a/gdb-dlopen-stap-probe-test2.patch +++ /dev/null @@ -1,69 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2012-08/msg00500.html -Subject: [patch] testsuite: Make solib-corrupted.exp untested for probes [Re: [RFA 0/4 take 2] Improved linker-debugger interface] - -On Fri, 17 Aug 2012 22:53:53 +0200, Jan Kratochvil wrote: -> It regresses with glibc-debuginfo installed: -> -> info sharedlibrary^M -> From To Syms Read Shared Object Library^M -> 0x00007ffff7ddcb20 0x00007ffff7df63d9 Yes /lib64/ld-linux-x86-64.so.2^M -> 0x00007ffff7ae05b0 0x00007ffff7b4ad78 Yes /lib64/libm.so.6^M -> 0x00007ffff77431a0 0x00007ffff7883cf0 Yes /lib64/libc.so.6^M -> (gdb) FAIL: gdb.base/solib-corrupted.exp: corrupted list -> -> But I guess there is no longer a way to test it with probes so it should just -> run some 'info probes' and make this test UNTESTED if rtld probes are -> available. - -I had to implement it for Fedora already anyway. - - -Regards, -Jan - - -gdb/testsuite/ -2012-08-18 Jan Kratochvil - - * gdb.base/solib-corrupted.exp: New variable probes. - (info probes): New test. - -diff --git a/gdb/testsuite/gdb.base/solib-corrupted.exp b/gdb/testsuite/gdb.base/solib-corrupted.exp -index 84b3b0c..c9f55d6 100644 ---- a/gdb/testsuite/gdb.base/solib-corrupted.exp -+++ b/gdb/testsuite/gdb.base/solib-corrupted.exp -@@ -36,6 +36,33 @@ if ![runto_main] { - return - } - -+# With probes interface GDB no longer scans the inferior library list so its -+# corruption cannot be tested. There is no way to disable the probes -+# interface. -+ -+set probes { init_start init_complete map_start reloc_complete unmap_start -+ unmap_complete } -+set test "info probes" -+gdb_test_multiple $test $test { -+ -re "^rtld\[ \t\]+(?:rtld_)?(\[a-z_\]+)\[ \t\]" { -+ set idx [lsearch -exact $probes $expect_out(1,string)] -+ if { $idx >= 0 } { -+ set probes [lreplace $probes $idx $idx] -+ } -+ exp_continue -+ } -+ -re "^\[^\r\n\]*\r\n" { -+ exp_continue -+ } -+ -re "^$gdb_prompt $" { -+ } -+} -+if { [llength $probes] == 0 } { -+ xfail $test -+ untested "GDB is using probes" -+ return -+} -+ - gdb_test "info sharedlibrary" "From * To .*" "normal list" - - # GDB checks there for matching L_PREV. - diff --git a/gdb-enable-count-crash.patch b/gdb-enable-count-crash.patch new file mode 100644 index 0000000..e6ab3b6 --- /dev/null +++ b/gdb-enable-count-crash.patch @@ -0,0 +1,86 @@ +http://sourceware.org/ml/gdb-patches/2013-06/msg00788.html +Subject: [PATCH] "enable count" user input error handling (PR gdb/15678) + +Typing "enable count" by itself crashes GDB. Also, if you omit the +breakpoint number/range, the error message is not very clear: + +(gdb) enable count 2 +warning: bad breakpoint number at or near '' +(gdb) enable count +Segmentation fault (core dumped) + +With this patch, the error messages are slightly more helpful: + +(gdb) enable count 2 +Argument required (one or more breakpoint numbers). +(gdb) enable count +Argument required (hit count). + +They are not as helpful to the user as I would like, but it's better +than crashing. Suggestions are welcome. + +Simon + +gdb/ChangeLog: +2013-06-26 Simon Marchi + + * breakpoint.c (map_breakpoint_numbers): Check for empty args + string. + (enable_count_command): Check args for NULL value. + +gdb/testsuite/ChangeLog: +2013-06-26 Simon Marchi + + * gdb.base/ena-dis-br.exp: Test "enable count" for bad user input. +--- + gdb/breakpoint.c | 9 +++++++-- + gdb/testsuite/gdb.base/ena-dis-br.exp | 8 ++++++++ + 2 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c +index ccd05d9..5a0c5ab 100644 +--- a/gdb/breakpoint.c ++++ b/gdb/breakpoint.c +@@ -14389,7 +14389,7 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *, + int match; + struct get_number_or_range_state state; + +- if (args == 0) ++ if (args == 0 || *args == '\0') + error_no_arg (_("one or more breakpoint numbers")); + + init_number_or_range (&state, args); +@@ -14713,7 +14713,12 @@ do_map_enable_count_breakpoint (struct breakpoint *bpt, void *countptr) + static void + enable_count_command (char *args, int from_tty) + { +- int count = get_number (&args); ++ int count; ++ ++ if (args == NULL) ++ error_no_arg (_("hit count")); ++ ++ count = get_number (&args); + + map_breakpoint_numbers (args, do_map_enable_count_breakpoint, &count); + } +diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp +index b08b709..82aef64 100644 +--- a/gdb/testsuite/gdb.base/ena-dis-br.exp ++++ b/gdb/testsuite/gdb.base/ena-dis-br.exp +@@ -173,6 +173,14 @@ set bp [break_at $bp_location7 "line $bp_location7"] + + set bp2 [break_at marker1 " line ($bp_location15|$bp_location16)"] + ++gdb_test "enable count" \ ++ "Argument required \\(hit count\\)\\." \ ++ "enable count missing arguments" ++ ++gdb_test "enable count 2" \ ++ "Argument required \\(one or more breakpoint numbers\\)\\." \ ++ "enable count missing last argument" ++ + gdb_test_no_output "enable count 2 $bp" "disable break with count" + + gdb_test "continue" \ + diff --git a/gdb-gdb-add-index-script.patch b/gdb-gdb-add-index-script.patch index db7b584..c48f10f 100644 --- a/gdb-gdb-add-index-script.patch +++ b/gdb-gdb-add-index-script.patch @@ -40,16 +40,14 @@ Subject: [PATCH 4/4] add gdb-add-index 5 files changed, 57 insertions(+), 1 deletions(-) create mode 100755 gdb/gdb-add-index -Index: gdb-7.4.50.20120103/gdb/Makefile.in +Index: gdb-7.6.50.20130731-cvs/gdb/Makefile.in =================================================================== ---- gdb-7.4.50.20120103.orig/gdb/Makefile.in 2012-01-03 05:53:25.000000000 +0100 -+++ gdb-7.4.50.20120103/gdb/Makefile.in 2012-01-03 15:24:25.693543435 +0100 -@@ -1033,7 +1033,16 @@ install-only: install-gstack $(CONFIG_IN - $(INSTALL_DATA) $(srcdir)/gdb.1 \ - $(DESTDIR)$(man1dir)/$$transformed_name.1 ; \ - $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \ -- $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h -+ $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h; \ +--- gdb-7.6.50.20130731-cvs.orig/gdb/Makefile.in 2013-08-02 16:31:59.603674194 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/Makefile.in 2013-08-02 16:32:08.260690156 +0200 +@@ -1070,6 +1070,15 @@ install-only: install-gstack $(CONFIG_IN + $(INSTALL_PROGRAM) gcore \ + $(DESTDIR)$(bindir)/$$transformed_name; \ + fi + transformed_name=`t='$(program_transform_name)'; \ + echo gdb-add-index | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ @@ -62,11 +60,11 @@ Index: gdb-7.4.50.20120103/gdb/Makefile.in @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do install-python: -Index: gdb-7.4.50.20120103/gdb/doc/gdb.texinfo +Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.4.50.20120103.orig/gdb/doc/gdb.texinfo 2012-01-03 15:20:54.000000000 +0100 -+++ gdb-7.4.50.20120103/gdb/doc/gdb.texinfo 2012-01-03 15:23:43.295231946 +0100 -@@ -16228,6 +16228,14 @@ There are currently some limitation on i +--- gdb-7.6.50.20130731-cvs.orig/gdb/doc/gdb.texinfo 2013-08-02 16:31:59.616674218 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo 2013-08-02 16:32:08.271690176 +0200 +@@ -17447,6 +17447,14 @@ There are currently some limitation on i for DWARF debugging information, not stabs. And, they do not currently work for programs using Ada. @@ -81,10 +79,73 @@ Index: gdb-7.4.50.20120103/gdb/doc/gdb.texinfo @node Symbol Errors @section Errors Reading Symbol Files -Index: gdb-7.4.50.20120103/gdb/gdb-add-index +@@ -43044,6 +43052,7 @@ switch (die->tag) + * gdbserver man:: Remote Server for the GNU Debugger man page + * gcore man:: Generate a core file of a running program + * gdbinit man:: gdbinit scripts ++* gdb-add-index man:: Add index files to speed up GDB + @end menu + + @node gdb man +@@ -43696,6 +43705,54 @@ gdb(1), @code{info -f gdb -n Startup} + The full documentation for @value{GDBN} is maintained as a Texinfo manual. + If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo + documentation are properly installed at your site, the command ++ ++@smallexample ++info gdb ++@end smallexample ++ ++should give you access to the complete manual. ++ ++@cite{Using GDB: A Guide to the GNU Source-Level Debugger}, ++Richard M. Stallman and Roland H. Pesch, July 1991. ++@end ifset ++@c man end ++ ++@node gdb-add-index man ++@heading gdb-add-index ++ ++@c man title gdb-add-index Add index files to speed up GDB ++ ++@c man begin SYNOPSIS gdb-add-index ++gdb-add-index @var{filename} ++@c man end ++ ++@c man begin DESCRIPTION gdb-add-index ++When GDB finds a symbol file, it scans the symbols in the file in order ++to construct an internal symbol table. This lets most GDB operations ++work quickly--at the cost of a delay early on. For large programs, ++this delay can be quite lengthy, so GDB provides a way to build an ++index, which speeds up startup. ++ ++To determine whether a file contains such an index, use the command ++@command{readelf -S filename}: the index is stored in a section named ++@code{.gdb_index}. Note that the index is never generated for files that do ++not contain DWARF debug information (sections named @code{.debug_*}). ++ ++See more in ++@ifset man ++the @value{GDBN} manual in node @code{Index Files} ++-- shell command @code{info -f gdb -n 'Index Files'}. ++@end ifset ++@ifclear man ++@ref{Index Files}. ++@end ifclear ++@c man end ++ ++@c man begin SEEALSO gdb-add-index ++@ifset man ++The full documentation for @value{GDBN} is maintained as a Texinfo manual. ++If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo ++documentation are properly installed at your site, the command + + @smallexample + info gdb +Index: gdb-7.6.50.20130731-cvs/gdb/gdb-add-index =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120103/gdb/gdb-add-index 2012-01-03 15:23:43.296231942 +0100 ++++ gdb-7.6.50.20130731-cvs/gdb/gdb-add-index 2013-08-02 16:32:08.271690176 +0200 @@ -0,0 +1,30 @@ +#! /bin/sh + @@ -116,3 +177,30 @@ Index: gdb-7.4.50.20120103/gdb/gdb-add-index +fi + +exit 0 +Index: gdb-7.6.50.20130731-cvs/gdb/doc/Makefile.in +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/doc/Makefile.in 2013-08-02 16:31:59.618674222 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/doc/Makefile.in 2013-08-02 16:32:28.828727314 +0200 +@@ -177,7 +177,7 @@ POD2MAN5 = pod2man --center="GNU Develop + --release="gdb-`sed q version.subst`" --section=5 + + # List of man pages generated from gdb.texi +-MAN1S = gdb.1 gdbserver.1 gcore.1 ++MAN1S = gdb.1 gdbserver.1 gcore.1 gdb-add-index.1 + MAN5S = gdbinit.5 + MANS = $(MAN1S) $(MAN5S) + +@@ -630,6 +630,13 @@ gcore.1: $(GDB_DOC_FILES) + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) + rm -f gcore.pod + ++gdb-add-index.1: $(GDB_DOC_FILES) ++ touch $@ ++ -$(TEXI2POD) $(MANCONF) -Dgdb-add-index < $(srcdir)/gdb.texinfo > gdb-add-index.pod ++ -($(POD2MAN1) gdb-add-index.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ ++ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) ++ rm -f gdb-add-index.pod ++ + gdbinit.5: $(GDB_DOC_FILES) + touch $@ + -$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod diff --git a/gdb-glibc-strstr-workaround.patch b/gdb-glibc-strstr-workaround.patch index 955d89c..275d76c 100644 --- a/gdb-glibc-strstr-workaround.patch +++ b/gdb-glibc-strstr-workaround.patch @@ -1,10 +1,10 @@ -Index: gdb-7.5.50.20130118/gdb/dwarf2read.c +Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/dwarf2read.c 2013-01-19 21:16:22.437961789 +0100 -+++ gdb-7.5.50.20130118/gdb/dwarf2read.c 2013-01-19 21:24:22.242969266 +0100 -@@ -15987,6 +15987,25 @@ new_symbol_full (struct die_info *die, s +--- gdb-7.6.50.20130731-cvs.orig/gdb/dwarf2read.c 2013-08-02 16:37:51.619241696 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c 2013-08-02 16:38:16.159277461 +0200 +@@ -16654,6 +16654,25 @@ new_symbol_full (struct die_info *die, s /* Cache this symbol's name and the name's demangled form (if any). */ - SYMBOL_SET_LANGUAGE (sym, cu->language); + SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack); linkagename = dwarf2_physname (name, die, cu); + + /* Workaround for: @@ -28,10 +28,10 @@ Index: gdb-7.5.50.20130118/gdb/dwarf2read.c SYMBOL_SET_NAMES (sym, linkagename, strlen (linkagename), 0, objfile); /* Fortran does not have mangling standard and the mangling does differ -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp 2013-01-19 21:23:09.119827963 +0100 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp 2013-08-02 16:37:51.620241697 +0200 @@ -0,0 +1,108 @@ +# Copyright (C) 2012 Free Software Foundation, Inc. + diff --git a/gdb-ia64-tdep.patch b/gdb-ia64-tdep.patch index dbf28ff..4d73da1 100644 --- a/gdb-ia64-tdep.patch +++ b/gdb-ia64-tdep.patch @@ -1,7 +1,25 @@ -Index: gdb-7.5.50.20130215/gdb/ia64-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/ia64-tdep.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ia64-tdep.c -+++ gdb-7.5.50.20130215/gdb/ia64-tdep.c +--- gdb-7.6.50.20130731-cvs.orig/gdb/ia64-tdep.c 2013-08-07 15:16:31.000000000 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ia64-tdep.c 2013-08-07 15:16:34.000000000 +0200 +@@ -2181,7 +2181,7 @@ static const struct frame_unwind ia64_fr + avoid the additional bogus frame + #7 0x0000000000000000 in ?? () */ + +-static char linux_clone2_code[] = ++static unsigned char linux_clone2_code[] = + { + /* libc/sysdeps/unix/sysv/linux/ia64/clone2.S */ + 0x09, 0x00, 0x20, 0x12, 0x90, 0x11, 0x00, 0x40, +@@ -2220,7 +2220,7 @@ static int + ia64_linux_clone2_running (struct frame_info *this_frame) + { + CORE_ADDR pc = get_frame_pc (this_frame); +- char buf[LINUX_CLONE_LEN]; ++ unsigned char buf[LINUX_CLONE_LEN]; + struct minimal_symbol *minsym; + long long instr; + @@ -2256,7 +2256,7 @@ static int ia64_outermost_frame (struct frame_info *this_frame) { @@ -19,57 +37,3 @@ Index: gdb-7.5.50.20130215/gdb/ia64-tdep.c &ia64_clone2_frame_this_id, &ia64_clone2_frame_prev_register, NULL, -@@ -2454,7 +2455,7 @@ ia64_sigtramp_frame_prev_register (struc - ULONGEST unatN_val; - ULONGEST unat; - read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat, -- register_size (target_gdbarch, IA64_UNAT_REGNUM)); -+ register_size (gdbarch, IA64_UNAT_REGNUM)); - unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0; - return frame_unwind_got_constant (this_frame, regnum, unatN_val); - } -@@ -2470,9 +2471,9 @@ ia64_sigtramp_frame_prev_register (struc - CORE_ADDR gr_addr = 0, nat_addr = 0; - - read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp, -- register_size (target_gdbarch, IA64_BSP_REGNUM)); -+ register_size (gdbarch, IA64_BSP_REGNUM)); - read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm, -- register_size (target_gdbarch, IA64_CFM_REGNUM)); -+ register_size (gdbarch, IA64_CFM_REGNUM)); - - /* The bsp points at the end of the register frame so we - subtract the size of frame from it to get start of register frame. */ -@@ -2496,7 +2497,7 @@ ia64_sigtramp_frame_prev_register (struc - nat_addr = cache->saved_regs[IA64_RNAT_REGNUM]; - if (nat_addr != 0) - read_memory (nat_addr, (char *) &nat_collection, -- register_size (target_gdbarch, IA64_RNAT_REGNUM)); -+ register_size (gdbarch, IA64_RNAT_REGNUM)); - } - else - nat_collection = read_memory_integer (nat_addr, 8, BFD_ENDIAN_LITTLE); -@@ -2522,9 +2523,9 @@ ia64_sigtramp_frame_prev_register (struc - ULONGEST bof; - - read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp, -- register_size (target_gdbarch, IA64_BSP_REGNUM)); -+ register_size (gdbarch, IA64_BSP_REGNUM)); - read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm, -- register_size (target_gdbarch, IA64_CFM_REGNUM)); -+ register_size (gdbarch, IA64_CFM_REGNUM)); - - /* The bsp points at the end of the register frame so we - subtract the size of frame from it to get beginning of frame. */ -@@ -2564,9 +2565,9 @@ ia64_sigtramp_frame_prev_register (struc - ULONGEST cfm; - ULONGEST prN_val; - read_memory (pr_addr, (char *) &pr, -- register_size (target_gdbarch, IA64_PR_REGNUM)); -+ register_size (gdbarch, IA64_PR_REGNUM)); - read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm, -- register_size (target_gdbarch, IA64_CFM_REGNUM)); -+ register_size (gdbarch, IA64_CFM_REGNUM)); - - /* Get the register rename base for this frame and adjust the - * register name to take rotation into account. */ diff --git a/gdb-libstdc++-v3-python-r155978.tar.bz2 b/gdb-libstdc++-v3-python-r155978.tar.bz2 index a04f820..3dd0860 100644 --- a/gdb-libstdc++-v3-python-r155978.tar.bz2 +++ b/gdb-libstdc++-v3-python-r155978.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1877172a7efbf7540290471e64816c9549b24a65e825f0e1a725ac950b4e5029 -size 11744 +oid sha256:b475a3ef42507a47b1ea4b7f9a4849287b4c713e5081ec86874eaa7da194f78b +size 11754 diff --git a/gdb-python-rdynamic.patch b/gdb-python-rdynamic.patch deleted file mode 100644 index 2771fd2..0000000 --- a/gdb-python-rdynamic.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/gdb/configure -+++ b/gdb/configure -@@ -14631,6 +14631,10 @@ rm -f core conftest.err conftest.$ac_objext \ - # Problem does not happen for the recommended libpythonX.Y.so linkage. - old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PYTHON_CFLAGS" -+ old_CPPFLAGS="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" -+ old_LIBS="$LIBS" -+ LIBS="$LIBS $PYTHON_LIBS" - if test "$cross_compiling" = yes; then : - true - else -@@ -14657,6 +14661,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - fi - - CFLAGS="$old_CFLAGS" -+ CPPFLAGS="$old_CPPFLAGS" -+ LIBS="$old_LIBS" - fi - LDFLAGS="$old_LDFLAGS" - fi ---- a/gdb/configure.ac -+++ b/gdb/configure.ac -@@ -1576,6 +1576,10 @@ if test "${gdb_native}" = yes; then - # Problem does not happen for the recommended libpythonX.Y.so linkage. - old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PYTHON_CFLAGS" -+ old_CPPFLAGS="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" -+ old_LIBS="$LIBS" -+ LIBS="$LIBS $PYTHON_LIBS" - AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [#include "]${have_libpython}[/Python.h"], -@@ -1586,6 +1590,8 @@ if test "${gdb_native}" = yes; then - return err == 0 ? 0 : 1;]), - [dynamic_list=true], [], [true]) - CFLAGS="$old_CFLAGS" -+ CPPFLAGS="$old_CPPFLAGS" -+ LIBS="$old_LIBS" - fi - LDFLAGS="$old_LDFLAGS" - fi diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch index 911daf2..bfcfe88 100644 --- a/gdb-rhbz795424-bitpos-20of25.patch +++ b/gdb-rhbz795424-bitpos-20of25.patch @@ -463,10 +463,10 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-main.patch -Index: gdb-7.5.50.20130215/gdb/ada-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ada-lang.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ada-lang.c 2013-02-15 22:40:18.513622035 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ada-lang.c 2013-08-02 16:38:26.408292160 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ada-lang.c 2013-08-02 16:39:48.052408256 +0200 @@ -80,7 +80,7 @@ static struct type *desc_bounds_type (st static struct value *desc_bounds (struct value *); @@ -653,7 +653,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c set_value_component_location (v, obj); set_value_bitpos (v, bit_offset + value_bitpos (obj)); -@@ -2427,7 +2430,7 @@ ada_value_primitive_packed_val (struct v +@@ -2426,7 +2429,7 @@ ada_value_primitive_packed_val (struct v not overlap. */ static void move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source, @@ -662,16 +662,16 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c { unsigned int accum, mask; int accum_bits, chunk_size; -@@ -2517,7 +2520,7 @@ ada_value_assign (struct value *toval, s +@@ -2516,7 +2519,7 @@ ada_value_assign (struct value *toval, s { int len = (value_bitpos (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; - int from_size; + LONGEST from_size; - char *buffer = (char *) alloca (len); + gdb_byte *buffer = alloca (len); struct value *val; CORE_ADDR to_addr = value_address (toval); -@@ -2562,7 +2565,7 @@ value_assign_to_component (struct value +@@ -2561,7 +2564,7 @@ value_assign_to_component (struct value (LONGEST) (value_address (component) - value_address (container)); int bit_offset_in_container = value_bitpos (component) - value_bitpos (container); @@ -680,7 +680,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c val = value_cast (value_type (component), val); -@@ -4084,7 +4087,7 @@ ensure_lval (struct value *val) +@@ -4082,7 +4085,7 @@ ensure_lval (struct value *val) if (VALUE_LVAL (val) == not_lval || VALUE_LVAL (val) == lval_internalvar) { @@ -689,7 +689,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c const CORE_ADDR addr = value_as_long (value_allocate_space_in_inferior (len)); -@@ -4158,7 +4161,7 @@ static CORE_ADDR +@@ -4156,7 +4159,7 @@ static CORE_ADDR value_pointer (struct value *value, struct type *type) { struct gdbarch *gdbarch = get_type_arch (type); @@ -698,7 +698,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c gdb_byte *buf = alloca (len); CORE_ADDR addr; -@@ -6053,7 +6056,7 @@ value_tag_from_contents_and_address (str +@@ -6087,7 +6090,7 @@ value_tag_from_contents_and_address (str const gdb_byte *valaddr, CORE_ADDR address) { @@ -707,7 +707,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *tag_type; if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, -@@ -6518,7 +6521,7 @@ ada_in_variant (LONGEST val, struct type +@@ -6552,7 +6555,7 @@ ada_in_variant (LONGEST val, struct type only in that it can handle packed values of arbitrary type. */ static struct value * @@ -716,7 +716,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *arg_type) { struct type *type; -@@ -6530,7 +6533,7 @@ ada_value_primitive_field (struct value +@@ -6564,7 +6567,7 @@ ada_value_primitive_field (struct value if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) { @@ -725,7 +725,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); return ada_value_primitive_packed_val (arg1, value_contents (arg1), -@@ -6557,9 +6560,9 @@ ada_value_primitive_field (struct value +@@ -6591,9 +6594,9 @@ ada_value_primitive_field (struct value Returns 1 if found, 0 otherwise. */ static int @@ -737,7 +737,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c int *index_p) { int i; -@@ -6577,8 +6580,8 @@ find_struct_field (const char *name, str +@@ -6611,8 +6614,8 @@ find_struct_field (const char *name, str for (i = 0; i < TYPE_NFIELDS (type); i += 1) { @@ -748,7 +748,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c const char *t_field_name = TYPE_FIELD_NAME (type, i); if (t_field_name == NULL) -@@ -6648,7 +6651,7 @@ num_visible_fields (struct type *type) +@@ -6682,7 +6685,7 @@ num_visible_fields (struct type *type) Searches recursively through wrapper fields (e.g., '_parent'). */ static struct value * @@ -757,7 +757,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *type) { int i; -@@ -6681,7 +6684,7 @@ ada_search_struct_field (char *name, str +@@ -6715,7 +6718,7 @@ ada_search_struct_field (char *name, str int j; struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -766,7 +766,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) { -@@ -6699,8 +6702,8 @@ ada_search_struct_field (char *name, str +@@ -6733,8 +6736,8 @@ ada_search_struct_field (char *name, str return NULL; } @@ -777,7 +777,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c /* Return field #INDEX in ARG, where the index is that returned by -@@ -6709,7 +6712,7 @@ static struct value *ada_index_struct_fi +@@ -6743,7 +6746,7 @@ static struct value *ada_index_struct_fi * If found, return value, else return NULL. */ static struct value * @@ -786,7 +786,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *type) { return ada_index_struct_field_1 (&index, arg, offset, type); -@@ -6721,7 +6724,7 @@ ada_index_struct_field (int index, struc +@@ -6755,7 +6758,7 @@ ada_index_struct_field (int index, struc * *INDEX_P. */ static struct value * @@ -795,7 +795,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *type) { int i; -@@ -6811,7 +6814,8 @@ ada_value_struct_elt (struct value *arg, +@@ -6845,7 +6848,8 @@ ada_value_struct_elt (struct value *arg, v = ada_search_struct_field (name, arg, 0, t); else { @@ -805,7 +805,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *field_type; CORE_ADDR address; -@@ -7124,8 +7128,8 @@ ada_coerce_ref (struct value *val0) +@@ -7158,8 +7162,8 @@ ada_coerce_ref (struct value *val0) /* Return OFF rounded upward if necessary to a multiple of ALIGNMENT (a power of 2). */ @@ -816,7 +816,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c { return (off + alignment - 1) & ~(alignment - 1); } -@@ -7504,10 +7508,9 @@ ada_template_to_fixed_record_type_1 (str +@@ -7538,10 +7542,9 @@ ada_template_to_fixed_record_type_1 (str struct value *mark = value_mark (); struct value *dval; struct type *rtype; @@ -829,7 +829,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c int f; /* Compute the number of fields in this record type that are going -@@ -7578,7 +7581,7 @@ ada_template_to_fixed_record_type_1 (str +@@ -7612,7 +7615,7 @@ ada_template_to_fixed_record_type_1 (str that follow this one. */ if (ada_is_aligner_type (field_type)) { @@ -838,7 +838,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c field_valaddr = cond_offset_host (field_valaddr, field_offset); field_address = cond_offset_target (field_address, field_offset); -@@ -7707,11 +7710,11 @@ ada_template_to_fixed_record_type_1 (str +@@ -7741,11 +7744,11 @@ ada_template_to_fixed_record_type_1 (str if (TYPE_LENGTH (type) <= 0) { if (TYPE_NAME (rtype)) @@ -854,7 +854,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c } else { -@@ -8048,7 +8051,8 @@ to_fixed_array_type (struct type *type0, +@@ -8082,7 +8085,8 @@ to_fixed_array_type (struct type *type0, type was a regular (non-packed) array type. As a result, the bitsize of the array elements needs to be set again, and the array length needs to be recomputed based on that bitsize. */ @@ -864,10 +864,10 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c int elt_bitsize = TYPE_FIELD_BITSIZE (type0, 0); TYPE_FIELD_BITSIZE (result, 0) = TYPE_FIELD_BITSIZE (type0, 0); -Index: gdb-7.5.50.20130215/gdb/ada-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ada-lang.h 2013-01-24 19:04:34.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ada-lang.h 2013-02-15 22:40:18.513622035 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ada-lang.h 2013-08-02 16:38:26.409292162 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ada-lang.h 2013-08-02 16:38:32.343300713 +0200 @@ -169,7 +169,7 @@ extern void ada_print_type (struct type extern void ada_print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream); @@ -886,7 +886,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.h const struct value_print_options *); struct value *ada_convert_actual (struct value *actual, -@@ -258,7 +258,7 @@ extern int ada_is_constrained_packed_arr +@@ -257,7 +257,7 @@ extern int ada_is_constrained_packed_arr extern struct value *ada_value_primitive_packed_val (struct value *, const gdb_byte *, @@ -895,10 +895,10 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.h struct type *); extern struct type *ada_coerce_to_simple_array_type (struct type *); -Index: gdb-7.5.50.20130215/gdb/ada-typeprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/ada-typeprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ada-typeprint.c 2013-01-01 07:32:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ada-typeprint.c 2013-02-15 22:40:18.514622038 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ada-typeprint.c 2013-08-02 16:38:26.424292184 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ada-typeprint.c 2013-08-02 16:38:32.343300713 +0200 @@ -829,8 +829,8 @@ ada_print_type (struct type *type0, cons const char *name = ada_type_name (type); @@ -920,10 +920,10 @@ Index: gdb-7.5.50.20130215/gdb/ada-typeprint.c break; case TYPE_CODE_ENUM: if (show < 0) -Index: gdb-7.5.50.20130215/gdb/ada-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ada-valprint.c 2013-02-01 21:08:45.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ada-valprint.c 2013-02-15 22:40:18.514622038 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ada-valprint.c 2013-08-02 16:38:26.425292185 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c 2013-08-02 16:38:32.344300715 +0200 @@ -41,16 +41,16 @@ static void print_record (struct type *, const struct value_print_options *); @@ -1084,10 +1084,10 @@ Index: gdb-7.5.50.20130215/gdb/ada-valprint.c int bit_size = TYPE_FIELD_BITSIZE (type, i); struct value_print_options opts; -Index: gdb-7.5.50.20130215/gdb/annotate.c +Index: gdb-7.6.50.20130731-cvs/gdb/annotate.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/annotate.c 2013-01-22 21:22:38.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/annotate.c 2013-02-15 22:40:18.514622038 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/annotate.c 2013-08-02 16:38:26.425292185 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/annotate.c 2013-08-02 16:38:32.344300715 +0200 @@ -523,21 +523,21 @@ annotate_frame_end (void) } @@ -1114,10 +1114,10 @@ Index: gdb-7.5.50.20130215/gdb/annotate.c } void -Index: gdb-7.5.50.20130215/gdb/annotate.h +Index: gdb-7.6.50.20130731-cvs/gdb/annotate.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/annotate.h 2013-01-22 21:19:38.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/annotate.h 2013-02-15 22:40:18.515622041 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/annotate.h 2013-08-02 16:38:26.426292186 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/annotate.h 2013-08-02 16:38:32.344300715 +0200 @@ -92,8 +92,8 @@ extern void annotate_frame_source_end (v extern void annotate_frame_where (void); extern void annotate_frame_end (void); @@ -1129,10 +1129,10 @@ Index: gdb-7.5.50.20130215/gdb/annotate.h extern void annotate_elt_rep_end (void); extern void annotate_elt (void); extern void annotate_array_section_end (void); -Index: gdb-7.5.50.20130215/gdb/arm-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/arm-linux-nat.c 2013-01-01 07:32:38.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/arm-linux-nat.c 2013-02-15 22:40:18.515622041 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/arm-linux-nat.c 2013-08-02 16:38:26.426292186 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c 2013-08-02 16:38:32.345300716 +0200 @@ -1073,7 +1073,7 @@ arm_linux_remove_hw_breakpoint (struct g /* Are we able to use a hardware watchpoint for the LEN bytes starting at ADDR? */ @@ -1142,10 +1142,10 @@ Index: gdb-7.5.50.20130215/gdb/arm-linux-nat.c { const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap (); CORE_ADDR max_wp_length, aligned_addr; -Index: gdb-7.5.50.20130215/gdb/ax-gdb.c +Index: gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ax-gdb.c 2013-01-31 17:27:50.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ax-gdb.c 2013-02-15 22:40:18.516622043 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ax-gdb.c 2013-08-02 16:38:26.427292188 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c 2013-08-02 16:38:32.346300717 +0200 @@ -83,12 +83,12 @@ static void gen_traced_pop (struct gdbar static void gen_sign_extend (struct agent_expr *, struct type *); static void gen_extend (struct agent_expr *, struct type *); @@ -1181,7 +1181,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c struct type *type); static void gen_struct_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, -@@ -569,7 +570,7 @@ gen_fetch (struct agent_expr *ax, struct +@@ -539,7 +540,7 @@ gen_fetch (struct agent_expr *ax, struct right shift it by -DISTANCE bits if DISTANCE < 0. This generates unsigned (logical) right shifts. */ static void @@ -1190,7 +1190,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c { if (distance > 0) { -@@ -623,7 +624,7 @@ gen_frame_locals_address (struct gdbarch +@@ -593,7 +594,7 @@ gen_frame_locals_address (struct gdbarch programming in ML, it would be clearer why these are the same thing. */ static void @@ -1199,7 +1199,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c { /* It would suffice to simply push the offset and add it, but this makes it easier to read positive and negative offsets in the -@@ -1279,7 +1280,7 @@ gen_address_of (struct agent_expr *ax, s +@@ -1249,7 +1250,7 @@ gen_address_of (struct agent_expr *ax, s static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, struct type *type, @@ -1208,7 +1208,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c { /* Note that ops[i] fetches 8 << i bits. */ static enum agent_op ops[] -@@ -1314,13 +1315,13 @@ gen_bitfield_ref (struct expression *exp +@@ -1284,13 +1285,13 @@ gen_bitfield_ref (struct expression *exp /* The first and one-after-last bits in the field, but rounded down and up to byte boundaries. */ @@ -1227,7 +1227,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c /* The index in ops of the opcode we're considering. */ int op; -@@ -1439,7 +1440,7 @@ gen_bitfield_ref (struct expression *exp +@@ -1409,7 +1410,7 @@ gen_bitfield_ref (struct expression *exp static void gen_primitive_field (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1236,7 +1236,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c { /* Is this a bitfield? */ if (TYPE_FIELD_PACKED (type, fieldno)) -@@ -1464,7 +1465,7 @@ gen_primitive_field (struct expression * +@@ -1434,7 +1435,7 @@ gen_primitive_field (struct expression * static int gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1245,11 +1245,11 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c { int i, rslt; int nbases = TYPE_N_BASECLASSES (type); -Index: gdb-7.5.50.20130215/gdb/ax-general.c +Index: gdb-7.6.50.20130731-cvs/gdb/ax-general.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ax-general.c 2013-01-31 17:27:50.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ax-general.c 2013-02-15 22:40:18.516622043 +0100 -@@ -192,7 +192,7 @@ ax_zero_ext (struct agent_expr *x, int n +--- gdb-7.6.50.20130731-cvs.orig/gdb/ax-general.c 2013-08-02 16:38:26.428292189 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ax-general.c 2013-08-02 16:38:32.346300717 +0200 +@@ -195,7 +195,7 @@ ax_zero_ext (struct agent_expr *x, int n /* Append a trace_quick instruction to EXPR, to record N bytes. */ void @@ -1258,11 +1258,11 @@ Index: gdb-7.5.50.20130215/gdb/ax-general.c { /* N must fit in a byte. */ if (n < 0 || n > 255) -Index: gdb-7.5.50.20130215/gdb/ax.h +Index: gdb-7.6.50.20130731-cvs/gdb/ax.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ax.h 2013-01-01 07:32:39.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ax.h 2013-02-15 22:40:18.517622045 +0100 -@@ -190,7 +190,7 @@ extern void ax_ext (struct agent_expr *E +--- gdb-7.6.50.20130731-cvs.orig/gdb/ax.h 2013-08-02 16:38:26.428292189 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ax.h 2013-08-02 16:38:32.346300717 +0200 +@@ -207,7 +207,7 @@ extern void ax_ext (struct agent_expr *E extern void ax_zero_ext (struct agent_expr *EXPR, int N); /* Append a trace_quick instruction to EXPR, to record N bytes. */ @@ -1271,11 +1271,11 @@ Index: gdb-7.5.50.20130215/gdb/ax.h /* Append a goto op to EXPR. OP is the actual op (must be aop_goto or aop_if_goto). We assume we don't know the target offset yet, -Index: gdb-7.5.50.20130215/gdb/breakpoint.c +Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/breakpoint.c 2013-02-15 22:37:35.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/breakpoint.c 2013-02-15 22:40:18.521622053 +0100 -@@ -6660,7 +6660,7 @@ breakpoint_address_match (struct address +--- gdb-7.6.50.20130731-cvs.orig/gdb/breakpoint.c 2013-08-02 16:38:26.432292195 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/breakpoint.c 2013-08-02 16:38:32.350300723 +0200 +@@ -6710,7 +6710,7 @@ breakpoint_address_match (struct address static int breakpoint_address_match_range (struct address_space *aspace1, CORE_ADDR addr1, @@ -1284,7 +1284,7 @@ Index: gdb-7.5.50.20130215/gdb/breakpoint.c CORE_ADDR addr2) { return ((gdbarch_has_global_breakpoints (target_gdbarch ()) -@@ -11182,7 +11182,7 @@ can_use_hardware_watchpoint (struct valu +@@ -11247,7 +11247,7 @@ can_use_hardware_watchpoint (struct valu && TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) { CORE_ADDR vaddr = value_address (v); @@ -1293,11 +1293,11 @@ Index: gdb-7.5.50.20130215/gdb/breakpoint.c int num_regs; len = (target_exact_watchpoints -Index: gdb-7.5.50.20130215/gdb/breakpoint.h +Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/breakpoint.h 2013-02-15 22:37:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/breakpoint.h 2013-02-15 22:40:18.521622053 +0100 -@@ -250,7 +250,7 @@ struct bp_target_info +--- gdb-7.6.50.20130731-cvs.orig/gdb/breakpoint.h 2013-08-02 16:38:26.434292198 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/breakpoint.h 2013-08-02 16:38:32.351300725 +0200 +@@ -242,7 +242,7 @@ struct bp_target_info /* If this is a ranged breakpoint, then this field contains the length of the range that will be watched for execution. */ @@ -1306,7 +1306,7 @@ Index: gdb-7.5.50.20130215/gdb/breakpoint.h /* If the breakpoint lives in memory and reading that memory would give back the breakpoint, instead of the original contents, then -@@ -419,7 +419,7 @@ struct bp_location +@@ -411,7 +411,7 @@ struct bp_location /* For hardware watchpoints, the size of the memory region being watched. For hardware ranged breakpoints, the size of the breakpoint range. */ @@ -1315,10 +1315,10 @@ Index: gdb-7.5.50.20130215/gdb/breakpoint.h /* Type of hardware watchpoint. */ enum target_hw_bp_type watchpoint_type; -Index: gdb-7.5.50.20130215/gdb/c-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/c-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/c-lang.c 2013-02-13 11:41:11.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/c-lang.c 2013-02-15 22:40:18.522622055 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/c-lang.c 2013-08-02 16:38:26.434292198 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/c-lang.c 2013-08-02 16:38:32.351300725 +0200 @@ -188,7 +188,7 @@ c_printchar (int c, struct type *type, s void @@ -1346,10 +1346,10 @@ Index: gdb-7.5.50.20130215/gdb/c-lang.c if (get_discrete_bounds (TYPE_INDEX_TYPE (expect_type), &low_bound, &high_bound) < 0) -Index: gdb-7.5.50.20130215/gdb/c-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/c-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/c-lang.h 2013-01-01 07:32:40.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/c-lang.h 2013-02-15 22:40:18.522622055 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/c-lang.h 2013-08-02 16:38:26.434292198 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/c-lang.h 2013-08-02 16:38:32.351300725 +0200 @@ -73,7 +73,7 @@ extern void c_print_typedef (struct type struct ui_file *); @@ -1385,10 +1385,10 @@ Index: gdb-7.5.50.20130215/gdb/c-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *, -Index: gdb-7.5.50.20130215/gdb/c-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/c-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/c-valprint.c 2013-01-01 07:32:40.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/c-valprint.c 2013-02-15 22:40:18.522622055 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/c-valprint.c 2013-08-02 16:38:26.435292199 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/c-valprint.c 2013-08-02 16:38:32.352300726 +0200 @@ -132,7 +132,7 @@ static const struct generic_val_print_de void @@ -1430,10 +1430,10 @@ Index: gdb-7.5.50.20130215/gdb/c-valprint.c struct value_print_options opts = *options; opts.deref_ref = 1; -Index: gdb-7.5.50.20130215/gdb/cp-abi.c +Index: gdb-7.6.50.20130731-cvs/gdb/cp-abi.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/cp-abi.c 2013-01-17 21:26:14.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/cp-abi.c 2013-02-15 22:40:18.523622057 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/cp-abi.c 2013-08-02 16:38:26.435292199 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/cp-abi.c 2013-08-02 16:38:32.352300726 +0200 @@ -68,13 +68,13 @@ is_operator_name (const char *name) return (*current_cp_abi.is_operator_name) (name); } @@ -1469,10 +1469,10 @@ Index: gdb-7.5.50.20130215/gdb/cp-abi.c { struct type *ret = NULL; volatile struct gdb_exception e; -Index: gdb-7.5.50.20130215/gdb/cp-abi.h +Index: gdb-7.6.50.20130731-cvs/gdb/cp-abi.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/cp-abi.h 2013-01-01 07:32:40.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/cp-abi.h 2013-02-15 22:40:18.523622057 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/cp-abi.h 2013-08-02 16:38:26.435292199 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/cp-abi.h 2013-08-02 16:38:32.352300726 +0200 @@ -108,7 +108,7 @@ extern struct value *value_virtual_fn_fi struct fn_field *f, int j, @@ -1508,7 +1508,7 @@ Index: gdb-7.5.50.20130215/gdb/cp-abi.h /* Describe the target of a pointer to method. CONTENTS is the byte pattern representing the pointer to method. TYPE is the pointer to -@@ -204,12 +204,13 @@ struct cp_abi_ops +@@ -227,12 +227,13 @@ struct cp_abi_ops struct value *(*virtual_fn_field) (struct value **arg1p, struct fn_field * f, int j, struct type * type, @@ -1527,10 +1527,10 @@ Index: gdb-7.5.50.20130215/gdb/cp-abi.h void (*print_method_ptr) (const gdb_byte *contents, struct type *type, struct ui_file *stream); -Index: gdb-7.5.50.20130215/gdb/cp-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/cp-valprint.c 2013-01-07 17:40:36.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/cp-valprint.c 2013-02-15 22:40:18.523622057 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/cp-valprint.c 2013-08-02 16:38:26.436292201 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c 2013-08-02 16:38:32.353300727 +0200 @@ -82,7 +82,7 @@ static void cp_print_static_field (struc const struct value_print_options *); @@ -1604,10 +1604,10 @@ Index: gdb-7.5.50.20130215/gdb/cp-valprint.c int skip; struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); const char *basename = TYPE_NAME (baseclass); -Index: gdb-7.5.50.20130215/gdb/d-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/d-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/d-lang.h 2013-01-01 07:32:41.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/d-lang.h 2013-02-15 22:40:18.523622057 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/d-lang.h 2013-08-02 16:38:26.436292201 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/d-lang.h 2013-08-02 16:38:32.353300727 +0200 @@ -25,7 +25,7 @@ extern char *d_demangle (const char *mangled, int options); @@ -1617,10 +1617,10 @@ Index: gdb-7.5.50.20130215/gdb/d-lang.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.5.50.20130215/gdb/d-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/d-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/d-valprint.c 2013-01-01 07:32:41.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/d-valprint.c 2013-02-15 22:40:18.524622059 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/d-valprint.c 2013-08-02 16:38:26.436292201 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/d-valprint.c 2013-08-02 16:38:32.353300727 +0200 @@ -29,7 +29,7 @@ static int @@ -1643,11 +1643,11 @@ Index: gdb-7.5.50.20130215/gdb/d-valprint.c const struct value_print_options *options) { int ret; -Index: gdb-7.5.50.20130215/gdb/doublest.c +Index: gdb-7.6.50.20130731-cvs/gdb/doublest.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/doublest.c 2013-01-01 07:32:41.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/doublest.c 2013-02-15 22:40:18.524622059 +0100 -@@ -791,7 +791,7 @@ floatformat_from_doublest (const struct +--- gdb-7.6.50.20130731-cvs.orig/gdb/doublest.c 2013-08-02 16:38:26.436292201 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/doublest.c 2013-08-02 16:38:32.354300729 +0200 +@@ -744,7 +744,7 @@ floatformat_from_doublest (const struct but not passed on by GDB. This should be fixed. */ static const struct floatformat * @@ -1656,7 +1656,7 @@ Index: gdb-7.5.50.20130215/gdb/doublest.c { const struct floatformat *format; -@@ -819,8 +819,8 @@ floatformat_from_length (struct gdbarch +@@ -772,8 +772,8 @@ floatformat_from_length (struct gdbarch else format = NULL; if (format == NULL) @@ -1667,11 +1667,11 @@ Index: gdb-7.5.50.20130215/gdb/doublest.c return format; } -Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c +Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/dwarf2loc.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/dwarf2loc.c 2013-02-15 22:40:18.525622061 +0100 -@@ -1677,19 +1677,19 @@ insert_bits (unsigned int datum, +--- gdb-7.6.50.20130731-cvs.orig/gdb/dwarf2loc.c 2013-08-02 16:38:26.438292204 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c 2013-08-02 16:42:11.217607703 +0200 +@@ -1713,19 +1713,19 @@ insert_bits (unsigned int datum, BITS_BIG_ENDIAN is taken directly from gdbarch. */ static void @@ -1697,7 +1697,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c dest_avail = 8 - dest_offset_bits % 8; -@@ -1727,13 +1727,13 @@ static void +@@ -1763,13 +1763,13 @@ static void read_pieced_value (struct value *v) { int i; @@ -1711,9 +1711,9 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c - size_t type_len; + ULONGEST type_len; size_t buffer_size = 0; - char *buffer = NULL; + gdb_byte *buffer = NULL; struct cleanup *cleanup; -@@ -1760,8 +1760,8 @@ read_pieced_value (struct value *v) +@@ -1796,8 +1796,8 @@ read_pieced_value (struct value *v) for (i = 0; i < c->n_pieces && offset < type_len; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1724,7 +1724,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c const gdb_byte *intermediate_buffer; /* Compute size, source, and destination offsets for copying, in -@@ -1910,13 +1910,13 @@ static void +@@ -1946,13 +1946,13 @@ static void write_pieced_value (struct value *to, struct value *from) { int i; @@ -1738,9 +1738,9 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c - size_t type_len; + ULONGEST type_len; size_t buffer_size = 0; - char *buffer = NULL; + gdb_byte *buffer = NULL; struct cleanup *cleanup; -@@ -1944,8 +1944,8 @@ write_pieced_value (struct value *to, st +@@ -1980,8 +1980,8 @@ write_pieced_value (struct value *to, st for (i = 0; i < c->n_pieces && offset < type_len; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1751,7 +1751,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c int need_bitwise; const gdb_byte *source_buffer; -@@ -2074,8 +2074,8 @@ write_pieced_value (struct value *to, st +@@ -2110,8 +2110,8 @@ write_pieced_value (struct value *to, st implicit pointer. */ static int @@ -1762,7 +1762,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c enum dwarf_value_location check_for) { struct piece_closure *c -@@ -2091,7 +2091,7 @@ check_pieced_value_bits (const struct va +@@ -2127,7 +2127,7 @@ check_pieced_value_bits (const struct va for (i = 0; i < c->n_pieces && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1771,7 +1771,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2129,8 +2129,8 @@ check_pieced_value_bits (const struct va +@@ -2165,8 +2165,8 @@ check_pieced_value_bits (const struct va } static int @@ -1782,7 +1782,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c { return check_pieced_value_bits (value, bit_offset, bit_length, DWARF_VALUE_MEMORY); -@@ -2148,8 +2148,8 @@ check_pieced_value_invalid (const struct +@@ -2184,8 +2184,8 @@ check_pieced_value_invalid (const struct a synthetic pointer. */ static int @@ -1793,7 +1793,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c { return check_pieced_value_bits (value, bit_offset, bit_length, DWARF_VALUE_IMPLICIT_POINTER); -@@ -2174,9 +2174,10 @@ indirect_pieced_value (struct value *val +@@ -2210,9 +2210,10 @@ indirect_pieced_value (struct value *val struct type *type; struct frame_info *frame; struct dwarf2_locexpr_baton baton; @@ -1806,7 +1806,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c type = check_typedef (value_type (value)); if (TYPE_CODE (type) != TYPE_CODE_PTR) -@@ -2190,7 +2191,7 @@ indirect_pieced_value (struct value *val +@@ -2226,7 +2227,7 @@ indirect_pieced_value (struct value *val for (i = 0; i < c->n_pieces && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1815,7 +1815,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2406,7 +2407,7 @@ dwarf2_evaluate_loc_desc_full (struct ty +@@ -2467,7 +2468,7 @@ dwarf2_evaluate_loc_desc_full (struct ty struct value *value = dwarf_expr_fetch (ctx, 0); gdb_byte *contents; const gdb_byte *val_bytes; @@ -1824,11 +1824,11 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c if (byte_offset + TYPE_LENGTH (type) > n) invalid_synthetic_pointer (); -Index: gdb-7.5.50.20130215/gdb/dwarf2read.c +Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/dwarf2read.c 2013-02-15 22:40:13.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/dwarf2read.c 2013-02-15 22:40:18.528622067 +0100 -@@ -1227,12 +1227,12 @@ dwarf2_complex_location_expr_complaint ( +--- gdb-7.6.50.20130731-cvs.orig/gdb/dwarf2read.c 2013-08-02 16:38:26.441292208 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c 2013-08-02 16:38:32.358300735 +0200 +@@ -1258,12 +1258,12 @@ dwarf2_complex_location_expr_complaint ( } static void @@ -1845,7 +1845,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2read.c } static void -@@ -10641,8 +10641,8 @@ dwarf2_add_field (struct field_info *fip +@@ -11215,8 +11215,8 @@ dwarf2_add_field (struct field_info *fip object, and then subtract off the number of bits of the field itself. The result is the bit offset of the LSB of the field. */ @@ -1856,10 +1856,10 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2read.c attr = dwarf2_attr (die, DW_AT_byte_size, cu); if (attr) -Index: gdb-7.5.50.20130215/gdb/eval.c +Index: gdb-7.6.50.20130731-cvs/gdb/eval.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/eval.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/eval.c 2013-02-15 22:40:18.529622070 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/eval.c 2013-08-02 16:38:26.443292211 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/eval.c 2013-08-02 16:38:32.359300736 +0200 @@ -294,7 +294,8 @@ evaluate_struct_tuple (struct value *str while (--nargs >= 0) { @@ -1879,7 +1879,7 @@ Index: gdb-7.5.50.20130215/gdb/eval.c if (exp->elts[*pos].opcode == BINOP_COMMA) { -@@ -709,11 +710,11 @@ binop_promote (const struct language_def +@@ -713,11 +714,11 @@ binop_promote (const struct language_def /* FIXME: Also mixed integral/booleans, with result an integer. */ { const struct builtin_type *builtin = builtin_type (gdbarch); @@ -1894,7 +1894,7 @@ Index: gdb-7.5.50.20130215/gdb/eval.c int unsigned_operation; /* Determine type length and signedness after promotion for -@@ -896,7 +897,7 @@ evaluate_subexp_standard (struct type *e +@@ -900,7 +901,7 @@ evaluate_subexp_standard (struct type *e struct value **argvec; int code; int ix; @@ -1903,7 +1903,7 @@ Index: gdb-7.5.50.20130215/gdb/eval.c struct type **arg_types; int save_pos1; struct symbol *function = NULL; -@@ -1076,7 +1077,7 @@ evaluate_subexp_standard (struct type *e +@@ -1080,7 +1081,7 @@ evaluate_subexp_standard (struct type *e struct type *range_type = TYPE_INDEX_TYPE (type); struct type *element_type = TYPE_TARGET_TYPE (type); struct value *array = allocate_value (expect_type); @@ -1912,7 +1912,7 @@ Index: gdb-7.5.50.20130215/gdb/eval.c LONGEST low_bound, high_bound, index; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -2078,7 +2079,8 @@ evaluate_subexp_standard (struct type *e +@@ -2075,7 +2076,8 @@ evaluate_subexp_standard (struct type *e { struct type *type = value_type (arg1); struct type *real_type; @@ -1922,10 +1922,10 @@ Index: gdb-7.5.50.20130215/gdb/eval.c struct value_print_options opts; get_user_print_options (&opts); -Index: gdb-7.5.50.20130215/gdb/f-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/f-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/f-lang.c 2013-01-01 07:32:42.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/f-lang.c 2013-02-15 22:40:18.529622070 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/f-lang.c 2013-08-02 16:38:26.443292211 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/f-lang.c 2013-08-02 16:38:32.359300736 +0200 @@ -103,7 +103,7 @@ f_printchar (int c, struct type *type, s static void @@ -1935,10 +1935,10 @@ Index: gdb-7.5.50.20130215/gdb/f-lang.c const struct value_print_options *options) { const char *type_encoding = f_get_encoding (type); -Index: gdb-7.5.50.20130215/gdb/f-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/f-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/f-lang.h 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/f-lang.h 2013-02-15 22:40:18.529622070 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/f-lang.h 2013-08-02 16:38:26.443292211 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/f-lang.h 2013-08-02 16:38:32.359300736 +0200 @@ -33,7 +33,7 @@ extern const char *f_object_address_data (struct type *type, struct ui_file *stream); extern void f_object_address_data_valid_or_error (struct type *type); @@ -1948,10 +1948,10 @@ Index: gdb-7.5.50.20130215/gdb/f-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -Index: gdb-7.5.50.20130215/gdb/f-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/f-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/f-valprint.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/f-valprint.c 2013-02-15 22:40:18.529622070 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/f-valprint.c 2013-08-02 16:38:26.444292212 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/f-valprint.c 2013-08-02 16:38:32.359300736 +0200 @@ -43,7 +43,7 @@ static void f77_create_arrayprint_offset struct ui_file *); static void f77_get_dynamic_length_of_aggregate (struct type *); @@ -2016,11 +2016,11 @@ Index: gdb-7.5.50.20130215/gdb/f-valprint.c val_print (TYPE_FIELD_TYPE (type, index), valaddr, embedded_offset + offset, -Index: gdb-7.5.50.20130215/gdb/findvar.c +Index: gdb-7.6.50.20130731-cvs/gdb/findvar.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/findvar.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/findvar.c 2013-02-15 22:40:18.529622070 +0100 -@@ -644,7 +644,7 @@ default_value_from_register (struct type +--- gdb-7.6.50.20130731-cvs.orig/gdb/findvar.c 2013-08-02 16:38:26.444292212 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/findvar.c 2013-08-02 16:38:32.360300738 +0200 +@@ -652,7 +652,7 @@ default_value_from_register (struct type struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2029,7 +2029,7 @@ Index: gdb-7.5.50.20130215/gdb/findvar.c struct value *value = allocate_value (type); VALUE_LVAL (value) = lval_register; -@@ -677,10 +677,10 @@ void +@@ -685,10 +685,10 @@ void read_frame_register_value (struct value *value, struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2043,7 +2043,7 @@ Index: gdb-7.5.50.20130215/gdb/findvar.c gdb_assert (VALUE_LVAL (value) == lval_register); -@@ -695,7 +695,7 @@ read_frame_register_value (struct value +@@ -703,7 +703,7 @@ read_frame_register_value (struct value while (len > 0) { struct value *regval = get_frame_register_value (frame, regnum); @@ -2052,11 +2052,11 @@ Index: gdb-7.5.50.20130215/gdb/findvar.c if (value_optimized_out (regval)) { -Index: gdb-7.5.50.20130215/gdb/frame.c +Index: gdb-7.6.50.20130731-cvs/gdb/frame.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/frame.c 2013-01-01 07:32:42.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/frame.c 2013-02-15 22:40:18.530622073 +0100 -@@ -1113,7 +1113,7 @@ deprecated_frame_register_read (struct f +--- gdb-7.6.50.20130731-cvs.orig/gdb/frame.c 2013-08-02 16:38:26.445292214 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/frame.c 2013-08-02 16:38:32.360300738 +0200 +@@ -1182,7 +1182,7 @@ deprecated_frame_register_read (struct f int get_frame_register_bytes (struct frame_info *frame, int regnum, @@ -2065,7 +2065,7 @@ Index: gdb-7.5.50.20130215/gdb/frame.c int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -1142,7 +1142,7 @@ get_frame_register_bytes (struct frame_i +@@ -1211,7 +1211,7 @@ get_frame_register_bytes (struct frame_i } if (len > maxsize) error (_("Bad debug information detected: " @@ -2074,10 +2074,10 @@ Index: gdb-7.5.50.20130215/gdb/frame.c /* Copy the data. */ while (len > 0) -Index: gdb-7.5.50.20130215/gdb/frame.h +Index: gdb-7.6.50.20130731-cvs/gdb/frame.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/frame.h 2013-02-01 20:58:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/frame.h 2013-02-15 22:40:18.530622073 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/frame.h 2013-08-02 16:38:26.445292214 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/frame.h 2013-08-02 16:38:32.360300738 +0200 @@ -532,7 +532,7 @@ extern void put_frame_register (struct f contents are optimized out or unavailable, set *OPTIMIZEDP, *UNAVAILABLEP accordingly. */ @@ -2087,11 +2087,11 @@ Index: gdb-7.5.50.20130215/gdb/frame.h gdb_byte *myaddr, int *optimizedp, int *unavailablep); -Index: gdb-7.5.50.20130215/gdb/gdbtypes.c +Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gdbtypes.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gdbtypes.c 2013-02-15 22:40:39.496648052 +0100 -@@ -2090,7 +2090,7 @@ allocate_gnat_aux_type (struct type *typ +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbtypes.c 2013-08-02 16:38:26.446292215 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c 2013-08-02 16:38:32.361300739 +0200 +@@ -2091,7 +2091,7 @@ allocate_gnat_aux_type (struct type *typ least as long as OBJFILE. */ struct type * @@ -2100,7 +2100,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c const char *name, struct objfile *objfile) { struct type *type; -@@ -2321,8 +2321,8 @@ is_public_ancestor (struct type *base, s +@@ -2322,8 +2322,8 @@ is_public_ancestor (struct type *base, s static int is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -2111,7 +2111,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c CORE_ADDR address, struct value *val) { int i, count = 0; -@@ -2333,7 +2333,7 @@ is_unique_ancestor_worker (struct type * +@@ -2334,7 +2334,7 @@ is_unique_ancestor_worker (struct type * for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) { struct type *iter; @@ -2120,7 +2120,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c iter = check_typedef (TYPE_BASECLASS (dclass, i)); -@@ -2374,7 +2374,7 @@ is_unique_ancestor_worker (struct type * +@@ -2375,7 +2375,7 @@ is_unique_ancestor_worker (struct type * int is_unique_ancestor (struct type *base, struct value *val) { @@ -2129,7 +2129,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c return is_unique_ancestor_worker (base, value_type (val), &offset, value_contents_for_printing (val), -@@ -3283,7 +3283,7 @@ recursive_dump_type (struct type *type, +@@ -3303,7 +3303,7 @@ recursive_dump_type (struct type *type, break; } puts_filtered ("\n"); @@ -2138,7 +2138,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c if (TYPE_OBJFILE_OWNED (type)) { printfi_filtered (spaces, "objfile "); -@@ -3407,8 +3407,8 @@ recursive_dump_type (struct type *type, +@@ -3427,8 +3427,8 @@ recursive_dump_type (struct type *type, idx, plongest (TYPE_FIELD_ENUMVAL (type, idx))); else printfi_filtered (spaces + 2, @@ -2149,7 +2149,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c TYPE_FIELD_BITSIZE (type, idx)); gdb_print_host_address (TYPE_FIELD_TYPE (type, idx), gdb_stdout); printf_filtered (" name '%s' (", -@@ -3922,7 +3922,7 @@ copy_type (const struct type *type) +@@ -3942,7 +3942,7 @@ copy_type (const struct type *type) struct type * arch_type (struct gdbarch *gdbarch, @@ -2158,10 +2158,10 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c { struct type *type; -Index: gdb-7.5.50.20130215/gdb/gdbtypes.h +Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gdbtypes.h 2013-02-15 22:37:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gdbtypes.h 2013-02-15 22:42:33.846787959 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbtypes.h 2013-08-02 16:38:26.447292217 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbtypes.h 2013-08-02 16:38:32.361300739 +0200 @@ -606,7 +606,7 @@ struct main_type gdbarch_bits_big_endian=0 targets, it is the bit offset to the LSB. */ @@ -2195,10 +2195,10 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.h extern struct type *arch_integer_type (struct gdbarch *, int, int, char *); extern struct type *arch_character_type (struct gdbarch *, int, int, char *); extern struct type *arch_boolean_type (struct gdbarch *, int, int, char *); -Index: gdb-7.5.50.20130215/gdb/gnu-v2-abi.c +Index: gdb-7.6.50.20130731-cvs/gdb/gnu-v2-abi.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gnu-v2-abi.c 2013-01-21 18:29:39.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gnu-v2-abi.c 2013-02-15 22:40:18.532622077 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/gnu-v2-abi.c 2013-08-02 16:38:26.447292217 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gnu-v2-abi.c 2013-08-02 16:38:32.362300740 +0200 @@ -85,7 +85,7 @@ gnuv2_is_operator_name (const char *name TYPE is the type in which F is located. */ static struct value * @@ -2250,11 +2250,11 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v2-abi.c gnuv2_baseclass_offset (type, i, valaddr, embedded_offset, address, val); -Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c +Index: gdb-7.6.50.20130731-cvs/gdb/gnu-v3-abi.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gnu-v3-abi.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gnu-v3-abi.c 2013-02-15 22:40:18.532622077 +0100 -@@ -106,7 +106,7 @@ build_gdb_vtable_type (struct gdbarch *a +--- gdb-7.6.50.20130731-cvs.orig/gdb/gnu-v3-abi.c 2013-08-02 16:38:26.448292218 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gnu-v3-abi.c 2013-08-02 16:38:32.362300740 +0200 +@@ -112,7 +112,7 @@ build_gdb_vtable_type (struct gdbarch *a { struct type *t; struct field *field_list, *field; @@ -2263,7 +2263,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c struct type *void_ptr_type = builtin_type (arch)->builtin_data_ptr; -@@ -182,7 +182,7 @@ vtable_ptrdiff_type (struct gdbarch *gdb +@@ -188,7 +188,7 @@ vtable_ptrdiff_type (struct gdbarch *gdb /* Return the offset from the start of the imaginary `struct gdb_gnu_v3_abi_vtable' object to the vtable's "address point" (i.e., where objects' virtual table pointers point). */ @@ -2272,7 +2272,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c vtable_address_point_offset (struct gdbarch *gdbarch) { struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data); -@@ -273,7 +273,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc +@@ -279,7 +279,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc static struct type * gnuv3_rtti_type (struct value *value, @@ -2281,7 +2281,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c { struct gdbarch *gdbarch; struct type *values_type = check_typedef (value_type (value)); -@@ -385,7 +385,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gd +@@ -404,7 +404,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gd static struct value * gnuv3_virtual_fn_field (struct value **value_p, struct fn_field *f, int j, @@ -2290,7 +2290,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c { struct type *values_type = check_typedef (value_type (*value_p)); struct gdbarch *gdbarch; -@@ -415,16 +415,16 @@ gnuv3_virtual_fn_field (struct value **v +@@ -434,16 +434,16 @@ gnuv3_virtual_fn_field (struct value **v -1 is returned on error. */ @@ -2310,7 +2310,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c /* Determine architecture. */ gdbarch = get_type_arch (type); -@@ -448,7 +448,7 @@ gnuv3_baseclass_offset (struct type *typ +@@ -467,7 +467,7 @@ gnuv3_baseclass_offset (struct type *typ cur_base_offset = cur_base_offset + vtable_address_point_offset (gdbarch); if ((- cur_base_offset) % TYPE_LENGTH (ptr_type) != 0) error (_("Misaligned vbase offset.")); @@ -2319,7 +2319,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c vtable = gnuv3_get_vtable (gdbarch, type, address + embedded_offset); gdb_assert (vtable != NULL); -@@ -492,7 +492,7 @@ gnuv3_find_method_in (struct type *domai +@@ -511,7 +511,7 @@ gnuv3_find_method_in (struct type *domai we're out of luck. */ for (i = 0; i < TYPE_N_BASECLASSES (domain); i++) { @@ -2328,10 +2328,10 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c struct type *basetype; if (BASETYPE_VIA_VIRTUAL (domain, i)) -Index: gdb-7.5.50.20130215/gdb/go-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/go-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/go-lang.h 2013-01-01 07:32:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/go-lang.h 2013-02-15 22:40:18.532622077 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/go-lang.h 2013-08-02 16:38:26.448292218 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/go-lang.h 2013-08-02 16:38:32.362300740 +0200 @@ -83,7 +83,7 @@ extern void go_print_type (struct type * /* Defined in go-valprint.c. */ @@ -2341,10 +2341,10 @@ Index: gdb-7.5.50.20130215/gdb/go-lang.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.5.50.20130215/gdb/go-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/go-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/go-valprint.c 2013-01-01 07:32:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/go-valprint.c 2013-02-15 22:40:18.532622077 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/go-valprint.c 2013-08-02 16:38:26.448292218 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/go-valprint.c 2013-08-02 16:38:32.362300740 +0200 @@ -37,7 +37,7 @@ static void @@ -2367,10 +2367,10 @@ Index: gdb-7.5.50.20130215/gdb/go-valprint.c const struct value_print_options *options) { CHECK_TYPEDEF (type); -Index: gdb-7.5.50.20130215/gdb/i386-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/i386-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/i386-nat.c 2013-02-13 15:59:49.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/i386-nat.c 2013-02-15 22:41:53.950739414 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/i386-nat.c 2013-08-02 16:38:26.448292218 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/i386-nat.c 2013-08-02 16:38:32.362300740 +0200 @@ -290,7 +290,7 @@ static int i386_remove_aligned_watchpoin valid value, bombs through internal_error. */ static int i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state, @@ -2400,11 +2400,11 @@ Index: gdb-7.5.50.20130215/gdb/i386-nat.c { struct i386_debug_reg_state *state = i386_debug_reg_state (ptid_get_pid (inferior_ptid)); -Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c +Index: gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/inf-ttrace.c 2013-01-01 07:32:45.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/inf-ttrace.c 2013-02-15 22:40:18.533622078 +0100 -@@ -364,7 +364,7 @@ inf_ttrace_can_use_hw_breakpoint (int ty +--- gdb-7.6.50.20130731-cvs.orig/gdb/inf-ttrace.c 2013-08-02 16:38:26.449292220 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c 2013-08-02 16:38:32.363300742 +0200 +@@ -365,7 +365,7 @@ inf_ttrace_can_use_hw_breakpoint (int ty } static int @@ -2413,11 +2413,11 @@ Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c { return 1; } -Index: gdb-7.5.50.20130215/gdb/jv-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/jv-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/jv-lang.c 2013-02-15 22:37:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/jv-lang.c 2013-02-15 22:40:18.533622078 +0100 -@@ -437,7 +437,7 @@ java_link_class_type (struct gdbarch *gd +--- gdb-7.6.50.20130731-cvs.orig/gdb/jv-lang.c 2013-08-02 16:38:26.449292220 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/jv-lang.c 2013-08-02 16:38:32.363300742 +0200 +@@ -436,7 +436,7 @@ java_link_class_type (struct gdbarch *gd for (i = TYPE_N_BASECLASSES (type); i < nfields; i++) { int accflags; @@ -2426,7 +2426,7 @@ Index: gdb-7.5.50.20130215/gdb/jv-lang.c if (fields == NULL) { -@@ -887,7 +887,7 @@ java_printchar (int c, struct type *type +@@ -886,7 +886,7 @@ java_printchar (int c, struct type *type static void java_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, @@ -2435,10 +2435,10 @@ Index: gdb-7.5.50.20130215/gdb/jv-lang.c const struct value_print_options *options) { const char *type_encoding = java_get_encoding (type); -Index: gdb-7.5.50.20130215/gdb/jv-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/jv-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/jv-lang.h 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/jv-lang.h 2013-02-15 22:40:18.533622078 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/jv-lang.h 2013-08-02 16:38:26.449292220 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/jv-lang.h 2013-08-02 16:38:32.363300742 +0200 @@ -42,8 +42,8 @@ struct builtin_java_type extern const struct builtin_java_type *builtin_java_type (struct gdbarch *); @@ -2450,10 +2450,10 @@ Index: gdb-7.5.50.20130215/gdb/jv-lang.h const struct value *, const struct value_print_options *); -Index: gdb-7.5.50.20130215/gdb/jv-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/jv-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/jv-valprint.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/jv-valprint.c 2013-02-15 22:40:18.533622078 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/jv-valprint.c 2013-08-02 16:38:26.450292221 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/jv-valprint.c 2013-08-02 16:38:32.363300742 +0200 @@ -266,7 +266,7 @@ java_value_print (struct value *val, str static void @@ -2472,11 +2472,11 @@ Index: gdb-7.5.50.20130215/gdb/jv-valprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.5.50.20130215/gdb/language.c +Index: gdb-7.6.50.20130731-cvs/gdb/language.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/language.c 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/language.c 2013-02-15 22:40:18.534622079 +0100 -@@ -720,7 +720,7 @@ unk_lang_printchar (int c, struct type * +--- gdb-7.6.50.20130731-cvs.orig/gdb/language.c 2013-08-02 16:38:26.450292221 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/language.c 2013-08-02 16:38:32.364300743 +0200 +@@ -721,7 +721,7 @@ unk_lang_printchar (int c, struct type * static void unk_lang_printstr (struct ui_file *stream, struct type *type, @@ -2485,7 +2485,7 @@ Index: gdb-7.5.50.20130215/gdb/language.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -739,7 +739,7 @@ unk_lang_print_type (struct type *type, +@@ -740,7 +740,7 @@ unk_lang_print_type (struct type *type, static void unk_lang_val_print (struct type *type, const gdb_byte *valaddr, @@ -2494,10 +2494,10 @@ Index: gdb-7.5.50.20130215/gdb/language.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.5.50.20130215/gdb/language.h +Index: gdb-7.6.50.20130731-cvs/gdb/language.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/language.h 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/language.h 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/language.h 2013-08-02 16:38:26.450292221 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/language.h 2013-08-02 16:38:32.364300743 +0200 @@ -175,7 +175,7 @@ struct language_defn struct ui_file * stream); @@ -2516,10 +2516,10 @@ Index: gdb-7.5.50.20130215/gdb/language.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.5.50.20130215/gdb/m2-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/m2-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/m2-lang.c 2013-01-07 17:40:36.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/m2-lang.c 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m2-lang.c 2013-08-02 16:38:26.450292221 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m2-lang.c 2013-08-02 16:38:32.364300743 +0200 @@ -103,10 +103,10 @@ m2_printchar (int c, struct type *type, static void @@ -2554,10 +2554,10 @@ Index: gdb-7.5.50.20130215/gdb/m2-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.5.50.20130215/gdb/m2-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/m2-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/m2-lang.h 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/m2-lang.h 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m2-lang.h 2013-08-02 16:38:26.451292222 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m2-lang.h 2013-08-02 16:38:32.364300743 +0200 @@ -33,7 +33,7 @@ extern void m2_print_typedef (struct typ extern int m2_is_long_set (struct type *type); extern int m2_is_unbounded_array (struct type *type); @@ -2567,10 +2567,10 @@ Index: gdb-7.5.50.20130215/gdb/m2-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -Index: gdb-7.5.50.20130215/gdb/m2-typeprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/m2-typeprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/m2-typeprint.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/m2-typeprint.c 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m2-typeprint.c 2013-08-02 16:38:26.451292222 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m2-typeprint.c 2013-08-02 16:38:32.364300743 +0200 @@ -233,9 +233,12 @@ static void m2_array (struct type *type, m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 1); } @@ -2587,10 +2587,10 @@ Index: gdb-7.5.50.20130215/gdb/m2-typeprint.c } fprintf_filtered (stream, "] OF "); m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); -Index: gdb-7.5.50.20130215/gdb/m2-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/m2-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/m2-valprint.c 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/m2-valprint.c 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m2-valprint.c 2013-08-02 16:38:26.451292222 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m2-valprint.c 2013-08-02 16:38:32.365300745 +0200 @@ -35,7 +35,7 @@ static int print_unpacked_pointer (struc struct ui_file *stream); static void @@ -2656,10 +2656,10 @@ Index: gdb-7.5.50.20130215/gdb/m2-valprint.c /* Look for a NULL char. */ for (temp_len = 0; -Index: gdb-7.5.50.20130215/gdb/memrange.c +Index: gdb-7.6.50.20130731-cvs/gdb/memrange.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/memrange.c 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/memrange.c 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/memrange.c 2013-08-02 16:38:26.451292222 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/memrange.c 2013-08-02 16:38:32.365300745 +0200 @@ -21,8 +21,8 @@ #include "memrange.h" @@ -2671,10 +2671,10 @@ Index: gdb-7.5.50.20130215/gdb/memrange.c { ULONGEST h, l; -Index: gdb-7.5.50.20130215/gdb/memrange.h +Index: gdb-7.6.50.20130731-cvs/gdb/memrange.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/memrange.h 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/memrange.h 2013-02-15 22:40:18.535622081 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/memrange.h 2013-08-02 16:38:26.452292224 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/memrange.h 2013-08-02 16:38:32.365300745 +0200 @@ -30,7 +30,7 @@ struct mem_range CORE_ADDR start; @@ -2695,11 +2695,11 @@ Index: gdb-7.5.50.20130215/gdb/memrange.h /* Sort ranges by start address, then coalesce contiguous or overlapping ranges. */ -Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/mips-linux-nat.c 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/mips-linux-nat.c 2013-02-15 22:40:18.535622081 +0100 -@@ -938,7 +938,7 @@ try_one_watch (struct pt_watch_regs *reg +--- gdb-7.6.50.20130731-cvs.orig/gdb/mips-linux-nat.c 2013-08-02 16:38:26.452292224 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c 2013-08-02 16:38:32.365300745 +0200 +@@ -588,7 +588,7 @@ mips_linux_stopped_data_address (struct the specified region can be covered by the watch registers. */ static int @@ -2708,10 +2708,10 @@ Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c { struct pt_watch_regs dummy_regs; int i; -Index: gdb-7.5.50.20130215/gdb/opencl-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/opencl-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/opencl-lang.c 2013-01-25 18:16:40.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/opencl-lang.c 2013-02-15 22:40:18.535622081 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/opencl-lang.c 2013-08-02 16:38:26.452292224 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/opencl-lang.c 2013-08-02 16:38:32.365300745 +0200 @@ -80,11 +80,11 @@ builtin_opencl_type (struct gdbarch *gdb static struct type * @@ -2838,10 +2838,10 @@ Index: gdb-7.5.50.20130215/gdb/opencl-lang.c if (!value_bits_synthetic_pointer (c->val, c->indices[i] * elsize + comp_offset, -Index: gdb-7.5.50.20130215/gdb/p-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/p-lang.c 2013-01-07 17:40:36.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/p-lang.c 2013-02-15 22:40:18.535622081 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/p-lang.c 2013-08-02 16:38:26.453292225 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/p-lang.c 2013-08-02 16:38:32.366300746 +0200 @@ -95,8 +95,8 @@ pascal_main_name (void) are not multiple of TARGET_CHAR_BIT then the results are wrong but this does not happen for Free Pascal nor for GPC. */ @@ -2889,10 +2889,10 @@ Index: gdb-7.5.50.20130215/gdb/p-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.5.50.20130215/gdb/p-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/p-lang.h 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/p-lang.h 2013-02-15 22:40:18.535622081 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/p-lang.h 2013-08-02 16:38:26.453292225 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/p-lang.h 2013-08-02 16:38:32.366300746 +0200 @@ -35,7 +35,7 @@ extern void pascal_print_type (struct ty extern void pascal_print_typedef (struct type *, struct symbol *, struct ui_file *); @@ -2927,10 +2927,10 @@ Index: gdb-7.5.50.20130215/gdb/p-lang.h CORE_ADDR, struct ui_file *, int, const struct value *, -Index: gdb-7.5.50.20130215/gdb/p-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/p-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/p-valprint.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/p-valprint.c 2013-02-15 22:40:18.536622084 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/p-valprint.c 2013-08-02 16:38:26.453292225 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/p-valprint.c 2013-08-02 16:38:32.366300746 +0200 @@ -58,7 +58,7 @@ static const struct generic_val_print_de void @@ -2951,7 +2951,7 @@ Index: gdb-7.5.50.20130215/gdb/p-valprint.c struct type *char_type; CORE_ADDR addr; int want_space = 0; -@@ -493,7 +493,7 @@ static void pascal_object_print_static_f +@@ -494,7 +494,7 @@ static void pascal_object_print_static_f const struct value_print_options *); static void pascal_object_print_value (struct type *, const gdb_byte *, @@ -2960,7 +2960,7 @@ Index: gdb-7.5.50.20130215/gdb/p-valprint.c CORE_ADDR, struct ui_file *, int, const struct value *, const struct value_print_options *, -@@ -552,7 +552,7 @@ pascal_object_is_vtbl_member (struct typ +@@ -553,7 +553,7 @@ pascal_object_is_vtbl_member (struct typ void pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr, @@ -2969,7 +2969,7 @@ Index: gdb-7.5.50.20130215/gdb/p-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -728,7 +728,7 @@ pascal_object_print_value_fields (struct +@@ -729,7 +729,7 @@ pascal_object_print_value_fields (struct static void pascal_object_print_value (struct type *type, const gdb_byte *valaddr, @@ -2978,7 +2978,7 @@ Index: gdb-7.5.50.20130215/gdb/p-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -751,11 +751,11 @@ pascal_object_print_value (struct type * +@@ -752,11 +752,11 @@ pascal_object_print_value (struct type * for (i = 0; i < n_baseclasses; i++) { @@ -2992,11 +2992,11 @@ Index: gdb-7.5.50.20130215/gdb/p-valprint.c volatile struct gdb_exception ex; int skip = 0; -Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ppc-linux-nat.c 2013-01-01 07:32:49.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ppc-linux-nat.c 2013-02-15 22:40:18.536622084 +0100 -@@ -1492,7 +1492,7 @@ ppc_linux_can_use_hw_breakpoint (int typ +--- gdb-7.6.50.20130731-cvs.orig/gdb/ppc-linux-nat.c 2013-08-02 16:38:26.454292227 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c 2013-08-02 16:38:32.366300746 +0200 +@@ -1496,7 +1496,7 @@ ppc_linux_can_use_hw_breakpoint (int typ } static int @@ -3005,10 +3005,10 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c { /* Handle sub-8-byte quantities. */ if (len <= 0) -Index: gdb-7.5.50.20130215/gdb/printcmd.c +Index: gdb-7.6.50.20130731-cvs/gdb/printcmd.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/printcmd.c 2013-02-15 22:34:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/printcmd.c 2013-02-15 22:40:18.537622086 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/printcmd.c 2013-08-02 16:38:26.454292227 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/printcmd.c 2013-08-02 16:38:32.367300748 +0200 @@ -290,7 +290,7 @@ print_formatted (struct value *val, int struct ui_file *stream) { @@ -3027,10 +3027,10 @@ Index: gdb-7.5.50.20130215/gdb/printcmd.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); /* String printing should go through val_print_scalar_formatted. */ -Index: gdb-7.5.50.20130215/gdb/procfs.c +Index: gdb-7.6.50.20130731-cvs/gdb/procfs.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/procfs.c 2013-01-01 07:32:49.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/procfs.c 2013-02-15 22:40:18.537622086 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/procfs.c 2013-08-02 16:38:26.455292228 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/procfs.c 2013-08-02 16:38:32.368300749 +0200 @@ -4926,7 +4926,7 @@ procfs_remove_watchpoint (CORE_ADDR addr } @@ -3040,11 +3040,11 @@ Index: gdb-7.5.50.20130215/gdb/procfs.c { /* The man page for proc(4) on Solaris 2.6 and up says that the system can support "thousands" of hardware watchpoints, but gives -Index: gdb-7.5.50.20130215/gdb/python/py-prettyprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/python/py-prettyprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/python/py-prettyprint.c 2013-01-01 07:33:01.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/python/py-prettyprint.c 2013-02-15 22:40:18.538622088 +0100 -@@ -689,7 +689,7 @@ print_children (PyObject *printer, const +--- gdb-7.6.50.20130731-cvs.orig/gdb/python/py-prettyprint.c 2013-08-02 16:38:26.456292230 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/python/py-prettyprint.c 2013-08-02 16:38:32.368300749 +0200 +@@ -688,7 +688,7 @@ print_children (PyObject *printer, const int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr, @@ -3053,7 +3053,7 @@ Index: gdb-7.5.50.20130215/gdb/python/py-prettyprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -837,7 +837,7 @@ gdbpy_default_visualizer (PyObject *self +@@ -843,7 +843,7 @@ gdbpy_default_visualizer (PyObject *self int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr, @@ -3062,11 +3062,11 @@ Index: gdb-7.5.50.20130215/gdb/python/py-prettyprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.5.50.20130215/gdb/python/python.h +Index: gdb-7.6.50.20130731-cvs/gdb/python/python.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/python/python.h 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/python/python.h 2013-02-15 22:40:18.538622088 +0100 -@@ -37,7 +37,7 @@ void source_python_script (FILE *file, c +--- gdb-7.6.50.20130731-cvs.orig/gdb/python/python.h 2013-08-02 16:38:26.456292230 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/python/python.h 2013-08-02 16:38:32.368300749 +0200 +@@ -98,7 +98,7 @@ void source_python_script (FILE *file, c void run_python_script (int argc, char **argv); int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr, @@ -3075,10 +3075,10 @@ Index: gdb-7.5.50.20130215/gdb/python/python.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.5.50.20130215/gdb/regcache.c +Index: gdb-7.6.50.20130731-cvs/gdb/regcache.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/regcache.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/regcache.c 2013-02-15 22:40:18.538622088 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/regcache.c 2013-08-02 16:38:26.457292231 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/regcache.c 2013-08-02 16:38:32.368300749 +0200 @@ -899,7 +899,7 @@ typedef void (regcache_write_ftype) (str static enum register_status @@ -3124,10 +3124,10 @@ Index: gdb-7.5.50.20130215/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -Index: gdb-7.5.50.20130215/gdb/regcache.h +Index: gdb-7.6.50.20130731-cvs/gdb/regcache.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/regcache.h 2013-01-01 07:32:49.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/regcache.h 2013-02-15 22:40:18.538622088 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/regcache.h 2013-08-02 16:38:26.457292231 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/regcache.h 2013-08-02 16:38:32.368300749 +0200 @@ -89,9 +89,9 @@ extern void regcache_raw_write_unsigned extern enum register_status @@ -3155,11 +3155,11 @@ Index: gdb-7.5.50.20130215/gdb/regcache.h /* Special routines to read/write the PC. */ -Index: gdb-7.5.50.20130215/gdb/remote.c +Index: gdb-7.6.50.20130731-cvs/gdb/remote.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/remote.c 2013-02-15 22:34:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/remote.c 2013-02-15 22:40:18.540622092 +0100 -@@ -8236,7 +8236,7 @@ int remote_hw_watchpoint_length_limit = +--- gdb-7.6.50.20130731-cvs.orig/gdb/remote.c 2013-08-02 16:38:26.459292234 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/remote.c 2013-08-02 16:38:32.370300752 +0200 +@@ -8368,7 +8368,7 @@ int remote_hw_watchpoint_length_limit = int remote_hw_breakpoint_limit = -1; static int @@ -3168,10 +3168,10 @@ Index: gdb-7.5.50.20130215/gdb/remote.c { if (remote_hw_watchpoint_length_limit == 0) return 0; -Index: gdb-7.5.50.20130215/gdb/s390-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/s390-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/s390-nat.c 2013-01-01 07:32:50.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/s390-nat.c 2013-02-15 22:40:18.540622092 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/s390-nat.c 2013-08-02 16:38:26.459292234 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/s390-nat.c 2013-08-02 16:38:32.370300752 +0200 @@ -571,7 +571,7 @@ s390_can_use_hw_breakpoint (int type, in } @@ -3181,10 +3181,10 @@ Index: gdb-7.5.50.20130215/gdb/s390-nat.c { return 1; } -Index: gdb-7.5.50.20130215/gdb/spu-multiarch.c +Index: gdb-7.6.50.20130731-cvs/gdb/spu-multiarch.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/spu-multiarch.c 2013-01-01 07:32:51.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/spu-multiarch.c 2013-02-15 22:40:18.540622092 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/spu-multiarch.c 2013-08-02 16:38:26.459292234 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/spu-multiarch.c 2013-08-02 16:38:32.370300752 +0200 @@ -118,7 +118,7 @@ spu_thread_architecture (struct target_o /* Override the to_region_ok_for_hw_watchpoint routine. */ @@ -3194,11 +3194,11 @@ Index: gdb-7.5.50.20130215/gdb/spu-multiarch.c { struct target_ops *ops_beneath = find_target_beneath (&spu_ops); while (ops_beneath && !ops_beneath->to_region_ok_for_hw_watchpoint) -Index: gdb-7.5.50.20130215/gdb/stack.c +Index: gdb-7.6.50.20130731-cvs/gdb/stack.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/stack.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/stack.c 2013-02-15 22:40:18.540622092 +0100 -@@ -173,7 +173,7 @@ print_stack_frame (struct frame_info *fr +--- gdb-7.6.50.20130731-cvs.orig/gdb/stack.c 2013-08-02 16:38:26.460292236 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/stack.c 2013-08-02 16:38:32.371300754 +0200 +@@ -178,7 +178,7 @@ print_stack_frame (struct frame_info *fr argument (not just the first nameless argument). */ static void @@ -3207,7 +3207,7 @@ Index: gdb-7.5.50.20130215/gdb/stack.c int first, struct ui_file *stream) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -497,7 +497,7 @@ print_frame_args (struct symbol *func, s +@@ -500,7 +500,7 @@ print_frame_args (struct symbol *func, s /* Offset of next stack argument beyond the one we have seen that is at the highest offset, or -1 if we haven't come to a stack argument yet. */ @@ -3216,7 +3216,7 @@ Index: gdb-7.5.50.20130215/gdb/stack.c /* Number of ints of arguments that we have printed so far. */ int args_printed = 0; struct cleanup *old_chain; -@@ -535,8 +535,8 @@ print_frame_args (struct symbol *func, s +@@ -538,8 +538,8 @@ print_frame_args (struct symbol *func, s case LOC_ARG: case LOC_REF_ARG: { @@ -3227,7 +3227,7 @@ Index: gdb-7.5.50.20130215/gdb/stack.c /* Compute address of next argument by adding the size of this argument and rounding to an int boundary. */ -@@ -671,7 +671,7 @@ print_frame_args (struct symbol *func, s +@@ -674,7 +674,7 @@ print_frame_args (struct symbol *func, s enough about the stack to find them. */ if (num != -1) { @@ -3236,11 +3236,11 @@ Index: gdb-7.5.50.20130215/gdb/stack.c if (highest_offset == -1) start = gdbarch_frame_args_skip (get_frame_arch (frame)); -Index: gdb-7.5.50.20130215/gdb/symmisc.c +Index: gdb-7.6.50.20130731-cvs/gdb/symmisc.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/symmisc.c 2013-02-15 22:34:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/symmisc.c 2013-02-15 22:40:18.541622094 +0100 -@@ -527,11 +527,11 @@ print_symbol (void *args) +--- gdb-7.6.50.20130731-cvs.orig/gdb/symmisc.c 2013-08-02 16:38:26.460292236 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/symmisc.c 2013-08-02 16:38:32.371300754 +0200 +@@ -534,11 +534,11 @@ print_symbol (void *args) case LOC_CONST_BYTES: { @@ -3255,11 +3255,11 @@ Index: gdb-7.5.50.20130215/gdb/symmisc.c for (i = 0; i < TYPE_LENGTH (type); i++) fprintf_filtered (outfile, " %02x", (unsigned) SYMBOL_VALUE_BYTES (symbol)[i]); -Index: gdb-7.5.50.20130215/gdb/target.c +Index: gdb-7.6.50.20130731-cvs/gdb/target.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/target.c 2013-01-31 17:32:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/target.c 2013-02-15 22:40:18.541622094 +0100 -@@ -51,7 +51,7 @@ static void default_terminal_info (char +--- gdb-7.6.50.20130731-cvs.orig/gdb/target.c 2013-08-02 16:38:26.461292237 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/target.c 2013-08-02 16:38:32.372300755 +0200 +@@ -51,7 +51,7 @@ static void default_terminal_info (const static int default_watchpoint_addr_within_range (struct target_ops *, CORE_ADDR, CORE_ADDR, int); @@ -3277,7 +3277,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c static int debug_to_can_accel_watchpoint_condition (CORE_ADDR, int, int, struct expression *); -@@ -3550,7 +3550,7 @@ target_fileio_read_stralloc (const char +@@ -3586,7 +3586,7 @@ target_fileio_read_stralloc (const char static int @@ -3286,7 +3286,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c { return (len <= gdbarch_ptr_bit (target_gdbarch ()) / TARGET_CHAR_BIT); } -@@ -4251,7 +4251,7 @@ debug_to_can_use_hw_breakpoint (int type +@@ -4541,7 +4541,7 @@ debug_to_can_use_hw_breakpoint (int type } static int @@ -3295,11 +3295,11 @@ Index: gdb-7.5.50.20130215/gdb/target.c { CORE_ADDR retval; -Index: gdb-7.5.50.20130215/gdb/target.h +Index: gdb-7.6.50.20130731-cvs/gdb/target.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/target.h 2013-02-15 22:37:30.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/target.h 2013-02-15 22:40:18.542622096 +0100 -@@ -482,7 +482,7 @@ struct target_ops +--- gdb-7.6.50.20130731-cvs.orig/gdb/target.h 2013-08-02 16:38:26.462292238 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/target.h 2013-08-02 16:38:32.372300755 +0200 +@@ -389,7 +389,7 @@ struct target_ops /* Documentation of this routine is provided with the corresponding target_* macro. */ @@ -3308,11 +3308,11 @@ Index: gdb-7.5.50.20130215/gdb/target.h int (*to_can_accel_watchpoint_condition) (CORE_ADDR, int, int, struct expression *); -Index: gdb-7.5.50.20130215/gdb/tracepoint.c +Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/tracepoint.c 2013-02-14 11:19:39.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/tracepoint.c 2013-02-15 22:40:18.543622099 +0100 -@@ -955,13 +955,13 @@ add_register (struct collection_list *co +--- gdb-7.6.50.20130731-cvs.orig/gdb/tracepoint.c 2013-08-02 16:38:26.464292241 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/tracepoint.c 2013-08-02 16:40:53.018499769 +0200 +@@ -940,13 +940,13 @@ add_register (struct collection_list *co static void add_memrange (struct collection_list *memranges, int type, bfd_signed_vma base, @@ -3328,16 +3328,16 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c } /* type: memrange_absolute == memory, other n == basereg */ -@@ -990,7 +990,7 @@ collect_symbol (struct collection_list * - long frame_regno, long frame_offset, - CORE_ADDR scope) +@@ -976,7 +976,7 @@ collect_symbol (struct collection_list * + CORE_ADDR scope, + int trace_string) { - unsigned long len; + ULONGEST len; unsigned int reg; bfd_signed_vma offset; int treat_as_expr = 0; -@@ -1014,8 +1014,8 @@ collect_symbol (struct collection_list * +@@ -1000,8 +1000,8 @@ collect_symbol (struct collection_list * char tmp[40]; sprintf_vma (tmp, offset); @@ -3348,7 +3348,7 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c tmp /* address */); } /* A struct may be a C++ class with static fields, go to general -@@ -1047,8 +1047,8 @@ collect_symbol (struct collection_list * +@@ -1033,8 +1033,8 @@ collect_symbol (struct collection_list * offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3359,7 +3359,7 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from frame ptr reg %d\n", reg); } -@@ -1059,8 +1059,8 @@ collect_symbol (struct collection_list * +@@ -1045,8 +1045,8 @@ collect_symbol (struct collection_list * offset = 0; if (info_verbose) { @@ -3370,7 +3370,7 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from reg %d\n", reg); } -@@ -1071,8 +1071,8 @@ collect_symbol (struct collection_list * +@@ -1057,8 +1057,8 @@ collect_symbol (struct collection_list * offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3381,7 +3381,7 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from frame ptr reg %d\n", reg); } -@@ -2642,7 +2642,8 @@ scope_info (char *args, int from_tty) +@@ -2716,7 +2716,8 @@ scope_info (char *args, int from_tty) const char *symname; char *save_args = args; struct block_iterator iter; @@ -3391,8 +3391,8 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c struct gdbarch *gdbarch; int regno; -@@ -2772,8 +2773,11 @@ scope_info (char *args, int from_tty) - break; +@@ -2852,8 +2853,11 @@ scope_info (char *args, int from_tty) + } } if (SYMBOL_TYPE (sym)) - printf_filtered (", length %d.\n", @@ -3405,10 +3405,10 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c } if (BLOCK_FUNCTION (block)) break; -Index: gdb-7.5.50.20130215/gdb/typeprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/typeprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/typeprint.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/typeprint.c 2013-02-15 22:40:18.543622099 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/typeprint.c 2013-08-02 16:38:26.464292241 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/typeprint.c 2013-08-02 16:38:32.374300758 +0200 @@ -409,7 +409,7 @@ whatis_exp (char *exp, int show) struct type *real_type = NULL; struct type *type; @@ -3418,10 +3418,10 @@ Index: gdb-7.5.50.20130215/gdb/typeprint.c int using_enc = 0; struct value_print_options opts; struct type_print_options flags = default_ptype_flags; -Index: gdb-7.5.50.20130215/gdb/valarith.c +Index: gdb-7.6.50.20130731-cvs/gdb/valarith.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/valarith.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/valarith.c 2013-02-15 22:40:18.543622099 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/valarith.c 2013-08-02 16:38:26.465292243 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/valarith.c 2013-08-02 16:38:32.374300758 +0200 @@ -190,15 +190,15 @@ value_subscript (struct value *array, LO to doubles, but no longer does. */ @@ -3475,11 +3475,11 @@ Index: gdb-7.5.50.20130215/gdb/valarith.c for (i = 0; i < len; i++) { -Index: gdb-7.5.50.20130215/gdb/valops.c +Index: gdb-7.6.50.20130731-cvs/gdb/valops.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/valops.c 2013-02-15 22:37:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/valops.c 2013-02-15 22:41:34.751715867 +0100 -@@ -54,11 +54,11 @@ static int typecmp (int staticp, int var +--- gdb-7.6.50.20130731-cvs.orig/gdb/valops.c 2013-08-02 16:38:26.467292246 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/valops.c 2013-08-02 16:38:32.375300759 +0200 +@@ -53,11 +53,11 @@ static int typecmp (int staticp, int var struct field t1[], struct value *t2[]); static struct value *search_struct_field (const char *, struct value *, @@ -3493,7 +3493,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c static int find_oload_champ_namespace (struct value **, int, const char *, const char *, -@@ -86,7 +86,7 @@ oload_classification classify_oload_matc +@@ -85,7 +85,7 @@ oload_classification classify_oload_matc int, int); static struct value *value_struct_elt_for_reference (struct type *, @@ -3502,7 +3502,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c char *, struct type *, int, enum noside); -@@ -103,8 +103,8 @@ static CORE_ADDR allocate_space_in_infer +@@ -102,8 +102,8 @@ static CORE_ADDR allocate_space_in_infer static struct value *cast_into_complex (struct type *, struct value *); static struct fn_field *find_method_list (struct value **, const char *, @@ -3513,7 +3513,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c void _initialize_valops (void); -@@ -189,7 +189,7 @@ find_function_in_inferior (const char *n +@@ -188,7 +188,7 @@ find_function_in_inferior (const char *n space. */ struct value * @@ -3522,7 +3522,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c { struct objfile *objf; struct value *val = find_function_in_inferior ("malloc", &objf); -@@ -262,7 +262,8 @@ value_cast_structs (struct type *type, s +@@ -261,7 +261,8 @@ value_cast_structs (struct type *type, s if (TYPE_NAME (t2) != NULL) { /* Try downcasting using the run-time type of the value. */ @@ -3532,7 +3532,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct type *real_type; real_type = value_rtti_type (v2, &full, &top, &using_enc); -@@ -401,12 +402,12 @@ value_cast (struct type *type, struct va +@@ -400,12 +401,12 @@ value_cast (struct type *type, struct va if (code1 == TYPE_CODE_ARRAY) { struct type *element_type = TYPE_TARGET_TYPE (type); @@ -3547,7 +3547,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c LONGEST low_bound, high_bound, new_length; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -640,7 +641,7 @@ value_reinterpret_cast (struct type *typ +@@ -639,7 +640,7 @@ value_reinterpret_cast (struct type *typ static int dynamic_cast_check_1 (struct type *desired_type, const gdb_byte *valaddr, @@ -3556,7 +3556,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c CORE_ADDR address, struct value *val, struct type *search_type, -@@ -652,8 +653,8 @@ dynamic_cast_check_1 (struct type *desir +@@ -651,8 +652,8 @@ dynamic_cast_check_1 (struct type *desir for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i) { @@ -3567,7 +3567,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (class_types_same_p (desired_type, TYPE_BASECLASS (search_type, i))) { -@@ -687,7 +688,7 @@ dynamic_cast_check_1 (struct type *desir +@@ -686,7 +687,7 @@ dynamic_cast_check_1 (struct type *desir static int dynamic_cast_check_2 (struct type *desired_type, const gdb_byte *valaddr, @@ -3576,7 +3576,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c CORE_ADDR address, struct value *val, struct type *search_type, -@@ -697,7 +698,7 @@ dynamic_cast_check_2 (struct type *desir +@@ -696,7 +697,7 @@ dynamic_cast_check_2 (struct type *desir for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i) { @@ -3585,7 +3585,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (! BASETYPE_VIA_PUBLIC (search_type, i)) continue; -@@ -728,7 +729,8 @@ dynamic_cast_check_2 (struct type *desir +@@ -727,7 +728,8 @@ dynamic_cast_check_2 (struct type *desir struct value * value_dynamic_cast (struct type *type, struct value *arg) { @@ -3595,7 +3595,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct type *resolved_type = check_typedef (type); struct type *arg_type = check_typedef (value_type (arg)); struct type *class_type, *rtti_type; -@@ -1181,7 +1183,7 @@ value_fetch_lazy (struct value *val) +@@ -1007,7 +1009,7 @@ value_at_lazy (struct type *type, CORE_A } void @@ -3604,7 +3604,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length) { -@@ -1332,7 +1334,7 @@ value_assign (struct value *toval, struc +@@ -1157,7 +1159,7 @@ value_assign (struct value *toval, struc { const gdb_byte *dest_buffer; CORE_ADDR changed_addr; @@ -3613,7 +3613,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c gdb_byte buffer[sizeof (LONGEST)]; if (value_bitsize (toval)) -@@ -1411,7 +1413,7 @@ value_assign (struct value *toval, struc +@@ -1236,7 +1238,7 @@ value_assign (struct value *toval, struc if (value_bitsize (toval)) { struct value *parent = value_parent (toval); @@ -3622,7 +3622,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c int changed_len; gdb_byte buffer[sizeof (LONGEST)]; int optim, unavail; -@@ -1891,7 +1893,7 @@ value_array (int lowbound, int highbound +@@ -1716,7 +1718,7 @@ value_array (int lowbound, int highbound { int nelem; int idx; @@ -3631,7 +3631,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct value *val; struct type *arraytype; -@@ -2066,7 +2068,7 @@ typecmp (int staticp, int varargs, int n +@@ -1891,7 +1893,7 @@ typecmp (int staticp, int varargs, int n static void update_search_result (struct value **result_ptr, struct value *v, @@ -3640,7 +3640,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c const char *name, struct type *type) { if (v != NULL) -@@ -2090,10 +2092,10 @@ update_search_result (struct value **res +@@ -1915,10 +1917,10 @@ update_search_result (struct value **res lookup is ambiguous. */ static void @@ -3653,7 +3653,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct type *outermost_type) { int i; -@@ -2148,7 +2150,7 @@ do_search_struct_field (const char *name +@@ -1973,7 +1975,7 @@ do_search_struct_field (const char *name . */ struct value *v = NULL; @@ -3662,7 +3662,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c /* This is pretty gross. In G++, the offset in an anonymous union is relative to the beginning of the -@@ -2187,7 +2189,7 @@ do_search_struct_field (const char *name +@@ -2012,7 +2014,7 @@ do_search_struct_field (const char *name && (strcmp_iw (name, TYPE_BASECLASS_NAME (type, i)) == 0)); @@ -3671,7 +3671,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2262,11 +2264,11 @@ do_search_struct_field (const char *name +@@ -2087,11 +2089,11 @@ do_search_struct_field (const char *name fields, look for a baseclass named NAME. */ static struct value * @@ -3685,7 +3685,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c do_search_struct_field (name, arg1, offset, type, looking_for_baseclass, &result, &boffset, type); -@@ -2283,7 +2285,7 @@ search_struct_field (const char *name, s +@@ -2108,7 +2110,7 @@ search_struct_field (const char *name, s static struct value * search_struct_method (const char *name, struct value **arg1p, @@ -3694,7 +3694,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c int *static_memfuncp, struct type *type) { int i; -@@ -2347,8 +2349,8 @@ search_struct_method (const char *name, +@@ -2172,8 +2174,8 @@ search_struct_method (const char *name, for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--) { @@ -3705,7 +3705,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2530,8 +2532,8 @@ value_struct_elt (struct value **argp, s +@@ -2355,8 +2357,8 @@ value_struct_elt (struct value **argp, s static struct fn_field * find_method_list (struct value **argp, const char *method, @@ -3716,7 +3716,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c { int i; struct fn_field *f; -@@ -2564,7 +2566,7 @@ find_method_list (struct value **argp, c +@@ -2389,7 +2391,7 @@ find_method_list (struct value **argp, c /* Not found in object, check in base subobjects. */ for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--) { @@ -3725,7 +3725,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2600,7 +2602,7 @@ find_method_list (struct value **argp, c +@@ -2425,7 +2427,7 @@ find_method_list (struct value **argp, c static struct fn_field * value_find_oload_method_list (struct value **argp, const char *method, int offset, int *num_fns, @@ -3734,7 +3734,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c { struct type *t; -@@ -2690,7 +2692,7 @@ find_overload_match (struct value **args +@@ -2515,7 +2517,7 @@ find_overload_match (struct value **args /* Number of overloaded instances being considered. */ int num_fns = 0; struct type *basetype = NULL; @@ -3743,7 +3743,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL); -@@ -3360,7 +3362,7 @@ compare_parameters (struct type *t1, str +@@ -3185,7 +3187,7 @@ compare_parameters (struct type *t1, str the form "DOMAIN::NAME". */ static struct value * @@ -3752,7 +3752,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct type *curtype, char *name, struct type *intype, int want_address, -@@ -3397,7 +3399,7 @@ value_struct_elt_for_reference (struct t +@@ -3222,7 +3224,7 @@ value_struct_elt_for_reference (struct t if (want_address) return value_from_longest (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain), @@ -3761,7 +3761,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c else if (noside == EVAL_AVOID_SIDE_EFFECTS) return allocate_value (TYPE_FIELD_TYPE (t, i)); else -@@ -3540,7 +3542,7 @@ value_struct_elt_for_reference (struct t +@@ -3365,7 +3367,7 @@ value_struct_elt_for_reference (struct t for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--) { struct value *v; @@ -3770,7 +3770,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (t, i)) base_offset = 0; -@@ -3630,7 +3632,7 @@ value_maybe_namespace_elt (const struct +@@ -3455,7 +3457,7 @@ value_maybe_namespace_elt (const struct struct type * value_rtti_indirect_type (struct value *v, int *full, @@ -3779,7 +3779,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c { struct value *target; struct type *type, *real_type, *target_type; -@@ -3680,12 +3682,12 @@ value_rtti_indirect_type (struct value * +@@ -3505,12 +3507,12 @@ value_rtti_indirect_type (struct value * struct value * value_full_object (struct value *argp, struct type *rtype, @@ -3794,11 +3794,11 @@ Index: gdb-7.5.50.20130215/gdb/valops.c int using_enc = 0; struct value *new_val; -Index: gdb-7.5.50.20130215/gdb/valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/valprint.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/valprint.c 2013-02-15 22:40:18.545622104 +0100 -@@ -299,7 +299,7 @@ scalar_type_p (struct type *type) +--- gdb-7.6.50.20130731-cvs.orig/gdb/valprint.c 2013-08-02 16:38:26.468292247 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/valprint.c 2013-08-02 16:38:32.376300761 +0200 +@@ -302,7 +302,7 @@ scalar_type_p (struct type *type) int valprint_check_validity (struct ui_file *stream, struct type *type, @@ -3807,7 +3807,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c const struct value *val) { CHECK_TYPEDEF (type); -@@ -363,7 +363,7 @@ val_print_invalid_address (struct ui_fil +@@ -366,7 +366,7 @@ val_print_invalid_address (struct ui_fil void generic_val_print (struct type *type, const gdb_byte *valaddr, @@ -3816,7 +3816,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, -@@ -725,7 +725,7 @@ generic_val_print (struct type *type, co +@@ -728,7 +728,7 @@ generic_val_print (struct type *type, co RECURSE. */ void @@ -3825,7 +3825,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -937,7 +937,7 @@ val_print_type_code_flags (struct type * +@@ -940,7 +940,7 @@ val_print_type_code_flags (struct type * void val_print_scalar_formatted (struct type *type, @@ -3834,7 +3834,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c const struct value *val, const struct value_print_options *options, int size, -@@ -1478,7 +1478,7 @@ print_decimal_chars (struct ui_file *str +@@ -1481,7 +1481,7 @@ print_decimal_chars (struct ui_file *str void print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, @@ -3843,7 +3843,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c { const gdb_byte *p; -@@ -1595,23 +1595,23 @@ maybe_print_array_index (struct type *in +@@ -1598,23 +1598,23 @@ maybe_print_array_index (struct type *in void val_print_array_elements (struct type *type, @@ -3873,7 +3873,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c LONGEST low_bound, high_bound; struct cleanup *back_to; CORE_ADDR saved_address = address; -@@ -1706,7 +1706,7 @@ val_print_array_elements (struct type *t +@@ -1709,7 +1709,7 @@ val_print_array_elements (struct type *t address, stream, recurse + 1, val, options, current_language); annotate_elt_rep (reps); @@ -3882,7 +3882,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c annotate_elt_rep_end (); i = rep1 - 1; -@@ -2357,7 +2357,7 @@ print_converted_chars_to_obstack (struct +@@ -2360,7 +2360,7 @@ print_converted_chars_to_obstack (struct void generic_printstr (struct ui_file *stream, struct type *type, @@ -3891,11 +3891,11 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c const char *encoding, int force_ellipses, int quote_char, int c_style_terminator, const struct value_print_options *options) -Index: gdb-7.5.50.20130215/gdb/valprint.h +Index: gdb-7.6.50.20130731-cvs/gdb/valprint.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/valprint.h 2013-01-08 03:00:34.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/valprint.h 2013-02-15 22:40:18.545622104 +0100 -@@ -113,11 +113,11 @@ extern void maybe_print_array_index (str +--- gdb-7.6.50.20130731-cvs.orig/gdb/valprint.h 2013-08-02 16:38:26.469292248 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/valprint.h 2013-08-02 16:38:32.376300761 +0200 +@@ -115,11 +115,11 @@ extern void maybe_print_array_index (str struct ui_file *stream, const struct value_print_options *); @@ -3909,7 +3909,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.h extern void val_print_type_code_int (struct type *, const gdb_byte *, struct ui_file *); -@@ -127,7 +127,7 @@ extern void val_print_type_code_flags (s +@@ -129,7 +129,7 @@ extern void val_print_type_code_flags (s struct ui_file *stream); extern void val_print_scalar_formatted (struct type *, @@ -3918,7 +3918,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.h const struct value *, const struct value_print_options *, int, -@@ -143,7 +143,7 @@ extern void print_decimal_chars (struct +@@ -145,7 +145,7 @@ extern void print_decimal_chars (struct unsigned int, enum bfd_endian); extern void print_hex_chars (struct ui_file *, const gdb_byte *, @@ -3927,7 +3927,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.h extern void print_char_chars (struct ui_file *, struct type *, const gdb_byte *, unsigned int, enum bfd_endian); -@@ -188,7 +188,7 @@ struct generic_val_print_decorations +@@ -190,7 +190,7 @@ struct generic_val_print_decorations extern void generic_val_print (struct type *type, const gdb_byte *valaddr, @@ -3936,7 +3936,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.h struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, -@@ -198,7 +198,7 @@ extern void generic_emit_char (int c, st +@@ -200,7 +200,7 @@ extern void generic_emit_char (int c, st int quoter, const char *encoding); extern void generic_printstr (struct ui_file *stream, struct type *type, @@ -3945,11 +3945,11 @@ Index: gdb-7.5.50.20130215/gdb/valprint.h const char *encoding, int force_ellipses, int quote_char, int c_style_terminator, const struct value_print_options *options); -Index: gdb-7.5.50.20130215/gdb/value.c +Index: gdb-7.6.50.20130731-cvs/gdb/value.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/value.c 2013-02-15 22:37:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/value.c 2013-02-15 22:40:18.545622104 +0100 -@@ -68,10 +68,10 @@ struct internal_function +--- gdb-7.6.50.20130731-cvs.orig/gdb/value.c 2013-08-02 16:38:26.471292251 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/value.c 2013-08-02 16:41:13.105527483 +0200 +@@ -69,10 +69,10 @@ struct internal_function struct range { /* Lowest offset in the range. */ @@ -3962,7 +3962,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c }; typedef struct range range_s; -@@ -82,8 +82,8 @@ DEF_VEC_O(range_s); +@@ -83,8 +83,8 @@ DEF_VEC_O(range_s); [offset2, offset2+len2) overlap. */ static int @@ -3973,7 +3973,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { ULONGEST h, l; -@@ -107,7 +107,7 @@ range_lessthan (const range_s *r1, const +@@ -108,7 +108,7 @@ range_lessthan (const range_s *r1, const OFFSET+LENGTH). */ static int @@ -3982,7 +3982,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { range_s what; int i; -@@ -240,7 +240,7 @@ struct value +@@ -241,7 +241,7 @@ struct value lval == lval_register, this is a further offset from location.address within the registers structure. Note also the member embedded_offset below. */ @@ -3991,7 +3991,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c /* Only used for bitfields; number of bits contained in them. */ int bitsize; -@@ -310,8 +310,8 @@ struct value +@@ -311,8 +311,8 @@ struct value `type', and `embedded_offset' is zero, so everything works normally. */ struct type *enclosing_type; @@ -4002,7 +4002,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c /* Values are stored in a chain, so that they can be deleted easily over calls to the inferior. Values assigned to internal -@@ -333,7 +333,8 @@ struct value +@@ -334,7 +334,8 @@ struct value }; int @@ -4012,7 +4012,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { gdb_assert (!value->lazy); -@@ -354,7 +355,8 @@ value_entirely_available (struct value * +@@ -355,7 +356,8 @@ value_entirely_available (struct value * } void @@ -4022,7 +4022,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { range_s newr; int i; -@@ -525,7 +527,7 @@ mark_value_bytes_unavailable (struct val +@@ -526,7 +528,7 @@ mark_value_bytes_unavailable (struct val static int find_first_range_overlap (VEC(range_s) *ranges, int pos, @@ -4031,7 +4031,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { range_s *r; int i; -@@ -538,9 +540,9 @@ find_first_range_overlap (VEC(range_s) * +@@ -539,9 +541,9 @@ find_first_range_overlap (VEC(range_s) * } int @@ -4044,7 +4044,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { int idx1 = 0, idx2 = 0; -@@ -768,13 +770,13 @@ deprecated_set_value_type (struct value +@@ -767,13 +769,13 @@ deprecated_set_value_type (struct value value->type = type; } @@ -4060,7 +4060,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { value->offset = offset; } -@@ -928,8 +930,9 @@ value_contents_all (struct value *value) +@@ -932,8 +934,9 @@ value_contents_all (struct value *value) DST_OFFSET+LENGTH) range are wholly available. */ void @@ -4072,7 +4072,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { range_s *r; int i; -@@ -977,8 +980,8 @@ value_contents_copy_raw (struct value *d +@@ -981,8 +984,8 @@ value_contents_copy_raw (struct value *d DST_OFFSET+LENGTH) range are wholly available. */ void @@ -4083,7 +4083,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { require_not_optimized_out (src); -@@ -1072,7 +1075,7 @@ value_entirely_optimized_out (const stru +@@ -1087,7 +1090,7 @@ value_entirely_optimized_out (const stru } int @@ -4092,7 +4092,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { if (!value->optimized_out) return 1; -@@ -1085,7 +1088,7 @@ value_bits_valid (const struct value *va +@@ -1100,7 +1103,7 @@ value_bits_valid (const struct value *va int value_bits_synthetic_pointer (const struct value *value, @@ -4101,7 +4101,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { if (value->lval != lval_computed || !value->location.computed.funcs->check_synthetic_pointer) -@@ -1095,26 +1098,26 @@ value_bits_synthetic_pointer (const stru +@@ -1110,26 +1113,26 @@ value_bits_synthetic_pointer (const stru length); } @@ -4132,7 +4132,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { value->pointed_to_offset = val; } -@@ -1969,7 +1972,7 @@ get_internalvar_function (struct interna +@@ -1982,7 +1985,7 @@ get_internalvar_function (struct interna } void @@ -4141,7 +4141,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c int bitsize, struct value *newval) { gdb_byte *addr; -@@ -2676,7 +2679,7 @@ set_value_enclosing_type (struct value * +@@ -2689,7 +2692,7 @@ set_value_enclosing_type (struct value * FIELDNO says which field. */ struct value * @@ -4150,7 +4150,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c int fieldno, struct type *arg_type) { struct value *v; -@@ -2706,7 +2709,7 @@ value_primitive_field (struct value *arg +@@ -2717,7 +2720,7 @@ value_primitive_field (struct value *arg bit. Assume that the address, offset, and embedded offset are sufficiently aligned. */ @@ -4158,8 +4158,8 @@ Index: gdb-7.5.50.20130215/gdb/value.c + LONGEST bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno); int container_bitsize = TYPE_LENGTH (type) * 8; - v = allocate_value_lazy (type); -@@ -2729,7 +2732,7 @@ value_primitive_field (struct value *arg + if (arg1->optimized_out) +@@ -2744,7 +2747,7 @@ value_primitive_field (struct value *arg /* This field is actually a base subobject, so preserve the entire object's contents for later references to virtual bases, etc. */ @@ -4168,7 +4168,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c /* Lazy register values with offsets are not supported. */ if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1)) -@@ -2806,7 +2809,7 @@ value_field (struct value *arg1, int fie +@@ -2834,7 +2837,7 @@ value_field (struct value *arg1, int fie struct value * value_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *type, @@ -4177,7 +4177,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { struct value *v; struct type *ftype = TYPE_FN_FIELD_TYPE (f, j); -@@ -2866,8 +2869,8 @@ value_fn_field (struct value **arg1p, st +@@ -2894,8 +2897,8 @@ value_fn_field (struct value **arg1p, st static int unpack_value_bits_as_long_1 (struct type *field_type, const gdb_byte *valaddr, @@ -4188,7 +4188,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c LONGEST *result) { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (field_type)); -@@ -2875,7 +2878,7 @@ unpack_value_bits_as_long_1 (struct type +@@ -2903,7 +2906,7 @@ unpack_value_bits_as_long_1 (struct type ULONGEST valmask; int lsbcount; int bytes_read; @@ -4197,7 +4197,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c /* Read the minimum number of bytes required; there may not be enough bytes to read an entire ULONGEST. */ -@@ -2945,7 +2948,7 @@ unpack_value_bits_as_long_1 (struct type +@@ -2973,7 +2976,7 @@ unpack_value_bits_as_long_1 (struct type int unpack_value_bits_as_long (struct type *field_type, const gdb_byte *valaddr, @@ -4206,7 +4206,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c const struct value *original_value, LONGEST *result) { -@@ -2963,10 +2966,10 @@ unpack_value_bits_as_long (struct type * +@@ -2991,10 +2994,10 @@ unpack_value_bits_as_long (struct type * static int unpack_value_field_as_long_1 (struct type *type, const gdb_byte *valaddr, @@ -4219,7 +4219,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); struct type *field_type = TYPE_FIELD_TYPE (type, fieldno); -@@ -2982,7 +2985,7 @@ unpack_value_field_as_long_1 (struct typ +@@ -3010,7 +3013,7 @@ unpack_value_field_as_long_1 (struct typ int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, @@ -4228,7 +4228,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c const struct value *val, LONGEST *result) { gdb_assert (val != NULL); -@@ -3014,7 +3017,7 @@ unpack_field_as_long (struct type *type, +@@ -3042,7 +3045,7 @@ unpack_field_as_long (struct type *type, struct value * value_field_bitfield (struct type *type, int fieldno, const gdb_byte *valaddr, @@ -4237,7 +4237,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { LONGEST l; -@@ -3041,12 +3044,12 @@ value_field_bitfield (struct type *type, +@@ -3069,12 +3072,12 @@ value_field_bitfield (struct type *type, void modify_field (struct type *type, gdb_byte *addr, @@ -4252,10 +4252,10 @@ Index: gdb-7.5.50.20130215/gdb/value.c /* Normalize BITPOS. */ addr += bitpos / 8; -Index: gdb-7.5.50.20130215/gdb/value.h +Index: gdb-7.6.50.20130731-cvs/gdb/value.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/value.h 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/value.h 2013-02-15 22:40:18.546622106 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/value.h 2013-08-02 16:38:26.472292253 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/value.h 2013-08-02 16:39:15.721362577 +0200 @@ -82,8 +82,8 @@ extern void set_value_parent (struct val within the registers structure. Note also the member embedded_offset below. */ @@ -4310,7 +4310,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h const struct value *val); extern struct value *allocate_optimized_out_value (struct type *type); -@@ -409,13 +410,13 @@ extern struct value *coerce_array (struc +@@ -415,13 +416,13 @@ extern struct value *coerce_array (struc bits in the given range are valid, zero if any bit is invalid. */ extern int value_bits_valid (const struct value *value, @@ -4326,7 +4326,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h /* Given a value, determine whether the contents bytes starting at OFFSET and extending for LENGTH bytes are available. This returns -@@ -423,7 +424,7 @@ extern int value_bits_synthetic_pointer +@@ -429,7 +430,7 @@ extern int value_bits_synthetic_pointer byte is unavailable. */ extern int value_bytes_available (const struct value *value, @@ -4335,7 +4335,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h /* Like value_bytes_available, but return false if any byte in the whole object is unavailable. */ -@@ -433,7 +434,7 @@ extern int value_entirely_available (str +@@ -439,7 +440,7 @@ extern int value_entirely_available (str LENGTH bytes as unavailable. */ extern void mark_value_bytes_unavailable (struct value *value, @@ -4344,7 +4344,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h /* Compare LENGTH bytes of VAL1's contents starting at OFFSET1 with LENGTH bytes of VAL2's contents starting at OFFSET2. -@@ -443,7 +444,7 @@ extern void mark_value_bytes_unavailable +@@ -449,7 +450,7 @@ extern void mark_value_bytes_unavailable example, to compare a complete object value with itself, including its enclosing type chunk, you'd do: @@ -4353,21 +4353,20 @@ Index: gdb-7.5.50.20130215/gdb/value.h value_available_contents (val, 0, val, 0, len); Returns true iff the set of available contents match. Unavailable -@@ -465,9 +466,10 @@ extern void mark_value_bytes_unavailable - value_available_contents_eq(val, 3, val, 4, 4) => 0 - */ +@@ -476,9 +477,9 @@ extern void mark_value_bytes_unavailable + gone, it works with const values. Therefore, this routine must not + be called with lazy values. */ -extern int value_available_contents_eq (const struct value *val1, int offset1, - const struct value *val2, int offset2, - int length); -+extern int value_available_contents_eq (const struct value *val1, -+ LONGEST offset1, -+ const struct value *val2, -+ LONGEST offset2, LONGEST length); ++extern int value_available_contents_eq (const struct value *val1, LONGEST offset1, ++ const struct value *val2, LONGEST offset2, ++ LONGEST length); /* Read LENGTH bytes of memory starting at MEMADDR into BUFFER, which is (or will be copied to) VAL's contents buffer offset by -@@ -476,7 +478,7 @@ extern int value_available_contents_eq ( +@@ -487,7 +488,7 @@ extern int value_available_contents_eq ( memory is likewise unavailable. STACK indicates whether the memory is known to be stack memory. */ @@ -4376,7 +4375,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length); -@@ -510,7 +512,7 @@ extern CORE_ADDR unpack_pointer (struct +@@ -521,7 +522,7 @@ extern CORE_ADDR unpack_pointer (struct extern int unpack_value_bits_as_long (struct type *field_type, const gdb_byte *valaddr, @@ -4385,7 +4384,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h int bitsize, const struct value *original_value, LONGEST *result); -@@ -519,12 +521,12 @@ extern LONGEST unpack_field_as_long (str +@@ -530,12 +531,12 @@ extern LONGEST unpack_field_as_long (str const gdb_byte *valaddr, int fieldno); extern int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, @@ -4400,7 +4399,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h const struct value *val); extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num); -@@ -583,12 +585,12 @@ extern struct value *default_read_var_va +@@ -594,12 +595,12 @@ extern struct value *default_read_var_va extern struct value *allocate_value (struct type *type); extern struct value *allocate_value_lazy (struct type *type); extern void allocate_value_contents (struct value *value); @@ -4419,7 +4418,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h extern struct value *allocate_repeat_value (struct type *type, int count); -@@ -660,16 +662,16 @@ extern int find_overload_match (struct v +@@ -671,16 +672,16 @@ extern int find_overload_match (struct v extern struct value *value_field (struct value *arg1, int fieldno); @@ -4439,7 +4438,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h extern struct value *value_cast_pointers (struct type *, struct value *, int); -@@ -763,7 +765,7 @@ extern void set_internalvar_string (stru +@@ -774,7 +775,7 @@ extern void set_internalvar_string (stru extern void clear_internalvar (struct internalvar *var); extern void set_internalvar_component (struct internalvar *var, @@ -4448,7 +4447,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h int bitpos, int bitsize, struct value *newvalue); -@@ -845,7 +847,7 @@ extern struct value *value_x_unop (struc +@@ -856,7 +857,7 @@ extern struct value *value_x_unop (struc enum noside noside); extern struct value *value_fn_field (struct value **arg1p, struct fn_field *f, @@ -4457,7 +4456,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h extern int binop_types_user_defined_p (enum exp_opcode op, struct type *type1, -@@ -873,7 +875,8 @@ extern void release_value_or_incref (str +@@ -884,7 +885,8 @@ extern void release_value_or_incref (str extern int record_latest_value (struct value *val); extern void modify_field (struct type *type, gdb_byte *addr, @@ -4467,7 +4466,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h extern void type_print (struct type *type, const char *varstring, struct ui_file *stream, int show); -@@ -903,7 +906,7 @@ extern void value_print_array_elements ( +@@ -914,7 +916,7 @@ extern void value_print_array_elements ( extern struct value *value_release_to_mark (struct value *mark); extern void val_print (struct type *type, const gdb_byte *valaddr, @@ -4476,7 +4475,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -952,10 +955,11 @@ extern struct value *value_literal_compl +@@ -963,10 +965,11 @@ extern struct value *value_literal_compl extern struct value *find_function_in_inferior (const char *, struct objfile **); diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch index 7e91576..0962a7b 100644 --- a/gdb-rhbz795424-bitpos-22of25.patch +++ b/gdb-rhbz795424-bitpos-22of25.patch @@ -96,10 +96,10 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-wp.patch -Index: gdb-7.5.50.20130215/gdb/arm-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/arm-linux-nat.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/arm-linux-nat.c 2013-02-15 22:42:45.988804306 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/arm-linux-nat.c 2013-08-02 16:42:29.565632895 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c 2013-08-02 16:42:34.094639104 +0200 @@ -1105,7 +1105,7 @@ arm_linux_region_ok_for_hw_watchpoint (C /* Insert a Hardware breakpoint. */ @@ -127,10 +127,10 @@ Index: gdb-7.5.50.20130215/gdb/arm-linux-nat.c { return start <= addr && start + length - 1 >= addr; } -Index: gdb-7.5.50.20130215/gdb/i386-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/i386-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/i386-nat.c 2013-02-15 22:41:53.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/i386-nat.c 2013-02-15 22:43:14.005838741 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/i386-nat.c 2013-08-02 16:42:29.566632896 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/i386-nat.c 2013-08-02 16:42:34.095639105 +0200 @@ -589,7 +589,7 @@ i386_update_inferior_debug_regs (struct of the type TYPE. Return 0 on success, -1 on failure. */ @@ -149,10 +149,10 @@ Index: gdb-7.5.50.20130215/gdb/i386-nat.c struct expression *cond) { struct i386_debug_reg_state *state -Index: gdb-7.5.50.20130215/gdb/ia64-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/ia64-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ia64-linux-nat.c 2013-02-15 22:34:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ia64-linux-nat.c 2013-02-15 22:42:45.989804309 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ia64-linux-nat.c 2013-08-02 16:42:29.566632896 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ia64-linux-nat.c 2013-08-02 16:42:34.095639105 +0200 @@ -542,7 +542,7 @@ is_power_of_2 (int val) } @@ -171,11 +171,11 @@ Index: gdb-7.5.50.20130215/gdb/ia64-linux-nat.c struct expression *cond) { int idx; -Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c +Index: gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/inf-ttrace.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/inf-ttrace.c 2013-02-15 22:42:45.989804309 +0100 -@@ -313,14 +313,14 @@ inf_ttrace_disable_page_protections (pid +--- gdb-7.6.50.20130731-cvs.orig/gdb/inf-ttrace.c 2013-08-02 16:42:29.567632898 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c 2013-08-02 16:42:34.095639105 +0200 +@@ -314,14 +314,14 @@ inf_ttrace_disable_page_protections (pid type TYPE. */ static int @@ -193,7 +193,7 @@ Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c gdb_assert (type == hw_write); -@@ -337,14 +337,14 @@ inf_ttrace_insert_watchpoint (CORE_ADDR +@@ -338,14 +338,14 @@ inf_ttrace_insert_watchpoint (CORE_ADDR type TYPE. */ static int @@ -211,11 +211,11 @@ Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c gdb_assert (type == hw_write); -Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/mips-linux-nat.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/mips-linux-nat.c 2013-02-15 22:42:45.990804311 +0100 -@@ -1017,7 +1017,7 @@ populate_regs_from_watches (struct pt_wa +--- gdb-7.6.50.20130731-cvs.orig/gdb/mips-linux-nat.c 2013-08-02 16:42:29.568632899 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c 2013-08-02 16:42:34.096639106 +0200 +@@ -644,7 +644,7 @@ mips_linux_new_thread (struct lwp_info * watch. Return zero on success. */ static int @@ -224,7 +224,7 @@ Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c struct expression *cond) { struct pt_watch_regs regs; -@@ -1067,7 +1067,7 @@ mips_linux_insert_watchpoint (CORE_ADDR +@@ -697,7 +697,7 @@ mips_linux_insert_watchpoint (CORE_ADDR Return zero on success. */ static int @@ -233,10 +233,10 @@ Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c struct expression *cond) { int retval; -Index: gdb-7.5.50.20130215/gdb/nto-procfs.c +Index: gdb-7.6.50.20130731-cvs/gdb/nto-procfs.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/nto-procfs.c 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/nto-procfs.c 2013-02-15 22:42:45.990804311 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/nto-procfs.c 2013-08-02 16:42:29.568632899 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/nto-procfs.c 2013-08-02 16:42:34.096639106 +0200 @@ -69,10 +69,10 @@ static ptid_t do_attach (ptid_t ptid); static int procfs_can_use_hw_breakpoint (int, int, int); @@ -267,11 +267,11 @@ Index: gdb-7.5.50.20130215/gdb/nto-procfs.c struct expression *cond) { return procfs_hw_watchpoint (addr, len, type); -Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ppc-linux-nat.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ppc-linux-nat.c 2013-02-15 22:42:45.991804313 +0100 -@@ -1838,11 +1838,11 @@ can_use_watchpoint_cond_accel (void) +--- gdb-7.6.50.20130731-cvs.orig/gdb/ppc-linux-nat.c 2013-08-02 16:42:29.570632902 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c 2013-08-02 16:42:34.097639108 +0200 +@@ -1853,11 +1853,11 @@ can_use_watchpoint_cond_accel (void) CONDITION_VALUE will hold the value which should be put in the DVC register. */ static void @@ -286,7 +286,7 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c CORE_ADDR addr_end_data, addr_end_dvc; /* The DVC register compares bytes within fixed-length windows which -@@ -1929,7 +1929,7 @@ num_memory_accesses (struct value *v) +@@ -1944,7 +1944,7 @@ num_memory_accesses (struct value *v) of the constant. */ static int check_condition (CORE_ADDR watch_addr, struct expression *cond, @@ -295,7 +295,7 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c { int pc = 1, num_accesses_left, num_accesses_right; struct value *left_val, *right_val, *left_chain, *right_chain; -@@ -1996,7 +1996,7 @@ check_condition (CORE_ADDR watch_addr, s +@@ -2011,7 +2011,7 @@ check_condition (CORE_ADDR watch_addr, s the condition expression, thus only triggering the watchpoint when it is true. */ static int @@ -304,7 +304,7 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c struct expression *cond) { CORE_ADDR data_value; -@@ -2013,7 +2013,7 @@ ppc_linux_can_accel_watchpoint_condition +@@ -2028,7 +2028,7 @@ ppc_linux_can_accel_watchpoint_condition static void create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr, @@ -313,7 +313,7 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c int insert) { if (len == 1 -@@ -2058,7 +2058,7 @@ create_watchpoint_request (struct ppc_hw +@@ -2073,7 +2073,7 @@ create_watchpoint_request (struct ppc_hw } static int @@ -322,7 +322,7 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c struct expression *cond) { struct lwp_info *lp; -@@ -2126,7 +2126,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR a +@@ -2141,7 +2141,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR a } static int @@ -331,7 +331,7 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c struct expression *cond) { struct lwp_info *lp; -@@ -2266,7 +2266,7 @@ ppc_linux_stopped_by_watchpoint (void) +@@ -2292,7 +2292,7 @@ ppc_linux_stopped_by_watchpoint (void) static int ppc_linux_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -340,10 +340,10 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c { int mask; -Index: gdb-7.5.50.20130215/gdb/procfs.c +Index: gdb-7.6.50.20130731-cvs/gdb/procfs.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/procfs.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/procfs.c 2013-02-15 22:42:45.992804315 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/procfs.c 2013-08-02 16:42:29.572632904 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/procfs.c 2013-08-02 16:42:34.098639109 +0200 @@ -2433,7 +2433,7 @@ procfs_address_to_host_pointer (CORE_ADD #endif @@ -380,11 +380,11 @@ Index: gdb-7.5.50.20130215/gdb/procfs.c struct expression *cond) { return procfs_set_watchpoint (inferior_ptid, addr, 0, 0, 0); -Index: gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c +Index: gdb-7.6.50.20130731-cvs/gdb/remote-m32r-sdi.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/remote-m32r-sdi.c 2013-01-01 07:32:50.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c 2013-02-15 22:42:45.993804317 +0100 -@@ -1417,14 +1417,15 @@ m32r_can_use_hw_watchpoint (int type, in +--- gdb-7.6.50.20130731-cvs.orig/gdb/remote-m32r-sdi.c 2013-08-02 16:42:29.573632906 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/remote-m32r-sdi.c 2013-08-02 16:42:34.099639111 +0200 +@@ -1416,14 +1416,15 @@ m32r_can_use_hw_watchpoint (int type, in watchpoint. */ static int @@ -403,7 +403,7 @@ Index: gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c for (i = 0; i < MAX_ACCESS_BREAKS; i++) { -@@ -1442,14 +1443,15 @@ m32r_insert_watchpoint (CORE_ADDR addr, +@@ -1441,14 +1442,15 @@ m32r_insert_watchpoint (CORE_ADDR addr, } static int @@ -422,11 +422,11 @@ Index: gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c for (i = 0; i < MAX_ACCESS_BREAKS; i++) { -Index: gdb-7.5.50.20130215/gdb/remote-mips.c +Index: gdb-7.6.50.20130731-cvs/gdb/remote-mips.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/remote-mips.c 2013-01-01 07:32:50.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/remote-mips.c 2013-02-15 22:42:45.994804319 +0100 -@@ -2419,7 +2419,7 @@ calculate_mask (CORE_ADDR addr, int len) +--- gdb-7.6.50.20130731-cvs.orig/gdb/remote-mips.c 2013-08-02 16:42:29.574632907 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/remote-mips.c 2013-08-02 16:42:34.100639112 +0200 +@@ -2426,7 +2426,7 @@ calculate_mask (CORE_ADDR addr, int len) watchpoint. */ static int @@ -435,7 +435,7 @@ Index: gdb-7.5.50.20130215/gdb/remote-mips.c struct expression *cond) { if (mips_set_breakpoint (addr, len, type)) -@@ -2431,7 +2431,7 @@ mips_insert_watchpoint (CORE_ADDR addr, +@@ -2438,7 +2438,7 @@ mips_insert_watchpoint (CORE_ADDR addr, /* Remove a watchpoint. */ static int @@ -444,11 +444,11 @@ Index: gdb-7.5.50.20130215/gdb/remote-mips.c struct expression *cond) { if (mips_clear_breakpoint (addr, len, type)) -Index: gdb-7.5.50.20130215/gdb/remote.c +Index: gdb-7.6.50.20130731-cvs/gdb/remote.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/remote.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/remote.c 2013-02-15 22:42:45.996804323 +0100 -@@ -8155,7 +8155,7 @@ watchpoint_to_Z_packet (int type) +--- gdb-7.6.50.20130731-cvs.orig/gdb/remote.c 2013-08-02 16:42:29.577632911 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/remote.c 2013-08-02 16:42:34.103639116 +0200 +@@ -8277,7 +8277,7 @@ watchpoint_to_Z_packet (int type) } static int @@ -457,7 +457,7 @@ Index: gdb-7.5.50.20130215/gdb/remote.c struct expression *cond) { struct remote_state *rs = get_remote_state (); -@@ -8170,7 +8170,7 @@ remote_insert_watchpoint (CORE_ADDR addr +@@ -8297,7 +8297,7 @@ remote_insert_watchpoint (CORE_ADDR addr p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -466,7 +466,7 @@ Index: gdb-7.5.50.20130215/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -@@ -8190,7 +8190,7 @@ remote_insert_watchpoint (CORE_ADDR addr +@@ -8317,7 +8317,7 @@ remote_insert_watchpoint (CORE_ADDR addr static int remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -475,7 +475,7 @@ Index: gdb-7.5.50.20130215/gdb/remote.c { CORE_ADDR diff = remote_address_masked (addr - start); -@@ -8199,7 +8199,7 @@ remote_watchpoint_addr_within_range (str +@@ -8326,7 +8326,7 @@ remote_watchpoint_addr_within_range (str static int @@ -484,7 +484,7 @@ Index: gdb-7.5.50.20130215/gdb/remote.c struct expression *cond) { struct remote_state *rs = get_remote_state (); -@@ -8214,7 +8214,7 @@ remote_remove_watchpoint (CORE_ADDR addr +@@ -8346,7 +8346,7 @@ remote_remove_watchpoint (CORE_ADDR addr p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -493,10 +493,10 @@ Index: gdb-7.5.50.20130215/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -Index: gdb-7.5.50.20130215/gdb/s390-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/s390-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/s390-nat.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/s390-nat.c 2013-02-15 22:42:45.997804325 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/s390-nat.c 2013-08-02 16:42:29.578632913 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/s390-nat.c 2013-08-02 16:42:34.103639116 +0200 @@ -516,7 +516,7 @@ s390_fix_watch_points (struct lwp_info * } @@ -515,21 +515,20 @@ Index: gdb-7.5.50.20130215/gdb/s390-nat.c struct expression *cond) { struct lwp_info *lp; -Index: gdb-7.5.50.20130215/gdb/target.c +Index: gdb-7.6.50.20130731-cvs/gdb/target.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/target.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/target.c 2013-02-15 22:42:45.997804325 +0100 -@@ -49,7 +49,8 @@ static void target_info (char *, int); - static void default_terminal_info (char *, int); +--- gdb-7.6.50.20130731-cvs.orig/gdb/target.c 2013-08-02 16:42:29.580632915 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/target.c 2013-08-02 16:42:52.160663787 +0200 +@@ -49,7 +49,7 @@ static void target_info (char *, int); + static void default_terminal_info (const char *, int); static int default_watchpoint_addr_within_range (struct target_ops *, - CORE_ADDR, CORE_ADDR, int); -+ CORE_ADDR, CORE_ADDR, -+ LONGEST); ++ CORE_ADDR, CORE_ADDR, LONGEST); static int default_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST); -@@ -114,10 +115,10 @@ static int debug_to_insert_hw_breakpoint +@@ -114,10 +114,10 @@ static int debug_to_insert_hw_breakpoint static int debug_to_remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *); @@ -542,7 +541,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c struct expression *); static int debug_to_stopped_by_watchpoint (void); -@@ -125,11 +126,12 @@ static int debug_to_stopped_by_watchpoin +@@ -125,11 +125,12 @@ static int debug_to_stopped_by_watchpoin static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *); static int debug_to_watchpoint_addr_within_range (struct target_ops *, @@ -557,7 +556,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c struct expression *); static void debug_to_terminal_init (void); -@@ -751,10 +753,10 @@ update_current_target (void) +@@ -790,10 +791,10 @@ update_current_target (void) (int (*) (struct gdbarch *, struct bp_target_info *)) return_minus_one); de_fault (to_insert_watchpoint, @@ -570,7 +569,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c return_minus_one); de_fault (to_stopped_by_watchpoint, (int (*) (void)) -@@ -767,7 +769,7 @@ update_current_target (void) +@@ -806,7 +807,7 @@ update_current_target (void) de_fault (to_region_ok_for_hw_watchpoint, default_region_ok_for_hw_watchpoint); de_fault (to_can_accel_watchpoint_condition, @@ -579,7 +578,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c return_zero); de_fault (to_terminal_init, (void (*) (void)) -@@ -3558,7 +3560,7 @@ default_region_ok_for_hw_watchpoint (COR +@@ -3594,7 +3595,7 @@ default_region_ok_for_hw_watchpoint (COR static int default_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -588,7 +587,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c { return addr >= start && addr < start + length; } -@@ -4265,7 +4267,7 @@ debug_to_region_ok_for_hw_watchpoint (CO +@@ -4555,7 +4556,7 @@ debug_to_region_ok_for_hw_watchpoint (CO } static int @@ -597,7 +596,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c struct expression *cond) { int retval; -@@ -4275,8 +4277,8 @@ debug_to_can_accel_watchpoint_condition +@@ -4565,8 +4566,8 @@ debug_to_can_accel_watchpoint_condition fprintf_unfiltered (gdb_stdlog, "target_can_accel_watchpoint_condition " @@ -608,7 +607,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c host_address_to_string (cond), (unsigned long) retval); return retval; } -@@ -4311,7 +4313,7 @@ debug_to_stopped_data_address (struct ta +@@ -4601,7 +4602,7 @@ debug_to_stopped_data_address (struct ta static int debug_to_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -617,7 +616,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c { int retval; -@@ -4319,9 +4321,9 @@ debug_to_watchpoint_addr_within_range (s +@@ -4609,9 +4610,9 @@ debug_to_watchpoint_addr_within_range (s start, length); fprintf_filtered (gdb_stdlog, @@ -629,7 +628,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c return retval; } -@@ -4356,7 +4358,7 @@ debug_to_remove_hw_breakpoint (struct gd +@@ -4646,7 +4647,7 @@ debug_to_remove_hw_breakpoint (struct gd } static int @@ -638,7 +637,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c struct expression *cond) { int retval; -@@ -4364,14 +4366,14 @@ debug_to_insert_watchpoint (CORE_ADDR ad +@@ -4654,14 +4655,14 @@ debug_to_insert_watchpoint (CORE_ADDR ad retval = debug_target.to_insert_watchpoint (addr, len, type, cond); fprintf_unfiltered (gdb_stdlog, @@ -656,7 +655,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c struct expression *cond) { int retval; -@@ -4379,8 +4381,8 @@ debug_to_remove_watchpoint (CORE_ADDR ad +@@ -4669,8 +4670,8 @@ debug_to_remove_watchpoint (CORE_ADDR ad retval = debug_target.to_remove_watchpoint (addr, len, type, cond); fprintf_unfiltered (gdb_stdlog, @@ -667,11 +666,11 @@ Index: gdb-7.5.50.20130215/gdb/target.c host_address_to_string (cond), (unsigned long) retval); return retval; } -Index: gdb-7.5.50.20130215/gdb/target.h +Index: gdb-7.6.50.20130731-cvs/gdb/target.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/target.h 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/target.h 2013-02-15 22:42:45.998804328 +0100 -@@ -466,8 +466,8 @@ struct target_ops +--- gdb-7.6.50.20130731-cvs.orig/gdb/target.h 2013-08-02 16:42:29.580632915 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/target.h 2013-08-02 16:42:34.105639119 +0200 +@@ -373,8 +373,8 @@ struct target_ops /* Documentation of what the two routines below are expected to do is provided with the corresponding target_* macros. */ @@ -682,7 +681,7 @@ Index: gdb-7.5.50.20130215/gdb/target.h int (*to_insert_mask_watchpoint) (struct target_ops *, CORE_ADDR, CORE_ADDR, int); -@@ -478,13 +478,13 @@ struct target_ops +@@ -385,13 +385,13 @@ struct target_ops int to_have_continuable_watchpoint; int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *); int (*to_watchpoint_addr_within_range) (struct target_ops *, diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch index 1bc44b0..2600651 100644 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ b/gdb-rhbz795424-bitpos-23of25.patch @@ -137,10 +137,10 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-tdep.patch -Index: gdb-7.5.50.20130118/gdb/alpha-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/alpha-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/alpha-tdep.c 2013-01-18 23:36:59.954290362 +0100 -+++ gdb-7.5.50.20130118/gdb/alpha-tdep.c 2013-01-18 23:37:12.465307566 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/alpha-tdep.c 2013-08-02 16:43:01.128676094 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/alpha-tdep.c 2013-08-02 16:43:04.723681004 +0200 @@ -299,18 +299,18 @@ alpha_push_dummy_call (struct gdbarch *g { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -184,10 +184,10 @@ Index: gdb-7.5.50.20130118/gdb/alpha-tdep.c memcpy (arg_reg_buffer + offset, contents, tlen); offset += tlen; contents += tlen; -Index: gdb-7.5.50.20130118/gdb/amd64-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/amd64-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/amd64-tdep.c 2013-01-18 23:36:59.955290365 +0100 -+++ gdb-7.5.50.20130118/gdb/amd64-tdep.c 2013-01-18 23:37:12.466307569 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/amd64-tdep.c 2013-08-02 16:43:01.130676097 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/amd64-tdep.c 2013-08-02 16:43:04.724681006 +0200 @@ -616,7 +616,7 @@ amd64_return_value (struct gdbarch *gdba { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -217,10 +217,10 @@ Index: gdb-7.5.50.20130118/gdb/amd64-tdep.c enum amd64_reg_class class[2]; int needed_integer_regs = 0; int needed_sse_regs = 0; -Index: gdb-7.5.50.20130118/gdb/amd64-windows-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/amd64-windows-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/amd64-windows-tdep.c 2013-01-18 23:36:59.956290369 +0100 -+++ gdb-7.5.50.20130118/gdb/amd64-windows-tdep.c 2013-01-18 23:37:12.466307569 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/amd64-windows-tdep.c 2013-08-02 16:43:01.135676104 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/amd64-windows-tdep.c 2013-08-02 16:43:04.724681006 +0200 @@ -79,7 +79,7 @@ amd64_windows_return_value (struct gdbar struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) @@ -230,11 +230,11 @@ Index: gdb-7.5.50.20130118/gdb/amd64-windows-tdep.c int regnum = -1; /* See if our value is returned through a register. If it is, then -Index: gdb-7.5.50.20130118/gdb/arm-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/arm-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/arm-tdep.c 2013-01-18 23:36:59.961290378 +0100 -+++ gdb-7.5.50.20130118/gdb/arm-tdep.c 2013-01-18 23:37:12.469307573 +0100 -@@ -3496,7 +3496,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc +--- gdb-7.6.50.20130731-cvs.orig/gdb/arm-tdep.c 2013-08-02 16:43:01.140676110 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/arm-tdep.c 2013-08-02 16:43:04.727681010 +0200 +@@ -3498,7 +3498,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc array). Vectors and complex types are not currently supported, matching the generic AAPCS support. */ @@ -243,7 +243,7 @@ Index: gdb-7.5.50.20130118/gdb/arm-tdep.c arm_vfp_cprc_sub_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type) { -@@ -3527,7 +3527,7 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3529,7 +3529,7 @@ arm_vfp_cprc_sub_candidate (struct type case TYPE_CODE_ARRAY: { @@ -252,7 +252,7 @@ Index: gdb-7.5.50.20130118/gdb/arm-tdep.c unsigned unitlen; count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type); if (count == -1) -@@ -3547,13 +3547,15 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3549,13 +3549,15 @@ arm_vfp_cprc_sub_candidate (struct type case TYPE_CODE_STRUCT: { @@ -271,7 +271,7 @@ Index: gdb-7.5.50.20130118/gdb/arm-tdep.c if (sub_count == -1) return -1; count += sub_count; -@@ -3573,13 +3575,15 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3575,13 +3577,15 @@ arm_vfp_cprc_sub_candidate (struct type case TYPE_CODE_UNION: { @@ -290,7 +290,7 @@ Index: gdb-7.5.50.20130118/gdb/arm-tdep.c if (sub_count == -1) return -1; count = (count > sub_count ? count : sub_count); -@@ -3615,7 +3619,7 @@ arm_vfp_call_candidate (struct type *t, +@@ -3617,7 +3621,7 @@ arm_vfp_call_candidate (struct type *t, int *count) { enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; @@ -299,7 +299,7 @@ Index: gdb-7.5.50.20130118/gdb/arm-tdep.c if (c <= 0 || c > 4) return 0; *base_type = b; -@@ -3696,7 +3700,7 @@ arm_push_dummy_call (struct gdbarch *gdb +@@ -3698,7 +3702,7 @@ arm_push_dummy_call (struct gdbarch *gdb for (argnum = 0; argnum < nargs; argnum++) { @@ -308,10 +308,10 @@ Index: gdb-7.5.50.20130118/gdb/arm-tdep.c struct type *arg_type; struct type *target_type; enum type_code typecode; -Index: gdb-7.5.50.20130118/gdb/avr-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/avr-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/avr-tdep.c 2013-01-18 23:36:59.963290385 +0100 -+++ gdb-7.5.50.20130118/gdb/avr-tdep.c 2013-01-18 23:37:12.470307574 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/avr-tdep.c 2013-08-02 16:43:01.142676113 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/avr-tdep.c 2013-08-02 16:43:04.728681011 +0200 @@ -1170,13 +1170,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s struct stack_item @@ -345,12 +345,12 @@ Index: gdb-7.5.50.20130118/gdb/avr-tdep.c /* Calculate the potential last register needed. */ last_regnum = regnum - (len + (len & 1)); -Index: gdb-7.5.50.20130118/gdb/bfin-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/bfin-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/bfin-tdep.c 2013-01-18 23:36:59.963290385 +0100 -+++ gdb-7.5.50.20130118/gdb/bfin-tdep.c 2013-01-18 23:37:12.470307574 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/bfin-tdep.c 2013-08-02 16:43:01.142676113 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/bfin-tdep.c 2013-08-02 16:43:04.728681011 +0200 @@ -506,7 +506,7 @@ bfin_push_dummy_call (struct gdbarch *gd - char buf[4]; + gdb_byte buf[4]; int i; long reg_r0, reg_r1, reg_r2; - int total_len = 0; @@ -367,10 +367,10 @@ Index: gdb-7.5.50.20130118/gdb/bfin-tdep.c sp -= container_len; write_memory (sp, value_contents_writeable (args[i]), container_len); -Index: gdb-7.5.50.20130118/gdb/cris-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/cris-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/cris-tdep.c 2013-01-18 23:36:59.965290390 +0100 -+++ gdb-7.5.50.20130118/gdb/cris-tdep.c 2013-01-18 23:37:12.471307578 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/cris-tdep.c 2013-08-02 16:43:04.729681012 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/cris-tdep.c 2013-08-02 16:52:28.316491561 +0200 @@ -670,13 +670,13 @@ static CORE_ADDR cris_unwind_sp (struct struct stack_item @@ -382,8 +382,8 @@ Index: gdb-7.5.50.20130118/gdb/cris-tdep.c }; static struct stack_item * --push_stack_item (struct stack_item *prev, void *contents, int len) -+push_stack_item (struct stack_item *prev, void *contents, ssize_t len) +-push_stack_item (struct stack_item *prev, const gdb_byte *contents, int len) ++push_stack_item (struct stack_item *prev, const gdb_byte *contents, ssize_t len) { struct stack_item *si; si = xmalloc (sizeof (struct stack_item)); @@ -393,22 +393,22 @@ Index: gdb-7.5.50.20130118/gdb/cris-tdep.c { - int len; + ssize_t len; - char *val; + const gdb_byte *val; - int reg_demand; - int i; + ssize_t reg_demand; + ssize_t i; - len = TYPE_LENGTH (value_type (args[argnum])); - val = (char *) value_contents (args[argnum]); + val = value_contents (args[argnum]); + len = TYPE_LENGTH (value_type (args[argnum])); /* How may registers worth of storage do we need for this argument? */ reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0); -Index: gdb-7.5.50.20130118/gdb/h8300-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/h8300-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/h8300-tdep.c 2013-01-18 23:36:59.966290392 +0100 -+++ gdb-7.5.50.20130118/gdb/h8300-tdep.c 2013-01-18 23:37:12.472307583 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/h8300-tdep.c 2013-08-02 16:43:01.144676116 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/h8300-tdep.c 2013-08-02 16:43:04.730681014 +0200 @@ -640,7 +640,7 @@ h8300_push_dummy_call (struct gdbarch *g int struct_return, CORE_ADDR struct_addr) { @@ -441,10 +441,10 @@ Index: gdb-7.5.50.20130118/gdb/h8300-tdep.c for (offset = 0; offset < padded_len; offset += wordsize) { -Index: gdb-7.5.50.20130118/gdb/hppa-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/hppa-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/hppa-tdep.c 2013-01-18 23:36:59.966290392 +0100 -+++ gdb-7.5.50.20130118/gdb/hppa-tdep.c 2013-01-18 23:37:44.228351370 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/hppa-tdep.c 2013-08-02 16:43:01.145676117 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/hppa-tdep.c 2013-08-02 16:43:04.731681015 +0200 @@ -961,7 +961,7 @@ hppa64_push_dummy_call (struct gdbarch * { struct value *arg = args[i]; @@ -463,10 +463,10 @@ Index: gdb-7.5.50.20130118/gdb/hppa-tdep.c int regnum, offset; if (len > 16) -Index: gdb-7.5.50.20130118/gdb/i386-darwin-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/i386-darwin-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/i386-darwin-tdep.c 2013-01-18 23:36:59.967290394 +0100 -+++ gdb-7.5.50.20130118/gdb/i386-darwin-tdep.c 2013-01-18 23:37:12.473307586 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/i386-darwin-tdep.c 2013-08-02 16:43:01.145676117 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/i386-darwin-tdep.c 2013-08-02 16:43:04.731681015 +0200 @@ -166,7 +166,7 @@ i386_darwin_push_dummy_call (struct gdba for (write_pass = 0; write_pass < 2; write_pass++) @@ -476,10 +476,10 @@ Index: gdb-7.5.50.20130118/gdb/i386-darwin-tdep.c int num_m128 = 0; if (struct_return) -Index: gdb-7.5.50.20130118/gdb/i386-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/i386-tdep.c 2013-01-18 23:36:59.969290398 +0100 -+++ gdb-7.5.50.20130118/gdb/i386-tdep.c 2013-01-18 23:37:12.475307589 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/i386-tdep.c 2013-08-02 16:43:01.147676120 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c 2013-08-02 16:43:04.733681018 +0200 @@ -2407,7 +2407,7 @@ i386_push_dummy_call (struct gdbarch *gd gdb_byte buf[4]; int i; @@ -543,10 +543,10 @@ Index: gdb-7.5.50.20130118/gdb/i386-tdep.c if (i386_fp_regnum_p (get_frame_arch (frame), regnum)) { -Index: gdb-7.5.50.20130118/gdb/ia64-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/ia64-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/ia64-tdep.c 2013-01-18 23:36:59.970290400 +0100 -+++ gdb-7.5.50.20130118/gdb/ia64-tdep.c 2013-01-18 23:37:12.476307589 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ia64-tdep.c 2013-08-02 16:43:01.148676121 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ia64-tdep.c 2013-08-02 16:43:04.734681019 +0200 @@ -3974,8 +3974,10 @@ ia64_push_dummy_call (struct gdbarch *gd int argno; struct value *arg; @@ -560,10 +560,10 @@ Index: gdb-7.5.50.20130118/gdb/ia64-tdep.c int floatreg; ULONGEST bsp; CORE_ADDR funcdescaddr, pc, global_pointer; -Index: gdb-7.5.50.20130118/gdb/iq2000-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/iq2000-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/iq2000-tdep.c 2013-01-18 23:36:59.970290400 +0100 -+++ gdb-7.5.50.20130118/gdb/iq2000-tdep.c 2013-01-18 23:37:12.476307589 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/iq2000-tdep.c 2013-08-02 16:43:01.149676123 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/iq2000-tdep.c 2013-08-02 16:43:04.734681019 +0200 @@ -654,8 +654,9 @@ iq2000_push_dummy_call (struct gdbarch * const bfd_byte *val; bfd_byte buf[4]; @@ -576,11 +576,11 @@ Index: gdb-7.5.50.20130118/gdb/iq2000-tdep.c /* Used to copy struct arguments into the stack. */ CORE_ADDR struct_ptr; -Index: gdb-7.5.50.20130118/gdb/m32r-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/m32r-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/m32r-tdep.c 2013-01-18 23:36:59.971290402 +0100 -+++ gdb-7.5.50.20130118/gdb/m32r-tdep.c 2013-01-18 23:37:12.476307589 +0100 -@@ -695,7 +695,7 @@ m32r_push_dummy_call (struct gdbarch *gd +--- gdb-7.6.50.20130731-cvs.orig/gdb/m32r-tdep.c 2013-08-02 16:43:01.149676123 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m32r-tdep.c 2013-08-02 16:43:04.734681019 +0200 +@@ -689,7 +689,7 @@ m32r_push_dummy_call (struct gdbarch *gd CORE_ADDR regval; gdb_byte *val; gdb_byte valbuf[MAX_REGISTER_SIZE]; @@ -589,10 +589,10 @@ Index: gdb-7.5.50.20130118/gdb/m32r-tdep.c /* First force sp to a 4-byte alignment. */ sp = sp & ~3; -Index: gdb-7.5.50.20130118/gdb/m68k-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/m68k-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/m68k-tdep.c 2013-01-18 23:36:59.971290402 +0100 -+++ gdb-7.5.50.20130118/gdb/m68k-tdep.c 2013-01-18 23:39:06.474459041 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m68k-tdep.c 2013-08-02 16:43:01.149676123 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m68k-tdep.c 2013-08-02 16:43:04.735681021 +0200 @@ -384,7 +384,7 @@ m68k_reg_struct_return_p (struct gdbarch { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -615,10 +615,10 @@ Index: gdb-7.5.50.20130118/gdb/m68k-tdep.c /* Non-scalars bigger than 4 bytes are left aligned, others are right aligned. */ -Index: gdb-7.5.50.20130118/gdb/m88k-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/m88k-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/m88k-tdep.c 2013-01-18 23:36:59.971290402 +0100 -+++ gdb-7.5.50.20130118/gdb/m88k-tdep.c 2013-01-18 23:37:12.477307590 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m88k-tdep.c 2013-08-02 16:43:01.150676124 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m88k-tdep.c 2013-08-02 16:43:04.735681021 +0200 @@ -260,13 +260,13 @@ m88k_store_arguments (struct regcache *r { struct gdbarch *gdbarch = get_regcache_arch (regcache); @@ -646,11 +646,11 @@ Index: gdb-7.5.50.20130118/gdb/m88k-tdep.c if (m88k_in_register_p (type)) { -Index: gdb-7.5.50.20130118/gdb/mep-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/mep-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/mep-tdep.c 2013-01-18 23:36:59.972290404 +0100 -+++ gdb-7.5.50.20130118/gdb/mep-tdep.c 2013-01-18 23:37:12.477307590 +0100 -@@ -2279,7 +2279,7 @@ push_large_arguments (CORE_ADDR sp, int +--- gdb-7.6.50.20130731-cvs.orig/gdb/mep-tdep.c 2013-08-02 16:43:01.150676124 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mep-tdep.c 2013-08-02 16:43:04.735681021 +0200 +@@ -2272,7 +2272,7 @@ push_large_arguments (CORE_ADDR sp, int for (i = 0; i < argc; i++) { @@ -659,11 +659,11 @@ Index: gdb-7.5.50.20130118/gdb/mep-tdep.c if (arg_len > MEP_GPR_SIZE) { -Index: gdb-7.5.50.20130118/gdb/mips-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/mips-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/mips-tdep.c 2013-01-18 23:36:59.975290414 +0100 -+++ gdb-7.5.50.20130118/gdb/mips-tdep.c 2013-01-18 23:37:12.479307599 +0100 -@@ -396,7 +396,7 @@ static void +--- gdb-7.6.50.20130731-cvs.orig/gdb/mips-tdep.c 2013-08-02 16:43:01.153676128 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mips-tdep.c 2013-08-02 16:43:04.737681023 +0200 +@@ -402,7 +402,7 @@ static void mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, int reg_num, int length, enum bfd_endian endian, gdb_byte *in, @@ -672,7 +672,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c { int reg_offset = 0; -@@ -419,8 +419,8 @@ mips_xfer_register (struct gdbarch *gdba +@@ -425,8 +425,8 @@ mips_xfer_register (struct gdbarch *gdba } if (mips_debug) fprintf_unfiltered (gdb_stderr, @@ -808,23 +808,23 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c val = value_contents (arg); -Index: gdb-7.5.50.20130118/gdb/mn10300-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/mn10300-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/mn10300-tdep.c 2013-01-18 23:36:59.976290416 +0100 -+++ gdb-7.5.50.20130118/gdb/mn10300-tdep.c 2013-01-18 23:37:12.479307599 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/mn10300-tdep.c 2013-08-02 16:43:04.737681023 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mn10300-tdep.c 2013-08-02 16:50:34.212320698 +0200 @@ -1228,7 +1228,7 @@ mn10300_push_dummy_call (struct gdbarch enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); const int push_size = register_size (gdbarch, E_PC_REGNUM); int regs_used; - int len, arg_len; -+ LONGEST len, arg_len; ++ LONGEST len, arg_len; int stack_offset = 0; int argnum; - char *val, valbuf[MAX_REGISTER_SIZE]; -Index: gdb-7.5.50.20130118/gdb/mt-tdep.c + const gdb_byte *val; +Index: gdb-7.6.50.20130731-cvs/gdb/mt-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/mt-tdep.c 2013-01-18 23:36:59.976290416 +0100 -+++ gdb-7.5.50.20130118/gdb/mt-tdep.c 2013-01-18 23:37:12.479307599 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/mt-tdep.c 2013-08-02 16:43:01.154676130 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mt-tdep.c 2013-08-02 16:43:04.737681023 +0200 @@ -783,9 +783,9 @@ mt_push_dummy_call (struct gdbarch *gdba gdb_byte buf[MT_MAX_STRUCT_SIZE]; int argreg = MT_1ST_ARGREG; @@ -837,10 +837,10 @@ Index: gdb-7.5.50.20130118/gdb/mt-tdep.c int i, j; /* First handle however many args we can fit into MT_1ST_ARGREG thru -Index: gdb-7.5.50.20130118/gdb/ppc-sysv-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/ppc-sysv-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/ppc-sysv-tdep.c 2013-01-18 23:36:59.977290417 +0100 -+++ gdb-7.5.50.20130118/gdb/ppc-sysv-tdep.c 2013-01-18 23:37:12.480307602 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ppc-sysv-tdep.c 2013-08-02 16:43:01.155676131 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ppc-sysv-tdep.c 2013-08-02 16:43:04.738681025 +0200 @@ -68,7 +68,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function)); @@ -871,7 +871,7 @@ Index: gdb-7.5.50.20130118/gdb/ppc-sysv-tdep.c const bfd_byte *val = value_contents (arg); if (TYPE_CODE (type) == TYPE_CODE_FLT && len <= 8 -@@ -1556,14 +1556,14 @@ ppc64_sysv_abi_push_dummy_call (struct g +@@ -1613,14 +1613,14 @@ ppc64_sysv_abi_push_dummy_call (struct g } else { @@ -888,7 +888,7 @@ Index: gdb-7.5.50.20130118/gdb/ppc-sysv-tdep.c if (len > tdep->wordsize) len = tdep->wordsize; memset (regval, 0, sizeof regval); -@@ -1591,7 +1591,7 @@ ppc64_sysv_abi_push_dummy_call (struct g +@@ -1648,7 +1648,7 @@ ppc64_sysv_abi_push_dummy_call (struct g register. Work around this by always writing the value to memory. Fortunately, doing this simplifies the code. */ @@ -897,11 +897,11 @@ Index: gdb-7.5.50.20130118/gdb/ppc-sysv-tdep.c if (len < tdep->wordsize) write_memory (gparam + tdep->wordsize - len, val, len); else -Index: gdb-7.5.50.20130118/gdb/rl78-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/rl78-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/rl78-tdep.c 2013-01-18 23:36:59.977290417 +0100 -+++ gdb-7.5.50.20130118/gdb/rl78-tdep.c 2013-01-18 23:37:12.480307602 +0100 -@@ -1019,8 +1019,8 @@ rl78_push_dummy_call (struct gdbarch *gd +--- gdb-7.6.50.20130731-cvs.orig/gdb/rl78-tdep.c 2013-08-02 16:43:01.155676131 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/rl78-tdep.c 2013-08-02 16:43:04.738681025 +0200 +@@ -1030,8 +1030,8 @@ rl78_push_dummy_call (struct gdbarch *gd for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -912,11 +912,11 @@ Index: gdb-7.5.50.20130118/gdb/rl78-tdep.c sp -= container_len; write_memory (rl78_make_data_address (sp), -Index: gdb-7.5.50.20130118/gdb/rs6000-aix-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/rs6000-aix-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/rs6000-aix-tdep.c 2013-01-18 23:36:59.978290418 +0100 -+++ gdb-7.5.50.20130118/gdb/rs6000-aix-tdep.c 2013-01-18 23:37:12.480307602 +0100 -@@ -198,9 +198,9 @@ rs6000_push_dummy_call (struct gdbarch * +--- gdb-7.6.50.20130731-cvs.orig/gdb/rs6000-aix-tdep.c 2013-08-02 16:43:01.155676131 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/rs6000-aix-tdep.c 2013-08-02 16:43:04.738681025 +0200 +@@ -196,9 +196,9 @@ rs6000_push_dummy_call (struct gdbarch * struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int ii; @@ -928,7 +928,7 @@ Index: gdb-7.5.50.20130118/gdb/rs6000-aix-tdep.c gdb_byte tmp_buffer[50]; int f_argno = 0; /* current floating point argno */ int wordsize = gdbarch_tdep (gdbarch)->wordsize; -@@ -328,7 +328,7 @@ ran_out_of_registers_for_arguments: +@@ -331,7 +331,7 @@ ran_out_of_registers_for_arguments: if ((argno < nargs) || argbytes) { @@ -937,11 +937,11 @@ Index: gdb-7.5.50.20130118/gdb/rs6000-aix-tdep.c if (argbytes) { -Index: gdb-7.5.50.20130118/gdb/s390-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/s390-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/s390-tdep.c 2013-01-18 23:36:59.979290420 +0100 -+++ gdb-7.5.50.20130118/gdb/s390-tdep.c 2013-01-18 23:37:12.480307602 +0100 -@@ -2482,7 +2482,7 @@ is_float_like (struct type *type) +--- gdb-7.6.50.20130731-cvs.orig/gdb/s390-tdep.c 2013-08-02 16:43:01.156676132 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/s390-tdep.c 2013-08-02 16:43:04.739681026 +0200 +@@ -2483,7 +2483,7 @@ is_float_like (struct type *type) static int @@ -950,7 +950,7 @@ Index: gdb-7.5.50.20130118/gdb/s390-tdep.c { return ((n & (n - 1)) == 0); } -@@ -2668,7 +2668,7 @@ s390_push_dummy_call (struct gdbarch *gd +@@ -2669,7 +2669,7 @@ s390_push_dummy_call (struct gdbarch *gd { struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); @@ -959,10 +959,10 @@ Index: gdb-7.5.50.20130118/gdb/s390-tdep.c if (s390_function_arg_pass_by_reference (type)) { -Index: gdb-7.5.50.20130118/gdb/score-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/score-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/score-tdep.c 2013-01-18 23:36:59.979290420 +0100 -+++ gdb-7.5.50.20130118/gdb/score-tdep.c 2013-01-18 23:37:12.481307604 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/score-tdep.c 2013-08-02 16:43:01.157676134 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/score-tdep.c 2013-08-02 16:43:04.739681026 +0200 @@ -515,7 +515,7 @@ score_push_dummy_call (struct gdbarch *g enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argnum; @@ -972,10 +972,10 @@ Index: gdb-7.5.50.20130118/gdb/score-tdep.c CORE_ADDR stack_offset = 0; CORE_ADDR addr = 0; -Index: gdb-7.5.50.20130118/gdb/sh-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/sh-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/sh-tdep.c 2013-01-18 23:36:59.980290423 +0100 -+++ gdb-7.5.50.20130118/gdb/sh-tdep.c 2013-01-18 23:37:12.481307604 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/sh-tdep.c 2013-08-02 16:43:01.157676134 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/sh-tdep.c 2013-08-02 16:51:29.604404553 +0200 @@ -807,7 +807,7 @@ sh_skip_prologue (struct gdbarch *gdbarc static int sh_use_struct_convention (int renesas_abi, struct type *type) @@ -988,36 +988,36 @@ Index: gdb-7.5.50.20130118/gdb/sh-tdep.c @@ -909,7 +909,7 @@ sh_frame_align (struct gdbarch *ignore, /* Helper function to justify value in register according to endianess. */ - static char * + static const gdb_byte * -sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, int len) +sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, LONGEST len) { - static char valbuf[4]; + static gdb_byte valbuf[4]; @@ -1069,7 +1069,8 @@ sh_push_dummy_call_fpu (struct gdbarch * struct type *type; CORE_ADDR regval; - char *val; + const gdb_byte *val; - int len, reg_size = 0; + LONGEST len; -+ ssize_t reg_size = 0; ++ int reg_size = 0; int pass_on_stack = 0; int treat_as_flt; int last_reg_arg = INT_MAX; @@ -1210,7 +1211,8 @@ sh_push_dummy_call_nofpu (struct gdbarch struct type *type; CORE_ADDR regval; - char *val; + const gdb_byte *val; - int len, reg_size = 0; + LONGEST len; -+ ssize_t reg_size = 0; ++ int reg_size = 0; int pass_on_stack = 0; int last_reg_arg = INT_MAX; -Index: gdb-7.5.50.20130118/gdb/sh64-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/sh64-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/sh64-tdep.c 2013-01-18 23:36:59.980290423 +0100 -+++ gdb-7.5.50.20130118/gdb/sh64-tdep.c 2013-01-18 23:37:12.482307606 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/sh64-tdep.c 2013-08-02 16:43:01.158676135 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/sh64-tdep.c 2013-08-02 16:50:49.740344125 +0200 @@ -1058,7 +1058,7 @@ sh64_push_dummy_call (struct gdbarch *gd CORE_ADDR struct_addr) { @@ -1029,17 +1029,17 @@ Index: gdb-7.5.50.20130118/gdb/sh64-tdep.c int double_argreg; @@ -1069,7 +1069,7 @@ sh64_push_dummy_call (struct gdbarch *gd CORE_ADDR regval; - char *val; - char valbuf[8]; + const gdb_byte *val; + gdb_byte valbuf[8]; - int len; + LONGEST len; int argreg_size; int fp_args[12]; -Index: gdb-7.5.50.20130118/gdb/sparc-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/sparc-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/sparc-tdep.c 2013-01-18 23:36:59.981290427 +0100 -+++ gdb-7.5.50.20130118/gdb/sparc-tdep.c 2013-01-18 23:37:12.482307606 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/sparc-tdep.c 2013-08-02 16:43:01.159676136 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/sparc-tdep.c 2013-08-02 16:43:04.740681027 +0200 @@ -471,7 +471,7 @@ sparc32_store_arguments (struct regcache for (i = 0; i < nargs; i++) { @@ -1049,10 +1049,10 @@ Index: gdb-7.5.50.20130118/gdb/sparc-tdep.c if (sparc_structure_or_union_p (type) || (sparc_floating_p (type) && len == 16) -Index: gdb-7.5.50.20130118/gdb/sparc64-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/sparc64-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/sparc64-tdep.c 2013-01-18 23:36:59.982290430 +0100 -+++ gdb-7.5.50.20130118/gdb/sparc64-tdep.c 2013-01-18 23:37:12.482307606 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/sparc64-tdep.c 2013-08-02 16:43:01.159676136 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/sparc64-tdep.c 2013-08-02 16:43:04.741681029 +0200 @@ -639,7 +639,8 @@ sparc64_16_byte_align_p (struct type *ty static void @@ -1108,11 +1108,11 @@ Index: gdb-7.5.50.20130118/gdb/sparc64-tdep.c int regnum = -1; gdb_byte buf[16]; -Index: gdb-7.5.50.20130118/gdb/spu-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/spu-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/spu-tdep.c 2013-01-18 23:36:59.982290430 +0100 -+++ gdb-7.5.50.20130118/gdb/spu-tdep.c 2013-01-18 23:37:12.483307607 +0100 -@@ -1373,7 +1373,7 @@ spu_push_dummy_call (struct gdbarch *gdb +--- gdb-7.6.50.20130731-cvs.orig/gdb/spu-tdep.c 2013-08-02 16:43:01.160676138 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/spu-tdep.c 2013-08-02 16:43:04.741681029 +0200 +@@ -1376,7 +1376,7 @@ spu_push_dummy_call (struct gdbarch *gdb struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); const gdb_byte *contents = value_contents (arg); @@ -1121,7 +1121,7 @@ Index: gdb-7.5.50.20130118/gdb/spu-tdep.c /* If the argument doesn't wholly fit into registers, it and all subsequent arguments go to the stack. */ -@@ -1405,7 +1405,7 @@ spu_push_dummy_call (struct gdbarch *gdb +@@ -1408,7 +1408,7 @@ spu_push_dummy_call (struct gdbarch *gdb { struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); @@ -1130,10 +1130,10 @@ Index: gdb-7.5.50.20130118/gdb/spu-tdep.c int preferred_slot; if (spu_scalar_value_p (type)) -Index: gdb-7.5.50.20130118/gdb/tic6x-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/tic6x-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/tic6x-tdep.c 2013-01-18 23:36:59.983290432 +0100 -+++ gdb-7.5.50.20130118/gdb/tic6x-tdep.c 2013-01-18 23:39:27.770484516 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/tic6x-tdep.c 2013-08-02 16:43:01.160676138 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/tic6x-tdep.c 2013-08-02 16:43:04.742681030 +0200 @@ -896,7 +896,7 @@ tic6x_push_dummy_call (struct gdbarch *g int argreg = 0; int argnum; @@ -1171,24 +1171,24 @@ Index: gdb-7.5.50.20130118/gdb/tic6x-tdep.c addr = sp + stack_offset; write_memory (addr, val, len); -Index: gdb-7.5.50.20130118/gdb/tilegx-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/tilegx-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/tilegx-tdep.c 2013-01-18 23:36:59.983290432 +0100 -+++ gdb-7.5.50.20130118/gdb/tilegx-tdep.c 2013-01-18 23:37:12.483307607 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/tilegx-tdep.c 2013-08-02 16:43:01.161676139 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/tilegx-tdep.c 2013-08-02 16:43:04.742681030 +0200 @@ -291,7 +291,7 @@ tilegx_push_dummy_call (struct gdbarch * CORE_ADDR stack_dest = sp; int argreg = TILEGX_R0_REGNUM; int i, j; - int typelen, slacklen, alignlen; + LONGEST typelen, slacklen, alignlen; - static const gdb_byte two_zero_words[8] = { 0 }; + static const gdb_byte four_zero_words[16] = { 0 }; /* If struct_return is 1, then the struct return address will -Index: gdb-7.5.50.20130118/gdb/v850-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/v850-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/v850-tdep.c 2013-01-18 23:36:59.984290434 +0100 -+++ gdb-7.5.50.20130118/gdb/v850-tdep.c 2013-01-18 23:37:12.484307608 +0100 -@@ -808,7 +808,7 @@ v850_push_dummy_call (struct gdbarch *gd +--- gdb-7.6.50.20130731-cvs.orig/gdb/v850-tdep.c 2013-08-02 16:43:01.161676139 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/v850-tdep.c 2013-08-02 16:52:55.219531101 +0200 +@@ -1021,7 +1021,7 @@ v850_push_dummy_call (struct gdbarch *gd enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argreg; int argnum; @@ -1196,8 +1196,8 @@ Index: gdb-7.5.50.20130118/gdb/v850-tdep.c + LONGEST len = 0; int stack_offset; - /* The offset onto the stack at which we will start copying parameters -@@ -833,7 +833,7 @@ v850_push_dummy_call (struct gdbarch *gd + if (gdbarch_tdep (gdbarch)->abi == V850_ABI_RH850) +@@ -1049,7 +1049,7 @@ v850_push_dummy_call (struct gdbarch *gd in four registers available. Loop thru args from first to last. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1206,10 +1206,10 @@ Index: gdb-7.5.50.20130118/gdb/v850-tdep.c gdb_byte *val; gdb_byte valbuf[v850_reg_size]; -Index: gdb-7.5.50.20130118/gdb/vax-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/vax-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/vax-tdep.c 2013-01-18 23:36:59.984290434 +0100 -+++ gdb-7.5.50.20130118/gdb/vax-tdep.c 2013-01-18 23:37:12.484307608 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/vax-tdep.c 2013-08-02 16:43:01.161676139 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/vax-tdep.c 2013-08-02 16:43:04.742681030 +0200 @@ -115,7 +115,7 @@ vax_store_arguments (struct regcache *re struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -1228,10 +1228,10 @@ Index: gdb-7.5.50.20130118/gdb/vax-tdep.c sp -= (len + 3) & ~3; count += (len + 3) / 4; -Index: gdb-7.5.50.20130118/gdb/xstormy16-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/xstormy16-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/xstormy16-tdep.c 2013-01-18 23:36:59.984290434 +0100 -+++ gdb-7.5.50.20130118/gdb/xstormy16-tdep.c 2013-01-18 23:37:12.484307608 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/xstormy16-tdep.c 2013-08-02 16:43:01.162676141 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/xstormy16-tdep.c 2013-08-02 16:43:04.743681032 +0200 @@ -235,8 +235,9 @@ xstormy16_push_dummy_call (struct gdbarc enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR stack_dest = sp; @@ -1242,12 +1242,12 @@ Index: gdb-7.5.50.20130118/gdb/xstormy16-tdep.c + LONGEST j; + LONGEST typelen; const gdb_byte *val; - char buf[xstormy16_pc_size]; + gdb_byte buf[xstormy16_pc_size]; -Index: gdb-7.5.50.20130118/gdb/xtensa-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/xtensa-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/xtensa-tdep.c 2013-01-18 23:36:59.985290436 +0100 -+++ gdb-7.5.50.20130118/gdb/xtensa-tdep.c 2013-01-18 23:37:12.484307608 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/xtensa-tdep.c 2013-08-02 16:43:01.163676142 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/xtensa-tdep.c 2013-08-02 16:43:04.743681032 +0200 @@ -1653,8 +1653,7 @@ xtensa_store_return_value (struct type * if (len > (callsize > 8 ? 8 : 16)) diff --git a/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch b/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch new file mode 100644 index 0000000..2ca6336 --- /dev/null +++ b/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch @@ -0,0 +1,138 @@ +Index: gdb-7.5.91.20130407/gdb/testsuite/gdb.threads/tls-rhbz947564.cc +=================================================================== +--- /dev/null ++++ gdb-7.5.91.20130407/gdb/testsuite/gdb.threads/tls-rhbz947564.cc +@@ -0,0 +1,53 @@ ++#include ++#include ++ ++class x ++ { ++ public: ++ int n; ++ ++ x() : n(0) {} ++ }; ++ ++class y ++ { ++ public: ++ int v; ++ ++ y() : v(0) {} ++ static __thread x *xp; ++ }; ++ ++__thread x *y::xp; ++ ++static void ++foo (y *yp) ++{ ++ yp->v = 1; /* foo_marker */ ++} ++ ++static void * ++bar (void *unused) ++{ ++ x xinst; ++ y::xp= &xinst; ++ ++ y yy; ++ foo(&yy); ++ ++ return NULL; ++} ++ ++int ++main(int argc, char *argv[]) ++{ ++ pthread_t t[2]; ++ ++ pthread_create (&t[0], NULL, bar, NULL); ++ pthread_create (&t[1], NULL, bar, NULL); ++ ++ pthread_join (t[0], NULL); ++ pthread_join (t[1], NULL); ++ ++ return 0; ++} +Index: gdb-7.5.91.20130407/gdb/testsuite/gdb.threads/tls-rhbz947564.exp +=================================================================== +--- /dev/null ++++ gdb-7.5.91.20130407/gdb/testsuite/gdb.threads/tls-rhbz947564.exp +@@ -0,0 +1,75 @@ ++# Copyright (C) 2013 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 . */ ++ ++set testfile tls-rhbz947564 ++set srcfile ${testfile}.cc ++set binfile ${objdir}/${subdir}/${testfile} ++ ++if [istarget "*-*-linux"] then { ++ set target_cflags "-D_MIT_POSIX_THREADS" ++} else { ++ set target_cflags "" ++} ++ ++if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list c++ debug]] != "" } { ++ return -1 ++} ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++ ++gdb_load ${binfile} ++ ++if { ![runto_main] } { ++ fail "Can't run to function main" ++ return 0 ++} ++ ++gdb_breakpoint "foo" ++gdb_continue_to_breakpoint "foo" ".* foo_marker .*" ++ ++proc get_xp_val {try} { ++ global expect_out ++ global gdb_prompt ++ global hex ++ ++ set xp_val "" ++ gdb_test_multiple "print *yp" "print yp value" { ++ -re { = \{v = 0, static xp = (0x[0-9a-f]+)\}.* } { ++ pass "print $try value of *yp" ++ set xp_val $expect_out(1,string) ++ } ++ -re "$gdb_prompt $" { ++ fail "print $try value of *yp" ++ } ++ timeout { ++ fail "print $try value of *yp (timeout)" ++ } ++ } ++ return $xp_val ++} ++ ++set first_run [get_xp_val "first"] ++ ++gdb_test "continue" "Breakpoint \[0-9\]+, foo \\\(yp=$hex\\\) at.*" ++ ++set second_run [get_xp_val "second"] ++ ++if { $first_run != $second_run } { ++ pass "different values for TLS variable" ++} else { ++ fail "different values for TLS variable" ++} diff --git a/gdb-test-pid0-core.patch b/gdb-test-pid0-core.patch index edb800d..cc5b530 100644 --- a/gdb-test-pid0-core.patch +++ b/gdb-test-pid0-core.patch @@ -6,8 +6,10 @@ http://sourceware.org/ml/gdb-patches/2010-08/msg00085.html http://sourceware.org/ml/gdb-cvs/2010-08/msg00026.html 2e5bcfdef1ec3883d48c3f87a4be5c0dff25e17e ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu 2013-08-02 22:14:50.748990883 +0200 @@ -0,0 +1,20 @@ +begin 600 x86_64-pid0-core.core.bz2 +M0EIH.3%!629362,CA>P!$/'_____^*#EZ-A!SP36P&_:G0#=14``04A&8,'U @@ -29,8 +31,10 @@ http://sourceware.org/ml/gdb-cvs/2010-08/msg00026.html +4B.Z!/,0-IZ^W_Q=R13A0D",CA>P` +` +end ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp 2013-08-02 22:17:30.575209385 +0200 @@ -0,0 +1,46 @@ +# This testcase is part of GDB, the GNU debugger. +# @@ -77,4 +81,4 @@ http://sourceware.org/ml/gdb-cvs/2010-08/msg00026.html + +# Former crash was: +# thread.c:884: internal-error: switch_to_thread: Assertion `inf != NULL' failed. -+gdb_test "core-file ${corefile}" "Program terminated with signal 11, Segmentation fault\\.\r\n.*" ++gdb_test "core-file ${corefile}" "Program terminated with signal (11|SIGSEGV), Segmentation fault\\.\r\n.*" diff --git a/gdb-x86_64-i386-syscall-restart.patch b/gdb-x86_64-i386-syscall-restart.patch index 3e3474f..f7c0dd6 100644 --- a/gdb-x86_64-i386-syscall-restart.patch +++ b/gdb-x86_64-i386-syscall-restart.patch @@ -102,7 +102,7 @@ gdb/ } } + -+ if (gdbarch_ptr_bit (gdbarch) == 32) ++ if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32) + { + /* Sign-extend %eax as during return from a syscall it is being checked + for -ERESTART* values -512 being above 0xfffffffffffffe00; tested by diff --git a/gdb.changes b/gdb.changes index 40af6dd..18f1bd9 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +Mon Aug 12 15:30:32 UTC 2013 - schwab@suse.de + +- gdb-aarch64-hw-break.patch: fix setting hardware debug registers after + fork + +------------------------------------------------------------------- +Wed Aug 7 13:27:17 UTC 2013 - matz@suse.com + +- Merge from fedoras gdb-7.6.50-20130731-cvs, of what will become 7.7 + eventually. This includes 7.6, which gave: + * new native configurations (e.g. ARM AArch64 GNU/Linux) + * new targets (e.g. ARM AArch64, Lynx 178 PowerPC, x86_64/Cygwin) + * support for the "mini debuginfo" section, .gnu_debugdata + * the C++ ABI now defaults to the GNU v3 ABI + * more Python scripting improvements + * some GDB/MI improvements + * new configure options, new commands, and options + * new remote packets + * a new "target record-btrace" has been added while the + "target record" command has been renamed to "target record-full" +- gdb-ia64-tdep.patch: build fixes +- gdb-ppc-ptrace.diff: Remove patch, not needed on new kernels + ------------------------------------------------------------------- Tue Jul 2 12:34:27 UTC 2013 - schwab@suse.de diff --git a/gdb.spec b/gdb.spec index 76a4b45..1868bbf 100644 --- a/gdb.spec +++ b/gdb.spec @@ -16,10 +16,10 @@ Summary: A GNU source-level debugger for C, C++, Fortran and other languages Name: gdb -%global snap 20130215 +%global snap 20130731 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20121213 -Version: 7.5.50.20130215 +Version: 7.6.50.20130731 # 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. @@ -30,7 +30,7 @@ Group: Development/Tools/Debuggers BuildRoot: %{_tmppath}/%{name}-%{version}-build # Do not provide URL for snapshots as the file lasts there only for 2 days. # ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2 -Source: gdb-%{version}.tar.bz2 +Source: gdb-%{version}-cvs.tar.bz2 URL: http://gnu.org/software/gdb/ %if "%{scl}" == "devtoolset-1.1" @@ -38,7 +38,7 @@ Obsoletes: devtoolset-1.0-%{pkg_name} %endif # For our convenience -%global gdb_src %{name}-%{version} +%global gdb_src %{name}-%{version}-cvs %global gdb_build build-%{_target_platform} %global gdb_docdir %{_docdir}/%{name}-doc @@ -73,7 +73,7 @@ Source3: gdb-gstack.man Source4: gdbinit # libstdc++ pretty printers from GCC SVN HEAD (4.5 experimental). -%global libstdcxxpython libstdc++-v3-python-r155978 +%global libstdcxxpython gdb-libstdc++-v3-python-r155978 Source5: %{libstdcxxpython}.tar.bz2 # Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). @@ -84,127 +84,113 @@ Source6: gdbtui Patch1: gdb-6.3-rh-testversion-20041202.patch Patch2: gdb-archer.patch Patch3: gdb-6.3-rh-dummykfail-20041202.patch -Patch4: gdb-6.3-rh-testlibunwind-20041202.patch -Patch5: gdb-6.3-ppc64syscall-20040622.patch -Patch6: gdb-6.3-ppc64displaysymbol-20041124.patch -Patch7: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch -Patch8: gdb-6.3-gstack-20050411.patch -Patch9: gdb-6.3-test-pie-20050107.patch -Patch10: gdb-6.3-test-self-20050110.patch -Patch11: gdb-6.3-test-dtorfix-20050121.patch -Patch12: gdb-6.3-test-movedir-20050125.patch -Patch13: gdb-6.3-gcore-thread-20050204.patch -Patch14: gdb-6.3-threaded-watchpoints2-20050225.patch -Patch15: gdb-6.3-ia64-gcore-page0-20050421.patch -Patch16: gdb-6.3-ia64-sigtramp-frame-20050708.patch -Patch17: gdb-6.3-ia64-gcore-speedup-20050714.patch -Patch18: gdb-6.3-inferior-notification-20050721.patch -Patch19: gdb-6.3-ia64-info-frame-fix-20050725.patch -Patch20: gdb-6.3-inheritancetest-20050726.patch -Patch21: gdb-6.3-readnever-20050907.patch -Patch22: gdb-6.3-ia64-sigill-20051115.patch -Patch23: gdb-6.5-bz203661-emit-relocs.patch -Patch24: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch -Patch25: gdb-6.5-sharedlibrary-path.patch -Patch26: gdb-6.5-bz190810-gdbserver-arch-advice.patch -Patch27: gdb-6.5-BEA-testsuite.patch -Patch28: gdb-6.5-last-address-space-byte-test.patch -Patch29: gdb-6.5-readline-long-line-crash-test.patch -Patch30: gdb-6.5-bz216711-clone-is-outermost.patch -Patch31: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch -Patch32: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch -Patch33: gdb-6.5-bz109921-DW_AT_decl_file-test.patch -Patch34: gdb-6.3-bz140532-ppc-unwinding-test.patch -Patch35: gdb-6.3-bz202689-exec-from-pthread-test.patch -Patch36: gdb-6.6-bz230000-power6-disassembly-test.patch -Patch37: gdb-6.3-bz231832-obstack-2gb.patch -Patch38: gdb-6.6-bz229517-gcore-without-terminal.patch -Patch39: gdb-6.6-bz235197-fork-detach-info.patch -Patch40: gdb-6.6-testsuite-timeouts.patch -Patch41: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch -Patch42: gdb-6.6-scheduler_locking-step-is-default.patch -Patch43: gdb-6.3-attach-see-vdso-test.patch -Patch44: gdb-6.5-bz243845-stale-testing-zombie-test.patch -Patch45: gdb-6.6-buildid-locate.patch -Patch46: gdb-6.6-buildid-locate-solib-missing-ids.patch -Patch47: gdb-6.6-buildid-locate-rpm.patch -Patch48: gdb-6.6-bfd-vdso8k.patch -Patch49: gdb-6.7-charsign-test.patch -Patch50: gdb-6.7-ppc-clobbered-registers-O2-test.patch -Patch51: gdb-6.7-testsuite-stable-results.patch -Patch52: gdb-6.5-ia64-libunwind-leak-test.patch -Patch53: gdb-6.5-missed-trap-on-step-test.patch -Patch54: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch -Patch55: gdb-6.5-gcore-buffer-limit-test.patch -Patch56: gdb-6.6-threads-static-test.patch -Patch57: gdb-6.3-mapping-zero-inode-test.patch -Patch58: gdb-6.3-focus-cmd-prev-test.patch -Patch59: gdb-6.8-bz442765-threaded-exec-test.patch -Patch60: gdb-6.8-sparc64-silence-memcpy-check.patch -Patch61: gdb-6.5-section-num-fixup-test.patch -Patch62: gdb-6.8-bz436037-reg-no-longer-active.patch -Patch63: gdb-6.8-watchpoint-conditionals-test.patch -Patch64: gdb-6.8-bz466901-backtrace-full-prelinked.patch -Patch65: gdb-6.8-bz457187-largefile-test.patch -Patch66: gdb-simultaneous-step-resume-breakpoint-test.patch -Patch67: gdb-core-open-vdso-warning.patch -Patch68: gdb-x86_64-i386-syscall-restart.patch -Patch69: gdb-bz533176-fortran-omp-step.patch -Patch70: gdb-follow-child-stale-parent.patch -Patch71: gdb-ccache-workaround.patch -Patch72: gdb-archer-pie-addons.patch -Patch73: gdb-archer-pie-addons-keep-disabled.patch -Patch74: gdb-lineno-makeup-test.patch -Patch75: gdb-ppc-power7-test.patch -Patch76: gdb-bz541866-rwatch-before-run.patch -Patch77: gdb-moribund-utrace-workaround.patch -Patch78: gdb-archer-next-over-throw-cxx-exec.patch -Patch79: gdb-bz601887-dwarf4-rh-test.patch -Patch80: gdb-6.6-buildid-locate-core-as-arg.patch -Patch81: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch -Patch82: gdb-test-bt-cfi-without-die.patch -Patch83: gdb-gdb-add-index-script.patch -Patch84: gdb-bz568248-oom-is-error.patch -Patch85: gdb-bz634108-solib_address.patch -Patch86: gdb-test-pid0-core.patch -Patch87: gdb-test-dw2-aranges.patch -Patch88: gdb-test-expr-cumulative-archer.patch -Patch89: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch -Patch90: gdb-dlopen-stap-probe-3of7.patch -Patch91: gdb-dlopen-stap-probe-4of7.patch -Patch92: gdb-dlopen-stap-probe-5of7.patch -Patch93: gdb-dlopen-stap-probe-6of7.patch -Patch94: gdb-dlopen-stap-probe-7of7.patch -Patch95: gdb-dlopen-stap-probe-test2.patch -Patch96: gdb-dlopen-stap-probe-mapfailed.patch -Patch97: gdb-dlopen-stap-probe-test.patch -Patch98: gdb-glibc-vdso-workaround.patch -Patch99: gdb-runtest-pie-override.patch -Patch100: gdb-python-rdynamic.patch -Patch101: gdb-attach-fail-reasons-5of5.patch -Patch102: gdb-attach-fail-reasons-5of5configure.patch -Patch103: gdb-stale-frame_info.patch -Patch104: gdb-glibc-strstr-workaround.patch -Patch105: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch -Patch106: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch -Patch107: gdb-rhbz795424-bitpos-20of25.patch -Patch108: gdb-rhbz795424-bitpos-21of25.patch -Patch109: gdb-rhbz795424-bitpos-22of25.patch -Patch110: gdb-rhbz795424-bitpos-23of25.patch -Patch111: gdb-rhbz795424-bitpos-25of25.patch -Patch112: gdb-rhbz795424-bitpos-25of25-test.patch -Patch113: gdb-rhbz795424-bitpos-lazyvalue.patch -Patch114: gdb-rhel5-gcc44.patch -Patch115: gdb-readline62-ask-more-rh.patch -Patch116: gdb-6.8-attach-signalled-detach-stopped.patch -Patch117: gdb-6.8-quit-never-aborts.patch -Patch118: gdb-rhel5-compat.patch +Patch4: gdb-6.3-ppc64syscall-20040622.patch +Patch5: gdb-6.3-ppc64displaysymbol-20041124.patch +Patch6: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch +Patch7: gdb-6.3-gstack-20050411.patch +Patch8: gdb-6.3-test-pie-20050107.patch +Patch9: gdb-6.3-test-self-20050110.patch +Patch10: gdb-6.3-test-dtorfix-20050121.patch +Patch11: gdb-6.3-test-movedir-20050125.patch +Patch12: gdb-6.3-threaded-watchpoints2-20050225.patch +Patch13: gdb-6.3-inferior-notification-20050721.patch +Patch14: gdb-6.3-inheritancetest-20050726.patch +Patch15: gdb-6.3-readnever-20050907.patch +Patch16: gdb-6.5-bz203661-emit-relocs.patch +Patch17: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +Patch18: gdb-6.5-sharedlibrary-path.patch +Patch19: gdb-6.5-bz190810-gdbserver-arch-advice.patch +Patch20: gdb-6.5-BEA-testsuite.patch +Patch21: gdb-6.5-last-address-space-byte-test.patch +Patch22: gdb-6.5-readline-long-line-crash-test.patch +Patch23: gdb-6.5-bz216711-clone-is-outermost.patch +Patch24: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch +Patch25: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch +Patch26: gdb-6.5-bz109921-DW_AT_decl_file-test.patch +Patch27: gdb-6.3-bz140532-ppc-unwinding-test.patch +Patch28: gdb-6.3-bz202689-exec-from-pthread-test.patch +Patch29: gdb-6.6-bz230000-power6-disassembly-test.patch +Patch30: gdb-6.3-bz231832-obstack-2gb.patch +Patch31: gdb-6.6-bz229517-gcore-without-terminal.patch +Patch32: gdb-6.6-bz235197-fork-detach-info.patch +Patch33: gdb-6.6-testsuite-timeouts.patch +Patch34: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch +Patch35: gdb-6.6-scheduler_locking-step-is-default.patch +Patch36: gdb-6.3-attach-see-vdso-test.patch +Patch37: gdb-6.5-bz243845-stale-testing-zombie-test.patch +Patch38: gdb-6.6-buildid-locate.patch +Patch39: gdb-6.6-buildid-locate-solib-missing-ids.patch +Patch40: gdb-6.6-buildid-locate-rpm.patch +Patch41: gdb-6.6-bfd-vdso8k.patch +Patch42: gdb-6.7-charsign-test.patch +Patch43: gdb-6.7-ppc-clobbered-registers-O2-test.patch +Patch44: gdb-6.7-testsuite-stable-results.patch +Patch45: gdb-6.5-ia64-libunwind-leak-test.patch +Patch46: gdb-6.5-missed-trap-on-step-test.patch +Patch47: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch +Patch48: gdb-6.5-gcore-buffer-limit-test.patch +Patch49: gdb-6.6-threads-static-test.patch +Patch50: gdb-6.3-mapping-zero-inode-test.patch +Patch51: gdb-6.3-focus-cmd-prev-test.patch +Patch52: gdb-6.8-bz442765-threaded-exec-test.patch +Patch53: gdb-6.8-sparc64-silence-memcpy-check.patch +Patch54: gdb-6.5-section-num-fixup-test.patch +Patch55: gdb-6.8-bz436037-reg-no-longer-active.patch +Patch56: gdb-6.8-watchpoint-conditionals-test.patch +Patch57: gdb-6.8-bz466901-backtrace-full-prelinked.patch +Patch58: gdb-6.8-bz457187-largefile-test.patch +Patch59: gdb-simultaneous-step-resume-breakpoint-test.patch +Patch60: gdb-core-open-vdso-warning.patch +Patch61: gdb-x86_64-i386-syscall-restart.patch +Patch62: gdb-bz533176-fortran-omp-step.patch +Patch63: gdb-follow-child-stale-parent.patch +Patch64: gdb-ccache-workaround.patch +Patch65: gdb-archer-pie-addons.patch +Patch66: gdb-archer-pie-addons-keep-disabled.patch +Patch67: gdb-lineno-makeup-test.patch +Patch68: gdb-ppc-power7-test.patch +Patch69: gdb-bz541866-rwatch-before-run.patch +Patch70: gdb-moribund-utrace-workaround.patch +Patch71: gdb-archer-next-over-throw-cxx-exec.patch +Patch72: gdb-bz601887-dwarf4-rh-test.patch +Patch73: gdb-6.6-buildid-locate-core-as-arg.patch +Patch74: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +Patch75: gdb-test-bt-cfi-without-die.patch +Patch76: gdb-gdb-add-index-script.patch +Patch77: gdb-bz568248-oom-is-error.patch +Patch78: gdb-bz634108-solib_address.patch +Patch79: gdb-test-pid0-core.patch +Patch80: gdb-test-dw2-aranges.patch +Patch81: gdb-test-expr-cumulative-archer.patch +Patch82: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch +Patch83: gdb-glibc-vdso-workaround.patch +Patch84: gdb-runtest-pie-override.patch +Patch85: gdb-attach-fail-reasons-5of5.patch +Patch86: gdb-stale-frame_info.patch +Patch87: gdb-glibc-strstr-workaround.patch +Patch88: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch +Patch89: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch +Patch90: gdb-rhbz795424-bitpos-20of25.patch +Patch91: gdb-rhbz795424-bitpos-21of25.patch +Patch92: gdb-rhbz795424-bitpos-22of25.patch +Patch93: gdb-rhbz795424-bitpos-23of25.patch +Patch94: gdb-rhbz795424-bitpos-25of25.patch +Patch95: gdb-rhbz795424-bitpos-25of25-test.patch +Patch96: gdb-rhbz795424-bitpos-lazyvalue.patch +Patch97: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch +Patch98: gdb-enable-count-crash.patch +Patch99: gdb-rhel5-gcc44.patch +Patch100: gdb-6.6-buildid-locate-rpm-scl.patch +Patch101: gdb-readline62-ask-more-rh.patch +Patch102: gdb-6.8-attach-signalled-detach-stopped.patch +Patch103: gdb-6.8-quit-never-aborts.patch +Patch104: gdb-rhel5-compat.patch #Fedora Packages end # Upstream patch to fix gcc -Werror Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch -Patch1003: gdb-ppc-ptrace.diff Patch1004: gdb-ia64-tdep.patch +Patch1005: gdb-aarch64-hw-break.patch BuildRequires: ncurses-devel texinfo gettext flex bison glibc-devel zlib-devel %if %{suse_version} < 1020 @@ -423,32 +409,20 @@ find -name "*.info*"|xargs rm -f %patch97 -p1 %patch98 -p1 %patch99 -p1 -%patch100 -p1 -%patch101 -p1 +#%%patch100 -p1 +#%%patch100 -p1 -R +#%%patch101 -p1 +#%%patch101 -p1 -R %patch102 -p1 %patch103 -p1 %patch104 -p1 -%patch105 -p1 -%patch106 -p1 -%patch107 -p1 -%patch108 -p1 -%patch109 -p1 -%patch110 -p1 -%patch111 -p1 -%patch112 -p1 -%patch113 -p1 -%patch114 -p1 -#%%patch115 -p1 -%patch116 -p1 -%patch117 -p1 -%patch118 -p1 #Fedora patching end %patch1002 -p1 -%patch1003 -p1 %patch1004 -p1 +%patch1005 -p0 find -name "*.orig" | xargs rm -f ! find -name "*.rej" # Should not happen. @@ -722,10 +696,6 @@ cd %{gdb_build} make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT -# install the gcore script in /usr/bin -cp $RPM_BUILD_DIR/%{gdb_src}/gdb/gdb_gcore.sh $RPM_BUILD_ROOT%{_bindir}/gcore -chmod 755 $RPM_BUILD_ROOT%{_bindir}/gcore - # Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). %if 0%{?rhel:1} && 0%{?rhel} <= 6 test ! -e $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui @@ -860,6 +830,7 @@ fi %defattr(-,root,root) %doc COPYING3 COPYING COPYING.LIB README NEWS %{_bindir}/gcore +%{_mandir}/*/gcore.1* %{_bindir}/gdb %config(noreplace) %{_sysconfdir}/gdbinit %{_sysconfdir}/gdbinit.d @@ -872,6 +843,8 @@ fi %{_mandir}/*/gdbtui.1* %endif # 0%{?rhel:1} && 0%{?rhel} <= 6 %{_bindir}/gdb-add-index +%{_mandir}/*/gdb-add-index.1* +%{_mandir}/*/gdbinit.5* %{_datadir}/gdb %{_infodir}/annotate.info* %{_infodir}/gdb.info* diff --git a/libstdc++-v3-python-r155978.tar.bz2 b/libstdc++-v3-python-r155978.tar.bz2 deleted file mode 100644 index 3dd0860..0000000 --- a/libstdc++-v3-python-r155978.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b475a3ef42507a47b1ea4b7f9a4849287b4c713e5081ec86874eaa7da194f78b -size 11754 diff --git a/patchlist.pl b/patchlist.pl index 33cad7a..45c5e6a 100644 --- a/patchlist.pl +++ b/patchlist.pl @@ -9,7 +9,7 @@ chomp($dir); system "rm \$(grep \"^Patch[0-9]\\{1,3\\}:\" gdb.spec | cut -d\" \" -f 2) 2>/dev/null"; system "rm *.tar.bz2"; system "cp $gdbFedora/*.tar.bz2 ./"; -system "pushd $gdbFedora ; $dir/patchname_get.sh -v gdb.spec 2>$dir/test.txt; popd"; +system "pushd $gdbFedora ; sh $dir/patchname_get.sh -v gdb.spec 2>$dir/test.txt; popd"; system "grep \"^Patch\" test.txt > test2.txt"; my @patchliste = `cat test2.txt`;