diff --git a/.gitignore b/.gitignore index 52b042b..125df83 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ /gdb-libstdc++-v3-python-r155978.tar.bz2 -/gdb-7.6.50.20130624.tar.bz2 -/gdb-7.6.50.20130731-cvs.tar.bz2 +/gdb-7.7.tar.bz2 diff --git a/gdb-6.3-gstack-20050411.patch b/gdb-6.3-gstack-20050411.patch index b73eeff..f1e9e3a 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.6/gdb/Makefile.in +Index: gdb-7.7/gdb/Makefile.in =================================================================== ---- 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 +--- gdb-7.7.orig/gdb/Makefile.in 2014-02-06 20:29:09.401214339 +0100 ++++ gdb-7.7/gdb/Makefile.in 2014-02-06 20:29:09.501214360 +0100 +@@ -1067,7 +1067,7 @@ info install-info clean-info dvi pdf ins install: all @$(MAKE) $(FLAGS_TO_PASS) install-only @@ -17,7 +17,7 @@ Index: gdb-7.6/gdb/Makefile.in transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e "$$t"` ; \ if test "x$$transformed_name" = x; then \ -@@ -1060,7 +1060,25 @@ install-only: $(CONFIG_INSTALL) +@@ -1104,7 +1104,25 @@ install-strip: install-python: $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb @@ -44,7 +44,7 @@ Index: gdb-7.6/gdb/Makefile.in transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e $$t` ; \ if test "x$$transformed_name" = x; then \ -@@ -1083,6 +1101,18 @@ uninstall: force $(CONFIG_UNINSTALL) +@@ -1127,6 +1145,18 @@ uninstall: force $(CONFIG_UNINSTALL) fi @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do @@ -63,10 +63,10 @@ Index: gdb-7.6/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.6/gdb/gstack.sh +Index: gdb-7.7/gdb/gstack.sh =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/gstack.sh 2013-05-21 13:26:55.434625908 +0200 ++++ gdb-7.7/gdb/gstack.sh 2014-02-06 20:29:09.501214360 +0100 @@ -0,0 +1,43 @@ +#!/bin/sh + @@ -111,10 +111,10 @@ Index: gdb-7.6/gdb/gstack.sh + -e 's/^\((gdb) \)*//' \ + -e '/^#/p' \ + -e '/^Thread/p' -Index: gdb-7.6/gdb/testsuite/gdb.base/gstack.exp +Index: gdb-7.7/gdb/testsuite/gdb.base/gstack.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.base/gstack.exp 2013-05-21 13:26:55.434625908 +0200 ++++ gdb-7.7/gdb/testsuite/gdb.base/gstack.exp 2014-02-06 20:43:17.774747352 +0100 @@ -0,0 +1,66 @@ +# Copyright (C) 2012 Free Software Foundation, Inc. + @@ -133,7 +133,7 @@ Index: gdb-7.6/gdb/testsuite/gdb.base/gstack.exp + +set testfile gstack +set executable ${testfile} -+set binfile ${objdir}/${subdir}/$executable ++set binfile [standard_output_file $executable] +if {[build_executable ${testfile} ${executable} "" {debug}] == -1} { + return -1 +} @@ -182,10 +182,10 @@ Index: gdb-7.6/gdb/testsuite/gdb.base/gstack.exp +gdb_exit + +remote_exec host "kill -9 $pid" -Index: gdb-7.6/gdb/testsuite/gdb.base/gstack.c +Index: gdb-7.7/gdb/testsuite/gdb.base/gstack.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.base/gstack.c 2013-05-21 13:26:33.610819569 +0200 ++++ gdb-7.7/gdb/testsuite/gdb.base/gstack.c 2014-02-06 20:29:09.502214360 +0100 @@ -0,0 +1,43 @@ +/* This testcase is part of GDB, the GNU debugger. + diff --git a/gdb-6.3-readnever-20050907.patch b/gdb-6.3-readnever-20050907.patch index 944e104..7ff1dc7 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.6.50.20130731-cvs/gdb/doc/gdb.texinfo +Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/doc/gdb.texinfo 2014-01-27 22:42:53.150573603 +0100 ++++ gdb-7.6.90.20140127/gdb/doc/gdb.texinfo 2014-01-27 22:42:56.694576319 +0100 +@@ -1031,6 +1031,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.6.50.20130731-cvs/gdb/doc/gdb.texinfo @end table @node Mode Options -Index: gdb-7.6.50.20130731-cvs/gdb/main.c +Index: gdb-7.6.90.20140127/gdb/main.c =================================================================== ---- 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) +--- gdb-7.6.90.20140127.orig/gdb/main.c 2014-01-27 22:42:53.153573606 +0100 ++++ gdb-7.6.90.20140127/gdb/main.c 2014-01-27 22:42:56.695576319 +0100 +@@ -473,6 +473,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,7 +40,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/main.c {"r", no_argument, &readnow_symbol_files, 1}, {"quiet", no_argument, &quiet, 1}, {"q", no_argument, &quiet, 1}, -@@ -1154,6 +1155,7 @@ Selection of debuggee and its files:\n\n +@@ -1164,6 +1165,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\ @@ -48,10 +48,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/main.c --write Set writing into executable and core files.\n\n\ "), stream); fputs_unfiltered (_("\ -Index: gdb-7.6.50.20130731-cvs/gdb/symfile.c +Index: gdb-7.6.90.20140127/gdb/symfile.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/symfile.c 2014-01-27 22:42:53.154573607 +0100 ++++ gdb-7.6.90.20140127/gdb/symfile.c 2014-01-27 22:42:56.696576320 +0100 @@ -82,6 +82,7 @@ static void clear_symtab_users_cleanup ( /* Global variables owned by this file. */ @@ -60,34 +60,32 @@ Index: gdb-7.6.50.20130731-cvs/gdb/symfile.c /* Functions this file defines. */ -Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c +Index: gdb-7.6.90.20140127/gdb/dwarf2read.c =================================================================== ---- 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" +--- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-01-27 22:42:56.700576323 +0100 ++++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-01-27 22:44:21.915641560 +0100 +@@ -70,6 +70,7 @@ #include "source.h" #include "filestuff.h" + #include "build-id.h" +#include "top.h" #include - #include "gdb_string.h" -@@ -1834,8 +1835,9 @@ dwarf2_has_info (struct objfile *objfile + #include +@@ -1975,7 +1976,8 @@ dwarf2_has_info (struct objfile *objfile (void *) names); dwarf2_per_objfile->objfile = objfile; } -- return (dwarf2_per_objfile->info.asection != NULL -- && dwarf2_per_objfile->abbrev.asection != NULL); -+ return (! readnever_symbol_files -+ && (dwarf2_per_objfile->info.asection != NULL -+ && dwarf2_per_objfile->abbrev.asection != NULL)); - } - - /* When loading sections, we look either for uncompressed section or for -Index: gdb-7.6.50.20130731-cvs/gdb/top.h +- return (!dwarf2_per_objfile->info.is_virtual ++ return !readnever_symbol_files && ++ (!dwarf2_per_objfile->info.is_virtual + && dwarf2_per_objfile->info.s.asection != NULL + && !dwarf2_per_objfile->abbrev.is_virtual + && dwarf2_per_objfile->abbrev.s.asection != NULL); +Index: gdb-7.6.90.20140127/gdb/top.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/top.h 2014-01-27 22:42:53.159573610 +0100 ++++ gdb-7.6.90.20140127/gdb/top.h 2014-01-27 22:42:56.701576324 +0100 @@ -59,6 +59,7 @@ extern void set_prompt (const char *s); /* From random places. */ diff --git a/gdb-6.3-test-pie-20050107.patch b/gdb-6.3-test-pie-20050107.patch index c6a8cbc..f38c0bf 100644 --- a/gdb-6.3-test-pie-20050107.patch +++ b/gdb-6.3-test-pie-20050107.patch @@ -1,25 +1,25 @@ -Index: gdb-7.5.91.20130323/gdb/testsuite/configure.ac +Index: gdb-7.6.90.20140127/gdb/testsuite/configure.ac =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/configure.ac 2014-01-27 22:41:19.281501688 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/configure.ac 2014-01-27 22:41:39.736517360 +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 \ gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \ - gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/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.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \ gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile]) -Index: gdb-7.5.91.20130323/gdb/testsuite/configure +Index: gdb-7.6.90.20140127/gdb/testsuite/configure =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/configure 2014-01-27 22:41:19.283501689 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/configure 2014-01-27 22:41:49.933525172 +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.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" +-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.perf/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.perf/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 @@ -28,13 +28,13 @@ Index: gdb-7.5.91.20130323/gdb/testsuite/configure "gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;; "gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;; + "gdb.pie/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pie/Makefile" ;; + "gdb.perf/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.perf/Makefile" ;; "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.5.91.20130323/gdb/testsuite/gdb.pie/attach.c +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach.c 2013-03-23 19:47:24.191683466 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach.c 2014-01-27 22:41:19.284501690 +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.5.91.20130323/gdb/testsuite/gdb.pie/attach.c + } + return 0; +} -Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach2.c +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach2.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach2.c 2013-03-23 19:47:24.192683421 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach2.c 2014-01-27 22:41:19.284501690 +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.5.91.20130323/gdb/testsuite/gdb.pie/attach2.c + } + return (0); +} -Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break.c +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break.c 2013-03-23 19:47:24.192683421 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break.c 2014-01-27 22:41:19.284501690 +0100 @@ -0,0 +1,146 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -236,10 +236,10 @@ Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break.c + } + return 0; +} -Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break1.c +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break1.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break1.c 2013-03-23 19:47:24.192683421 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break1.c 2014-01-27 22:41:19.284501690 +0100 @@ -0,0 +1,44 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -285,10 +285,10 @@ Index: gdb-7.5.91.20130323/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.5.91.20130323/gdb/testsuite/gdb.pie/coremaker.c +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/coremaker.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/coremaker.c 2013-03-23 19:47:24.192683421 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/coremaker.c 2014-01-27 22:41:19.284501690 +0100 @@ -0,0 +1,142 @@ +/* Copyright 1992, 1993, 1994, 1995, 1996, 1999 + Free Software Foundation, Inc. @@ -432,10 +432,10 @@ Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/coremaker.c + return 0; +} + -Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach.exp 2013-03-23 19:47:24.193683377 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach.exp 2014-01-27 22:41:19.285501691 +0100 @@ -0,0 +1,417 @@ +# Copyright 1997, 1999, 2002 Free Software Foundation, Inc. + @@ -854,10 +854,10 @@ Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/attach.exp +do_call_attach_tests + +return 0 -Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/break.exp 2013-03-23 19:47:24.194683332 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break.exp 2014-01-27 22:41:19.286501691 +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.5.91.20130323/gdb/testsuite/gdb.pie/break.exp + send_gdb "set args main\n" + gdb_expect -re ".*$gdb_prompt $" {} +} -Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/corefile.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/corefile.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/corefile.exp 2013-03-23 19:47:24.194683332 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/corefile.exp 2014-01-27 22:41:19.286501691 +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.5.91.20130323/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.5.91.20130323/gdb/testsuite/gdb.pie/Makefile.in +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/Makefile.in =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/testsuite/gdb.pie/Makefile.in 2013-03-23 19:47:24.194683332 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/Makefile.in 2014-01-27 22:41:19.286501691 +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 3a5745b..2073af2 100644 --- a/gdb-6.3-test-self-20050110.patch +++ b/gdb-6.3-test-self-20050110.patch @@ -6,20 +6,20 @@ * gdb.gdb/xfullpath.exp: Ditto. * gdb.gdb/observer.exp: Ditto. -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/selftest-support.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/lib/selftest-support.exp =================================================================== ---- 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] +--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/selftest-support.exp 2014-01-27 22:42:04.022535966 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/lib/selftest-support.exp 2014-01-27 22:42:42.630565675 +0100 +@@ -136,18 +136,18 @@ proc do_self_tests {function body} { + } # Remove any old copy lying around. -- remote_file host delete x$tool -+ #remote_file host delete x$tool +- remote_file host delete $xgdb ++ #remote_file host delete $xgdb 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 $xgdb] ++ #set file [remote_download host $GDB_FULLPATH $xgdb] - set result [selftest_setup $file $function] + set result [selftest_setup $GDB_FULLPATH $function] diff --git a/gdb-6.5-bz216711-clone-is-outermost.patch b/gdb-6.5-bz216711-clone-is-outermost.patch index 41a887a..9fb23ed 100644 --- a/gdb-6.5-bz216711-clone-is-outermost.patch +++ b/gdb-6.5-bz216711-clone-is-outermost.patch @@ -23,11 +23,11 @@ instead. Port to GDB-6.7. -Index: gdb-7.4.50.20120703/gdb/amd64-linux-tdep.c +Index: gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c =================================================================== ---- gdb-7.4.50.20120703.orig/gdb/amd64-linux-tdep.c 2012-06-13 22:36:48.000000000 +0200 -+++ gdb-7.4.50.20120703/gdb/amd64-linux-tdep.c 2012-07-03 17:32:46.547563363 +0200 -@@ -271,6 +271,80 @@ amd64_linux_register_reggroup_p (struct +--- gdb-7.6.90.20140127.orig/gdb/amd64-linux-tdep.c 2014-02-04 23:40:06.263483469 +0100 ++++ gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c 2014-02-04 23:47:18.438009290 +0100 +@@ -289,6 +289,80 @@ amd64_linux_register_reggroup_p (struct /* Set the program counter for process PTID to PC. */ @@ -108,20 +108,20 @@ Index: gdb-7.4.50.20120703/gdb/amd64-linux-tdep.c static void amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc) { -@@ -1547,6 +1621,8 @@ amd64_linux_init_abi (struct gdbarch_inf +@@ -1607,6 +1681,8 @@ amd64_linux_init_abi_common(struct gdbar - amd64_linux_init_abi_common (info, gdbarch); + tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET; + tdep->outermost_frame_p = amd64_linux_outermost_frame; + - /* GNU/Linux uses SVR4-style shared libraries. */ - set_solib_svr4_fetch_link_map_offsets - (gdbarch, svr4_lp64_fetch_link_map_offsets); -Index: gdb-7.4.50.20120703/gdb/amd64-tdep.c + /* Add the %orig_rax register used for syscall restarting. */ + set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc); + +Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c =================================================================== ---- gdb-7.4.50.20120703.orig/gdb/amd64-tdep.c 2012-06-16 17:20:22.000000000 +0200 -+++ gdb-7.4.50.20120703/gdb/amd64-tdep.c 2012-07-03 17:32:12.335604415 +0200 -@@ -2324,6 +2324,7 @@ amd64_frame_unwind_stop_reason (struct f +--- gdb-7.6.90.20140127.orig/gdb/amd64-tdep.c 2014-02-04 23:40:06.265483471 +0100 ++++ gdb-7.6.90.20140127/gdb/amd64-tdep.c 2014-02-04 23:45:40.846891653 +0100 +@@ -2359,6 +2359,7 @@ amd64_frame_unwind_stop_reason (struct f { struct amd64_frame_cache *cache = amd64_frame_cache (this_frame, this_cache); @@ -129,7 +129,7 @@ Index: gdb-7.4.50.20120703/gdb/amd64-tdep.c if (!cache->base_p) return UNWIND_UNAVAILABLE; -@@ -2332,6 +2333,10 @@ amd64_frame_unwind_stop_reason (struct f +@@ -2367,6 +2368,10 @@ amd64_frame_unwind_stop_reason (struct f if (cache->base == 0) return UNWIND_OUTERMOST; @@ -140,30 +140,31 @@ Index: gdb-7.4.50.20120703/gdb/amd64-tdep.c return UNWIND_NO_REASON; } -@@ -2341,6 +2346,7 @@ amd64_frame_this_id (struct frame_info * +@@ -2498,6 +2503,7 @@ amd64_sigtramp_frame_this_id (struct fra { struct amd64_frame_cache *cache = - amd64_frame_cache (this_frame, this_cache); + amd64_sigtramp_frame_cache (this_frame, this_cache); + struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame)); if (!cache->base_p) - return; -@@ -2349,6 +2355,10 @@ amd64_frame_this_id (struct frame_info * - if (cache->base == 0) - return; - -+ /* Detect OS dependent outermost frames; such as `clone'. */ -+ if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame)) -+ return; -+ - (*this_id) = frame_id_build (cache->base + 16, cache->pc); + (*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame)); +@@ -2506,6 +2512,11 @@ amd64_sigtramp_frame_this_id (struct fra + /* This marks the outermost frame. */ + return; + } ++ else if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame)) ++ { ++ /* Detect OS dependent outermost frames; such as `clone'. */ ++ return; ++ } + else + (*this_id) = frame_id_build (cache->base + 16, get_frame_pc (this_frame)); } - -Index: gdb-7.4.50.20120703/gdb/i386-tdep.c +Index: gdb-7.6.90.20140127/gdb/i386-tdep.c =================================================================== ---- gdb-7.4.50.20120703.orig/gdb/i386-tdep.c 2012-06-18 19:31:34.000000000 +0200 -+++ gdb-7.4.50.20120703/gdb/i386-tdep.c 2012-07-03 17:32:12.339604409 +0200 -@@ -7655,6 +7655,9 @@ i386_gdbarch_init (struct gdbarch_info i +--- gdb-7.6.90.20140127.orig/gdb/i386-tdep.c 2014-02-04 23:40:06.267483473 +0100 ++++ gdb-7.6.90.20140127/gdb/i386-tdep.c 2014-02-04 23:43:33.048734974 +0100 +@@ -7830,6 +7830,9 @@ i386_gdbarch_init (struct gdbarch_info i tdep->xsave_xcr0_offset = -1; @@ -173,11 +174,11 @@ Index: gdb-7.4.50.20120703/gdb/i386-tdep.c tdep->record_regmap = i386_record_regmap; set_gdbarch_long_long_align_bit (gdbarch, 32); -Index: gdb-7.4.50.20120703/gdb/i386-tdep.h +Index: gdb-7.6.90.20140127/gdb/i386-tdep.h =================================================================== ---- gdb-7.4.50.20120703.orig/gdb/i386-tdep.h 2012-06-13 22:29:15.000000000 +0200 -+++ gdb-7.4.50.20120703/gdb/i386-tdep.h 2012-07-03 17:32:12.340604408 +0200 -@@ -219,6 +219,9 @@ struct gdbarch_tdep +--- gdb-7.6.90.20140127.orig/gdb/i386-tdep.h 2014-02-04 23:40:06.268483475 +0100 ++++ gdb-7.6.90.20140127/gdb/i386-tdep.h 2014-02-04 23:43:33.048734974 +0100 +@@ -192,6 +192,9 @@ struct gdbarch_tdep int (*i386_sysenter_record) (struct regcache *regcache); /* Parse syscall args. */ int (*i386_syscall_record) (struct regcache *regcache); @@ -187,10 +188,10 @@ Index: gdb-7.4.50.20120703/gdb/i386-tdep.h }; /* Floating-point registers. */ -Index: gdb-7.4.50.20120703/gdb/ia64-tdep.c +Index: gdb-7.6.90.20140127/gdb/ia64-tdep.c =================================================================== ---- gdb-7.4.50.20120703.orig/gdb/ia64-tdep.c 2012-07-03 17:30:09.000000000 +0200 -+++ gdb-7.4.50.20120703/gdb/ia64-tdep.c 2012-07-03 17:32:12.343604405 +0200 +--- gdb-7.6.90.20140127.orig/gdb/ia64-tdep.c 2014-02-04 23:40:06.270483477 +0100 ++++ gdb-7.6.90.20140127/gdb/ia64-tdep.c 2014-02-04 23:43:33.049734975 +0100 @@ -2176,6 +2176,138 @@ static const struct frame_unwind ia64_fr default_frame_sniffer }; @@ -330,7 +331,7 @@ Index: gdb-7.4.50.20120703/gdb/ia64-tdep.c /* Signal trampolines. */ static void -@@ -4146,6 +4278,7 @@ ia64_gdbarch_init (struct gdbarch_info i +@@ -4023,6 +4155,7 @@ ia64_gdbarch_init (struct gdbarch_info i set_gdbarch_dummy_id (gdbarch, ia64_dummy_id); set_gdbarch_unwind_pc (gdbarch, ia64_unwind_pc); @@ -338,10 +339,10 @@ Index: gdb-7.4.50.20120703/gdb/ia64-tdep.c #ifdef HAVE_LIBUNWIND_IA64_H frame_unwind_append_unwinder (gdbarch, &ia64_libunwind_sigtramp_frame_unwind); -Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/bt-clone-stop.c +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/bt-clone-stop.c 2012-07-03 17:32:12.344604404 +0200 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.c 2014-02-04 23:43:33.050734976 +0100 @@ -0,0 +1,39 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -382,10 +383,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/bt-clone-stop.c + for (;;) + pause(); +} -Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/bt-clone-stop.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2012-07-03 17:32:12.344604404 +0200 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2014-02-04 23:43:33.050734976 +0100 @@ -0,0 +1,61 @@ +# Copyright 2006 Free Software Foundation, Inc. + diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch index dfd5a1e..ffe0b40 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.6.50.20130731-cvs/gdb/exceptions.h +Index: gdb-7.6.90.20140127/gdb/exceptions.h =================================================================== ---- 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, +--- gdb-7.6.90.20140127.orig/gdb/exceptions.h 2014-02-06 17:31:00.148529736 +0100 ++++ gdb-7.6.90.20140127/gdb/exceptions.h 2014-02-06 17:31:17.560548525 +0100 +@@ -97,6 +97,9 @@ enum errors { + /* An undefined command was executed. */ + UNDEFINED_COMMAND_ERROR, + /* Attempt to load a core file as executable. */ + IS_CORE_ERROR, @@ -72,10 +72,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/exceptions.h /* Add more errors here. */ NR_ERRORS }; -Index: gdb-7.6.50.20130731-cvs/gdb/exec.c +Index: gdb-7.6.90.20140127/gdb/exec.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/exec.c 2014-02-06 17:30:58.266527708 +0100 ++++ gdb-7.6.90.20140127/gdb/exec.c 2014-02-06 17:31:00.149529737 +0100 @@ -34,6 +34,7 @@ #include "gdbthread.h" #include "progspace.h" @@ -84,7 +84,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/exec.c #include #include "readline/readline.h" -@@ -217,12 +218,27 @@ exec_file_attach (char *filename, int fr +@@ -228,12 +229,27 @@ exec_file_attach (char *filename, int fr if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) { @@ -115,11 +115,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/exec.c } if (build_section_table (exec_bfd, §ions, §ions_end)) -Index: gdb-7.6.50.20130731-cvs/gdb/main.c +Index: gdb-7.6.90.20140127/gdb/main.c =================================================================== ---- 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 { +--- gdb-7.6.90.20140127.orig/gdb/main.c 2014-02-06 17:30:58.267527709 +0100 ++++ gdb-7.6.90.20140127/gdb/main.c 2014-02-06 17:32:32.232629052 +0100 +@@ -307,6 +307,36 @@ typedef struct cmdarg { /* Define type VEC (cmdarg_s). */ DEF_VEC_O (cmdarg_s); @@ -156,7 +156,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/main.c static int captured_main (void *data) { -@@ -810,6 +840,8 @@ captured_main (void *data) +@@ -824,6 +854,8 @@ captured_main (void *data) { symarg = argv[optind]; execarg = argv[optind]; @@ -165,7 +165,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/main.c optind++; } -@@ -975,11 +1007,25 @@ captured_main (void *data) +@@ -987,11 +1019,25 @@ captured_main (void *data) && symarg != NULL && strcmp (execarg, symarg) == 0) { @@ -191,6 +191,6 @@ Index: gdb-7.6.50.20130731-cvs/gdb/main.c + as a core file. */ + if (catch_command_errors (func, execarg, !batch_flag, RETURN_MASK_ALL) + && core_bfd == NULL) - catch_command_errors (symbol_file_add_main, symarg, - !batch_flag, RETURN_MASK_ALL); + catch_command_errors_const (symbol_file_add_main, symarg, + !batch_flag, RETURN_MASK_ALL); } diff --git a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch index 617bef9..3378717 100644 --- a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +++ b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch @@ -1,8 +1,20 @@ -Index: gdb-7.4.50.20120602/gdb/elfread.c +Index: gdb-7.6.90.20140127/gdb/proc-service.list =================================================================== ---- gdb-7.4.50.20120602.orig/gdb/elfread.c 2012-06-02 21:35:09.669510757 +0200 -+++ gdb-7.4.50.20120602/gdb/elfread.c 2012-06-02 21:35:31.106502660 +0200 -@@ -1658,6 +1658,19 @@ build_id_to_filename (struct build_id *b +--- gdb-7.6.90.20140127.orig/gdb/proc-service.list 2014-02-06 17:32:42.810640320 +0100 ++++ gdb-7.6.90.20140127/gdb/proc-service.list 2014-02-06 17:33:35.406696964 +0100 +@@ -37,4 +37,7 @@ + ps_pstop; + ps_ptread; + ps_ptwrite; ++ ++ /* gdb-6.6-buildid-locate-rpm.patch */ ++ rpmsqEnable; + }; +Index: gdb-7.6.90.20140127/gdb/build-id.c +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/build-id.c 2014-02-06 17:30:14.230480264 +0100 ++++ gdb-7.6.90.20140127/gdb/build-id.c 2014-02-06 17:34:28.846754283 +0100 +@@ -677,6 +677,19 @@ build_id_to_filename (const struct elf_b #include #endif @@ -22,15 +34,3 @@ Index: gdb-7.4.50.20120602/gdb/elfread.c /* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files and avoid their duplicities during a single inferior run. */ -Index: gdb-7.4.50.20120602/gdb/proc-service.list -=================================================================== ---- gdb-7.4.50.20120602.orig/gdb/proc-service.list 2012-06-02 21:35:09.669510757 +0200 -+++ gdb-7.4.50.20120602/gdb/proc-service.list 2012-06-02 21:35:14.296508989 +0200 -@@ -37,4 +37,7 @@ - ps_pstop; - ps_ptread; - ps_ptwrite; -+ -+ /* gdb-6.6-buildid-locate-rpm.patch */ -+ rpmsqEnable; - }; diff --git a/gdb-6.6-buildid-locate-rpm-scl.patch b/gdb-6.6-buildid-locate-rpm-scl.patch index 0fe8877..d5533e8 100644 --- a/gdb-6.6-buildid-locate-rpm-scl.patch +++ b/gdb-6.6-buildid-locate-rpm-scl.patch @@ -1,9 +1,11 @@ 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 +Index: gdb-7.6.90.20140127/gdb/dwarf2read.c +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-02-06 18:28:23.756232026 +0100 ++++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-02-06 18:28:48.969259122 +0100 +@@ -3035,6 +3035,14 @@ read_index_from_section (struct objfile "set use-deprecated-index-sections on". */ if (version < 6 && !deprecated_ok) { @@ -18,7 +20,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=953585 static int warning_printed = 0; if (!warning_printed) { -@@ -2711,6 +2719,8 @@ to use the section anyway."), +@@ -3046,6 +3054,8 @@ to use the section anyway."), warning_printed = 1; } return 0; @@ -26,10 +28,12 @@ https://bugzilla.redhat.com/show_bug.cgi?id=953585 + } } /* 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; + of the TU (for symbols coming from TUs), +Index: gdb-7.6.90.20140127/gdb/build-id.c +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/build-id.c 2014-02-06 18:28:23.758232029 +0100 ++++ gdb-7.6.90.20140127/gdb/build-id.c 2014-02-06 18:28:26.814235312 +0100 +@@ -711,7 +711,7 @@ static int missing_rpm_list_entries; /* Returns the count of newly added rpms. */ static int @@ -38,7 +42,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=953585 { static int rpm_init_done = 0; rpmts ts; -@@ -1778,7 +1778,7 @@ missing_rpm_enlist (const char *filename +@@ -815,7 +815,7 @@ missing_rpm_enlist (const char *filename mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); if (mi != NULL) { @@ -47,7 +51,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=953585 { Header h; char *debuginfo, **slot, *s, *s2; -@@ -1897,6 +1897,35 @@ missing_rpm_enlist (const char *filename +@@ -933,6 +933,35 @@ missing_rpm_enlist (const char *filename xfree (debuginfo); count++; } @@ -83,7 +87,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=953585 rpmdbFreeIterator_p (mi); } -@@ -1907,6 +1936,19 @@ missing_rpm_enlist (const char *filename +@@ -943,6 +972,19 @@ missing_rpm_enlist (const char *filename } static int diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index 3192ee1..77b2ca4 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -1,7 +1,7 @@ -Index: gdb-7.6.50.20130731-cvs/gdb/event-top.c +Index: gdb-7.6.90.20140127/gdb/event-top.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/event-top.c 2014-02-06 17:18:26.965717210 +0100 ++++ gdb-7.6.90.20140127/gdb/event-top.c 2014-02-06 16:59:23.174474404 +0100 @@ -37,6 +37,7 @@ #include "gdbcmd.h" /* for dont_repeat() */ #include "annotate.h" @@ -10,16 +10,16 @@ Index: gdb-7.6.50.20130731-cvs/gdb/event-top.c /* readline include files. */ #include "readline/readline.h" -@@ -171,6 +172,8 @@ rl_callback_read_char_wrapper (gdb_clien +@@ -173,6 +174,8 @@ rl_callback_read_char_wrapper (gdb_clien void - cli_command_loop (void) + cli_command_loop (void *data) { + debug_flush_missing (); + display_gdb_prompt (0); /* Now it's time to start the event loop. */ -@@ -238,6 +241,8 @@ display_gdb_prompt (char *new_prompt) +@@ -240,6 +243,8 @@ display_gdb_prompt (char *new_prompt) /* Reset the nesting depth used when trace-commands is set. */ reset_command_nest_depth (); @@ -28,815 +28,916 @@ Index: gdb-7.6.50.20130731-cvs/gdb/event-top.c /* Each interpreter has its own rules on displaying the command prompt. */ if (!current_interp_display_prompt_p ()) -Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c +Index: gdb-7.6.90.20140127/gdb/symfile.h =================================================================== ---- 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" - #include "observer.h" -+#include "elf/external.h" - #include +--- gdb-7.6.90.20140127.orig/gdb/symfile.h 2014-02-06 17:18:33.865724666 +0100 ++++ gdb-7.6.90.20140127/gdb/symfile.h 2014-02-06 17:08:56.282099150 +0100 +@@ -557,6 +557,8 @@ extern struct cleanup *increment_reading + /* build-id support. */ + extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr); + extern void debug_print_missing (const char *binary, const char *debug); ++extern void debug_flush_missing (void); ++#define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file") - extern void _initialize_elfread (void); -@@ -1701,8 +1702,360 @@ build_id_to_filename (const struct elf_b - return retval; - } + /* From dwarf2read.c */ -+#ifdef HAVE_LIBRPM +Index: gdb-7.6.90.20140127/gdb/testsuite/lib/gdb.exp +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/gdb.exp 2014-02-06 17:18:26.969717214 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/lib/gdb.exp 2014-02-06 17:18:33.866724667 +0100 +@@ -1504,7 +1504,7 @@ proc default_gdb_start { } { + warning "Couldn't set the width to 0." + } + } +- # Turn off the missing warnings as the testsuite does not expect it. ++ # Turn off the missing RPMs warnings as the testsuite does not expect it. + send_gdb "set build-id-verbose 0\n" + gdb_expect 10 { + -re "$gdb_prompt $" { +Index: gdb-7.6.90.20140127/gdb/testsuite/lib/mi-support.exp +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/mi-support.exp 2014-02-06 17:18:26.970717215 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/lib/mi-support.exp 2014-02-06 17:18:33.867724668 +0100 +@@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } { + warning "Couldn't set the width to 0." + } + } +- # Turn off the missing warnings as the testsuite does not expect it. ++ # Turn off the missing RPMs warnings as the testsuite does not expect it. + 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.6.90.20140127/gdb/tui/tui-interp.c +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/tui/tui-interp.c 2014-02-06 17:18:26.970717215 +0100 ++++ gdb-7.6.90.20140127/gdb/tui/tui-interp.c 2014-02-06 17:18:33.867724668 +0100 +@@ -30,6 +30,7 @@ + #include "tui/tui.h" + #include "tui/tui-io.h" + #include "exceptions.h" ++#include "symfile.h" + + /* Set to 1 when the TUI mode must be activated when we first start + gdb. */ +Index: gdb-7.6.90.20140127/gdb/aclocal.m4 +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/aclocal.m4 2014-02-06 17:18:33.868724669 +0100 ++++ gdb-7.6.90.20140127/gdb/aclocal.m4 2014-02-06 17:09:49.877157405 +0100 +@@ -11,6 +11,221 @@ + # even the implied warranty of MERCHANTABILITY or FITNESS FOR A + # PARTICULAR PURPOSE. + ++# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- ++# serial 1 (pkg-config-0.24) ++# ++# Copyright © 2004 Scott James Remnant . ++# ++# 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. ++# ++# As a special exception to the GNU General Public License, if you ++# distribute this file as part of a program that contains a ++# configuration script generated by Autoconf, you may include it under ++# the same distribution terms that you use for the rest of that program. + -+#include -+#include -+#include -+#include -+#ifdef DLOPEN_LIBRPM -+#include -+#endif ++# PKG_PROG_PKG_CONFIG([MIN-VERSION]) ++# ---------------------------------- ++AC_DEFUN([PKG_PROG_PKG_CONFIG], ++[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) ++m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) ++m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) ++AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) ++AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) ++AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + -+/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files -+ and avoid their duplicities during a single inferior run. */ ++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then ++ AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) ++fi ++if test -n "$PKG_CONFIG"; then ++ _pkg_min_version=m4_default([$1], [0.9.0]) ++ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) ++ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then ++ AC_MSG_RESULT([yes]) ++ else ++ AC_MSG_RESULT([no]) ++ PKG_CONFIG="" ++ fi ++fi[]dnl ++])# PKG_PROG_PKG_CONFIG + -+static struct htab *missing_rpm_hash; ++# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) ++# ++# Check to see whether a particular set of modules exists. Similar ++# to PKG_CHECK_MODULES(), but does not set variables or print errors. ++# ++# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++# only at the first occurence in configure.ac, so if the first place ++# it's called might be skipped (such as if it is within an "if", you ++# have to call PKG_CHECK_EXISTS manually ++# -------------------------------------------------------------- ++AC_DEFUN([PKG_CHECK_EXISTS], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl ++if test -n "$PKG_CONFIG" && \ ++ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then ++ m4_default([$2], [:]) ++m4_ifvaln([$3], [else ++ $3])dnl ++fi]) + -+/* This MISSING_RPM_LIST tracker is used to collect and print as a single line -+ all the rpms right before the nearest GDB prompt. It gets cleared after -+ each such print (it is questionable if we should clear it after the print). -+ */ ++# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) ++# --------------------------------------------- ++m4_define([_PKG_CONFIG], ++[if test -n "$$1"; then ++ pkg_cv_[]$1="$$1" ++ elif test -n "$PKG_CONFIG"; then ++ PKG_CHECK_EXISTS([$3], ++ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ], ++ [pkg_failed=yes]) ++ else ++ pkg_failed=untried ++fi[]dnl ++])# _PKG_CONFIG + -+struct missing_rpm -+ { -+ struct missing_rpm *next; -+ char rpm[1]; -+ }; -+static struct missing_rpm *missing_rpm_list; -+static int missing_rpm_list_entries; ++# _PKG_SHORT_ERRORS_SUPPORTED ++# ----------------------------- ++AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi[]dnl ++])# _PKG_SHORT_ERRORS_SUPPORTED + -+/* Returns the count of newly added rpms. */ + -+static int -+missing_rpm_enlist (const char *filename) -+{ -+ static int rpm_init_done = 0; -+ rpmts ts; -+ rpmdbMatchIterator mi; -+ int count = 0; ++# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], ++# [ACTION-IF-NOT-FOUND]) ++# ++# ++# Note that if there is a possibility the first call to ++# PKG_CHECK_MODULES might not happen, you should be sure to include an ++# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac ++# ++# ++# -------------------------------------------------------------- ++AC_DEFUN([PKG_CHECK_MODULES], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl ++AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl ++AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + -+#ifdef DLOPEN_LIBRPM -+ /* Duplicate here the declarations to verify they match. The same sanity -+ check is present also in `configure.ac'. */ -+ extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); -+ static char *(*headerFormat_p) (Header h, const char * fmt, errmsg_t *errmsg); -+ extern int rpmReadConfigFiles(const char * file, const char * target); -+ static int (*rpmReadConfigFiles_p) (const char * file, const char * target); -+ extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); -+ static rpmdbMatchIterator (*rpmdbFreeIterator_p) (rpmdbMatchIterator mi); -+ extern Header rpmdbNextIterator(rpmdbMatchIterator mi); -+ static Header (*rpmdbNextIterator_p) (rpmdbMatchIterator mi); -+ extern rpmts rpmtsCreate(void); -+ static rpmts (*rpmtsCreate_p) (void); -+ extern rpmts rpmtsFree(rpmts ts); -+ static rpmts (*rpmtsFree_p) (rpmts ts); -+ extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, -+ const void * keyp, size_t keylen); -+ static rpmdbMatchIterator (*rpmtsInitIterator_p) (const rpmts ts, -+ rpmTag rpmtag, -+ const void *keyp, -+ size_t keylen); -+#else /* !DLOPEN_LIBRPM */ -+# define headerFormat_p headerFormat -+# define rpmReadConfigFiles_p rpmReadConfigFiles -+# define rpmdbFreeIterator_p rpmdbFreeIterator -+# define rpmdbNextIterator_p rpmdbNextIterator -+# define rpmtsCreate_p rpmtsCreate -+# define rpmtsFree_p rpmtsFree -+# define rpmtsInitIterator_p rpmtsInitIterator -+#endif /* !DLOPEN_LIBRPM */ ++pkg_failed=no ++AC_MSG_CHECKING([for $1]) + -+ gdb_assert (filename != NULL); ++_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) ++_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + -+ if (strcmp (filename, BUILD_ID_MAIN_EXECUTABLE_FILENAME) == 0) -+ return 0; ++m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS ++and $1[]_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details.]) + -+ if (filename[0] != '/') -+ { -+ warning (_("Ignoring non-absolute filename: <%s>"), filename); -+ return 0; -+ } ++if test $pkg_failed = yes; then ++ AC_MSG_RESULT([no]) ++ _PKG_SHORT_ERRORS_SUPPORTED ++ if test $_pkg_short_errors_supported = yes; then ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` ++ else ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + -+ if (!rpm_init_done) -+ { -+ static int init_tried; ++ m4_default([$4], [AC_MSG_ERROR( ++[Package requirements ($2) were not met: + -+ /* Already failed the initialization before? */ -+ if (init_tried) -+ return 0; -+ init_tried = 1; ++$$1_PKG_ERRORS + -+#ifdef DLOPEN_LIBRPM -+ { -+ void *h; ++Consider adjusting the PKG_CONFIG_PATH environment variable if you ++installed software in a non-standard prefix. + -+ h = dlopen (DLOPEN_LIBRPM, RTLD_LAZY); -+ if (!h) -+ { -+ warning (_("Unable to open \"%s\" (%s), " -+ "missing debuginfos notifications will not be displayed"), -+ DLOPEN_LIBRPM, dlerror ()); -+ return 0; -+ } ++_PKG_TEXT])[]dnl ++ ]) ++elif test $pkg_failed = untried; then ++ AC_MSG_RESULT([no]) ++ m4_default([$4], [AC_MSG_FAILURE( ++[The pkg-config script could not be found or is too old. Make sure it ++is in your PATH or set the PKG_CONFIG environment variable to the full ++path to pkg-config. + -+ if (!((headerFormat_p = dlsym (h, "headerFormat")) -+ && (rpmReadConfigFiles_p = dlsym (h, "rpmReadConfigFiles")) -+ && (rpmdbFreeIterator_p = dlsym (h, "rpmdbFreeIterator")) -+ && (rpmdbNextIterator_p = dlsym (h, "rpmdbNextIterator")) -+ && (rpmtsCreate_p = dlsym (h, "rpmtsCreate")) -+ && (rpmtsFree_p = dlsym (h, "rpmtsFree")) -+ && (rpmtsInitIterator_p = dlsym (h, "rpmtsInitIterator")))) -+ { -+ warning (_("Opened library \"%s\" is incompatible (%s), " -+ "missing debuginfos notifications will not be displayed"), -+ DLOPEN_LIBRPM, dlerror ()); -+ if (dlclose (h)) -+ warning (_("Error closing library \"%s\": %s\n"), DLOPEN_LIBRPM, -+ dlerror ()); -+ return 0; -+ } -+ } -+#endif /* DLOPEN_LIBRPM */ -+ -+ if (rpmReadConfigFiles_p (NULL, NULL) != 0) -+ { -+ warning (_("Error reading the rpm configuration files")); -+ return 0; -+ } ++_PKG_TEXT + -+ rpm_init_done = 1; -+ } ++To get pkg-config, see .])[]dnl ++ ]) ++else ++ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS ++ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS ++ AC_MSG_RESULT([yes]) ++ $3 ++fi[]dnl ++])# PKG_CHECK_MODULES + -+ ts = rpmtsCreate_p (); + -+ mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); -+ if (mi != NULL) -+ { -+ for (;;) -+ { -+ Header h; -+ char *debuginfo, **slot, *s, *s2; -+ errmsg_t err; -+ size_t srcrpmlen = sizeof (".src.rpm") - 1; -+ size_t debuginfolen = sizeof ("-debuginfo") - 1; -+ rpmdbMatchIterator mi_debuginfo; ++# PKG_INSTALLDIR(DIRECTORY) ++# ------------------------- ++# Substitutes the variable pkgconfigdir as the location where a module ++# should install pkg-config .pc files. By default the directory is ++# $libdir/pkgconfig, but the default can be changed by passing ++# DIRECTORY. The user can override through the --with-pkgconfigdir ++# parameter. ++AC_DEFUN([PKG_INSTALLDIR], ++[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) ++m4_pushdef([pkg_description], ++ [pkg-config installation directory @<:@]pkg_default[@:>@]) ++AC_ARG_WITH([pkgconfigdir], ++ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, ++ [with_pkgconfigdir=]pkg_default) ++AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) ++m4_popdef([pkg_default]) ++m4_popdef([pkg_description]) ++]) dnl PKG_INSTALLDIR ++ ++ ++# PKG_NOARCH_INSTALLDIR(DIRECTORY) ++# ------------------------- ++# Substitutes the variable noarch_pkgconfigdir as the location where a ++# module should install arch-independent pkg-config .pc files. By ++# default the directory is $datadir/pkgconfig, but the default can be ++# changed by passing DIRECTORY. The user can override through the ++# --with-noarch-pkgconfigdir parameter. ++AC_DEFUN([PKG_NOARCH_INSTALLDIR], ++[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) ++m4_pushdef([pkg_description], ++ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) ++AC_ARG_WITH([noarch-pkgconfigdir], ++ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, ++ [with_noarch_pkgconfigdir=]pkg_default) ++AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) ++m4_popdef([pkg_default]) ++m4_popdef([pkg_description]) ++]) dnl PKG_NOARCH_INSTALLDIR ++ ++ ++# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, ++# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) ++# ------------------------------------------- ++# Retrieves the value of the pkg-config variable for the given module. ++AC_DEFUN([PKG_CHECK_VAR], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl ++AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + -+ h = rpmdbNextIterator_p (mi); -+ if (h == NULL) -+ break; ++_PKG_CONFIG([$1], [variable="][$3]["], [$2]) ++AS_VAR_COPY([$1], [pkg_cv_][$1]) + -+ /* Verify the debuginfo file is not already installed. */ ++AS_VAR_IF([$1], [""], [$5], [$4])dnl ++])# PKG_CHECK_VAR + -+ debuginfo = headerFormat_p (h, "%{sourcerpm}-debuginfo.%{arch}", -+ &err); -+ if (!debuginfo) -+ { -+ warning (_("Error querying the rpm file `%s': %s"), filename, -+ err); -+ continue; -+ } -+ /* s = `.src.rpm-debuginfo.%{arch}' */ -+ s = strrchr (debuginfo, '-') - srcrpmlen; -+ s2 = NULL; -+ if (s > debuginfo && memcmp (s, ".src.rpm", srcrpmlen) == 0) -+ { -+ /* s2 = `-%{release}.src.rpm-debuginfo.%{arch}' */ -+ s2 = memrchr (debuginfo, '-', s - debuginfo); -+ } -+ if (s2) -+ { -+ /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */ -+ s2 = memrchr (debuginfo, '-', s2 - debuginfo); -+ } -+ if (!s2) -+ { -+ warning (_("Error querying the rpm file `%s': %s"), filename, -+ debuginfo); -+ xfree (debuginfo); -+ continue; -+ } -+ /* s = `.src.rpm-debuginfo.%{arch}' */ -+ /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */ -+ memmove (s2 + debuginfolen, s2, s - s2); -+ memcpy (s2, "-debuginfo", debuginfolen); -+ /* s = `XXXX.%{arch}' */ -+ /* strlen ("XXXX") == srcrpmlen + debuginfolen */ -+ /* s2 = `-debuginfo-%{version}-%{release}XX.%{arch}' */ -+ /* strlen ("XX") == srcrpmlen */ -+ memmove (s + debuginfolen, s + srcrpmlen + debuginfolen, -+ strlen (s + srcrpmlen + debuginfolen) + 1); -+ /* s = `-debuginfo-%{version}-%{release}.%{arch}' */ + # AM_AUX_DIR_EXPAND -*- Autoconf -*- + + # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +Index: gdb-7.6.90.20140127/gdb/config.in +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/config.in 2014-02-06 17:18:26.971717216 +0100 ++++ gdb-7.6.90.20140127/gdb/config.in 2014-02-06 17:18:33.868724669 +0100 +@@ -33,6 +33,9 @@ + /* Define to BFD's default target vector. */ + #undef DEFAULT_BFD_VEC + ++/* librpm version specific library name to dlopen. */ ++#undef DLOPEN_LIBRPM + -+ /* RPMDBI_PACKAGES requires keylen == sizeof (int). */ -+ /* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */ -+ mi_debuginfo = rpmtsInitIterator_p (ts, RPMDBI_LABEL, debuginfo, 0); -+ xfree (debuginfo); -+ if (mi_debuginfo) -+ { -+ rpmdbFreeIterator_p (mi_debuginfo); -+ count = 0; -+ break; -+ } + /* Define to 1 if translation of program messages to the user's native + language is requested. */ + #undef ENABLE_NLS +@@ -207,6 +210,9 @@ + /* Define if Python 2.7 is being used. */ + #undef HAVE_LIBPYTHON2_7 + ++/* Define if librpm library is being used. */ ++#undef HAVE_LIBRPM + -+ /* The allocated memory gets utilized below for MISSING_RPM_HASH. */ -+ debuginfo = headerFormat_p (h, -+ "%{name}-%{version}-%{release}.%{arch}", -+ &err); -+ if (!debuginfo) -+ { -+ warning (_("Error querying the rpm file `%s': %s"), filename, -+ err); -+ continue; -+ } + /* Define to 1 if you have the header file. */ + #undef HAVE_LIBUNWIND_IA64_H + +Index: gdb-7.6.90.20140127/gdb/configure +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/configure 2014-02-06 17:18:26.976717221 +0100 ++++ gdb-7.6.90.20140127/gdb/configure 2014-02-06 17:18:33.872724673 +0100 +@@ -689,6 +689,11 @@ PKGVERSION + HAVE_NATIVE_GCORE_TARGET + TARGET_OBS + subdirs ++RPM_LIBS ++RPM_CFLAGS ++PKG_CONFIG_LIBDIR ++PKG_CONFIG_PATH ++PKG_CONFIG + GDB_DATADIR + DEBUGDIR + MAKEINFO_EXTRA_FLAGS +@@ -792,6 +797,7 @@ with_gdb_datadir + with_relocated_sources + with_auto_load_dir + with_auto_load_safe_path ++with_rpm + enable_targets + enable_64_bit_bfd + enable_gdbcli +@@ -842,6 +848,11 @@ CPPFLAGS + CPP + MAKEINFO + MAKEINFOFLAGS ++PKG_CONFIG ++PKG_CONFIG_PATH ++PKG_CONFIG_LIBDIR ++RPM_CFLAGS ++RPM_LIBS + YACC + YFLAGS + XMKMF' +@@ -1512,6 +1523,8 @@ Optional Packages: + [--with-auto-load-dir] + --without-auto-load-safe-path + do not restrict auto-loaded files locations ++ --with-rpm query rpm database for missing debuginfos (yes/no, ++ def. auto=librpm.so) + --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets + --with-curses use the curses library instead of the termcap + library +@@ -1559,6 +1572,13 @@ Some influential environment variables: + MAKEINFO Parent configure detects if it is of sufficient version. + MAKEINFOFLAGS + Parameters for MAKEINFO. ++ PKG_CONFIG path to pkg-config utility ++ PKG_CONFIG_PATH ++ directories to add to pkg-config's search path ++ PKG_CONFIG_LIBDIR ++ path overriding pkg-config's built-in search path ++ RPM_CFLAGS C compiler flags for RPM, overriding pkg-config ++ RPM_LIBS linker flags for RPM, overriding pkg-config + 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. +@@ -5154,6 +5174,491 @@ _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 + $as_echo "$with_auto_load_safe_path" >&6; } + ++# Integration with rpm library to support missing debuginfo suggestions. ++# --without-rpm: Disable any rpm support. ++# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime. ++# Even with runtime missing `libname.so' GDB will still other run correctly. ++# Missing `libname.so' during ./configure will abort the configuration. ++# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific ++# minor version first such as `librpm-4.6.so' as minor version differences ++# mean API+ABI incompatibility. If the specific match versioned library name ++# could not be found still open dynamically at least `librpm.so'. ++# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try ++# to find librpm for compilation-time linking by pkg-config. GDB binary will ++# be probably linked with the version specific library (as `librpm-4.6.so'). ++# Failure to find librpm by pkg-config will abort the configuration. ++# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config ++# cannot find librpm use to the rpmless compilation (like `--without-rpm'). + -+ /* Base package name for `debuginfo-install'. We do not use the -+ `yum' command directly as the line -+ 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 -+ debuginfo-install is unable to install the debuginfo package if -+ the base name PKG binary rpm is not installed while for example -+ PKG-libs would be installed (RH Bug 467901). -+ FUTURE: After multiple debuginfo versions simultaneously installed -+ get supported the support for the VERSION-RELEASE tags handling -+ may need an update. */ + -+ if (missing_rpm_hash == NULL) -+ { -+ /* DEL_F is passed NULL as MISSING_RPM_LIST's HTAB_DELETE -+ should not deallocate the entries. */ ++# Check whether --with-rpm was given. ++if test "${with_rpm+set}" = set; then : ++ withval=$with_rpm; ++else ++ with_rpm="auto" ++fi + -+ missing_rpm_hash = htab_create_alloc (64, htab_hash_string, -+ (int (*) (const void *, const void *)) streq, -+ NULL, xcalloc, xfree); -+ } -+ slot = (char **) htab_find_slot (missing_rpm_hash, debuginfo, INSERT); -+ /* XCALLOC never returns NULL. */ -+ gdb_assert (slot != NULL); -+ if (*slot == NULL) -+ { -+ struct missing_rpm *missing_rpm; + -+ *slot = debuginfo; + -+ missing_rpm = xmalloc (sizeof (*missing_rpm) + strlen (debuginfo)); -+ strcpy (missing_rpm->rpm, debuginfo); -+ missing_rpm->next = missing_rpm_list; -+ missing_rpm_list = missing_rpm; -+ missing_rpm_list_entries++; -+ } -+ else -+ xfree (debuginfo); -+ count++; -+ } + -+ rpmdbFreeIterator_p (mi); -+ } ++if test "x$with_rpm" != "xno"; then ++ if test "x$with_rpm" = "xyes"; then ++ LIBRPM="librpm.so" ++ RPM_REQUIRE=true ++ DLOPEN_REQUIRE=false ++ elif test "x$with_rpm" = "xauto"; then ++ LIBRPM="librpm.so" ++ RPM_REQUIRE=false ++ DLOPEN_REQUIRE=false ++ else ++ LIBRPM="$with_rpm" ++ RPM_REQUIRE=true ++ DLOPEN_REQUIRE=true ++ fi ++ LIBRPM_STRING='"'"$LIBRPM"'"' + -+ rpmtsFree_p (ts); ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking specific librpm version" >&5 ++$as_echo_n "checking specific librpm version... " >&6; } ++ HAVE_DLOPEN_LIBRPM=false ++ save_LIBS="$LIBS" ++ LIBS="$LIBS -ldl" ++ if test "$cross_compiling" = yes; then : ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error "cannot run test program while cross compiling ++See \`config.log' for more details." "$LINENO" 5; } ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + -+ return count; -+} ++#include ++#include ++#include + -+static int -+missing_rpm_list_compar (const char *const *ap, const char *const *bp) ++int ++main () +{ -+ return strcoll (*ap, *bp); -+} + -+/* It returns a NULL-terminated array of strings needing to be FREEd. It may -+ also return only NULL. */ ++ void *h; ++ const char *const *rpmverp; ++ FILE *f; + -+static void -+missing_rpm_list_print (void) -+{ -+ char **array, **array_iter; -+ struct missing_rpm *list_iter; -+ struct cleanup *cleanups; ++ f = fopen ("conftest.out", "w"); ++ if (!f) ++ { ++ fprintf (stderr, "Cannot write \"%s\": %s\n", "conftest.out", ++ strerror (errno)); ++ return 1; ++ } ++ h = dlopen ($LIBRPM_STRING, RTLD_LAZY); ++ if (!h) ++ { ++ fprintf (stderr, "dlopen (\"%s\"): %s\n", $LIBRPM_STRING, dlerror ()); ++ return 1; ++ } ++ rpmverp = dlsym (h, "RPMVERSION"); ++ if (!rpmverp) ++ { ++ fprintf (stderr, "dlsym (\"RPMVERSION\"): %s\n", dlerror ()); ++ return 1; ++ } ++ fprintf (stderr, "RPMVERSION is: \""); ++ fprintf (stderr, "%s\"\n", *rpmverp); + -+ if (missing_rpm_list_entries == 0) -+ return; ++ /* Try to find the specific librpm version only for "librpm.so" as we do ++ not know how to assemble the version string otherwise. */ + -+ array = xmalloc (sizeof (*array) * missing_rpm_list_entries); -+ cleanups = make_cleanup (xfree, array); ++ if (strcmp ("librpm.so", $LIBRPM_STRING) != 0) ++ { ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ else ++ { ++ char *h2_name; ++ void *h2; ++ int major, minor; + -+ array_iter = array; -+ for (list_iter = missing_rpm_list; list_iter != NULL; -+ list_iter = list_iter->next) -+ { -+ *array_iter++ = list_iter->rpm; -+ } -+ gdb_assert (array_iter == array + missing_rpm_list_entries); ++ if (sscanf (*rpmverp, "%d.%d", &major, &minor) != 2) ++ { ++ fprintf (stderr, "Unable to parse RPMVERSION.\n"); ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ /* Avoid the square brackets by malloc. */ ++ h2_name = malloc (64); ++ sprintf (h2_name, "librpm-%d.%d.so", major, minor); ++ h2 = dlopen (h2_name, RTLD_LAZY); ++ if (!h2) ++ { ++ fprintf (stderr, "dlopen (\"%s\"): %s\n", h2_name, dlerror ()); ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ if (h2 != h) ++ { ++ fprintf (stderr, "dlopen of \"%s\" and \"%s\" are different.\n", ++ $LIBRPM_STRING, h2_name); ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ /* Found the valid .so name with a specific version. */ ++ fprintf (f, "%s\n", h2_name); ++ return 0; ++ } + -+ qsort (array, missing_rpm_list_entries, sizeof (*array), -+ (int (*) (const void *, const void *)) missing_rpm_list_compar); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : + -+ printf_unfiltered (_("Missing separate debuginfos, use: %s"), -+ "debuginfo-install"); -+ for (array_iter = array; array_iter < array + missing_rpm_list_entries; -+ array_iter++) -+ { -+ putchar_unfiltered (' '); -+ puts_unfiltered (*array_iter); -+ } -+ putchar_unfiltered ('\n'); ++ DLOPEN_LIBRPM="`cat conftest.out`" ++ if test "x$DLOPEN_LIBRPM" != "x"; then ++ HAVE_DLOPEN_LIBRPM=true ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLOPEN_LIBRPM" >&5 ++$as_echo "$DLOPEN_LIBRPM" >&6; } ++ fi + -+ while (missing_rpm_list != NULL) -+ { -+ list_iter = missing_rpm_list; -+ missing_rpm_list = list_iter->next; -+ xfree (list_iter); -+ } -+ missing_rpm_list_entries = 0; ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi + -+ do_cleanups (cleanups); -+} ++ rm -f conftest.out + -+static void -+missing_rpm_change (void) -+{ -+ debug_flush_missing (); + -+ gdb_assert (missing_rpm_list == NULL); -+ if (missing_rpm_hash != NULL) -+ { -+ htab_delete (missing_rpm_hash); -+ missing_rpm_hash = NULL; -+ } -+} + -+enum missing_exec -+ { -+ /* Init state. EXEC_BFD also still could be NULL. */ -+ MISSING_EXEC_NOT_TRIED, -+ /* We saw a non-NULL EXEC_BFD but RPM has no info about it. */ -+ MISSING_EXEC_NOT_FOUND, -+ /* We found EXEC_BFD by RPM and we either have its symbols (either embedded -+ or separate) or the main executable's RPM is now contained in -+ MISSING_RPM_HASH. */ -+ MISSING_EXEC_ENLISTED -+ }; -+static enum missing_exec missing_exec = MISSING_EXEC_NOT_TRIED; ++ if $HAVE_DLOPEN_LIBRPM; then + -+#endif /* HAVE_LIBRPM */ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking rpm library API compatibility" >&5 ++$as_echo_n "checking rpm library API compatibility... " >&6; } ++ # The compilation requires -Werror to verify anything. ++ save_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -Werror" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + -+void -+debug_flush_missing (void) ++/* Duplicate here the declarations to verify they match "elfread.c". */ ++#include ++#include ++#include ++#include ++extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); ++extern int rpmReadConfigFiles(const char * file, const char * target); ++extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); ++extern Header rpmdbNextIterator(rpmdbMatchIterator mi); ++extern rpmts rpmtsCreate(void); ++extern rpmts rpmtsFree(rpmts ts); ++extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, ++ const void * keyp, size_t keylen); ++ ++int ++main () +{ -+#ifdef HAVE_LIBRPM -+ missing_rpm_list_print (); -+#endif -+} + - /* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages -- Try to install the hash file ... -+ yum --enablerepo='*debug*' install ... - avoidance. */ - - struct missing_filepair -@@ -1756,11 +2109,17 @@ missing_filepair_change (void) - /* All their memory came just from missing_filepair_OBSTACK. */ - missing_filepair_hash = NULL; - } -+#ifdef HAVE_LIBRPM -+ missing_exec = MISSING_EXEC_NOT_TRIED; -+#endif - } - - static void - debug_print_executable_changed (void) - { -+#ifdef HAVE_LIBRPM -+ missing_rpm_change (); -+#endif - missing_filepair_change (); - } - -@@ -1827,14 +2186,34 @@ debug_print_missing (const char *binary, - - *slot = missing_filepair; - -- /* We do not collect and flush these messages as each such message -- already requires its own separate lines. */ -+#ifdef HAVE_LIBRPM -+ if (missing_exec == MISSING_EXEC_NOT_TRIED) -+ { -+ char *execfilename; - -- fprintf_unfiltered (gdb_stdlog, -- _("Missing separate debuginfo for %s\n"), binary); -- if (debug != NULL) -- fprintf_unfiltered (gdb_stdlog, _("Try to install the hash file %s\n"), -- debug); -+ execfilename = get_exec_file (0); -+ if (execfilename != NULL) -+ { -+ if (missing_rpm_enlist (execfilename) == 0) -+ missing_exec = MISSING_EXEC_NOT_FOUND; -+ else -+ missing_exec = MISSING_EXEC_ENLISTED; -+ } -+ } -+ if (missing_exec != MISSING_EXEC_ENLISTED) -+ if ((binary[0] == 0 || missing_rpm_enlist (binary) == 0) -+ && (debug == NULL || missing_rpm_enlist (debug) == 0)) -+#endif /* HAVE_LIBRPM */ -+ { -+ /* We do not collect and flush these messages as each such message -+ already requires its own separate lines. */ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : + -+ fprintf_unfiltered (gdb_stdlog, -+ _("Missing separate debuginfo for %s\n"), binary); -+ if (debug != NULL) -+ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"), -+ "yum --enablerepo='*debug*' install", debug); -+ } - } - - static char * -Index: gdb-7.6.50.20130731-cvs/gdb/symfile.h -=================================================================== ---- 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); -+#define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file") - - /* From dwarf2read.c */ - -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/gdb.exp -=================================================================== ---- 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." - } - } -- # Turn off the missing warnings as the testsuite does not expect it. -+ # Turn off the missing RPMs warnings as the testsuite does not expect it. - send_gdb "set build-id-verbose 0\n" - gdb_expect 10 { - -re "$gdb_prompt $" { -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/mi-support.exp -=================================================================== ---- 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." - } - } -- # Turn off the missing warnings as the testsuite does not expect it. -+ # Turn off the missing RPMs warnings as the testsuite does not expect it. - 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.6.50.20130731-cvs/gdb/tui/tui-interp.c -=================================================================== ---- 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" - #include "exceptions.h" -+#include "symfile.h" - - /* Set to 1 when the TUI mode must be activated when we first start - gdb. */ -Index: gdb-7.6.50.20130731-cvs/gdb/aclocal.m4 -=================================================================== ---- 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. - -+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -+# serial 1 (pkg-config-0.24) -+# -+# Copyright © 2004 Scott James Remnant . -+# -+# 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. -+# -+# As a special exception to the GNU General Public License, if you -+# distribute this file as part of a program that contains a -+# configuration script generated by Autoconf, you may include it under -+# the same distribution terms that you use for the rest of that program. -+ -+# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -+# ---------------------------------- -+AC_DEFUN([PKG_PROG_PKG_CONFIG], -+[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -+m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) -+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) -+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) ++ LIBRPM_COMPAT=true ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } + -+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then -+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -+fi -+if test -n "$PKG_CONFIG"; then -+ _pkg_min_version=m4_default([$1], [0.9.0]) -+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) -+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then -+ AC_MSG_RESULT([yes]) -+ else -+ AC_MSG_RESULT([no]) -+ PKG_CONFIG="" -+ fi -+fi[]dnl -+])# PKG_PROG_PKG_CONFIG ++else + -+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -+# -+# Check to see whether a particular set of modules exists. Similar -+# to PKG_CHECK_MODULES(), but does not set variables or print errors. -+# -+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -+# only at the first occurence in configure.ac, so if the first place -+# it's called might be skipped (such as if it is within an "if", you -+# have to call PKG_CHECK_EXISTS manually -+# -------------------------------------------------------------- -+AC_DEFUN([PKG_CHECK_EXISTS], -+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -+if test -n "$PKG_CONFIG" && \ -+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then -+ m4_default([$2], [:]) -+m4_ifvaln([$3], [else -+ $3])dnl -+fi]) ++ LIBRPM_COMPAT=false ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + -+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -+# --------------------------------------------- -+m4_define([_PKG_CONFIG], -+[if test -n "$$1"; then -+ pkg_cv_[]$1="$$1" -+ elif test -n "$PKG_CONFIG"; then -+ PKG_CHECK_EXISTS([$3], -+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], -+ [pkg_failed=yes]) -+ else -+ pkg_failed=untried -+fi[]dnl -+])# _PKG_CONFIG ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ CFLAGS="$save_CFLAGS" + -+# _PKG_SHORT_ERRORS_SUPPORTED -+# ----------------------------- -+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -+[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes -+else -+ _pkg_short_errors_supported=no -+fi[]dnl -+])# _PKG_SHORT_ERRORS_SUPPORTED ++ if ! $LIBRPM_COMPAT; then ++ HAVE_DLOPEN_LIBRPM=false ++ fi ++ fi + ++ if $HAVE_DLOPEN_LIBRPM; then ++ DLOPEN_LIBRPM_STRING='"'"$DLOPEN_LIBRPM"'"' + -+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -+# [ACTION-IF-NOT-FOUND]) -+# -+# -+# Note that if there is a possibility the first call to -+# PKG_CHECK_MODULES might not happen, you should be sure to include an -+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -+# -+# -+# -------------------------------------------------------------- -+AC_DEFUN([PKG_CHECK_MODULES], -+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl ++cat >>confdefs.h <<_ACEOF ++#define DLOPEN_LIBRPM $DLOPEN_LIBRPM_STRING ++_ACEOF + -+pkg_failed=no -+AC_MSG_CHECKING([for $1]) + -+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -+_PKG_CONFIG([$1][_LIBS], [libs], [$2]) ++$as_echo "#define HAVE_LIBRPM 1" >>confdefs.h + -+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -+and $1[]_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details.]) ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ LIBS="$save_LIBS" ++ if $DLOPEN_REQUIRE; then ++ as_fn_error "Specific name $LIBRPM was requested but it could not be opened." "$LINENO" 5 ++ fi + -+if test $pkg_failed = yes; then -+ AC_MSG_RESULT([no]) -+ _PKG_SHORT_ERRORS_SUPPORTED -+ if test $_pkg_short_errors_supported = yes; then -+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` -+ else -+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` -+ fi -+ # Put the nasty error message in config.log where it belongs -+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + -+ m4_default([$4], [AC_MSG_ERROR( -+[Package requirements ($2) were not met: + -+$$1_PKG_ERRORS + -+Consider adjusting the PKG_CONFIG_PATH environment variable if you -+installed software in a non-standard prefix. + -+_PKG_TEXT]) -+ ]) -+elif test $pkg_failed = untried; then -+ AC_MSG_RESULT([no]) -+ m4_default([$4], [AC_MSG_FAILURE( -+[The pkg-config script could not be found or is too old. Make sure it -+is in your PATH or set the PKG_CONFIG environment variable to the full -+path to pkg-config. + -+_PKG_TEXT ++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. ++set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $PKG_CONFIG in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS + -+To get pkg-config, see .]) -+ ]) ++ ;; ++esac ++fi ++PKG_CONFIG=$ac_cv_path_PKG_CONFIG ++if test -n "$PKG_CONFIG"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 ++$as_echo "$PKG_CONFIG" >&6; } +else -+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS -+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS -+ AC_MSG_RESULT([yes]) -+ $3 -+fi[]dnl -+])# PKG_CHECK_MODULES ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi + - # AM_CONDITIONAL -*- Autoconf -*- - - # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -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: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 - -+/* librpm version specific library name to dlopen. */ -+#undef DLOPEN_LIBRPM + - /* Define to 1 if translation of program messages to the user's native - language is requested. */ - #undef ENABLE_NLS -@@ -219,6 +222,9 @@ - /* Define if Python 2.7 is being used. */ - #undef HAVE_LIBPYTHON2_7 - -+/* Define if librpm library is being used. */ -+#undef HAVE_LIBRPM ++fi ++if test -z "$ac_cv_path_PKG_CONFIG"; then ++ ac_pt_PKG_CONFIG=$PKG_CONFIG ++ # Extract the first word of "pkg-config", so it can be a program name with args. ++set dummy pkg-config; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $ac_pt_PKG_CONFIG in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS + - /* Define to 1 if you have the header file. */ - #undef HAVE_LIBUNWIND_IA64_H - -Index: gdb-7.6.50.20130731-cvs/gdb/configure -=================================================================== ---- 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 -+RPM_CFLAGS -+PKG_CONFIG_LIBDIR -+PKG_CONFIG_PATH -+PKG_CONFIG - GDB_DATADIR - DEBUGDIR - MAKEINFO_EXTRA_FLAGS -@@ -789,6 +794,7 @@ with_gdb_datadir - with_relocated_sources - with_auto_load_dir - with_auto_load_safe_path -+with_rpm - enable_targets - enable_64_bit_bfd - enable_gdbcli -@@ -839,6 +845,11 @@ CPPFLAGS - CPP - MAKEINFO - MAKEINFOFLAGS -+PKG_CONFIG -+PKG_CONFIG_PATH -+PKG_CONFIG_LIBDIR -+RPM_CFLAGS -+RPM_LIBS - YACC - YFLAGS - XMKMF' -@@ -1509,6 +1520,8 @@ Optional Packages: - [--with-auto-load-dir] - --without-auto-load-safe-path - do not restrict auto-loaded files locations -+ --with-rpm query rpm database for missing debuginfos (yes/no, -+ def. auto=librpm.so) - --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets - --with-curses use the curses library instead of the termcap - library -@@ -1556,6 +1569,13 @@ Some influential environment variables: - MAKEINFO Parent configure detects if it is of sufficient version. - MAKEINFOFLAGS - Parameters for MAKEINFO. -+ PKG_CONFIG path to pkg-config utility -+ PKG_CONFIG_PATH -+ directories to add to pkg-config's search path -+ PKG_CONFIG_LIBDIR -+ path overriding pkg-config's built-in search path -+ RPM_CFLAGS C compiler flags for RPM, overriding pkg-config -+ RPM_LIBS linker flags for RPM, overriding pkg-config - 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. -@@ -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; } - -+# Integration with rpm library to support missing debuginfo suggestions. -+# --without-rpm: Disable any rpm support. -+# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime. -+# Even with runtime missing `libname.so' GDB will still other run correctly. -+# Missing `libname.so' during ./configure will abort the configuration. -+# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific -+# minor version first such as `librpm-4.6.so' as minor version differences -+# mean API+ABI incompatibility. If the specific match versioned library name -+# could not be found still open dynamically at least `librpm.so'. -+# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try -+# to find librpm for compilation-time linking by pkg-config. GDB binary will -+# be probably linked with the version specific library (as `librpm-4.6.so'). -+# Failure to find librpm by pkg-config will abort the configuration. -+# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config -+# cannot find librpm use to the rpmless compilation (like `--without-rpm'). ++ ;; ++esac ++fi ++ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG ++if test -n "$ac_pt_PKG_CONFIG"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 ++$as_echo "$ac_pt_PKG_CONFIG" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_pt_PKG_CONFIG" = x; then ++ PKG_CONFIG="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ PKG_CONFIG=$ac_pt_PKG_CONFIG ++ fi ++else ++ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" ++fi ++ ++fi ++if test -n "$PKG_CONFIG"; then ++ _pkg_min_version=0.9.0 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 ++$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } ++ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ PKG_CONFIG="" ++ fi ++fi + ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RPM" >&5 ++$as_echo_n "checking for RPM... " >&6; } + -+# Check whether --with-rpm was given. -+if test "${with_rpm+set}" = set; then : -+ withval=$with_rpm; ++if test -n "$RPM_CFLAGS"; then ++ pkg_cv_RPM_CFLAGS="$RPM_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rpm\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "rpm") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_RPM_CFLAGS=`$PKG_CONFIG --cflags "rpm" 2>/dev/null` +else -+ with_rpm="auto" ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$RPM_LIBS"; then ++ pkg_cv_RPM_LIBS="$RPM_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rpm\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "rpm") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_RPM_LIBS=`$PKG_CONFIG --libs "rpm" 2>/dev/null` ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried +fi + + + ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + -+if test "x$with_rpm" != "xno"; then -+ if test "x$with_rpm" = "xyes"; then -+ LIBRPM="librpm.so" -+ RPM_REQUIRE=true -+ DLOPEN_REQUIRE=false -+ elif test "x$with_rpm" = "xauto"; then -+ LIBRPM="librpm.so" -+ RPM_REQUIRE=false -+ DLOPEN_REQUIRE=false -+ else -+ LIBRPM="$with_rpm" -+ RPM_REQUIRE=true -+ DLOPEN_REQUIRE=true -+ fi -+ LIBRPM_STRING='"'"$LIBRPM"'"' ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ RPM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "rpm" 2>&1` ++ else ++ RPM_PKG_ERRORS=`$PKG_CONFIG --print-errors "rpm" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$RPM_PKG_ERRORS" >&5 + -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking specific librpm version" >&5 -+$as_echo_n "checking specific librpm version... " >&6; } -+ HAVE_DLOPEN_LIBRPM=false -+ save_LIBS="$LIBS" -+ LIBS="$LIBS -ldl" -+ if test "$cross_compiling" = yes; then : -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error "cannot run test program while cross compiling -+See \`config.log' for more details." "$LINENO" 5; } ++ HAVE_LIBRPM=false ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ HAVE_LIBRPM=false +else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ ++ RPM_CFLAGS=$pkg_cv_RPM_CFLAGS ++ RPM_LIBS=$pkg_cv_RPM_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ HAVE_LIBRPM=true ++fi + -+#include -+#include -+#include ++ if $HAVE_LIBRPM; then + -+int -+main () -+{ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking rpm library API compatibility" >&5 ++$as_echo_n "checking rpm library API compatibility... " >&6; } ++ # The compilation requires -Werror to verify anything. ++ save_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -Werror" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + -+ void *h; -+ const char *const *rpmverp; -+ FILE *f; ++/* Duplicate here the declarations to verify they match "elfread.c". */ ++#include ++#include ++#include ++#include ++extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); ++extern int rpmReadConfigFiles(const char * file, const char * target); ++extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); ++extern Header rpmdbNextIterator(rpmdbMatchIterator mi); ++extern rpmts rpmtsCreate(void); ++extern rpmts rpmtsFree(rpmts ts); ++extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, ++ const void * keyp, size_t keylen); ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++ LIBRPM_COMPAT=true ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ++else ++ ++ LIBRPM_COMPAT=false ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ CFLAGS="$save_CFLAGS" ++ ++ if ! $LIBRPM_COMPAT; then ++ HAVE_LIBRPM=false ++ RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB" ++ fi ++ fi ++ ++ if $HAVE_LIBRPM; then ++ ++$as_echo "#define HAVE_LIBRPM 1" >>confdefs.h ++ ++ CFLAGS="$CFLAGS $RPM_CFLAGS" ++ LIBS="$LIBS $RPM_LIBS" ++ else ++ if $RPM_REQUIRE; then ++ as_fn_error "$RPM_PKG_ERRORS" "$LINENO" 5 ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $RPM_PKG_ERRORS" >&5 ++$as_echo "$as_me: WARNING: $RPM_PKG_ERRORS" >&2;} ++ fi ++ fi ++ fi ++fi ++ + + + subdirs="$subdirs testsuite" +Index: gdb-7.6.90.20140127/gdb/configure.ac +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/configure.ac 2014-02-06 17:18:26.977717223 +0100 ++++ gdb-7.6.90.20140127/gdb/configure.ac 2014-02-06 17:18:33.873724674 +0100 +@@ -165,6 +165,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap + [Directories safe to hold auto-loaded files.]) + AC_MSG_RESULT([$with_auto_load_safe_path]) + ++# Integration with rpm library to support missing debuginfo suggestions. ++# --without-rpm: Disable any rpm support. ++# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime. ++# Even with runtime missing `libname.so' GDB will still other run correctly. ++# Missing `libname.so' during ./configure will abort the configuration. ++# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific ++# minor version first such as `librpm-4.6.so' as minor version differences ++# mean API+ABI incompatibility. If the specific match versioned library name ++# could not be found still open dynamically at least `librpm.so'. ++# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try ++# to find librpm for compilation-time linking by pkg-config. GDB binary will ++# be probably linked with the version specific library (as `librpm-4.6.so'). ++# Failure to find librpm by pkg-config will abort the configuration. ++# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config ++# cannot find librpm use to the rpmless compilation (like `--without-rpm'). ++ ++AC_ARG_WITH([rpm], ++ [AS_HELP_STRING([--with-rpm], ++ [query rpm database for missing debuginfos (yes/no, def. auto=librpm.so)])], [], [with_rpm="auto"]) ++ ++m4_pattern_allow([^AC_MSG_ERROR$]) ++m4_pattern_allow([^AC_MSG_WARN$]) ++if test "x$with_rpm" != "xno"; then ++ if test "x$with_rpm" = "xyes"; then ++ LIBRPM="librpm.so" ++ RPM_REQUIRE=true ++ DLOPEN_REQUIRE=false ++ elif test "x$with_rpm" = "xauto"; then ++ LIBRPM="librpm.so" ++ RPM_REQUIRE=false ++ DLOPEN_REQUIRE=false ++ else ++ LIBRPM="$with_rpm" ++ RPM_REQUIRE=true ++ DLOPEN_REQUIRE=true ++ fi ++ LIBRPM_STRING='"'"$LIBRPM"'"' ++ ++ AC_MSG_CHECKING([specific librpm version]) ++ HAVE_DLOPEN_LIBRPM=false ++ save_LIBS="$LIBS" ++ LIBS="$LIBS -ldl" ++ AC_RUN_IFELSE(AC_LANG_PROGRAM([[ ++#include ++#include ++#include ++ ]], [[ ++ void *h; ++ const char *const *rpmverp; ++ FILE *f; + + f = fopen ("conftest.out", "w"); + if (!f) @@ -901,39 +1002,21 @@ Index: gdb-7.6.50.20130731-cvs/gdb/configure + fprintf (f, "%s\n", h2_name); + return 0; + } -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ ++ ]]), [ + DLOPEN_LIBRPM="`cat conftest.out`" + if test "x$DLOPEN_LIBRPM" != "x"; then + HAVE_DLOPEN_LIBRPM=true -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLOPEN_LIBRPM" >&5 -+$as_echo "$DLOPEN_LIBRPM" >&6; } ++ AC_MSG_RESULT($DLOPEN_LIBRPM) + fi -+ -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ ++ ]) + rm -f conftest.out + -+ -+ -+ if $HAVE_DLOPEN_LIBRPM; then -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking rpm library API compatibility" >&5 -+$as_echo_n "checking rpm library API compatibility... " >&6; } ++ m4_define([CHECK_LIBRPM_COMPAT], [ ++ AC_MSG_CHECKING([rpm library API compatibility]) + # The compilation requires -Werror to verify anything. + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ ++ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ +/* Duplicate here the declarations to verify they match "elfread.c". */ +#include +#include @@ -947,31 +1030,18 @@ Index: gdb-7.6.50.20130731-cvs/gdb/configure +extern rpmts rpmtsFree(rpmts ts); +extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, + const void * keyp, size_t keylen); -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ ++ ]]), [ + LIBRPM_COMPAT=true -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ -+else -+ ++ AC_MSG_RESULT(yes) ++ ], [ + LIBRPM_COMPAT=false -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ AC_MSG_RESULT(no) ++ ]) + CFLAGS="$save_CFLAGS" ++ ]) + ++ if $HAVE_DLOPEN_LIBRPM; then ++ CHECK_LIBRPM_COMPAT + if ! $LIBRPM_COMPAT; then + HAVE_DLOPEN_LIBRPM=false + fi @@ -979,498 +1049,485 @@ Index: gdb-7.6.50.20130731-cvs/gdb/configure + + if $HAVE_DLOPEN_LIBRPM; then + DLOPEN_LIBRPM_STRING='"'"$DLOPEN_LIBRPM"'"' -+ -+cat >>confdefs.h <<_ACEOF -+#define DLOPEN_LIBRPM $DLOPEN_LIBRPM_STRING -+_ACEOF -+ -+ -+$as_echo "#define HAVE_LIBRPM 1" >>confdefs.h -+ ++ AC_DEFINE_UNQUOTED(DLOPEN_LIBRPM, $DLOPEN_LIBRPM_STRING, [librpm version specific library name to dlopen.]) ++ AC_DEFINE(HAVE_LIBRPM, 1, [Define if librpm library is being used.]) + else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } ++ AC_MSG_RESULT(no) + LIBS="$save_LIBS" + if $DLOPEN_REQUIRE; then -+ as_fn_error "Specific name $LIBRPM was requested but it could not be opened." "$LINENO" 5 ++ AC_MSG_ERROR([Specific name $LIBRPM was requested but it could not be opened.]) + fi ++ PKG_CHECK_MODULES(RPM, rpm, [HAVE_LIBRPM=true], [HAVE_LIBRPM=false]) + ++ if $HAVE_LIBRPM; then ++ CHECK_LIBRPM_COMPAT ++ if ! $LIBRPM_COMPAT; then ++ HAVE_LIBRPM=false ++ RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB" ++ fi ++ fi + ++ if $HAVE_LIBRPM; then ++ AC_DEFINE(HAVE_LIBRPM, 1, [Define if librpm library is being used.]) ++ CFLAGS="$CFLAGS $RPM_CFLAGS" ++ LIBS="$LIBS $RPM_LIBS" ++ else ++ if $RPM_REQUIRE; then ++ AC_MSG_ERROR($RPM_PKG_ERRORS) ++ else ++ AC_MSG_WARN($RPM_PKG_ERRORS) ++ fi ++ fi ++ fi ++fi ++ + AC_CONFIG_SUBDIRS(testsuite) + + # Check whether to support alternative target configurations +Index: gdb-7.6.90.20140127/gdb/corelow.c +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/corelow.c 2014-02-06 17:18:26.978717224 +0100 ++++ gdb-7.6.90.20140127/gdb/corelow.c 2014-02-06 17:18:33.873724674 +0100 +@@ -315,7 +315,7 @@ build_id_locate_exec (int from_tty) + symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; + } + else +- debug_print_missing (_("the main executable file"), build_id_filename); ++ debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename); + + do_cleanups (back_to); + +Index: gdb-7.6.90.20140127/gdb/build-id.c +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/build-id.c 2014-02-06 17:18:26.842717077 +0100 ++++ gdb-7.6.90.20140127/gdb/build-id.c 2014-02-06 17:08:18.341060295 +0100 +@@ -32,6 +32,7 @@ + #include "gdbcmd.h" + #include "observer.h" + #include ++#include "elf/external.h" + + #define BUILD_ID_VERBOSE_NONE 0 + #define BUILD_ID_VERBOSE_FILENAMES 1 +@@ -666,8 +667,360 @@ build_id_to_filename (const struct elf_b + return result; + } + ++#ifdef HAVE_LIBRPM + ++#include ++#include ++#include ++#include ++#ifdef DLOPEN_LIBRPM ++#include ++#endif + ++/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files ++ and avoid their duplicities during a single inferior run. */ + ++static struct htab *missing_rpm_hash; + -+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then -+ if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $PKG_CONFIG in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS ++/* This MISSING_RPM_LIST tracker is used to collect and print as a single line ++ all the rpms right before the nearest GDB prompt. It gets cleared after ++ each such print (it is questionable if we should clear it after the print). ++ */ + -+ ;; -+esac -+fi -+PKG_CONFIG=$ac_cv_path_PKG_CONFIG -+if test -n "$PKG_CONFIG"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -+$as_echo "$PKG_CONFIG" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi ++struct missing_rpm ++ { ++ struct missing_rpm *next; ++ char rpm[1]; ++ }; ++static struct missing_rpm *missing_rpm_list; ++static int missing_rpm_list_entries; + ++/* Returns the count of newly added rpms. */ + -+fi -+if test -z "$ac_cv_path_PKG_CONFIG"; then -+ ac_pt_PKG_CONFIG=$PKG_CONFIG -+ # Extract the first word of "pkg-config", so it can be a program name with args. -+set dummy pkg-config; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $ac_pt_PKG_CONFIG in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS ++static int ++missing_rpm_enlist (const char *filename) ++{ ++ static int rpm_init_done = 0; ++ rpmts ts; ++ rpmdbMatchIterator mi; ++ int count = 0; + -+ ;; -+esac -+fi -+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -+if test -n "$ac_pt_PKG_CONFIG"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -+$as_echo "$ac_pt_PKG_CONFIG" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi ++#ifdef DLOPEN_LIBRPM ++ /* Duplicate here the declarations to verify they match. The same sanity ++ check is present also in `configure.ac'. */ ++ extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); ++ static char *(*headerFormat_p) (Header h, const char * fmt, errmsg_t *errmsg); ++ extern int rpmReadConfigFiles(const char * file, const char * target); ++ static int (*rpmReadConfigFiles_p) (const char * file, const char * target); ++ extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); ++ static rpmdbMatchIterator (*rpmdbFreeIterator_p) (rpmdbMatchIterator mi); ++ extern Header rpmdbNextIterator(rpmdbMatchIterator mi); ++ static Header (*rpmdbNextIterator_p) (rpmdbMatchIterator mi); ++ extern rpmts rpmtsCreate(void); ++ static rpmts (*rpmtsCreate_p) (void); ++ extern rpmts rpmtsFree(rpmts ts); ++ static rpmts (*rpmtsFree_p) (rpmts ts); ++ extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, ++ const void * keyp, size_t keylen); ++ static rpmdbMatchIterator (*rpmtsInitIterator_p) (const rpmts ts, ++ rpmTag rpmtag, ++ const void *keyp, ++ size_t keylen); ++#else /* !DLOPEN_LIBRPM */ ++# define headerFormat_p headerFormat ++# define rpmReadConfigFiles_p rpmReadConfigFiles ++# define rpmdbFreeIterator_p rpmdbFreeIterator ++# define rpmdbNextIterator_p rpmdbNextIterator ++# define rpmtsCreate_p rpmtsCreate ++# define rpmtsFree_p rpmtsFree ++# define rpmtsInitIterator_p rpmtsInitIterator ++#endif /* !DLOPEN_LIBRPM */ + -+ if test "x$ac_pt_PKG_CONFIG" = x; then -+ PKG_CONFIG="" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ PKG_CONFIG=$ac_pt_PKG_CONFIG -+ fi -+else -+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -+fi ++ gdb_assert (filename != NULL); + -+fi -+if test -n "$PKG_CONFIG"; then -+ _pkg_min_version=0.9.0 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } -+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ PKG_CONFIG="" -+ fi -+fi ++ if (strcmp (filename, BUILD_ID_MAIN_EXECUTABLE_FILENAME) == 0) ++ return 0; + -+pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RPM" >&5 -+$as_echo_n "checking for RPM... " >&6; } ++ if (filename[0] != '/') ++ { ++ warning (_("Ignoring non-absolute filename: <%s>"), filename); ++ return 0; ++ } + -+if test -n "$RPM_CFLAGS"; then -+ pkg_cv_RPM_CFLAGS="$RPM_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rpm\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "rpm") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_RPM_CFLAGS=`$PKG_CONFIG --cflags "rpm" 2>/dev/null` -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+if test -n "$RPM_LIBS"; then -+ pkg_cv_RPM_LIBS="$RPM_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rpm\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "rpm") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_RPM_LIBS=`$PKG_CONFIG --libs "rpm" 2>/dev/null` -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi ++ if (!rpm_init_done) ++ { ++ static int init_tried; + ++ /* Already failed the initialization before? */ ++ if (init_tried) ++ return 0; ++ init_tried = 1; + ++#ifdef DLOPEN_LIBRPM ++ { ++ void *h; + -+if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } ++ h = dlopen (DLOPEN_LIBRPM, RTLD_LAZY); ++ if (!h) ++ { ++ warning (_("Unable to open \"%s\" (%s), " ++ "missing debuginfos notifications will not be displayed"), ++ DLOPEN_LIBRPM, dlerror ()); ++ return 0; ++ } + -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes -+else -+ _pkg_short_errors_supported=no -+fi -+ if test $_pkg_short_errors_supported = yes; then -+ RPM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "rpm" 2>&1` -+ else -+ RPM_PKG_ERRORS=`$PKG_CONFIG --print-errors "rpm" 2>&1` -+ fi -+ # Put the nasty error message in config.log where it belongs -+ echo "$RPM_PKG_ERRORS" >&5 ++ if (!((headerFormat_p = dlsym (h, "headerFormat")) ++ && (rpmReadConfigFiles_p = dlsym (h, "rpmReadConfigFiles")) ++ && (rpmdbFreeIterator_p = dlsym (h, "rpmdbFreeIterator")) ++ && (rpmdbNextIterator_p = dlsym (h, "rpmdbNextIterator")) ++ && (rpmtsCreate_p = dlsym (h, "rpmtsCreate")) ++ && (rpmtsFree_p = dlsym (h, "rpmtsFree")) ++ && (rpmtsInitIterator_p = dlsym (h, "rpmtsInitIterator")))) ++ { ++ warning (_("Opened library \"%s\" is incompatible (%s), " ++ "missing debuginfos notifications will not be displayed"), ++ DLOPEN_LIBRPM, dlerror ()); ++ if (dlclose (h)) ++ warning (_("Error closing library \"%s\": %s\n"), DLOPEN_LIBRPM, ++ dlerror ()); ++ return 0; ++ } ++ } ++#endif /* DLOPEN_LIBRPM */ + -+ HAVE_LIBRPM=false -+elif test $pkg_failed = untried; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ HAVE_LIBRPM=false -+else -+ RPM_CFLAGS=$pkg_cv_RPM_CFLAGS -+ RPM_LIBS=$pkg_cv_RPM_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ HAVE_LIBRPM=true -+fi ++ if (rpmReadConfigFiles_p (NULL, NULL) != 0) ++ { ++ warning (_("Error reading the rpm configuration files")); ++ return 0; ++ } + -+ if $HAVE_LIBRPM; then ++ rpm_init_done = 1; ++ } + -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking rpm library API compatibility" >&5 -+$as_echo_n "checking rpm library API compatibility... " >&6; } -+ # The compilation requires -Werror to verify anything. -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -Werror" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ ++ ts = rpmtsCreate_p (); + -+/* Duplicate here the declarations to verify they match "elfread.c". */ -+#include -+#include -+#include -+#include -+extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); -+extern int rpmReadConfigFiles(const char * file, const char * target); -+extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); -+extern Header rpmdbNextIterator(rpmdbMatchIterator mi); -+extern rpmts rpmtsCreate(void); -+extern rpmts rpmtsFree(rpmts ts); -+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, -+ const void * keyp, size_t keylen); ++ mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); ++ if (mi != NULL) ++ { ++ for (;;) ++ { ++ Header h; ++ char *debuginfo, **slot, *s, *s2; ++ errmsg_t err; ++ size_t srcrpmlen = sizeof (".src.rpm") - 1; ++ size_t debuginfolen = sizeof ("-debuginfo") - 1; ++ rpmdbMatchIterator mi_debuginfo; + -+int -+main () -+{ ++ h = rpmdbNextIterator_p (mi); ++ if (h == NULL) ++ break; + -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : ++ /* Verify the debuginfo file is not already installed. */ + -+ LIBRPM_COMPAT=true -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } ++ debuginfo = headerFormat_p (h, "%{sourcerpm}-debuginfo.%{arch}", ++ &err); ++ if (!debuginfo) ++ { ++ warning (_("Error querying the rpm file `%s': %s"), filename, ++ err); ++ continue; ++ } ++ /* s = `.src.rpm-debuginfo.%{arch}' */ ++ s = strrchr (debuginfo, '-') - srcrpmlen; ++ s2 = NULL; ++ if (s > debuginfo && memcmp (s, ".src.rpm", srcrpmlen) == 0) ++ { ++ /* s2 = `-%{release}.src.rpm-debuginfo.%{arch}' */ ++ s2 = memrchr (debuginfo, '-', s - debuginfo); ++ } ++ if (s2) ++ { ++ /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */ ++ s2 = memrchr (debuginfo, '-', s2 - debuginfo); ++ } ++ if (!s2) ++ { ++ warning (_("Error querying the rpm file `%s': %s"), filename, ++ debuginfo); ++ xfree (debuginfo); ++ continue; ++ } ++ /* s = `.src.rpm-debuginfo.%{arch}' */ ++ /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */ ++ memmove (s2 + debuginfolen, s2, s - s2); ++ memcpy (s2, "-debuginfo", debuginfolen); ++ /* s = `XXXX.%{arch}' */ ++ /* strlen ("XXXX") == srcrpmlen + debuginfolen */ ++ /* s2 = `-debuginfo-%{version}-%{release}XX.%{arch}' */ ++ /* strlen ("XX") == srcrpmlen */ ++ memmove (s + debuginfolen, s + srcrpmlen + debuginfolen, ++ strlen (s + srcrpmlen + debuginfolen) + 1); ++ /* s = `-debuginfo-%{version}-%{release}.%{arch}' */ + -+else ++ /* RPMDBI_PACKAGES requires keylen == sizeof (int). */ ++ /* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */ ++ mi_debuginfo = rpmtsInitIterator_p (ts, RPMDBI_LABEL, debuginfo, 0); ++ xfree (debuginfo); ++ if (mi_debuginfo) ++ { ++ rpmdbFreeIterator_p (mi_debuginfo); ++ count = 0; ++ break; ++ } + -+ LIBRPM_COMPAT=false -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } ++ /* The allocated memory gets utilized below for MISSING_RPM_HASH. */ ++ debuginfo = headerFormat_p (h, ++ "%{name}-%{version}-%{release}.%{arch}", ++ &err); ++ if (!debuginfo) ++ { ++ warning (_("Error querying the rpm file `%s': %s"), filename, ++ err); ++ continue; ++ } + -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ CFLAGS="$save_CFLAGS" ++ /* Base package name for `debuginfo-install'. We do not use the ++ `yum' command directly as the line ++ 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 ++ debuginfo-install is unable to install the debuginfo package if ++ the base name PKG binary rpm is not installed while for example ++ PKG-libs would be installed (RH Bug 467901). ++ FUTURE: After multiple debuginfo versions simultaneously installed ++ get supported the support for the VERSION-RELEASE tags handling ++ may need an update. */ + -+ if ! $LIBRPM_COMPAT; then -+ HAVE_LIBRPM=false -+ RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB" -+ fi -+ fi ++ if (missing_rpm_hash == NULL) ++ { ++ /* DEL_F is passed NULL as MISSING_RPM_LIST's HTAB_DELETE ++ should not deallocate the entries. */ + -+ if $HAVE_LIBRPM; then ++ missing_rpm_hash = htab_create_alloc (64, htab_hash_string, ++ (int (*) (const void *, const void *)) streq, ++ NULL, xcalloc, xfree); ++ } ++ slot = (char **) htab_find_slot (missing_rpm_hash, debuginfo, INSERT); ++ /* XCALLOC never returns NULL. */ ++ gdb_assert (slot != NULL); ++ if (*slot == NULL) ++ { ++ struct missing_rpm *missing_rpm; + -+$as_echo "#define HAVE_LIBRPM 1" >>confdefs.h ++ *slot = debuginfo; + -+ CFLAGS="$CFLAGS $RPM_CFLAGS" -+ LIBS="$LIBS $RPM_LIBS" -+ else -+ if $RPM_REQUIRE; then -+ as_fn_error "$RPM_PKG_ERRORS" "$LINENO" 5 -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $RPM_PKG_ERRORS" >&5 -+$as_echo "$as_me: WARNING: $RPM_PKG_ERRORS" >&2;} -+ fi -+ fi -+ fi -+fi ++ missing_rpm = xmalloc (sizeof (*missing_rpm) + strlen (debuginfo)); ++ strcpy (missing_rpm->rpm, debuginfo); ++ missing_rpm->next = missing_rpm_list; ++ missing_rpm_list = missing_rpm; ++ missing_rpm_list_entries++; ++ } ++ else ++ xfree (debuginfo); ++ count++; ++ } + - - - subdirs="$subdirs testsuite" -Index: gdb-7.6.50.20130731-cvs/gdb/configure.ac -=================================================================== ---- 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]) - -+# Integration with rpm library to support missing debuginfo suggestions. -+# --without-rpm: Disable any rpm support. -+# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime. -+# Even with runtime missing `libname.so' GDB will still other run correctly. -+# Missing `libname.so' during ./configure will abort the configuration. -+# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific -+# minor version first such as `librpm-4.6.so' as minor version differences -+# mean API+ABI incompatibility. If the specific match versioned library name -+# could not be found still open dynamically at least `librpm.so'. -+# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try -+# to find librpm for compilation-time linking by pkg-config. GDB binary will -+# be probably linked with the version specific library (as `librpm-4.6.so'). -+# Failure to find librpm by pkg-config will abort the configuration. -+# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config -+# cannot find librpm use to the rpmless compilation (like `--without-rpm'). ++ rpmdbFreeIterator_p (mi); ++ } + -+AC_ARG_WITH([rpm], -+ [AS_HELP_STRING([--with-rpm], -+ [query rpm database for missing debuginfos (yes/no, def. auto=librpm.so)])], [], [with_rpm="auto"]) ++ rpmtsFree_p (ts); + -+m4_pattern_allow([^AC_MSG_ERROR$]) -+m4_pattern_allow([^AC_MSG_WARN$]) -+if test "x$with_rpm" != "xno"; then -+ if test "x$with_rpm" = "xyes"; then -+ LIBRPM="librpm.so" -+ RPM_REQUIRE=true -+ DLOPEN_REQUIRE=false -+ elif test "x$with_rpm" = "xauto"; then -+ LIBRPM="librpm.so" -+ RPM_REQUIRE=false -+ DLOPEN_REQUIRE=false -+ else -+ LIBRPM="$with_rpm" -+ RPM_REQUIRE=true -+ DLOPEN_REQUIRE=true -+ fi -+ LIBRPM_STRING='"'"$LIBRPM"'"' ++ return count; ++} + -+ AC_MSG_CHECKING([specific librpm version]) -+ HAVE_DLOPEN_LIBRPM=false -+ save_LIBS="$LIBS" -+ LIBS="$LIBS -ldl" -+ AC_RUN_IFELSE(AC_LANG_PROGRAM([[ -+#include -+#include -+#include -+ ]], [[ -+ void *h; -+ const char *const *rpmverp; -+ FILE *f; ++static int ++missing_rpm_list_compar (const char *const *ap, const char *const *bp) ++{ ++ return strcoll (*ap, *bp); ++} + -+ f = fopen ("conftest.out", "w"); -+ if (!f) -+ { -+ fprintf (stderr, "Cannot write \"%s\": %s\n", "conftest.out", -+ strerror (errno)); -+ return 1; -+ } -+ h = dlopen ($LIBRPM_STRING, RTLD_LAZY); -+ if (!h) -+ { -+ fprintf (stderr, "dlopen (\"%s\"): %s\n", $LIBRPM_STRING, dlerror ()); -+ return 1; -+ } -+ rpmverp = dlsym (h, "RPMVERSION"); -+ if (!rpmverp) -+ { -+ fprintf (stderr, "dlsym (\"RPMVERSION\"): %s\n", dlerror ()); -+ return 1; -+ } -+ fprintf (stderr, "RPMVERSION is: \""); -+ fprintf (stderr, "%s\"\n", *rpmverp); ++/* It returns a NULL-terminated array of strings needing to be FREEd. It may ++ also return only NULL. */ + -+ /* Try to find the specific librpm version only for "librpm.so" as we do -+ not know how to assemble the version string otherwise. */ ++static void ++missing_rpm_list_print (void) ++{ ++ char **array, **array_iter; ++ struct missing_rpm *list_iter; ++ struct cleanup *cleanups; + -+ if (strcmp ("librpm.so", $LIBRPM_STRING) != 0) -+ { -+ fprintf (f, "%s\n", $LIBRPM_STRING); -+ return 0; -+ } -+ else -+ { -+ char *h2_name; -+ void *h2; -+ int major, minor; ++ if (missing_rpm_list_entries == 0) ++ return; + -+ if (sscanf (*rpmverp, "%d.%d", &major, &minor) != 2) -+ { -+ fprintf (stderr, "Unable to parse RPMVERSION.\n"); -+ fprintf (f, "%s\n", $LIBRPM_STRING); -+ return 0; -+ } -+ /* Avoid the square brackets by malloc. */ -+ h2_name = malloc (64); -+ sprintf (h2_name, "librpm-%d.%d.so", major, minor); -+ h2 = dlopen (h2_name, RTLD_LAZY); -+ if (!h2) -+ { -+ fprintf (stderr, "dlopen (\"%s\"): %s\n", h2_name, dlerror ()); -+ fprintf (f, "%s\n", $LIBRPM_STRING); -+ return 0; -+ } -+ if (h2 != h) -+ { -+ fprintf (stderr, "dlopen of \"%s\" and \"%s\" are different.\n", -+ $LIBRPM_STRING, h2_name); -+ fprintf (f, "%s\n", $LIBRPM_STRING); -+ return 0; -+ } -+ /* Found the valid .so name with a specific version. */ -+ fprintf (f, "%s\n", h2_name); -+ return 0; -+ } -+ ]]), [ -+ DLOPEN_LIBRPM="`cat conftest.out`" -+ if test "x$DLOPEN_LIBRPM" != "x"; then -+ HAVE_DLOPEN_LIBRPM=true -+ AC_MSG_RESULT($DLOPEN_LIBRPM) -+ fi -+ ]) -+ rm -f conftest.out ++ array = xmalloc (sizeof (*array) * missing_rpm_list_entries); ++ cleanups = make_cleanup (xfree, array); + -+ m4_define([CHECK_LIBRPM_COMPAT], [ -+ AC_MSG_CHECKING([rpm library API compatibility]) -+ # The compilation requires -Werror to verify anything. -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -Werror" -+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ -+/* Duplicate here the declarations to verify they match "elfread.c". */ -+#include -+#include -+#include -+#include -+extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); -+extern int rpmReadConfigFiles(const char * file, const char * target); -+extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); -+extern Header rpmdbNextIterator(rpmdbMatchIterator mi); -+extern rpmts rpmtsCreate(void); -+extern rpmts rpmtsFree(rpmts ts); -+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, -+ const void * keyp, size_t keylen); -+ ]]), [ -+ LIBRPM_COMPAT=true -+ AC_MSG_RESULT(yes) -+ ], [ -+ LIBRPM_COMPAT=false -+ AC_MSG_RESULT(no) -+ ]) -+ CFLAGS="$save_CFLAGS" -+ ]) ++ array_iter = array; ++ for (list_iter = missing_rpm_list; list_iter != NULL; ++ list_iter = list_iter->next) ++ { ++ *array_iter++ = list_iter->rpm; ++ } ++ gdb_assert (array_iter == array + missing_rpm_list_entries); + -+ if $HAVE_DLOPEN_LIBRPM; then -+ CHECK_LIBRPM_COMPAT -+ if ! $LIBRPM_COMPAT; then -+ HAVE_DLOPEN_LIBRPM=false -+ fi -+ fi ++ qsort (array, missing_rpm_list_entries, sizeof (*array), ++ (int (*) (const void *, const void *)) missing_rpm_list_compar); + -+ if $HAVE_DLOPEN_LIBRPM; then -+ DLOPEN_LIBRPM_STRING='"'"$DLOPEN_LIBRPM"'"' -+ AC_DEFINE_UNQUOTED(DLOPEN_LIBRPM, $DLOPEN_LIBRPM_STRING, [librpm version specific library name to dlopen.]) -+ AC_DEFINE(HAVE_LIBRPM, 1, [Define if librpm library is being used.]) -+ else -+ AC_MSG_RESULT(no) -+ LIBS="$save_LIBS" -+ if $DLOPEN_REQUIRE; then -+ AC_MSG_ERROR([Specific name $LIBRPM was requested but it could not be opened.]) -+ fi -+ PKG_CHECK_MODULES(RPM, rpm, [HAVE_LIBRPM=true], [HAVE_LIBRPM=false]) ++ printf_unfiltered (_("Missing separate debuginfos, use: %s"), ++ "debuginfo-install"); ++ for (array_iter = array; array_iter < array + missing_rpm_list_entries; ++ array_iter++) ++ { ++ putchar_unfiltered (' '); ++ puts_unfiltered (*array_iter); ++ } ++ putchar_unfiltered ('\n'); + -+ if $HAVE_LIBRPM; then -+ CHECK_LIBRPM_COMPAT -+ if ! $LIBRPM_COMPAT; then -+ HAVE_LIBRPM=false -+ RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB" -+ fi -+ fi ++ while (missing_rpm_list != NULL) ++ { ++ list_iter = missing_rpm_list; ++ missing_rpm_list = list_iter->next; ++ xfree (list_iter); ++ } ++ missing_rpm_list_entries = 0; + -+ if $HAVE_LIBRPM; then -+ AC_DEFINE(HAVE_LIBRPM, 1, [Define if librpm library is being used.]) -+ CFLAGS="$CFLAGS $RPM_CFLAGS" -+ LIBS="$LIBS $RPM_LIBS" -+ else -+ if $RPM_REQUIRE; then -+ AC_MSG_ERROR($RPM_PKG_ERRORS) -+ else -+ AC_MSG_WARN($RPM_PKG_ERRORS) -+ fi -+ fi -+ fi -+fi -+ - AC_CONFIG_SUBDIRS(testsuite) ++ do_cleanups (cleanups); ++} ++ ++static void ++missing_rpm_change (void) ++{ ++ debug_flush_missing (); ++ ++ gdb_assert (missing_rpm_list == NULL); ++ if (missing_rpm_hash != NULL) ++ { ++ htab_delete (missing_rpm_hash); ++ missing_rpm_hash = NULL; ++ } ++} ++ ++enum missing_exec ++ { ++ /* Init state. EXEC_BFD also still could be NULL. */ ++ MISSING_EXEC_NOT_TRIED, ++ /* We saw a non-NULL EXEC_BFD but RPM has no info about it. */ ++ MISSING_EXEC_NOT_FOUND, ++ /* We found EXEC_BFD by RPM and we either have its symbols (either embedded ++ or separate) or the main executable's RPM is now contained in ++ MISSING_RPM_HASH. */ ++ MISSING_EXEC_ENLISTED ++ }; ++static enum missing_exec missing_exec = MISSING_EXEC_NOT_TRIED; ++ ++#endif /* HAVE_LIBRPM */ ++ ++void ++debug_flush_missing (void) ++{ ++#ifdef HAVE_LIBRPM ++ missing_rpm_list_print (); ++#endif ++} ++ + /* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages +- Try to install the hash file ... ++ yum --enablerepo='*debug*' install ... + avoidance. */ - # Check whether to support alternative target configurations -Index: gdb-7.6.50.20130731-cvs/gdb/corelow.c -=================================================================== ---- 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; + struct missing_filepair +@@ -721,11 +1074,17 @@ missing_filepair_change (void) + /* All their memory came just from missing_filepair_OBSTACK. */ + missing_filepair_hash = NULL; } - else -- debug_print_missing (_("the main executable file"), build_id_filename); -+ debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename); ++#ifdef HAVE_LIBRPM ++ missing_exec = MISSING_EXEC_NOT_TRIED; ++#endif + } - do_cleanups (back_to); + static void + debug_print_executable_changed (void) + { ++#ifdef HAVE_LIBRPM ++ missing_rpm_change (); ++#endif + missing_filepair_change (); + } + +@@ -792,14 +1151,34 @@ debug_print_missing (const char *binary, + + *slot = missing_filepair; + +- /* We do not collect and flush these messages as each such message +- already requires its own separate lines. */ ++#ifdef HAVE_LIBRPM ++ if (missing_exec == MISSING_EXEC_NOT_TRIED) ++ { ++ char *execfilename; + +- fprintf_unfiltered (gdb_stdlog, +- _("Missing separate debuginfo for %s\n"), binary); +- if (debug != NULL) +- fprintf_unfiltered (gdb_stdlog, _("Try to install the hash file %s\n"), +- debug); ++ execfilename = get_exec_file (0); ++ if (execfilename != NULL) ++ { ++ if (missing_rpm_enlist (execfilename) == 0) ++ missing_exec = MISSING_EXEC_NOT_FOUND; ++ else ++ missing_exec = MISSING_EXEC_ENLISTED; ++ } ++ } ++ if (missing_exec != MISSING_EXEC_ENLISTED) ++ if ((binary[0] == 0 || missing_rpm_enlist (binary) == 0) ++ && (debug == NULL || missing_rpm_enlist (debug) == 0)) ++#endif /* HAVE_LIBRPM */ ++ { ++ /* We do not collect and flush these messages as each such message ++ already requires its own separate lines. */ ++ ++ fprintf_unfiltered (gdb_stdlog, ++ _("Missing separate debuginfo for %s\n"), binary); ++ if (debug != NULL) ++ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"), ++ "yum --enablerepo='*debug*' install", debug); ++ } + } + /* See build-id.h. */ diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index 0b967fd..d3bc4a5 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -1,18 +1,19 @@ -Index: gdb-7.6.50.20130731-cvs/gdb/corelow.c +Index: gdb-7.6.90.20140127/gdb/corelow.c =================================================================== ---- 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 @@ +--- gdb-7.6.90.20140127.orig/gdb/corelow.c 2014-01-27 02:57:53.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/corelow.c 2014-02-06 16:46:52.261646499 +0100 +@@ -48,6 +48,10 @@ #include "gdb_bfd.h" #include "completer.h" #include "filestuff.h" +#include "auxv.h" +#include "elf/common.h" +#include "gdbcmd.h" ++#include "build-id.h" #ifndef O_LARGEFILE #define O_LARGEFILE 0 -@@ -273,6 +276,53 @@ add_to_thread_list (bfd *abfd, asection +@@ -271,6 +275,53 @@ add_to_thread_list (bfd *abfd, asection inferior_ptid = ptid; /* Yes, make it current. */ } @@ -44,7 +45,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/corelow.c + file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer + directly to the separate debug info file. */ + -+ execfilename = build_id_to_filename (build_id, &build_id_filename, 0); ++ execfilename = build_id_to_filename (build_id, &build_id_filename); + make_cleanup (xfree, build_id_filename); + + if (execfilename != NULL) @@ -66,7 +67,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/corelow.c /* This routine opens and sets up the core file bfd. */ static void -@@ -411,6 +461,14 @@ core_open (char *filename, int from_tty) +@@ -409,6 +460,14 @@ core_open (char *filename, int from_tty) switch_to_thread (thread->ptid); } @@ -81,7 +82,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/corelow.c post_create_inferior (&core_ops, from_tty); /* Now go through the target stack looking for threads since there -@@ -974,4 +1032,11 @@ _initialize_corelow (void) +@@ -980,4 +1039,11 @@ _initialize_corelow (void) init_core_ops (); add_target_with_completer (&core_ops, filename_completer); @@ -93,11 +94,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/corelow.c + NULL, NULL, NULL, + &setlist, &showlist); } -Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo +Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo =================================================================== ---- 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. +--- gdb-7.6.90.20140127.orig/gdb/doc/gdb.texinfo 2014-02-06 16:46:51.804645989 +0100 ++++ gdb-7.6.90.20140127/gdb/doc/gdb.texinfo 2014-02-06 16:46:52.110646331 +0100 +@@ -17413,6 +17413,27 @@ information files. @end table @@ -125,11 +126,19 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/solib-svr4.c +Index: gdb-7.6.90.20140127/gdb/solib-svr4.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/solib-svr4.c 2014-01-27 02:57:53.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/solib-svr4.c 2014-02-06 16:49:27.508819174 +0100 +@@ -47,6 +47,7 @@ + #include "exceptions.h" + #include "gdb_bfd.h" + #include "probe.h" ++#include "build-id.h" + + static struct link_map_offsets *svr4_fetch_link_map_offsets (void); + static int svr4_have_link_map_offsets (void); +@@ -1369,9 +1370,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD continue; } @@ -151,7 +160,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c + + /* Missing the build-id matching separate debug info file + would be handled while SO_NAME gets loaded. */ -+ name = build_id_to_filename (build_id, &build_id_filename, 0); ++ name = build_id_to_filename (build_id, &build_id_filename); + if (name != NULL) + { + strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1); @@ -185,27 +194,160 @@ Index: gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c xfree (buffer); /* If this entry has no name, or its name matches the name -Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c +Index: gdb-7.6.90.20140127/gdb/elfread.c =================================================================== ---- 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" - #include "gdb_bfd.h" +--- gdb-7.6.90.20140127.orig/gdb/elfread.c 2014-01-27 02:57:53.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/elfread.c 2014-02-06 16:46:52.249646486 +0100 +@@ -1316,9 +1316,10 @@ elf_symfile_read (struct objfile *objfil + && objfile->separate_debug_objfile == NULL + && objfile->separate_debug_objfile_backlink == NULL) + { +- char *debugfile; ++ char *debugfile, *build_id_filename; + +- debugfile = find_separate_debug_file_by_buildid (objfile); ++ debugfile = find_separate_debug_file_by_buildid (objfile, ++ &build_id_filename); + + if (debugfile == NULL) + debugfile = find_separate_debug_file_by_debuglink (objfile); +@@ -1332,6 +1333,12 @@ elf_symfile_read (struct objfile *objfil + symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile); + do_cleanups (cleanup); + } ++ /* Check if any separate debug info has been extracted out. */ ++ else if (bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink") ++ != NULL) ++ debug_print_missing (objfile_name (objfile), build_id_filename); ++ ++ xfree (build_id_filename); + } + } + +Index: gdb-7.6.90.20140127/gdb/symfile.h +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/symfile.h 2014-01-27 02:57:53.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/symfile.h 2014-02-06 16:46:52.250646487 +0100 +@@ -554,6 +554,10 @@ void free_symfile_segment_data (struct s + + extern struct cleanup *increment_reading_symtab (void); + ++/* build-id support. */ ++extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr); ++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.6.90.20140127/gdb/testsuite/lib/gdb.exp +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/gdb.exp 2014-02-06 16:46:51.643645810 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/lib/gdb.exp 2014-02-06 16:46:52.251646488 +0100 +@@ -1504,6 +1504,16 @@ proc default_gdb_start { } { + warning "Couldn't set the width to 0." + } + } ++ # Turn off the missing warnings as the testsuite does not expect it. ++ send_gdb "set build-id-verbose 0\n" ++ gdb_expect 10 { ++ -re "$gdb_prompt $" { ++ verbose "Disabled the missing debug infos warnings." 2 ++ } ++ timeout { ++ warning "Could not disable the missing debug infos warnings.." ++ } ++ } + return 0 + } + +Index: gdb-7.6.90.20140127/gdb/testsuite/lib/mi-support.exp +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/mi-support.exp 2014-01-27 02:57:54.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/lib/mi-support.exp 2014-02-06 16:46:52.252646489 +0100 +@@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } { + warning "Couldn't set the width to 0." + } + } ++ # Turn off the missing warnings as the testsuite does not expect it. ++ 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$" { ++ verbose "Disabled the missing debug infos warnings." 2 ++ } ++ timeout { ++ warning "Could not disable the missing debug infos warnings.." ++ } ++ } + # 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.6.90.20140127/gdb/objfiles.h +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/objfiles.h 2014-01-27 02:57:53.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/objfiles.h 2014-02-06 16:46:52.113646334 +0100 +@@ -436,6 +436,10 @@ struct objfile + + #define OBJF_NOT_FILENAME (1 << 6) + ++/* This file was loaded according to the BUILD_ID_CORE_LOADS rules. */ ++ ++#define OBJF_BUILD_ID_CORE_LOADED (1 << 12) ++ + /* Declarations for functions defined in objfiles.c */ + + extern struct objfile *allocate_objfile (bfd *, const char *name, int); +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/corefile.exp +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.base/corefile.exp 2014-01-27 02:57:54.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/corefile.exp 2014-02-06 16:46:52.113646334 +0100 +@@ -281,3 +281,33 @@ gdb_test_multiple "core-file $corefile" + pass $test + } + } ++ ++ ++# Test auto-loading of binary files through build-id from the core file. ++set buildid [build_id_debug_filename_get $binfile] ++set wholetest "binfile found by build-id" ++if {$buildid == ""} { ++ untested "$wholetest (binary has no build-id)" ++} else { ++ gdb_exit ++ gdb_start ++ ++ regsub {\.debug$} $buildid {} buildid ++ set debugdir ${objdir}/${subdir}/${testfile}-debugdir ++ file delete -force -- $debugdir ++ file mkdir $debugdir/[file dirname $buildid] ++ file copy $binfile $debugdir/$buildid ++ ++ set test "show debug-file-directory" ++ gdb_test_multiple $test $test { ++ -re "The directory where separate debug symbols are searched for is \"(.*)\"\\.\r\n$gdb_prompt $" { ++ set debugdir_orig $expect_out(1,string) ++ pass $test ++ } ++ } ++ gdb_test_no_output "set debug-file-directory $debugdir:$debugdir_orig" "set debug-file-directory" ++ gdb_test "show build-id-core-loads" {Whether CORE-FILE loads the build-id associated files automatically is on\.} ++ gdb_test "core-file $corefile" "\r\nProgram terminated with .*" "core-file without executable" ++ gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*" ++ pass $wholetest ++} +Index: gdb-7.6.90.20140127/gdb/build-id.c +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/build-id.c 2014-01-27 02:57:53.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/build-id.c 2014-02-06 16:46:52.113646334 +0100 +@@ -27,11 +27,65 @@ + #include "symfile.h" + #include "objfiles.h" + #include "filenames.h" +#include "libbfd.h" +#include "gdbcore.h" +#include "gdbcmd.h" +#include "observer.h" +#include - - extern void _initialize_elfread (void); - -@@ -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 @@ -220,7 +362,8 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + +/* Locate NT_GNU_BUILD_ID and return its matching debug filename. + FIXME: NOTE decoding should be unified with the BFD core notes decoding. */ -+ + +-/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */ +static struct elf_build_id * +build_id_buf_get (bfd *templ, gdb_byte *buf, bfd_size_type size) +{ @@ -253,17 +396,17 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + } + return NULL; +} -+ + +/* Separate debuginfo files have corrupted PHDR but SHDR is correct there. + Locate NT_GNU_BUILD_ID from ABFD and return its content. */ - ++ static const struct elf_build_id * -build_id_bfd_get (bfd *abfd) +build_id_bfd_shdr_get (bfd *abfd) { 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) +@@ -45,6 +99,348 @@ build_id_bfd_get (bfd *abfd) return elf_tdata (abfd)->build_id; } @@ -609,23 +752,23 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + return retval; +} + - /* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */ + /* See build-id.h. */ - static int -@@ -1114,7 +1510,7 @@ build_id_verify (const char *filename, c - if (abfd == NULL) - return 0; + int +@@ -53,7 +449,7 @@ build_id_verify (bfd *abfd, size_t check + const struct elf_build_id *found; + int retval = 0; - found = build_id_bfd_get (abfd); + found = build_id_bfd_shdr_get (abfd); if (found == NULL) - warning (_("File \"%s\" has no build-id, file skipped"), filename); -@@ -1131,16 +1527,53 @@ build_id_verify (const char *filename, c + warning (_("File \"%s\" has no build-id, file skipped"), +@@ -68,20 +464,56 @@ build_id_verify (bfd *abfd, size_t check + return retval; } - static char * --build_id_to_debug_filename (const struct elf_build_id *build_id) ++static char * +link_resolve (const char *symlink, int level) +{ + char buf[PATH_MAX + 1], *target, *retval; @@ -661,28 +804,33 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + return retval; +} + -+char * -+build_id_to_filename (const struct elf_build_id *build_id, char **link_return, -+ int add_debug_suffix) + /* See build-id.h. */ + + bfd * +-build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) ++build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, ++ char **link_return, int add_debug_suffix) { - char *link, *debugdir, *retval = NULL; -+ char *link_all = NULL; +- char *link, *debugdir; ++ char *link, *debugdir, *link_all = NULL; VEC (char_ptr) *debugdir_vec; struct cleanup *back_to; int ix; + bfd *abfd = NULL; /* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */ - link = alloca (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1 -- + 2 * build_id->size + (sizeof ".debug" - 1) + 1); -+ link = xmalloc (strlen (debug_file_directory) + 2 * build_id->size + 50); +- + 2 * build_id_len + (sizeof ".debug" - 1) + 1); ++ link = xmalloc (strlen (debug_file_directory) + 2 * build_id_len + 50); /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will cause "/.build-id/..." lookups. */ -@@ -1153,7 +1586,10 @@ build_id_to_debug_filename (const struct +@@ -94,8 +526,11 @@ build_id_to_debug_bfd (size_t build_id_l size_t debugdir_len = strlen (debugdir); - const gdb_byte *data = build_id->data; - size_t size = build_id->size; + const gdb_byte *data = build_id; + size_t size = build_id_len; - char *s; + char *filename = NULL; + unsigned seqno; + struct stat statbuf_trash; + /* Initialize it just to avoid a GCC false warning. */ @@ -690,19 +838,18 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c memcpy (link, debugdir, debugdir_len); s = &link[debugdir_len]; -@@ -1167,37 +1603,256 @@ build_id_to_debug_filename (const struct +@@ -109,44 +544,282 @@ build_id_to_debug_bfd (size_t build_id_l *s++ = '/'; while (size-- > 0) s += sprintf (s, "%02x", (unsigned) *data++); - strcpy (s, ".debug"); - -- /* lrealpath() is expensive even for the usually non-existent files. */ -- if (access (link, F_OK) == 0) -- retval = lrealpath (link); + for (seqno = 0;; seqno++) + { + char *s2; -+ + +- /* lrealpath() is expensive even for the usually non-existent files. */ +- if (access (link, F_OK) == 0) +- filename = lrealpath (link); + if (seqno) + { + /* There can be multiple build-id symlinks pointing to real files @@ -733,21 +880,39 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + break; + } + -+ retval = lrealpath (link); ++ filename = lrealpath (link); ++ if (filename == NULL) ++ continue; + -+ if (retval != NULL && !build_id_verify (retval, build_id)) ++ /* We expect to be silent on the non-existing files. */ ++ abfd = gdb_bfd_open_maybe_remote (filename); ++ if (abfd == NULL) + { -+ xfree (retval); -+ retval = NULL; ++ xfree (filename); ++ continue; + } -+ -+ if (retval) + +- if (filename == NULL) +- continue; ++ if (build_id_verify (abfd, build_id_len, build_id)) + break; + +- /* We expect to be silent on the non-existing files. */ +- abfd = gdb_bfd_open_maybe_remote (filename); +- if (abfd == NULL) +- continue; ++ gdb_bfd_unref (abfd); ++ abfd = NULL; + +- if (build_id_verify (abfd, build_id_len, build_id)) +- break; ++ xfree (filename); ++ filename = NULL; + } + -+ if (retval != NULL) ++ if (filename != NULL) + { -+ /* LINK_ALL is not used below in this non-NULL RETVAL case. */ ++ /* LINK_ALL is not used below in this non-NULL FILENAME case. */ + xfree (link0); + break; + } @@ -757,14 +922,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + 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); ++ link_all = link0_resolved; + else - { -- xfree (retval); -- retval = NULL; ++ { + size_t len_orig = strlen (link_all); + + link_all = xrealloc (link_all, @@ -773,16 +935,17 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with + its possible use as an argument for installation command. */ + link_all[len_orig] = ' '; -+ + +- gdb_bfd_unref (abfd); +- abfd = NULL; + strcpy (&link_all[len_orig + 1], link0_resolved); - } -+ xfree (link0_resolved); ++ xfree (link0_resolved); ++ } + } - ++ + if (link_return != NULL) + { - if (retval != NULL) -- break; ++ if (abfd != NULL) + { + *link_return = link; + link = NULL; @@ -797,9 +960,24 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + xfree (link_all); do_cleanups (back_to); - return retval; + return abfd; } ++char * ++build_id_to_filename (const struct elf_build_id *build_id, char **link_return) ++{ ++ bfd *abfd; ++ char *result; ++ ++ abfd = build_id_to_debug_bfd (build_id->size, build_id->data, link_return, 0); ++ if (abfd == NULL) ++ return NULL; ++ ++ result = xstrdup (bfd_get_filename (abfd)); ++ gdb_bfd_unref (abfd); ++ return result; ++} ++ +/* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages + Try to install the hash file ... + avoidance. */ @@ -936,7 +1114,9 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + debug); +} + - static char * + /* See build-id.h. */ + + char * -find_separate_debug_file_by_buildid (struct objfile *objfile) +find_separate_debug_file_by_buildid (struct objfile *objfile, + char **build_id_filename_return) @@ -950,54 +1130,24 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + build_id = build_id_bfd_shdr_get (objfile->obfd); if (build_id != NULL) { - char *build_id_name; + bfd *abfd; -- build_id_name = build_id_to_debug_filename (build_id); -+ build_id_name = build_id_to_filename (build_id, build_id_filename_return, -+ 1); +- abfd = build_id_to_debug_bfd (build_id->size, build_id->data); ++ abfd = build_id_to_debug_bfd (build_id->size, build_id->data, ++ build_id_filename_return, 1); /* Prevent looping on a stripped .debug file. */ - if (build_id_name != NULL - && 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) -- return build_id_name; -+ return build_id_name; + if (abfd != NULL + && filename_cmp (bfd_get_filename (abfd), +@@ -166,3 +839,21 @@ find_separate_debug_file_by_buildid (str } return NULL; } -@@ -1445,9 +2100,10 @@ elf_symfile_read (struct objfile *objfil - && objfile->separate_debug_objfile == NULL - && objfile->separate_debug_objfile_backlink == NULL) - { -- char *debugfile; -+ char *debugfile, *build_id_filename; - -- debugfile = find_separate_debug_file_by_buildid (objfile); -+ debugfile = find_separate_debug_file_by_buildid (objfile, -+ &build_id_filename); - - if (debugfile == NULL) - debugfile = find_separate_debug_file_by_debuglink (objfile); -@@ -1461,6 +2117,12 @@ elf_symfile_read (struct objfile *objfil - symbol_file_add_separate (abfd, symfile_flags, objfile); - do_cleanups (cleanup); - } -+ /* Check if any separate debug info has been extracted out. */ -+ else if (bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink") -+ != NULL) -+ debug_print_missing (objfile->name, build_id_filename); + -+ xfree (build_id_filename); - } - } - -@@ -1790,4 +2452,16 @@ _initialize_elfread (void) - - elf_objfile_gnu_ifunc_cache_data = register_objfile_data (); - gnu_ifunc_fns_p = &elf_gnu_ifunc_fns; ++extern void _initialize_build_id (void); + ++void ++_initialize_build_id (void) ++{ + add_setshow_zinteger_cmd ("build-id-verbose", no_class, &build_id_verbose, + _("\ +Set debugging level of the build-id locator."), _("\ @@ -1009,116 +1159,42 @@ Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c + &setlist, &showlist); + + observer_attach_executable_changed (debug_print_executable_changed); - } -Index: gdb-7.6.50.20130731-cvs/gdb/symfile.h ++} +Index: gdb-7.6.90.20140127/gdb/build-id.h =================================================================== ---- 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); +--- gdb-7.6.90.20140127.orig/gdb/build-id.h 2014-01-27 02:57:53.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/build-id.h 2014-02-06 16:46:52.114646335 +0100 +@@ -32,13 +32,18 @@ extern int build_id_verify (bfd *abfd, + the caller. */ -+/* build-id support. */ -+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); + extern bfd *build_id_to_debug_bfd (size_t build_id_len, +- const bfd_byte *build_id); ++ const bfd_byte *build_id, char **link_return, ++ int add_debug_suffix); + - /* From dwarf2read.c */ ++extern char *build_id_to_filename (const struct elf_build_id *build_id, ++ char **link_return); - /* Names for a dwarf2 debugging section. The field NORMAL is the normal -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/gdb.exp -=================================================================== ---- 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." - } - } -+ # Turn off the missing warnings as the testsuite does not expect it. -+ send_gdb "set build-id-verbose 0\n" -+ gdb_expect 10 { -+ -re "$gdb_prompt $" { -+ verbose "Disabled the missing debug infos warnings." 2 -+ } -+ timeout { -+ warning "Could not disable the missing debug infos warnings.." -+ } -+ } - return 0 - } + /* Find the separate debug file for OBJFILE, by using the build-id + associated with OBJFILE's BFD. If successful, returns a malloc'd + file name for the separate debug file. The caller must free this. + Otherwise, returns NULL. */ + +-extern char *find_separate_debug_file_by_buildid (struct objfile *objfile); ++extern char *find_separate_debug_file_by_buildid (struct objfile *objfile, ++ char **build_id_filename_return); -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/mi-support.exp + #endif /* BUILD_ID_H */ +Index: gdb-7.6.90.20140127/gdb/dwarf2read.c =================================================================== ---- 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." - } +--- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-02-06 16:46:51.809645995 +0100 ++++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-02-06 16:49:55.679850414 +0100 +@@ -2429,7 +2429,7 @@ dwarf2_get_dwz_file (void) } -+ # Turn off the missing warnings as the testsuite does not expect it. -+ 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$" { -+ verbose "Disabled the missing debug infos warnings." 2 -+ } -+ timeout { -+ warning "Could not disable the missing debug infos warnings.." -+ } -+ } - # 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.6.50.20130731-cvs/gdb/objfiles.h -=================================================================== ---- 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) - -+/* This file was loaded according to the BUILD_ID_CORE_LOADS rules. */ -+ -+#define OBJF_BUILD_ID_CORE_LOADED (1 << 12) -+ - /* The object file that contains the runtime common minimal symbols - for SunOS4. Note that this objfile has no associated BFD. */ -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/corefile.exp -=================================================================== ---- 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] { + if (dwz_bfd == NULL) +- dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid); ++ dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid, NULL, 1); - gdb_exit - } -+ -+ -+# Test auto-loading of binary files through build-id from the core file. -+set buildid [build_id_debug_filename_get $binfile] -+set wholetest "binfile found by build-id" -+if {$buildid == ""} { -+ untested "$wholetest (binary has no build-id)" -+} else { -+ gdb_exit -+ gdb_start -+ -+ regsub {\.debug$} $buildid {} buildid -+ set debugdir ${objdir}/${subdir}/${testfile}-debugdir -+ file delete -force -- $debugdir -+ file mkdir $debugdir/[file dirname $buildid] -+ file copy $binfile $debugdir/$buildid -+ -+ set test "show debug-file-directory" -+ gdb_test_multiple $test $test { -+ -re "The directory where separate debug symbols are searched for is \"(.*)\"\\.\r\n$gdb_prompt $" { -+ set debugdir_orig $expect_out(1,string) -+ pass $test -+ } -+ } -+ gdb_test_no_output "set debug-file-directory $debugdir:$debugdir_orig" "set debug-file-directory" -+ gdb_test "show build-id-core-loads" {Whether CORE-FILE loads the build-id associated files automatically is on\.} -+ gdb_test "core-file $corefile" "\r\nProgram terminated with .*" "core-file without executable" -+ gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*" -+ pass $wholetest -+} + if (dwz_bfd == NULL) + error (_("could not find '.gnu_debugaltlink' file for %s"), diff --git a/gdb-6.6-bz235197-fork-detach-info.patch b/gdb-6.6-bz235197-fork-detach-info.patch index d7263ff..d6d9416 100644 --- a/gdb-6.6-bz235197-fork-detach-info.patch +++ b/gdb-6.6-bz235197-fork-detach-info.patch @@ -3,12 +3,12 @@ Port to GDB-6.8pre. Remove the `[' character from the GDB-6.8 default message. -Index: gdb-7.2.50.20110320/gdb/linux-nat.c +Index: gdb-7.6.90.20140127/gdb/linux-nat.c =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/linux-nat.c 2011-03-20 16:59:51.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/linux-nat.c 2011-03-20 16:59:51.000000000 +0100 -@@ -716,7 +716,7 @@ holding the child stopped. Try \"set de - remove_breakpoints_pid (GET_PID (inferior_ptid)); +--- gdb-7.6.90.20140127.orig/gdb/linux-nat.c 2014-02-04 23:47:39.275034491 +0100 ++++ gdb-7.6.90.20140127/gdb/linux-nat.c 2014-02-04 23:48:11.943074132 +0100 +@@ -426,7 +426,7 @@ holding the child stopped. Try \"set de + remove_breakpoints_pid (ptid_get_pid (inferior_ptid)); } - if (info_verbose || debug_linux_nat) @@ -16,10 +16,10 @@ Index: gdb-7.2.50.20110320/gdb/linux-nat.c { target_terminal_ours (); fprintf_filtered (gdb_stdlog, -Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/fork-detach.c +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.base/fork-detach.c 2011-03-20 16:59:51.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.c 2014-02-04 23:47:39.275034491 +0100 @@ -0,0 +1,57 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -78,10 +78,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/fork-detach.c + } + return 0; +} -Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/fork-detach.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.base/fork-detach.exp 2011-03-20 17:12:22.000000000 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.exp 2014-02-04 23:47:39.276034493 +0100 @@ -0,0 +1,36 @@ +# Copyright 2007 Free Software Foundation, Inc. + diff --git a/gdb-6.6-scheduler_locking-step-is-default.patch b/gdb-6.6-scheduler_locking-step-is-default.patch index 1132449..67e35c2 100644 --- a/gdb-6.6-scheduler_locking-step-is-default.patch +++ b/gdb-6.6-scheduler_locking-step-is-default.patch @@ -1,8 +1,8 @@ -Index: gdb-7.5.50.20130118/gdb/infrun.c +Index: gdb-7.6.90.20140127/gdb/infrun.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/infrun.c 2013-01-19 20:56:34.142917416 +0100 -+++ gdb-7.5.50.20130118/gdb/infrun.c 2013-01-19 20:56:34.662918474 +0100 -@@ -1628,7 +1628,7 @@ static const char *const scheduler_enums +--- gdb-7.6.90.20140127.orig/gdb/infrun.c 2014-02-04 23:48:27.262092869 +0100 ++++ gdb-7.6.90.20140127/gdb/infrun.c 2014-02-04 23:48:31.674096613 +0100 +@@ -1618,7 +1618,7 @@ static const char *const scheduler_enums schedlock_step, NULL }; @@ -11,10 +11,10 @@ Index: gdb-7.5.50.20130118/gdb/infrun.c static void show_scheduler_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-cli.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-cli.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2013-01-01 07:41:24.000000000 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-cli.exp 2013-01-19 20:56:34.662918474 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2014-02-04 23:48:27.263092871 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-cli.exp 2014-02-04 23:48:31.674096613 +0100 @@ -163,7 +163,7 @@ mi_execute_to "exec-continue" "breakpoin # Test that the token is output even for CLI commands # Also test that *stopped includes frame information. @@ -24,10 +24,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-cli.exp "34 next: run" if {!$async} { -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-logging.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-logging.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2013-01-01 07:41:24.000000000 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-logging.exp 2013-01-19 20:56:34.662918474 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2014-02-04 23:48:27.263092871 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-logging.exp 2014-02-04 23:48:31.674096613 +0100 @@ -53,7 +53,7 @@ close $chan set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+" @@ -46,17 +46,17 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-logging.exp pass "Redirect log file contents" } else { fail "Redirect log file contents" -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-console.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-console.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.mi/mi-console.exp 2013-01-01 07:41:24.000000000 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-console.exp 2013-01-19 20:56:55.783961145 +0100 -@@ -45,6 +45,9 @@ if { [gdb_compile "${srcdir}/${subdir}/ +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.mi/mi-console.exp 2014-02-04 23:48:31.675096666 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-console.exp 2014-02-04 23:48:55.981127963 +0100 +@@ -60,6 +60,9 @@ if { [gdb_compile "${srcdir}/${subdir}/ mi_run_to_main +# thread-id=\"all\" vs. thread-id=\"1\" below: +mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off" + - # Next over the hello() call which will produce lots of output - mi_gdb_test "220-exec-next" \ - "220\\^running(\r\n\\*running,thread-id=\"all\")?" \ + # The output we get from the target depends on how it is hosted. If + # we are semihosted (e.g., the sim or a remote target that supports + # the File I/O remote protocol extension), we see the target I/O diff --git a/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch b/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch index 4d4fd6b..75dda1a 100644 --- a/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch +++ b/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch @@ -21,11 +21,11 @@ Port to GDB-6.8pre. -Index: gdb-7.5.50.20130215/gdb/inferior.h +Index: gdb-7.6.90.20140127/gdb/inferior.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/inferior.h 2013-01-16 18:31:38.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/inferior.h 2013-02-15 22:31:42.993944957 +0100 -@@ -160,7 +160,15 @@ extern void reopen_exec_file (void); +--- gdb-7.6.90.20140127.orig/gdb/inferior.h 2014-01-27 22:05:28.801895347 +0100 ++++ gdb-7.6.90.20140127/gdb/inferior.h 2014-01-27 22:33:45.230157813 +0100 +@@ -155,7 +155,15 @@ extern void reopen_exec_file (void); /* The `resume' routine should only be called in special circumstances. Normally, use `proceed', which handles a lot of bookkeeping. */ @@ -42,11 +42,11 @@ Index: gdb-7.5.50.20130215/gdb/inferior.h extern ptid_t user_visible_resume_ptid (int step); -Index: gdb-7.5.50.20130215/gdb/infrun.c +Index: gdb-7.6.90.20140127/gdb/infrun.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/infrun.c 2013-01-31 20:18:58.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/infrun.c 2013-02-15 22:34:07.132144519 +0100 -@@ -81,7 +81,7 @@ static int follow_fork (void); +--- gdb-7.6.90.20140127.orig/gdb/infrun.c 2014-01-27 22:05:28.804895349 +0100 ++++ gdb-7.6.90.20140127/gdb/infrun.c 2014-01-27 22:35:12.781224279 +0100 +@@ -83,7 +83,7 @@ static int follow_fork (void); static void set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c); @@ -55,7 +55,7 @@ Index: gdb-7.5.50.20130215/gdb/infrun.c static int currently_stepping_or_nexting_callback (struct thread_info *tp, void *data); -@@ -1709,7 +1709,8 @@ user_visible_resume_ptid (int step) +@@ -1699,7 +1699,8 @@ user_visible_resume_ptid (int step) } else if ((scheduler_mode == schedlock_on) || (scheduler_mode == schedlock_step @@ -65,7 +65,7 @@ Index: gdb-7.5.50.20130215/gdb/infrun.c { /* User-settable 'scheduler' mode requires solo thread resume. */ resume_ptid = inferior_ptid; -@@ -1727,7 +1728,7 @@ user_visible_resume_ptid (int step) +@@ -1717,7 +1718,7 @@ user_visible_resume_ptid (int step) STEP nonzero if we should step (zero to continue instead). SIG is the signal to give the inferior (zero for none). */ void @@ -74,23 +74,23 @@ Index: gdb-7.5.50.20130215/gdb/infrun.c { int should_resume = 1; struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0); -@@ -1760,9 +1761,13 @@ resume (int step, enum gdb_signal sig) +@@ -1750,9 +1751,13 @@ resume (int step, enum gdb_signal sig) if (debug_infrun) fprintf_unfiltered (gdb_stdlog, -- "infrun: resume (step=%d, signal=%d), " -+ "infrun: resume (step=%s, signal=%d), " +- "infrun: resume (step=%d, signal=%s), " ++ "infrun: resume (step=%s, signal=%s), " "trap_expected=%d, current thread [%s] at %s\n", -- step, sig, tp->control.trap_expected, +- step, gdb_signal_to_symbol_string (sig), + (step == RESUME_STEP_CONTINUE + ? "RESUME_STEP_CONTINUE" + : (step == RESUME_STEP_USER ? "RESUME_STEP_USER" + : "RESUME_STEP_NEEDED")), -+ sig, tp->control.trap_expected, ++ gdb_signal_to_symbol_string (sig), + tp->control.trap_expected, target_pid_to_str (inferior_ptid), paddress (gdbarch, pc)); - -@@ -2140,7 +2145,7 @@ proceed (CORE_ADDR addr, enum gdb_signal +@@ -2147,7 +2152,7 @@ proceed (CORE_ADDR addr, enum gdb_signal CORE_ADDR pc; struct address_space *aspace; /* GDB may force the inferior to step due to various reasons. */ @@ -99,7 +99,7 @@ Index: gdb-7.5.50.20130215/gdb/infrun.c /* If we're stopped at a fork/vfork, follow the branch set by the "set follow-fork-mode" command; otherwise, we'll just proceed -@@ -2180,13 +2185,13 @@ proceed (CORE_ADDR addr, enum gdb_signal +@@ -2187,13 +2192,13 @@ proceed (CORE_ADDR addr, enum gdb_signal actually be executing the breakpoint insn anyway. We'll be (un-)executing the previous instruction. */ @@ -115,7 +115,7 @@ Index: gdb-7.5.50.20130215/gdb/infrun.c } else { -@@ -2217,13 +2222,13 @@ proceed (CORE_ADDR addr, enum gdb_signal +@@ -2225,13 +2230,13 @@ proceed (CORE_ADDR addr, enum gdb_signal is required it returns TRUE and sets the current thread to the old thread. */ if (prepare_to_proceed (step)) @@ -131,7 +131,7 @@ Index: gdb-7.5.50.20130215/gdb/infrun.c { tp->control.trap_expected = 1; /* If displaced stepping is enabled, we can step over the -@@ -2310,9 +2315,13 @@ proceed (CORE_ADDR addr, enum gdb_signal +@@ -2318,9 +2323,13 @@ proceed (CORE_ADDR addr, enum gdb_signal /* Reset to normal state. */ init_infwait_state (); @@ -147,7 +147,7 @@ Index: gdb-7.5.50.20130215/gdb/infrun.c /* Wait for it to stop (if not standalone) and in any case decode why it stopped, and act accordingly. */ -@@ -5247,13 +5256,18 @@ process_event_stop_test: +@@ -5332,13 +5341,18 @@ switch_back_to_stepped_thread (struct ex /* Is thread TP in the middle of single-stepping? */ @@ -171,11 +171,11 @@ Index: gdb-7.5.50.20130215/gdb/infrun.c } /* Returns true if any thread *but* the one passed in "data" is in the -Index: gdb-7.5.50.20130215/gdb/linux-nat.c +Index: gdb-7.6.90.20140127/gdb/linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-13 15:59:49.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:31:42.997944967 +0100 -@@ -2971,7 +2971,11 @@ static int +--- gdb-7.6.90.20140127.orig/gdb/linux-nat.c 2014-01-27 22:05:28.806895350 +0100 ++++ gdb-7.6.90.20140127/gdb/linux-nat.c 2014-01-27 22:33:45.330157889 +0100 +@@ -2697,7 +2697,11 @@ static int select_singlestep_lwp_callback (struct lwp_info *lp, void *data) { if (lp->last_resume_kind == resume_step @@ -188,11 +188,11 @@ Index: gdb-7.5.50.20130215/gdb/linux-nat.c return 1; else return 0; -Index: gdb-7.5.50.20130215/gdb/linux-nat.h +Index: gdb-7.6.90.20140127/gdb/linux-nat.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/linux-nat.h 2013-02-13 15:59:49.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/linux-nat.h 2013-02-15 22:31:42.998944969 +0100 -@@ -73,8 +73,8 @@ struct lwp_info +--- gdb-7.6.90.20140127.orig/gdb/linux-nat.h 2014-01-27 22:05:28.807895351 +0100 ++++ gdb-7.6.90.20140127/gdb/linux-nat.h 2014-01-27 22:33:45.334157892 +0100 +@@ -59,8 +59,8 @@ struct lwp_info /* If non-zero, a pending wait status. */ int status; diff --git a/gdb-6.7-testsuite-stable-results.patch b/gdb-6.7-testsuite-stable-results.patch deleted file mode 100644 index 397c061..0000000 --- a/gdb-6.7-testsuite-stable-results.patch +++ /dev/null @@ -1,108 +0,0 @@ -gdb/testsuite/gdb.base/fileio.c: -gdb/testsuite/gdb.base/fileio.exp: -2007-12-08 Jan Kratochvil - - * gdb.base/fileio.c (ROOTSUBDIR): New macro. - (main): CHDIR into ROOTSUBDIR. CHOWN ROOTSUBDIR and CHDIR into - ROOTSUBDIR if we are being run as root. - * gdb.base/fileio.exp: Change the startup and finish cleanup. - Change the test file reference to be into the `fileio.dir' directory. - - -sources/gdb/testsuite/gdb.base/dump.exp: -Found on RHEL-5.s390x. - - -gdb-6.8.50.20090209/gdb/testsuite/gdb.base/auxv.exp: -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.6.50.20130731-cvs/gdb/testsuite/gdb.base/fileio.c -=================================================================== ---- 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); - -+#define ROOTSUBDIR "fileio.dir" -+ - #define FILENAME "foo.fileio.test" - #define RENAMED "bar.fileio.test" - #define NONEXISTANT "nofoo.fileio.test" -@@ -542,6 +544,37 @@ strerrno (int err) - int - main () - { -+ /* ROOTSUBDIR is already prepared by fileio.exp. We use it for easy cleanup -+ (by fileio.exp) if we are run by multiple users in the same directory. */ -+ -+ if (chdir (ROOTSUBDIR) != 0) -+ { -+ printf ("chdir " ROOTSUBDIR ": %s\n", strerror (errno)); -+ exit (1); -+ } -+ -+ /* These tests -+ Open for write but no write permission returns EACCES -+ Unlinking a file in a directory w/o write access returns EACCES -+ fail if we are being run as root - drop the privileges here. */ -+ -+ if (geteuid () == 0) -+ { -+ uid_t uid = 99; -+ -+ if (chown (".", uid, uid) != 0) -+ { -+ printf ("chown %d.%d " ROOTSUBDIR ": %s\n", (int) uid, (int) uid, -+ strerror (errno)); -+ exit (1); -+ } -+ if (setuid (uid) || geteuid () == 0) -+ { -+ printf ("setuid %d: %s\n", (int) uid, strerror (errno)); -+ exit (1); -+ } -+ } -+ - /* Don't change the order of the calls. They partly depend on each other */ - test_open (); - test_write (); -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/fileio.exp -=================================================================== ---- 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} --remote_exec build {sh -xc rm\ -rf\ *.fileio.test} -+remote_exec build {sh -xc rm\ -rf\ fileio.dir} -+remote_exec build {sh -xc mkdir\ -m777\ fileio.dir} - - set oldtimeout $timeout - set timeout [expr "$timeout + 60"] -@@ -78,7 +78,7 @@ gdb_test continue \ - - gdb_test "continue" ".*" "" - --catch "system \"chmod -f -w nowrt.fileio.test\"" -+catch "system \"chmod -f -w fileio.dir/nowrt.fileio.test\"" - - gdb_test continue \ - "Continuing\\..*open 5:.*EACCES$stop_msg" \ -@@ -244,8 +244,8 @@ gdb_exit - # Wait till GDB really exits. - sleep 1 - --remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test} --remote_exec build {sh -xc rm\ -rf\ *.fileio.test} -+remote_exec build {sh -xc test\ -r\ fileio.dir/dir2.fileio.test\ &&\ chmod\ -f\ +w\ fileio.dir/dir2.fileio.test} -+remote_exec build {sh -xc rm\ -rf\ fileio.dir} - - set timeout $oldtimeout - return 0 diff --git a/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch b/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch index d53ef03..c5937f3 100644 --- a/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch +++ b/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch @@ -1,8 +1,8 @@ -Index: gdb-7.5.50.20130118/gdb/gdb_bfd.c +Index: gdb-7.6.90.20140127/gdb/gdb_bfd.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/gdb_bfd.c 2013-01-18 23:11:18.158718709 +0100 -+++ gdb-7.5.50.20130118/gdb/gdb_bfd.c 2013-01-18 23:12:06.841787893 +0100 -@@ -27,12 +27,14 @@ +--- gdb-7.6.90.20140127.orig/gdb/gdb_bfd.c 2014-02-06 17:39:46.370096290 +0100 ++++ gdb-7.6.90.20140127/gdb/gdb_bfd.c 2014-02-06 17:40:14.996127247 +0100 +@@ -29,12 +29,14 @@ #ifdef HAVE_ZLIB_H #include #endif @@ -15,9 +15,9 @@ Index: gdb-7.5.50.20130118/gdb/gdb_bfd.c #endif +#endif - /* An object of this type is stored in the section's user data when - mapping a section. */ -@@ -205,6 +207,7 @@ free_one_bfd_section (bfd *abfd, asectio + typedef bfd *bfdp; + DEF_VEC_P (bfdp); +@@ -210,6 +212,7 @@ free_one_bfd_section (bfd *abfd, asectio if (sect != NULL && sect->data != NULL) { @@ -25,7 +25,7 @@ Index: gdb-7.5.50.20130118/gdb/gdb_bfd.c #ifdef HAVE_MMAP if (sect->map_addr != NULL) { -@@ -215,6 +218,7 @@ free_one_bfd_section (bfd *abfd, asectio +@@ -220,6 +223,7 @@ free_one_bfd_section (bfd *abfd, asectio } else #endif @@ -33,7 +33,7 @@ Index: gdb-7.5.50.20130118/gdb/gdb_bfd.c xfree (sect->data); } } -@@ -360,6 +364,7 @@ gdb_bfd_map_section (asection *sectp, bf +@@ -371,6 +375,7 @@ gdb_bfd_map_section (asection *sectp, bf if (descriptor->data != NULL) goto done; @@ -41,7 +41,7 @@ Index: gdb-7.5.50.20130118/gdb/gdb_bfd.c #ifdef HAVE_MMAP if (!bfd_is_section_compressed (abfd, sectp)) { -@@ -394,6 +399,7 @@ gdb_bfd_map_section (asection *sectp, bf +@@ -405,6 +410,7 @@ gdb_bfd_map_section (asection *sectp, bf } } #endif /* HAVE_MMAP */ diff --git a/gdb-archer.patch b/gdb-archer.patch index 98ff0f6..6694dc0 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -2,20 +2,20 @@ http://sourceware.org/gdb/wiki/ProjectArcher http://sourceware.org/gdb/wiki/ArcherBranchManagement GIT snapshot: -commit a980be3b9cc66774adfb9a25da805f65cfed4245 +commit 21c8ac8faa4256f27d4751d8f0d2b218f2d232a8 -branch jankratochvil/fedora20 - the merge of branches: +branch jankratochvil/fedoragdb77 - the merge of branches: jankratochvil/vla tromey/python diff --git a/README.archer b/README.archer new file mode 100644 -index 0000000..21357e4 +index 0000000..5ae587e --- /dev/null +++ b/README.archer @@ -0,0 +1,13 @@ -+Merge for Fedora 20: http://pkgs.fedoraproject.org/cgit/gdb.git/ ++Merge for Fedora 21: http://pkgs.fedoraproject.org/cgit/gdb.git/ + +jankratochvil/vla +tromey/python @@ -29,10 +29,10 @@ index 0000000..21357e4 +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 8f4ee9e..e914dfb 100644 +index 824b26b..56f052a 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in -@@ -1351,6 +1351,12 @@ stamp-h: $(srcdir)/config.in config.status +@@ -1372,6 +1372,12 @@ stamp-h: $(srcdir)/config.in config.status CONFIG_LINKS= \ $(SHELL) config.status @@ -46,10 +46,10 @@ index 8f4ee9e..e914dfb 100644 $(SHELL) config.status --recheck diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c -index dc5f2b6..5feac49 100644 +index e70a33b..977f3e2 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c -@@ -12309,6 +12309,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp, +@@ -12703,6 +12703,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp, static int ada_operator_check (struct expression *exp, int pos, @@ -57,7 +57,7 @@ index dc5f2b6..5feac49 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data) { -@@ -12323,12 +12324,15 @@ ada_operator_check (struct expression *exp, int pos, +@@ -12717,12 +12718,15 @@ ada_operator_check (struct expression *exp, int pos, break; default: @@ -76,7 +76,7 @@ index dc5f2b6..5feac49 100644 return 1; diff --git a/gdb/block.c b/gdb/block.c -index 643e144..74c516b 100644 +index 2ae6ee2..376a1e8 100644 --- a/gdb/block.c +++ b/gdb/block.c @@ -693,3 +693,21 @@ block_iter_match_next (const char *name, @@ -102,7 +102,7 @@ index 643e144..74c516b 100644 + return SYMBOL_SYMTAB (func)->objfile; +} diff --git a/gdb/block.h b/gdb/block.h -index 02e7e8b..2931401 100644 +index ca143a9..0f065f8 100644 --- a/gdb/block.h +++ b/gdb/block.h @@ -279,4 +279,6 @@ extern struct symbol *block_iter_match_next (const char *name, @@ -113,10 +113,10 @@ index 02e7e8b..2931401 100644 + #endif /* BLOCK_H */ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c -index 1e89407..1f4de33 100644 +index 66a69b5..952e1c5 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -15605,6 +15605,24 @@ all_tracepoints (void) +@@ -15734,6 +15734,24 @@ all_tracepoints (void) return tp_vec; } @@ -141,16 +141,16 @@ index 1e89407..1f4de33 100644 /* This help string is used for the break, hbreak, tbreak and thbreak commands. It is defined as a macro to prevent duplication. -@@ -16568,4 +16586,7 @@ agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\ - automatic_hardware_breakpoints = 1; +@@ -16699,4 +16717,7 @@ agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\ observer_attach_about_to_proceed (breakpoint_about_to_proceed); + observer_attach_thread_exit (remove_threaded_breakpoints); +#if 0 + observer_attach_mark_used (breakpoint_types_mark_used); +#endif } diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c -index bf4564f..e8d0281 100644 +index 4edc9ec..292eddb 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -689,7 +689,13 @@ c_type_print_varspec_suffix (struct type *type, @@ -169,7 +169,7 @@ index bf4564f..e8d0281 100644 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 +index e5291ab..4820972 100644 --- a/gdb/cleanups.c +++ b/gdb/cleanups.c @@ -261,9 +261,11 @@ save_final_cleanups (void) @@ -185,12 +185,12 @@ index 898e526..18ebaee 100644 *pmy_chain = chain; } diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in -index dec6207..fbb4dc0 100644 +index e535316..444de9d 100644 --- a/gdb/data-directory/Makefile.in +++ b/gdb/data-directory/Makefile.in -@@ -61,13 +61,21 @@ PYTHON_FILES = \ - gdb/printing.py \ +@@ -63,13 +63,21 @@ PYTHON_FILES = \ gdb/prompt.py \ + gdb/command/bound_registers.py \ gdb/command/__init__.py \ + gdb/command/ignore_errors.py \ + gdb/command/pahole.py \ @@ -212,10 +212,10 @@ index dec6207..fbb4dc0 100644 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 cb393e8..1dfca22 100644 +index 74ddcf5..c45e1eb 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo -@@ -1221,6 +1221,16 @@ for remote debugging. +@@ -1222,6 +1222,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. @@ -232,7 +232,7 @@ index cb393e8..1dfca22 100644 @c resolve the situation of these eventually @item -tui @cindex @code{--tui} -@@ -23189,8 +23199,6 @@ containing @code{end}. For example: +@@ -23521,8 +23531,6 @@ containing @code{end}. For example: @smallexample (@value{GDBP}) python @@ -241,7 +241,7 @@ index cb393e8..1dfca22 100644 >print 23 >end 23 -@@ -23204,6 +23212,14 @@ controlled using @code{set python print-stack}: if @code{full}, then +@@ -23536,6 +23544,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. @@ -256,140 +256,11 @@ index cb393e8..1dfca22 100644 @end table It is also possible to execute a Python script from the @value{GDBN} -diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo -index 60805ad..5411012 100644 ---- a/gdb/doc/gdbint.texinfo -+++ b/gdb/doc/gdbint.texinfo -@@ -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. - -+@menu -+* Symbol Reading:: -+* Partial Symbol Tables:: -+* Types:: -+* Object File Formats:: -+* Debugging File Formats:: -+* Adding a New Symbol Reader to GDB:: -+* Memory Management for Symbol Files:: -+* Memory Management for Types:: -+@end menu -+ -+@node Symbol Reading - @section Symbol Reading - - @cindex symbol reading -@@ -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 - -+@node Partial Symbol Tables - @section Partial Symbol Tables - - @value{GDBN} has three types of symbol tables: -@@ -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}. - -+@node Types - @section Types - - @unnumberedsubsec Fundamental Types (e.g., @code{FT_VOID}, @code{FT_BOOLEAN}). -@@ -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. - -+@anchor{Builtin Types} - @unnumberedsubsec Builtin Types (e.g., @code{builtin_type_void}, @code{builtin_type_char}). - - These are instances of type structs that roughly correspond to -@@ -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. - -+@node Object File Formats - @section Object File Formats - @cindex object file formats - -@@ -2460,6 +2476,7 @@ SOM, which is a cross-language ABI). - - The SOM reader is in @file{somread.c}. - -+@node Debugging File Formats - @section Debugging File Formats - - This section describes characteristics of debugging information that -@@ -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. - -+@node Adding a New Symbol Reader to GDB - @section Adding a New Symbol Reader to @value{GDBN} - - @cindex adding debugging info reader -@@ -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}. - -+@node Memory Management for Symbol Files - @section Memory Management for Symbol Files - - Most memory associated with a loaded symbol file is stored on -@@ -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. - --User convenience variables, et cetera, have associated types. Normally --these types live in the associated objfile. However, when the objfile --is unloaded, those types are deep copied to global memory, so that --the values of the user variables and history items are not lost. -+@node Memory Management for Types -+@section Memory Management for Types -+@cindex memory management for types -+ -+@findex TYPE_OBJFILE -+@code{TYPE_OBJFILE} macro indicates the current memory owner of the type. -+Non-@code{NULL} value indicates it is owned by an objfile (specifically by its -+obstack) and in such case the type remains valid till the objfile is unloaded -+or reloaded. For such types with an associated objfile no reference counting -+is being made. -+ -+User convenience variables, et cetera, have associated types. Normally these -+types live in the associated objfile. However, when the objfile is unloaded, -+those types are deep copied to global memory, so that the values of the user -+variables and history items are not lost. During the copy they will get their -+@code{TYPE_OBJFILE} set to @code{NULL} and become so-called @dfn{reclaimable} -+types. -+ -+Types with null @code{TYPE_OBJFILE} can be either permanent types -+(@pxref{Builtin Types}) or reclaimable types which will be deallocated at the -+first idle @value{GDBN} moment if the last object referencing them is removed. -+Permanent types are allocated by the function @code{alloc_type} (and its -+derivations like @code{init_type}) specifying objfile as @code{NULL}. The -+reclaimable types are created the same way but moreover they need to have -+@code{type_init_group} called to start their tracking as being possibly -+deallocatable. -+ -+@findex free_all_types -+When @value{GDBN} gets idle it always calls the @code{free_all_types} function -+which deallocates any unused types. All types currently not owned by an -+objfile must be marked as used on each @code{free_all_types} call as they would -+get deallocated as unused otherwise. -+ -+@code{free_all_types} automatically checks for any cross-type references such -+as through @code{TYPE_TARGET_TYPE}, @code{TYPE_POINTER_TYPE} etc.@: and -+prevents early deallocation for any such existing references. Reclaimable -+types may reference any other reclaimable types or even permanent types. But -+permanent types must not reference reclaimable types (nor an objfile associated -+type). - - - @node Language Support diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi -index adb7085..5ec5b5a 100644 +index 61acbb2..ac37324 100644 --- a/gdb/doc/observer.texi +++ b/gdb/doc/observer.texi -@@ -249,6 +249,11 @@ The trace state variable @var{tsv} is deleted. If @var{tsv} is +@@ -253,6 +253,11 @@ The trace state variable @var{tsv} is deleted. If @var{tsv} is The trace state value @var{tsv} is modified. @end deftypefun @@ -402,10 +273,10 @@ index adb7085..5ec5b5a 100644 This observer is used for internal testing. Do not use. See testsuite/gdb.gdb/observer.exp. diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c -index 752d782..ab0a3eb 100644 +index 36c9f66..1f21766 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c -@@ -1479,6 +1479,14 @@ execute_stack_op (struct dwarf_expr_context *ctx, +@@ -1478,6 +1478,14 @@ execute_stack_op (struct dwarf_expr_context *ctx, } break; @@ -421,10 +292,10 @@ index 752d782..ab0a3eb 100644 error (_("Unhandled dwarf expression opcode 0x%x"), op); } diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h -index e85486a..e7ac799 100644 +index 39dadf3..8cebbe8 100644 --- a/gdb/dwarf2expr.h +++ b/gdb/dwarf2expr.h -@@ -77,12 +77,8 @@ struct dwarf_expr_context_funcs +@@ -84,12 +84,8 @@ struct dwarf_expr_context_funcs This can throw an exception if the index is out of range. */ CORE_ADDR (*get_addr_index) (void *baton, unsigned int index); @@ -438,7 +309,7 @@ index e85486a..e7ac799 100644 /* The location of a value. */ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c -index 02afcdf..5a21629 100644 +index dd921ec..01a8566 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -306,6 +306,9 @@ struct dwarf_expr_baton @@ -451,7 +322,7 @@ index 02afcdf..5a21629 100644 }; /* Helper functions for dwarf2_evaluate_loc_desc. */ -@@ -421,7 +424,7 @@ dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, +@@ -433,7 +436,7 @@ dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, if (*length == 0) error (_("Could not find the frame base for \"%s\"."), @@ -460,7 +331,7 @@ index 02afcdf..5a21629 100644 } /* Helper function for dwarf2_evaluate_loc_desc. Computes the CFA for -@@ -488,6 +491,85 @@ dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset) +@@ -500,6 +503,85 @@ dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset) ctx->funcs->get_frame_pc, ctx->baton); } @@ -546,7 +417,7 @@ index 02afcdf..5a21629 100644 /* Callback function for dwarf2_evaluate_loc_desc. */ static struct type * -@@ -1202,10 +1284,12 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, +@@ -1215,10 +1297,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; @@ -559,7 +430,7 @@ index 02afcdf..5a21629 100644 ctx->offset = dwarf2_per_cu_text_offset (baton_local.per_cu); ctx->baton = &baton_local; -@@ -1213,10 +1297,95 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, +@@ -1226,10 +1310,78 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, ctx->gdbarch = saved_ctx.gdbarch; ctx->addr_size = saved_ctx.addr_size; @@ -570,23 +441,6 @@ index 02afcdf..5a21629 100644 +static CORE_ADDR dwarf_expr_get_addr_index (void *baton, unsigned int index); + -+/* Virtual method table for dwarf2_evaluate_loc_desc_full below. */ -+ -+static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs = -+{ -+ dwarf_expr_read_reg, -+ dwarf_expr_read_mem, -+ dwarf_expr_frame_base, -+ dwarf_expr_frame_cfa, -+ dwarf_expr_frame_pc, -+ dwarf_expr_tls_address, -+ dwarf_expr_dwarf_call, -+ dwarf_expr_get_base_type, -+ dwarf_expr_push_dwarf_reg_entry_value, -+ dwarf_expr_get_addr_index, -+ dwarf_expr_object_address -+}; -+ +/* Evaluate DWARF expression at DATA ... DATA + SIZE with its result readable + by dwarf_expr_fetch (RETVAL, 0). FRAME parameter can be NULL to call + get_selected_frame to find it. Returned dwarf_expr_context freeing is @@ -655,30 +509,17 @@ index 02afcdf..5a21629 100644 /* Callback function for dwarf2_evaluate_loc_desc. Fetch the address indexed by DW_OP_GNU_addr_index. */ -@@ -2177,22 +2346,6 @@ static const struct lval_funcs pieced_value_funcs = { - free_pieced_value_closure +@@ -2205,7 +2357,8 @@ static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs = + dwarf_expr_dwarf_call, + dwarf_expr_get_base_type, + dwarf_expr_push_dwarf_reg_entry_value, +- dwarf_expr_get_addr_index ++ dwarf_expr_get_addr_index, ++ dwarf_expr_object_address }; --/* Virtual method table for dwarf2_evaluate_loc_desc_full below. */ -- --static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs = --{ -- dwarf_expr_read_reg, -- dwarf_expr_read_mem, -- dwarf_expr_frame_base, -- dwarf_expr_frame_cfa, -- dwarf_expr_frame_pc, -- dwarf_expr_tls_address, -- dwarf_expr_dwarf_call, -- dwarf_expr_get_base_type, -- dwarf_expr_push_dwarf_reg_entry_value, -- dwarf_expr_get_addr_index --}; -- /* 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 -@@ -2205,7 +2358,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2220,7 +2373,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, LONGEST byte_offset) { struct value *retval; @@ -686,7 +527,7 @@ index 02afcdf..5a21629 100644 struct dwarf_expr_context *ctx; struct cleanup *old_chain, *value_chain; struct objfile *objfile = dwarf2_per_cu_objfile (per_cu); -@@ -2217,29 +2369,18 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2232,29 +2384,18 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, if (size == 0) return allocate_optimized_out_value (type); @@ -717,7 +558,7 @@ index 02afcdf..5a21629 100644 retval = allocate_value (type); mark_value_bytes_unavailable (retval, 0, TYPE_LENGTH (type)); return retval; -@@ -2303,6 +2444,16 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2329,6 +2470,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); @@ -731,10 +572,10 @@ index 02afcdf..5a21629 100644 + DW_OP_push_object_address. */ + object_address_set (address); + - retval = allocate_value_lazy (type); - VALUE_LVAL (retval) = lval_memory; + retval = value_at_lazy (type, address + byte_offset); if (in_stack_memory) -@@ -4204,8 +4355,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, + set_value_stack (retval, 1); +@@ -4241,8 +4392,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, dlbaton->per_cu); } @@ -745,7 +586,7 @@ index 02afcdf..5a21629 100644 loclist_read_variable, loclist_read_variable_at_entry, diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h -index 9bc8ca5..28467dc 100644 +index 786e77c..55ff4e6 100644 --- a/gdb/dwarf2loc.h +++ b/gdb/dwarf2loc.h @@ -137,6 +137,15 @@ struct dwarf2_loclist_baton @@ -765,10 +606,10 @@ index 9bc8ca5..28467dc 100644 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 d18eaed..91c476c 100644 +index 23bcfe0..ca9ffda 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -1661,6 +1661,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu, +@@ -1738,6 +1738,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu, struct dwarf2_loclist_baton *baton, const struct attribute *attr); @@ -778,7 +619,7 @@ index d18eaed..91c476c 100644 static void dwarf2_symbol_mark_computed (const struct attribute *attr, struct symbol *sym, struct dwarf2_cu *cu, -@@ -1694,6 +1697,9 @@ static void age_cached_comp_units (void); +@@ -1771,6 +1774,9 @@ static void age_cached_comp_units (void); static void free_one_cached_comp_unit (struct dwarf2_per_cu_data *); @@ -788,7 +629,7 @@ index d18eaed..91c476c 100644 static struct type *set_die_type (struct die_info *, struct type *, struct dwarf2_cu *); -@@ -1722,6 +1728,9 @@ static struct type *get_die_type_at_offset (sect_offset, +@@ -1799,6 +1805,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); @@ -798,7 +639,7 @@ index d18eaed..91c476c 100644 static void dwarf2_release_queue (void *dummy); static void queue_comp_unit (struct dwarf2_per_cu_data *per_cu, -@@ -12263,6 +12272,29 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) +@@ -13227,6 +13236,29 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) new_symbol (die, this_type, cu); } @@ -828,7 +669,7 @@ index d18eaed..91c476c 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. */ -@@ -12276,7 +12308,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -13240,7 +13272,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; @@ -837,7 +678,7 @@ index d18eaed..91c476c 100644 struct cleanup *back_to; const char *name; -@@ -12329,17 +12361,19 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -13293,17 +13325,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) @@ -868,7 +709,7 @@ index d18eaed..91c476c 100644 /* Understand Dwarf2 support for vector types (like they occur on the PowerPC w/ AltiVec). Gcc just adds another attribute to the -@@ -12973,29 +13007,114 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -13942,29 +13976,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; @@ -996,7 +837,7 @@ index d18eaed..91c476c 100644 char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -13320,7 +13439,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14289,7 +14408,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; @@ -1005,9 +846,9 @@ index d18eaed..91c476c 100644 int low_default_is_valid; const char *name; LONGEST negative_mask; -@@ -13379,42 +13498,6 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14348,42 +14467,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); + die->offset.sect_off, objfile_name (cu->objfile)); - attr = dwarf2_attr (die, DW_AT_upper_bound, cu); - if (attr) @@ -1048,7 +889,7 @@ index d18eaed..91c476c 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 -@@ -13453,24 +13536,163 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14422,24 +14505,163 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) } } @@ -1226,7 +1067,7 @@ index d18eaed..91c476c 100644 name = dwarf2_name (die, cu); if (name) -@@ -16380,11 +16602,14 @@ var_decode_location (struct attribute *attr, struct symbol *sym, +@@ -17361,11 +17583,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 @@ -1243,7 +1084,7 @@ index d18eaed..91c476c 100644 cu->has_loclist = 1; } -@@ -17225,6 +17450,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu) +@@ -18212,6 +18437,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu) break; } @@ -1253,7 +1094,7 @@ index d18eaed..91c476c 100644 return this_type; } -@@ -19910,66 +20138,109 @@ fill_in_loclist_baton (struct dwarf2_cu *cu, +@@ -20894,66 +21122,109 @@ fill_in_loclist_baton (struct dwarf2_cu *cu, baton->from_dwo = cu->dwo_unit != NULL; } @@ -1402,7 +1243,7 @@ index d18eaed..91c476c 100644 } } -@@ -20342,6 +20613,25 @@ per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs) +@@ -21326,6 +21597,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); } @@ -1428,7 +1269,7 @@ index d18eaed..91c476c 100644 /* Set the type associated with DIE to TYPE. Save it in CU's hash table if necessary. For convenience, return TYPE. -@@ -20366,6 +20656,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -21350,6 +21640,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; @@ -1438,7 +1279,7 @@ index d18eaed..91c476c 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 539489f..13ba1a9 100644 +index bfbe319..3fdc5d5 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -41,6 +41,7 @@ @@ -1449,7 +1290,7 @@ index 539489f..13ba1a9 100644 #include "gdb_assert.h" -@@ -393,27 +394,221 @@ init_array_element (struct value *array, struct value *element, +@@ -397,27 +398,222 @@ init_array_element (struct value *array, struct value *element, } static struct value * @@ -1673,7 +1514,8 @@ index 539489f..13ba1a9 100644 + { + gdb_assert (TYPE_LENGTH (new_array_type) + <= TYPE_LENGTH (value_type (saved_array))); -+ allocate_value_contents (array); ++ /* FIXME: It simulates non-public allocate_value_contents. */ ++ value_contents_all_raw (array); + set_value_lazy (array, 0); + + memcpy (value_contents_writeable (array), @@ -1687,7 +1529,7 @@ index 539489f..13ba1a9 100644 } -@@ -710,6 +905,7 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -714,6 +910,7 @@ evaluate_subexp_standard (struct type *expect_type, int save_pos1; struct symbol *function = NULL; char *function_name = NULL; @@ -1695,7 +1537,7 @@ index 539489f..13ba1a9 100644 pc = (*pos)++; op = exp->elts[pc].opcode; -@@ -1776,6 +1972,8 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1780,6 +1977,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); @@ -1704,7 +1546,7 @@ index 539489f..13ba1a9 100644 type = check_typedef (value_type (arg1)); code = TYPE_CODE (type); -@@ -1796,23 +1994,13 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1800,23 +1999,13 @@ evaluate_subexp_standard (struct type *expect_type, code = TYPE_CODE (type); } } @@ -1730,7 +1572,7 @@ index 539489f..13ba1a9 100644 case TYPE_CODE_PTR: case TYPE_CODE_FUNC: -@@ -2225,49 +2413,6 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2229,49 +2418,6 @@ evaluate_subexp_standard (struct type *expect_type, } return (arg1); @@ -1780,7 +1622,7 @@ index 539489f..13ba1a9 100644 case BINOP_LOGICAL_AND: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); if (noside == EVAL_SKIP) -@@ -2499,15 +2644,23 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2503,15 +2649,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); @@ -1806,7 +1648,7 @@ index 539489f..13ba1a9 100644 else if (noside == EVAL_AVOID_SIDE_EFFECTS) { type = check_typedef (value_type (arg1)); -@@ -2516,12 +2669,18 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2520,12 +2674,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 ) @@ -1830,7 +1672,7 @@ index 539489f..13ba1a9 100644 else error (_("Attempt to take contents of a non-pointer value.")); } -@@ -2531,9 +2690,14 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2535,9 +2695,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) @@ -1848,7 +1690,7 @@ index 539489f..13ba1a9 100644 case UNOP_ADDR: /* C++: check for and handle pointer to members. */ -@@ -2963,7 +3127,7 @@ evaluate_subexp_with_coercion (struct expression *exp, +@@ -2967,7 +3132,7 @@ evaluate_subexp_with_coercion (struct expression *exp, { enum exp_opcode op; int pc; @@ -1857,7 +1699,7 @@ index 539489f..13ba1a9 100644 struct symbol *var; struct type *type; -@@ -2974,13 +3138,18 @@ evaluate_subexp_with_coercion (struct expression *exp, +@@ -2978,13 +3143,18 @@ evaluate_subexp_with_coercion (struct expression *exp, { case OP_VAR_VALUE: var = exp->elts[pc + 2].symbol; @@ -1877,7 +1719,7 @@ index 539489f..13ba1a9 100644 return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)), val); } -@@ -3038,9 +3207,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos) +@@ -3042,9 +3212,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos) case OP_VAR_VALUE: (*pos) += 4; @@ -1894,7 +1736,7 @@ index 539489f..13ba1a9 100644 default: val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS); -@@ -3071,18 +3244,25 @@ parse_and_eval_type (char *p, int length) +@@ -3075,18 +3249,25 @@ parse_and_eval_type (char *p, int length) int calc_f77_array_dims (struct type *array_type) { @@ -1931,7 +1773,7 @@ index 539489f..13ba1a9 100644 + } diff --git a/gdb/f-exp.y b/gdb/f-exp.y -index 846cc02..9283183 100644 +index 7a94b15..a6ba784 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -297,7 +297,9 @@ arglist : subrange @@ -1946,7 +1788,7 @@ index 846cc02..9283183 100644 ; diff --git a/gdb/f-lang.h b/gdb/f-lang.h -index 4ef1acf..8da016b 100644 +index 2d67a48..4d2f411 100644 --- a/gdb/f-lang.h +++ b/gdb/f-lang.h @@ -29,6 +29,10 @@ extern void f_error (char *); /* Defined in f-exp.y */ @@ -1961,19 +1803,18 @@ index 4ef1acf..8da016b 100644 struct ui_file *, int, const struct value *, diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c -index aa33231..df998c4 100644 +index 8356aab..5050255 100644 --- a/gdb/f-typeprint.c +++ b/gdb/f-typeprint.c -@@ -30,7 +30,7 @@ +@@ -30,6 +30,7 @@ #include "gdbcore.h" #include "target.h" #include "f-lang.h" -- +#include "dwarf2loc.h" - #include "gdb_string.h" - #include -@@ -47,6 +47,34 @@ void f_type_print_varspec_prefix (struct type *, struct ui_file *, + #include + #include +@@ -47,6 +48,34 @@ void f_type_print_varspec_prefix (struct type *, struct ui_file *, void f_type_print_base (struct type *, struct ui_file *, int, int); @@ -2008,7 +1849,7 @@ index aa33231..df998c4 100644 /* LEVEL is the depth to indent lines by. */ void -@@ -56,6 +84,9 @@ f_print_type (struct type *type, const char *varstring, struct ui_file *stream, +@@ -56,6 +85,9 @@ f_print_type (struct type *type, const char *varstring, struct ui_file *stream, enum type_code code; int demangled_args; @@ -2018,7 +1859,7 @@ index aa33231..df998c4 100644 f_type_print_base (type, stream, show, level); code = TYPE_CODE (type); if ((varstring != NULL && *varstring != '\0') -@@ -162,6 +193,9 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, +@@ -162,6 +194,9 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, QUIT; @@ -2029,7 +1870,7 @@ index aa33231..df998c4 100644 { case TYPE_CODE_ARRAY: diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c -index d01d6ec..8a21149 100644 +index d8c767f..4aa0d5e 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -51,15 +51,17 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2]; @@ -2168,7 +2009,7 @@ index d01d6ec..8a21149 100644 switch (TYPE_CODE (type)) { diff --git a/gdb/findvar.c b/gdb/findvar.c -index f586ce2..8fd5a08 100644 +index 0647c0f..a2a0a4f 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -34,6 +34,7 @@ @@ -2179,7 +2020,7 @@ index f586ce2..8fd5a08 100644 /* Basic byte-swapping routines. All 'extract' functions return a host-format integer from a target-format integer at ADDR which is -@@ -443,7 +444,10 @@ minsym_lookup_iterator_cb (struct objfile *objfile, void *cb_data) +@@ -416,7 +417,10 @@ minsym_lookup_iterator_cb (struct objfile *objfile, void *cb_data) } /* A default implementation for the "la_read_var_value" hook in @@ -2191,7 +2032,7 @@ index f586ce2..8fd5a08 100644 struct value * 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) +@@ -425,13 +429,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) struct type *type = SYMBOL_TYPE (var); CORE_ADDR addr; @@ -2205,73 +2046,17 @@ index f586ce2..8fd5a08 100644 if (symbol_read_needs_frame (var)) gdb_assert (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 (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); -- v = allocate_value_lazy (type); - break; - - case LOC_REF_ARG: -@@ -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); -- v = allocate_value_lazy (type); - break; - } - - case LOC_LOCAL: - addr = get_frame_locals_address (frame); - addr += SYMBOL_VALUE (var); -- v = allocate_value_lazy (type); - break; - - case LOC_TYPEDEF: -@@ -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 (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); -- v = allocate_value_lazy (type); - } - else - { -@@ -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); -- v = allocate_value_lazy (type); - } - break; - -@@ -633,6 +623,10 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -599,6 +596,9 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) break; } + /* ADDR is set here for ALLOCATE_VALUE's CHECK_TYPEDEF for + DW_OP_PUSH_OBJECT_ADDRESS. */ + object_address_set (addr); -+ v = allocate_value_lazy (type); - VALUE_LVAL (v) = lval_memory; - set_value_address (v, addr); + v = value_at_lazy (type, addr); return v; -@@ -737,10 +731,11 @@ struct value * + } +@@ -702,10 +702,11 @@ struct value * value_from_register (struct type *type, int regnum, struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2285,7 +2070,7 @@ index f586ce2..8fd5a08 100644 { int optim, unavail, ok; -@@ -755,7 +750,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame) +@@ -720,7 +721,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; @@ -2315,20 +2100,19 @@ index 05a38b2..9801fdf 100644 set variable $gdb_init_done = 1 diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c -index d19c593..3995913 100644 +index 8e3090d..758b3c5 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -38,6 +38,9 @@ - #include "hashtab.h" - #include "exceptions.h" +@@ -40,6 +40,8 @@ #include "cp-support.h" + #include "bcache.h" + #include "dwarf2loc.h" +#include "observer.h" +#include "dwarf2expr.h" -+#include "dwarf2loc.h" /* Initialize BADNESS constants. */ -@@ -186,6 +189,43 @@ alloc_type (struct objfile *objfile) +@@ -188,6 +190,43 @@ alloc_type (struct objfile *objfile) return type; } @@ -2372,7 +2156,7 @@ index d19c593..3995913 100644 /* Allocate a new GDBARCH-associated type structure and fill it with some defaults. Space for the type structure is allocated on the heap. */ -@@ -311,7 +351,7 @@ make_pointer_type (struct type *type, struct type **typeptr) +@@ -328,7 +367,7 @@ make_pointer_type (struct type *type, struct type **typeptr) if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */ { @@ -2381,7 +2165,7 @@ index d19c593..3995913 100644 if (typeptr) *typeptr = ntype; } -@@ -384,7 +424,7 @@ make_reference_type (struct type *type, struct type **typeptr) +@@ -401,7 +440,7 @@ make_reference_type (struct type *type, struct type **typeptr) if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */ { @@ -2390,7 +2174,7 @@ index d19c593..3995913 100644 if (typeptr) *typeptr = ntype; } -@@ -807,6 +847,7 @@ create_range_type (struct type *result_type, struct type *index_type, +@@ -824,6 +863,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; @@ -2398,7 +2182,7 @@ index d19c593..3995913 100644 if (low_bound >= 0) TYPE_UNSIGNED (result_type) = 1; -@@ -927,6 +968,10 @@ get_array_bounds (struct type *type, LONGEST *low_bound, LONGEST *high_bound) +@@ -944,6 +984,10 @@ get_array_bounds (struct type *type, LONGEST *low_bound, LONGEST *high_bound) return 1; } @@ -2409,7 +2193,7 @@ index d19c593..3995913 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. -@@ -950,26 +995,31 @@ create_array_type (struct type *result_type, +@@ -967,26 +1011,31 @@ create_array_type (struct type *result_type, TYPE_CODE (result_type) = TYPE_CODE_ARRAY; TYPE_TARGET_TYPE (result_type) = element_type; @@ -2454,7 +2238,7 @@ index d19c593..3995913 100644 return result_type; } -@@ -1490,6 +1540,105 @@ stub_noname_complaint (void) +@@ -1508,6 +1557,105 @@ stub_noname_complaint (void) complaint (&symfile_complaints, _("stub type has NULL name")); } @@ -2560,7 +2344,7 @@ index d19c593..3995913 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 -@@ -1656,52 +1805,37 @@ check_typedef (struct type *type) +@@ -1674,52 +1822,37 @@ check_typedef (struct type *type) } } @@ -2634,7 +2418,7 @@ index d19c593..3995913 100644 TYPE_TARGET_STUB (type) = 0; } else if (TYPE_CODE (type) == TYPE_CODE_RANGE) -@@ -1709,6 +1843,7 @@ check_typedef (struct type *type) +@@ -1727,6 +1860,7 @@ check_typedef (struct type *type) TYPE_LENGTH (type) = TYPE_LENGTH (target_type); TYPE_TARGET_STUB (type) = 0; } @@ -2642,7 +2426,7 @@ index d19c593..3995913 100644 } type = make_qualified_type (type, instance_flags, NULL); -@@ -3404,33 +3539,42 @@ type_pair_eq (const void *item_lhs, const void *item_rhs) +@@ -3632,33 +3766,42 @@ type_pair_eq (const void *item_lhs, const void *item_rhs) } /* Allocate the hash table used by copy_type_recursive to walk @@ -2700,7 +2484,7 @@ index d19c593..3995913 100644 return type; /* This type shouldn't be pointing to any types in other objfiles; -@@ -3445,9 +3589,10 @@ copy_type_recursive (struct objfile *objfile, +@@ -3673,9 +3816,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 @@ -2714,7 +2498,7 @@ index d19c593..3995913 100644 stored->old = type; stored->new = new_type; *slot = stored; -@@ -3458,6 +3603,21 @@ copy_type_recursive (struct objfile *objfile, +@@ -3686,6 +3830,21 @@ copy_type_recursive (struct objfile *objfile, TYPE_OBJFILE_OWNED (new_type) = 0; TYPE_OWNER (new_type).gdbarch = get_type_arch (type); @@ -2736,7 +2520,7 @@ index d19c593..3995913 100644 if (TYPE_NAME (type)) TYPE_NAME (new_type) = xstrdup (TYPE_NAME (type)); if (TYPE_TAG_NAME (type)) -@@ -3466,12 +3626,48 @@ copy_type_recursive (struct objfile *objfile, +@@ -3694,12 +3853,48 @@ copy_type_recursive (struct objfile *objfile, TYPE_INSTANCE_FLAGS (new_type) = TYPE_INSTANCE_FLAGS (type); TYPE_LENGTH (new_type) = TYPE_LENGTH (type); @@ -2785,7 +2569,7 @@ index d19c593..3995913 100644 TYPE_FIELDS (new_type) = XCALLOC (nfields, struct field); for (i = 0; i < nfields; i++) { -@@ -3480,8 +3676,8 @@ copy_type_recursive (struct objfile *objfile, +@@ -3708,8 +3903,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) @@ -2796,7 +2580,7 @@ index d19c593..3995913 100644 if (TYPE_FIELD_NAME (type, i)) TYPE_FIELD_NAME (new_type, i) = xstrdup (TYPE_FIELD_NAME (type, i)); -@@ -3512,24 +3708,184 @@ copy_type_recursive (struct objfile *objfile, +@@ -3740,24 +3935,184 @@ copy_type_recursive (struct objfile *objfile, } } @@ -2988,7 +2772,7 @@ index d19c593..3995913 100644 /* Maybe copy the type_specific bits. NOTE drow/2005-12-09: We do not copy the C++-specific bits like -@@ -3546,6 +3902,17 @@ copy_type_recursive (struct objfile *objfile, +@@ -3774,6 +4129,17 @@ copy_type_recursive (struct objfile *objfile, return new_type; } @@ -3006,7 +2790,7 @@ index d19c593..3995913 100644 /* Make a copy of the given TYPE, except that the pointer & reference types are not preserved. -@@ -4110,6 +4477,13 @@ void +@@ -4330,6 +4696,13 @@ void _initialize_gdbtypes (void) { gdbtypes_data = gdbarch_data_register_post_init (gdbtypes_post_init); @@ -3021,7 +2805,7 @@ index d19c593..3995913 100644 add_setshow_zuinteger_cmd ("overload", no_class, &overload_debug, diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h -index 0ca7a87..c6029dc 100644 +index 61ddeff..fc6f276 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -226,6 +226,11 @@ enum type_instance_flag_value @@ -3212,7 +2996,7 @@ index 0ca7a87..c6029dc 100644 /* C++ */ -@@ -1529,6 +1634,18 @@ extern struct type *create_array_type (struct type *, struct type *, +@@ -1533,6 +1638,18 @@ extern struct type *create_array_type (struct type *, struct type *, struct type *); extern struct type *lookup_array_range_type (struct type *, LONGEST, LONGEST); @@ -3231,7 +3015,7 @@ index 0ca7a87..c6029dc 100644 extern struct type *create_string_type (struct type *, struct type *, struct type *); extern struct type *lookup_string_range_type (struct type *, LONGEST, LONGEST); -@@ -1574,6 +1691,10 @@ extern int is_public_ancestor (struct type *, struct type *); +@@ -1578,6 +1695,10 @@ extern int is_public_ancestor (struct type *, struct type *); extern int is_unique_ancestor (struct type *, struct value *); @@ -3242,7 +3026,7 @@ index 0ca7a87..c6029dc 100644 /* Overload resolution */ #define LENGTH_MATCH(bv) ((bv)->rank[0]) -@@ -1652,8 +1773,7 @@ extern void maintenance_print_type (char *, int); +@@ -1656,8 +1777,7 @@ extern void maintenance_print_type (char *, int); extern htab_t create_copied_types_hash (struct objfile *objfile); @@ -3253,7 +3037,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 677f587..30b849e 100644 +index 0c8349e..a07f41a 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -37,6 +37,7 @@ @@ -3264,7 +3048,7 @@ index 677f587..30b849e 100644 #include "source.h" #include "cli/cli-cmds.h" #include "python/python.h" -@@ -318,6 +319,8 @@ captured_main (void *data) +@@ -325,6 +326,8 @@ captured_main (void *data) char *cdarg = NULL; char *ttyarg = NULL; @@ -3273,7 +3057,7 @@ index 677f587..30b849e 100644 /* These are static so that we can take their address in an initializer. */ static int print_help; -@@ -517,10 +520,14 @@ captured_main (void *data) +@@ -531,10 +534,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}, @@ -3289,7 +3073,7 @@ index 677f587..30b849e 100644 { int option_index; -@@ -538,6 +545,9 @@ captured_main (void *data) +@@ -552,6 +559,9 @@ captured_main (void *data) case 0: /* Long option that just sets a flag. */ break; @@ -3299,7 +3083,7 @@ index 677f587..30b849e 100644 case OPT_SE: symarg = optarg; execarg = optarg; -@@ -747,7 +757,31 @@ captured_main (void *data) +@@ -761,7 +771,31 @@ captured_main (void *data) /* Now that gdb_init has created the initial inferior, we're in position to set args for that inferior. */ @@ -3332,7 +3116,7 @@ index 677f587..30b849e 100644 { /* The remaining options are the command-line options for the inferior. The first one is the sym/exec file, and the rest -@@ -1037,7 +1071,8 @@ captured_main (void *data) +@@ -1047,7 +1081,8 @@ captured_main (void *data) /* Read in the old history after all the command files have been read. */ @@ -3342,7 +3126,7 @@ index 677f587..30b849e 100644 if (batch_flag) { -@@ -1048,13 +1083,25 @@ captured_main (void *data) +@@ -1058,13 +1093,25 @@ captured_main (void *data) /* Show time and/or space usage. */ do_cleanups (pre_stat_chain); @@ -3374,7 +3158,7 @@ index 677f587..30b849e 100644 } /* No exit -- exit is through quit_command. */ } -@@ -1089,6 +1136,12 @@ print_gdb_help (struct ui_file *stream) +@@ -1099,6 +1146,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\ @@ -3387,7 +3171,7 @@ index 677f587..30b849e 100644 gdb [options] --args executable-file [inferior-arguments ...]\n\n\ "), stream); fputs_unfiltered (_("\ -@@ -1134,6 +1187,13 @@ Output and user interface control:\n\n\ +@@ -1144,6 +1197,13 @@ Output and user interface control:\n\n\ fputs_unfiltered (_("\ --dbx DBX compatibility mode.\n\ --xdb XDB compatibility mode.\n\ @@ -3402,7 +3186,7 @@ index 677f587..30b849e 100644 "), stream); fputs_unfiltered (_("\ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c -index 05d4c6f..acec2a2 100644 +index a87f1f4..0f93271 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -38,6 +38,7 @@ @@ -3482,10 +3266,10 @@ index 05d4c6f..acec2a2 100644 void diff --git a/gdb/parse.c b/gdb/parse.c -index 13699a8..7b930c1 100644 +index 1171289..2afdb85 100644 --- a/gdb/parse.c +++ b/gdb/parse.c -@@ -1780,6 +1780,7 @@ parser_fprintf (FILE *x, const char *y, ...) +@@ -1773,6 +1773,7 @@ parser_fprintf (FILE *x, const char *y, ...) int operator_check_standard (struct expression *exp, int pos, @@ -3493,7 +3277,7 @@ index 13699a8..7b930c1 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data) -@@ -1819,7 +1820,7 @@ operator_check_standard (struct expression *exp, int pos, +@@ -1812,7 +1813,7 @@ operator_check_standard (struct expression *exp, int pos, struct type *type = elts[pos + 2 + arg].type; struct objfile *objfile = TYPE_OBJFILE (type); @@ -3502,7 +3286,7 @@ index 13699a8..7b930c1 100644 return 1; } } -@@ -1837,7 +1838,8 @@ operator_check_standard (struct expression *exp, int pos, +@@ -1830,7 +1831,8 @@ operator_check_standard (struct expression *exp, int pos, /* Check objfile where the variable itself is placed. SYMBOL_OBJ_SECTION (symbol) may be NULL. */ @@ -3512,7 +3296,7 @@ index 13699a8..7b930c1 100644 return 1; /* Check objfile where is placed the code touching the variable. */ -@@ -1850,24 +1852,27 @@ operator_check_standard (struct expression *exp, int pos, +@@ -1843,24 +1845,27 @@ operator_check_standard (struct expression *exp, int pos, /* Invoke callbacks for TYPE and OBJFILE if they were set as non-NULL. */ @@ -3548,7 +3332,7 @@ index 13699a8..7b930c1 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data) { -@@ -1882,7 +1887,9 @@ exp_iterate (struct expression *exp, +@@ -1875,7 +1880,9 @@ exp_iterate (struct expression *exp, pos = endpos - oplen; if (exp->language_defn->la_exp_desc->operator_check (exp, pos, @@ -3559,7 +3343,7 @@ index 13699a8..7b930c1 100644 return 1; endpos = pos; -@@ -1913,8 +1920,29 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile) +@@ -1906,8 +1913,29 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile) { gdb_assert (objfile->separate_debug_objfile_backlink == NULL); @@ -3591,7 +3375,7 @@ index 13699a8..7b930c1 100644 void _initialize_parse (void) diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h -index 5fbae0d..1fdad46 100644 +index c3f2607..fa0af7b 100644 --- a/gdb/parser-defs.h +++ b/gdb/parser-defs.h @@ -245,6 +245,8 @@ extern void operator_length_standard (const struct expression *, int, int *, @@ -3612,10 +3396,10 @@ index 5fbae0d..1fdad46 100644 void *data), void *data); diff --git a/gdb/printcmd.c b/gdb/printcmd.c -index 1cc248d..eef0c66 100644 +index 10d3c23..5759d5c 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c -@@ -51,6 +51,7 @@ +@@ -50,6 +50,7 @@ #include "cli/cli-utils.h" #include "format.h" #include "source.h" @@ -3623,7 +3407,7 @@ index 1cc248d..eef0c66 100644 #ifdef TUI #include "tui/tui.h" /* For tui_active et al. */ -@@ -980,6 +981,11 @@ print_command_1 (const char *exp, int voidprint) +@@ -979,6 +980,11 @@ print_command_1 (const char *exp, int voidprint) else val = access_value_history (0); @@ -3635,7 +3419,7 @@ index 1cc248d..eef0c66 100644 if (voidprint || (val && value_type (val) && TYPE_CODE (value_type (val)) != TYPE_CODE_VOID)) { -@@ -1061,6 +1067,9 @@ output_command_const (const char *exp, int from_tty) +@@ -1060,6 +1066,9 @@ output_command_const (const char *exp, int from_tty) val = evaluate_expression (expr); @@ -3645,7 +3429,7 @@ index 1cc248d..eef0c66 100644 annotate_value_begin (value_type (val)); get_formatted_print_options (&opts, format); -@@ -1495,6 +1504,24 @@ x_command (char *exp, int from_tty) +@@ -1494,6 +1503,24 @@ x_command (char *exp, int from_tty) set_internalvar (lookup_internalvar ("__"), last_examine_value); } } @@ -3670,7 +3454,7 @@ index 1cc248d..eef0c66 100644 /* Add an expression to the auto-display chain. -@@ -1993,6 +2020,10 @@ print_variable_and_value (const char *name, struct symbol *var, +@@ -1995,6 +2022,10 @@ print_variable_and_value (const char *name, struct symbol *var, struct value_print_options opts; val = read_var_value (var, frame); @@ -3681,7 +3465,7 @@ index 1cc248d..eef0c66 100644 get_user_print_options (&opts); opts.deref_ref = 1; common_val_print (val, stream, indent, &opts, current_language); -@@ -2648,4 +2679,8 @@ Show printing of source filename and line number with ."), NULL, +@@ -2651,4 +2682,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.")); @@ -3938,19 +3722,19 @@ index 0000000..debb3bb + +InScope () diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c -index 337e307..be91c5a 100644 +index 16bb442..8cf6deb 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c -@@ -31,6 +31,8 @@ - #include "bcache.h" - #include "dwarf2loc.h" +@@ -29,6 +29,8 @@ + #include "language.h" + #include "vec.h" #include "typeprint.h" +#include "observer.h" +#include "gdb_assert.h" typedef struct pyty_type_object { -@@ -39,11 +41,19 @@ typedef struct pyty_type_object +@@ -37,11 +39,19 @@ typedef struct pyty_type_object /* If a Type object is associated with an objfile, it is kept on a doubly-linked list, rooted in the objfile. This lets us copy the @@ -3971,7 +3755,7 @@ index 337e307..be91c5a 100644 static PyTypeObject type_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("type_object"); -@@ -1180,8 +1190,63 @@ typy_richcompare (PyObject *self, PyObject *other, int op) +@@ -1024,8 +1034,63 @@ typy_richcompare (PyObject *self, PyObject *other, int op) @@ -4035,7 +3819,7 @@ index 337e307..be91c5a 100644 static void save_objfile_types (struct objfile *objfile, void *datum) { -@@ -1202,12 +1267,13 @@ save_objfile_types (struct objfile *objfile, void *datum) +@@ -1046,12 +1111,13 @@ save_objfile_types (struct objfile *objfile, void *datum) { type_object *next = obj->next; @@ -4053,7 +3837,7 @@ index 337e307..be91c5a 100644 obj = next; } -@@ -1218,43 +1284,28 @@ save_objfile_types (struct objfile *objfile, void *datum) +@@ -1062,43 +1128,28 @@ save_objfile_types (struct objfile *objfile, void *datum) } static void @@ -4111,7 +3895,7 @@ index 337e307..be91c5a 100644 /* Return number of fields ("length" of the field dictionary). */ -@@ -1474,7 +1525,10 @@ type_to_type_object (struct type *type) +@@ -1318,7 +1369,10 @@ type_to_type_object (struct type *type) type_obj = PyObject_New (type_object, &type_object_type); if (type_obj) @@ -4124,7 +3908,7 @@ index 337e307..be91c5a 100644 return (PyObject *) type_obj; } diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c -index 0d87219..c019184 100644 +index 4ab782d..eed91b878 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -29,6 +29,7 @@ @@ -4135,7 +3919,7 @@ index 0d87219..c019184 100644 #ifdef HAVE_PYTHON -@@ -1385,12 +1386,28 @@ gdbpy_is_value_object (PyObject *obj) +@@ -1503,12 +1504,28 @@ gdbpy_is_value_object (PyObject *obj) return PyObject_TypeCheck (obj, &value_object_type); } @@ -4165,7 +3949,7 @@ index 0d87219..c019184 100644 (PyObject *) &value_object_type); } diff --git a/gdb/python/python.c b/gdb/python/python.c -index 00092c7..ec49fc9 100644 +index 337c170..873c0dc 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -67,6 +67,8 @@ static const char *gdbpy_should_print_stack = python_excp_message; @@ -4177,7 +3961,7 @@ index 00092c7..ec49fc9 100644 #include "target.h" #include "gdbthread.h" #include "observer.h" -@@ -1116,6 +1118,53 @@ gdbpy_print_stack (void) +@@ -1116,6 +1118,56 @@ gdbpy_print_stack (void) /* Return the current Progspace. There always is one. */ @@ -4194,9 +3978,12 @@ index 00092c7..ec49fc9 100644 +{ + if (! running_python_script || in_cli) + return PyErr_Format (PyExc_RuntimeError, "cannot invoke CLI recursively"); ++ ++ if (ui_out_is_mi_like_p (current_uiout)) ++ return PyErr_Format (PyExc_RuntimeError, _("Cannot invoke CLI from MI.")); + + in_cli = 1; -+ cli_command_loop (); ++ current_interp_command_loop (); + in_cli = 0; + + Py_RETURN_NONE; @@ -4231,20 +4018,20 @@ index 00092c7..ec49fc9 100644 static PyObject * gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2) -@@ -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" }, +@@ -1831,6 +1883,8 @@ static PyMethodDef GdbMethods[] = + Evaluate command, a string, as a gdb CLI command. Optionally returns\n\ + a Python String containing the output of the command if to_string is\n\ + set to True." }, + { "cli", gdbpy_cli, METH_NOARGS, + "Enter the gdb CLI" }, { "parameter", gdbpy_parameter, METH_VARARGS, "Return a gdb parameter's value" }, diff --git a/gdb/python/python.h b/gdb/python/python.h -index 1a1e5c2..312be94 100644 +index 96bf7c2..79ad6c9 100644 --- a/gdb/python/python.h +++ b/gdb/python/python.h -@@ -95,6 +95,8 @@ void eval_python_from_control_command (struct command_line *); +@@ -108,6 +108,8 @@ void eval_python_from_control_command (struct command_line *); void source_python_script (FILE *file, const char *filename); @@ -4254,10 +4041,10 @@ index 1a1e5c2..312be94 100644 int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, diff --git a/gdb/stack.c b/gdb/stack.c -index d89ff89..301d569 100644 +index 314e4da..d07a9c2 100644 --- a/gdb/stack.c +++ b/gdb/stack.c -@@ -511,6 +511,10 @@ print_frame_args (struct symbol *func, struct frame_info *frame, +@@ -537,6 +537,10 @@ print_frame_args (struct symbol *func, struct frame_info *frame, stb = mem_fileopen (); old_chain = make_cleanup_ui_file_delete (stb); @@ -4269,7 +4056,7 @@ index d89ff89..301d569 100644 { struct block *b = SYMBOL_BLOCK_VALUE (func); diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp -index e22cb3a..5e16186 100644 +index afc1475..7e94c49 100644 --- a/gdb/testsuite/gdb.ada/packed_array.exp +++ b/gdb/testsuite/gdb.ada/packed_array.exp @@ -56,5 +56,11 @@ gdb_test_multiple "$test" "$test" { @@ -5449,7 +5236,7 @@ index 0000000..b05411e + +gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array" diff --git a/gdb/testsuite/gdb.base/arrayidx.c b/gdb/testsuite/gdb.base/arrayidx.c -index 2cc935b..30c7f85 100644 +index 58be08c..04e36cd 100644 --- a/gdb/testsuite/gdb.base/arrayidx.c +++ b/gdb/testsuite/gdb.base/arrayidx.c @@ -17,6 +17,13 @@ @@ -5467,7 +5254,7 @@ index 2cc935b..30c7f85 100644 main (void) { diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp -index 37ed4c3..82f30cb 100644 +index 35454e3..6144d36 100644 --- a/gdb/testsuite/gdb.base/arrayidx.exp +++ b/gdb/testsuite/gdb.base/arrayidx.exp @@ -49,4 +49,12 @@ gdb_test "print array" \ @@ -5512,7 +5299,7 @@ index 0000000..eeb7b85 +} staticstruct = { 1 }; diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.exp b/gdb/testsuite/gdb.base/internal-var-field-address.exp new file mode 100644 -index 0000000..6d82e73 +index 0000000..33c9e94 --- /dev/null +++ b/gdb/testsuite/gdb.base/internal-var-field-address.exp @@ -0,0 +1,26 @@ @@ -5533,7 +5320,7 @@ index 0000000..6d82e73 + +set test internal-var-field-address +set binfile ${test}.x -+if { [gdb_compile "${srcdir}/${subdir}/${test}.c" "${objdir}/${subdir}/${binfile}" object {debug}] != "" } { ++if { [gdb_compile "${srcdir}/${subdir}/${test}.c" "[standard_output_file ${binfile}]" object {debug}] != "" } { + untested "Couldn't compile test program" + return -1 +} @@ -6439,7 +6226,7 @@ index 0000000..5fcdd84 + .byte 0x0 /* Terminator */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp new file mode 100644 -index 0000000..c41151c +index 0000000..bc35209 --- /dev/null +++ b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp @@ -0,0 +1,37 @@ @@ -6473,7 +6260,7 @@ index 0000000..c41151c +set srcfile ${testfile}.S +set binfile ${testfile}.x + -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${binfile}" object {nodebug}] != "" } { ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "[standard_output_file ${binfile}]" object {nodebug}] != "" } { + return -1 +} + @@ -6609,7 +6396,7 @@ index 0000000..9dbbf3c + .byte 0x0 /* Terminator */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp new file mode 100644 -index 0000000..a13e346 +index 0000000..cec673c --- /dev/null +++ b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp @@ -0,0 +1,39 @@ @@ -6642,7 +6429,7 @@ index 0000000..a13e346 +set testfile dw2-subrange-no-type +set srcfile ${testfile}.S +set executable ${testfile}.x -+set binfile ${objdir}/${subdir}/${executable} ++set binfile [standard_output_file ${executable}] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { + return -1 @@ -6778,7 +6565,7 @@ index 0000000..261ce17 +end subroutine bar diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp new file mode 100644 -index 0000000..fa41b80 +index 0000000..e5a82ee --- /dev/null +++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp @@ -0,0 +1,37 @@ @@ -6801,9 +6588,9 @@ index 0000000..fa41b80 +set testfile "dynamic-other-frame" +set srcfile1 ${testfile}.f90 +set srcfile2 ${testfile}-stub.f90 -+set objfile2 ${objdir}/${subdir}/${testfile}-stub.o ++set objfile2 [standard_output_file ${testfile}-stub.o] +set executable ${testfile} -+set binfile ${objdir}/${subdir}/${executable} ++set binfile [standard_output_file ${executable}] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${objfile2}" object {f90}] != "" + || [gdb_compile "${srcdir}/${subdir}/${srcfile1} ${objfile2}" "${binfile}" executable {debug f90}] != "" } { @@ -7332,7 +7119,7 @@ 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 d700715..6ebca0a 100644 +index 1d02779..f9f5be4 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -92,6 +92,10 @@ proc do_steps_and_nexts {} { @@ -7380,7 +7167,7 @@ index 0000000..ebced3c +} diff --git a/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp b/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp new file mode 100644 -index 0000000..99b6cc7 +index 0000000..88326c0 --- /dev/null +++ b/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp @@ -0,0 +1,57 @@ @@ -7409,7 +7196,7 @@ index 0000000..99b6cc7 + +set testfile "mi2-var-stale-type" +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if {[build_executable ${testfile}.exp $testfile $srcfile] == -1} { + return -1 +} @@ -7741,7 +7528,7 @@ index 0000000..295602d + writeln(s); { set breakpoint 2 here } +end. diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp -index 806da94..b22231a 100644 +index 3517824..4fa2bd8 100644 --- a/gdb/testsuite/gdb.python/py-frame.exp +++ b/gdb/testsuite/gdb.python/py-frame.exp @@ -94,3 +94,5 @@ gdb_test "python print ('result = %s' % f0.read_var ('variable_which_surely_does @@ -7751,10 +7538,10 @@ index 806da94..b22231a 100644 + +gdb_test "python print ('result = %s' % (f0.block ()))" "" "test Frame.block" diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp -index 9142c72..2855220 100644 +index ed332db..06466ec 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp -@@ -366,6 +366,15 @@ proc test_value_after_death {} { +@@ -385,6 +385,15 @@ proc test_value_after_death {} { "print value's type" } @@ -7770,19 +7557,19 @@ index 9142c72..2855220 100644 # Regression test for invalid subscript operations. The bug was that # the type of the value was not being checked before allowing a # subscript operation to proceed. -@@ -492,6 +501,7 @@ test_value_in_inferior +@@ -512,6 +521,7 @@ test_value_in_inferior test_inferior_function_call test_lazy_strings test_value_after_death +test_cast_regression # 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 70b797e..3588e1d 100644 +index 2713ddf..533b81b 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp -@@ -143,6 +143,11 @@ proc gdb_unload {} { +@@ -150,6 +150,11 @@ proc gdb_unload {} { send_gdb "y\n" exp_continue } @@ -7795,7 +7582,7 @@ index 70b797e..3588e1d 100644 send_gdb "y\n" exp_continue diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp -index 784ab6c..9e0a844 100644 +index 1b494ee..3bb8ad9 100644 --- a/gdb/testsuite/lib/pascal.exp +++ b/gdb/testsuite/lib/pascal.exp @@ -37,6 +37,9 @@ proc pascal_init {} { @@ -7830,10 +7617,10 @@ index 784ab6c..9e0a844 100644 set pascal_init_done 1 } diff --git a/gdb/top.c b/gdb/top.c -index 33a78da..22992ba 100644 +index d068450..e2b4110 100644 --- a/gdb/top.c +++ b/gdb/top.c -@@ -342,6 +342,9 @@ prepare_execute_command (void) +@@ -331,6 +331,9 @@ prepare_execute_command (void) mark = value_mark (); cleanup = make_cleanup_value_free_to_mark (mark); @@ -7844,11 +7631,11 @@ index 33a78da..22992ba 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 4e70593..e8402a2 100644 +index 09993dd..9fcb3b3 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -34,6 +34,7 @@ - #include "gdb_string.h" + #include #include "exceptions.h" #include "valprint.h" +#include "dwarf2loc.h" @@ -7882,10 +7669,10 @@ index 4e70593..e8402a2 100644 get_user_print_options (&opts); diff --git a/gdb/utils.c b/gdb/utils.c -index 94ebce8..23a4986 100644 +index e062e89..773242d 100644 --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -1725,6 +1725,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void) +@@ -1745,6 +1745,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void) return back_to; } @@ -7923,10 +7710,10 @@ index 94ebce8..23a4986 100644 static void diff --git a/gdb/utils.h b/gdb/utils.h -index 0f6bb06..283137e 100644 +index 8bbcc5f..1342d68 100644 --- a/gdb/utils.h +++ b/gdb/utils.h -@@ -384,4 +384,6 @@ extern ULONGEST align_down (ULONGEST v, int n); +@@ -382,4 +382,6 @@ extern ULONGEST align_down (ULONGEST v, int n); extern LONGEST gdb_sign_extend (LONGEST value, int bit); @@ -7934,7 +7721,7 @@ index 0f6bb06..283137e 100644 + #endif /* UTILS_H */ diff --git a/gdb/valarith.c b/gdb/valarith.c -index 18c14fc..0a3a3aa 100644 +index 8e863e3..97a8b0f 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -195,7 +195,10 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound) @@ -7961,18 +7748,18 @@ index 18c14fc..0a3a3aa 100644 } diff --git a/gdb/valops.c b/gdb/valops.c -index a3ab24f..53af842 100644 +index 5382c49..0de8009 100644 --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -44,6 +44,7 @@ +@@ -42,6 +42,7 @@ + #include "observer.h" #include "objfiles.h" - #include "symtab.h" #include "exceptions.h" +#include "dwarf2loc.h" extern unsigned int overload_debug; /* Local functions. */ -@@ -902,6 +903,65 @@ value_one (struct type *type) +@@ -900,6 +901,65 @@ value_one (struct type *type) return val; } @@ -8038,7 +7825,7 @@ index a3ab24f..53af842 100644 /* Helper function for value_at, value_at_lazy, and value_at_lazy_stack. */ static struct value * -@@ -1366,7 +1426,18 @@ address_of_variable (struct symbol *var, const struct block *b) +@@ -1365,7 +1425,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) { @@ -8058,7 +7845,7 @@ index a3ab24f..53af842 100644 return value_from_pointer (lookup_pointer_type (type), addr); } -@@ -1473,6 +1544,7 @@ struct value * +@@ -1472,6 +1543,7 @@ struct value * value_coerce_array (struct value *arg1) { struct type *type = check_typedef (value_type (arg1)); @@ -8066,7 +7853,7 @@ index a3ab24f..53af842 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 -@@ -1482,8 +1554,12 @@ value_coerce_array (struct value *arg1) +@@ -1481,8 +1553,12 @@ value_coerce_array (struct value *arg1) if (VALUE_LVAL (arg1) != lval_memory) error (_("Attempt to take address of value not located in memory.")); @@ -8080,7 +7867,7 @@ index a3ab24f..53af842 100644 } /* Given a value which is a function, return a value which is a pointer -@@ -3558,6 +3634,8 @@ value_slice (struct value *array, int lowbound, int length) +@@ -3571,6 +3647,8 @@ value_slice (struct value *array, int lowbound, int length) TYPE_TARGET_TYPE (range_type), lowbound, lowbound + length - 1); @@ -8090,7 +7877,7 @@ index a3ab24f..53af842 100644 { struct type *element_type = TYPE_TARGET_TYPE (array_type); diff --git a/gdb/valprint.c b/gdb/valprint.c -index 753ae34..6d87d9c 100644 +index 01889c5..e25e3c8 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -37,6 +37,7 @@ @@ -8101,7 +7888,7 @@ index 753ae34..6d87d9c 100644 #include -@@ -290,7 +291,6 @@ scalar_type_p (struct type *type) +@@ -290,7 +291,6 @@ val_print_scalar_type_p (struct type *type) case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: case TYPE_CODE_SET: @@ -8109,7 +7896,7 @@ index 753ae34..6d87d9c 100644 return 0; default: return 1; -@@ -1607,6 +1607,7 @@ val_print_array_elements (struct type *type, +@@ -1625,6 +1625,7 @@ val_print_array_elements (struct type *type, { unsigned int things_printed = 0; unsigned len; @@ -8117,7 +7904,7 @@ index 753ae34..6d87d9c 100644 struct type *elttype, *index_type; unsigned eltlen; /* Position of the array element we are examining to see -@@ -1615,9 +1616,33 @@ val_print_array_elements (struct type *type, +@@ -1633,9 +1634,33 @@ val_print_array_elements (struct type *type, /* Number of repetitions we have detected so far. */ unsigned int reps; LONGEST low_bound, high_bound; @@ -8153,7 +7940,7 @@ index 753ae34..6d87d9c 100644 index_type = TYPE_INDEX_TYPE (type); if (get_array_bounds (type, &low_bound, &high_bound)) -@@ -1704,6 +1729,8 @@ val_print_array_elements (struct type *type, +@@ -1722,6 +1747,8 @@ val_print_array_elements (struct type *type, { fprintf_filtered (stream, "..."); } @@ -8163,7 +7950,7 @@ index 753ae34..6d87d9c 100644 /* Read LEN bytes of target memory at address MEMADDR, placing the diff --git a/gdb/value.c b/gdb/value.c -index 8d635c7..cce87c6 100644 +index 8542316..f75cf37 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -43,6 +43,7 @@ @@ -8174,7 +7961,7 @@ index 8d635c7..cce87c6 100644 /* Prototypes for exported functions. */ -@@ -1448,12 +1449,15 @@ void +@@ -1623,12 +1624,15 @@ void set_value_component_location (struct value *component, const struct value *whole) { @@ -8190,7 +7977,7 @@ index 8d635c7..cce87c6 100644 if (whole->lval == lval_computed) { const struct lval_funcs *funcs = whole->location.computed.funcs; -@@ -1461,6 +1465,12 @@ set_value_component_location (struct value *component, +@@ -1636,6 +1640,12 @@ set_value_component_location (struct value *component, if (funcs->copy_closure) component->location.computed.closure = funcs->copy_closure (whole); } @@ -8203,7 +7990,7 @@ index 8d635c7..cce87c6 100644 } -@@ -1594,6 +1604,31 @@ show_values (char *num_exp, int from_tty) +@@ -1769,6 +1779,31 @@ show_values (char *num_exp, int from_tty) num_exp[1] = '\0'; } } @@ -8235,7 +8022,7 @@ index 8d635c7..cce87c6 100644 /* Internal variables. These are variables within the debugger that hold values assigned by debugger commands. -@@ -2129,6 +2164,38 @@ call_internal_function (struct gdbarch *gdbarch, +@@ -2304,6 +2339,38 @@ call_internal_function (struct gdbarch *gdbarch, return (*ifn->handler) (gdbarch, language, ifn->cookie, argc, argv); } @@ -8274,7 +8061,7 @@ index 8d635c7..cce87c6 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 -@@ -2176,11 +2243,10 @@ preserve_one_value (struct value *value, struct objfile *objfile, +@@ -2351,11 +2418,10 @@ preserve_one_value (struct value *value, struct objfile *objfile, htab_t copied_types) { if (TYPE_OBJFILE (value->type) == objfile) @@ -8288,7 +8075,7 @@ index 8d635c7..cce87c6 100644 copied_types); } -@@ -2195,7 +2261,7 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile, +@@ -2370,7 +2436,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 @@ -8297,7 +8084,7 @@ index 8d635c7..cce87c6 100644 break; case INTERNALVAR_VALUE: -@@ -3308,10 +3374,27 @@ readjust_indirect_value_type (struct value *value, struct type *enc_type, +@@ -3479,10 +3545,27 @@ readjust_indirect_value_type (struct value *value, struct type *enc_type, struct value * coerce_ref (struct value *arg) { @@ -8326,7 +8113,7 @@ index 8d635c7..cce87c6 100644 retval = coerce_ref_if_computed (arg); if (retval) return retval; -@@ -3419,7 +3502,8 @@ int +@@ -3590,7 +3673,8 @@ int value_fetch_lazy (struct value *val) { gdb_assert (value_lazy (val)); @@ -8336,7 +8123,7 @@ index 8d635c7..cce87c6 100644 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) +@@ -3625,13 +3709,24 @@ value_fetch_lazy (struct value *val) } else if (VALUE_LVAL (val) == lval_memory) { @@ -8367,10 +8154,10 @@ index 8d635c7..cce87c6 100644 } 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); +@@ -3814,4 +3909,10 @@ Check whether an expression is void.\n\ + Usage: $_isvoid (expression)\n\ + Return 1 if the expression is void, zero otherwise."), + isvoid_internal_fn, NULL); + + make_final_cleanup (value_history_cleanup, NULL); + @@ -8379,10 +8166,10 @@ index 8d635c7..cce87c6 100644 +#endif } diff --git a/gdb/value.h b/gdb/value.h -index 5e00c89..d9efe3e 100644 +index 5924b2f..eae3553 100644 --- a/gdb/value.h +++ b/gdb/value.h -@@ -548,6 +548,10 @@ extern struct value *value_from_decfloat (struct type *type, +@@ -571,6 +571,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 73e3f97..1f58d34 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -37,22 +37,22 @@ gdb/gdbserver/ (linux_create_inferior, linux_tracefork_child): Call it instead of direct ptrace. -Index: gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.c +Index: gdb-7.6.90.20140127/gdb/common/linux-ptrace.c =================================================================== ---- 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" +--- gdb-7.6.90.20140127.orig/gdb/common/linux-ptrace.c 2014-02-06 17:40:32.530145960 +0100 ++++ gdb-7.6.90.20140127/gdb/common/linux-ptrace.c 2014-02-06 17:48:16.329644534 +0100 +@@ -32,6 +32,10 @@ + + #include +#ifdef HAVE_SELINUX_SELINUX_H +# include +#endif /* HAVE_SELINUX_SELINUX_H */ + - /* Find all possible reasons we could fail to attach PID and append these - newline terminated reason strings to initialized BUFFER. '\0' termination - of BUFFER must be done by the caller. */ -@@ -48,6 +52,8 @@ linux_ptrace_attach_warnings (pid_t pid, + /* Stores the currently supported ptrace options. A value of + -1 means we did not check for features yet. A value of 0 means + there are no supported features. */ +@@ -56,6 +60,8 @@ linux_ptrace_attach_warnings (pid_t pid, buffer_xml_printf (buffer, _("warning: process %d is a zombie " "- the process has already terminated\n"), (int) pid); @@ -61,7 +61,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.c } #if defined __i386__ || defined __x86_64__ -@@ -236,3 +242,19 @@ linux_ptrace_init_warnings (void) +@@ -542,3 +548,19 @@ linux_ptrace_init_warnings (void) linux_ptrace_test_ret_to_nx (); } @@ -81,22 +81,23 @@ Index: gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.c + "(gdb) shell sudo setsebool deny_ptrace=0")); +#endif /* HAVE_LIBSELINUX */ +} -Index: gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.h +Index: gdb-7.6.90.20140127/gdb/common/linux-ptrace.h =================================================================== ---- 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; +--- gdb-7.6.90.20140127.orig/gdb/common/linux-ptrace.h 2014-02-06 17:40:35.506149162 +0100 ++++ gdb-7.6.90.20140127/gdb/common/linux-ptrace.h 2014-02-06 17:48:00.601627995 +0100 +@@ -85,6 +85,7 @@ struct buffer; extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer); extern void linux_ptrace_init_warnings (void); +extern void linux_ptrace_create_warnings (struct buffer *buffer); - - #endif /* COMMON_LINUX_PTRACE_H */ -Index: gdb-7.6.50.20130731-cvs/gdb/configure.ac + extern void linux_enable_event_reporting (pid_t pid); + extern int linux_supports_tracefork (void); + extern int linux_supports_traceclone (void); +Index: gdb-7.6.90.20140127/gdb/configure.ac =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/configure.ac 2014-02-06 17:40:32.532145962 +0100 ++++ gdb-7.6.90.20140127/gdb/configure.ac 2014-02-06 17:40:35.507149163 +0100 +@@ -1975,6 +1975,10 @@ case $host_os in esac AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) @@ -107,11 +108,11 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/gdbserver/configure.ac +Index: gdb-7.6.90.20140127/gdb/gdbserver/configure.ac =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/gdbserver/configure.ac 2014-02-06 17:40:32.532145962 +0100 ++++ gdb-7.6.90.20140127/gdb/gdbserver/configure.ac 2014-02-06 17:40:35.507149163 +0100 +@@ -454,6 +454,10 @@ if $want_ipa ; then fi fi @@ -122,11 +123,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure.ac AC_SUBST(GDBSERVER_DEPFILES) AC_SUBST(GDBSERVER_LIBS) AC_SUBST(srv_xmlbuiltin) -Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/linux-low.c +Index: gdb-7.6.90.20140127/gdb/gdbserver/linux-low.c =================================================================== ---- 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) +--- gdb-7.6.90.20140127.orig/gdb/gdbserver/linux-low.c 2014-02-06 17:40:32.534145964 +0100 ++++ gdb-7.6.90.20140127/gdb/gdbserver/linux-low.c 2014-02-06 17:49:32.385726514 +0100 +@@ -543,6 +543,29 @@ add_lwp (ptid_t ptid) return lwp; } @@ -140,7 +141,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/linux-low.c + + errno = 0; + if (ptrace (PTRACE_TRACEME, 0, -+ (PTRACE_ARG3_TYPE) 0, (PTRACE_ARG4_TYPE) 0) == 0) ++ (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) == 0) + return; + + save_errno = errno; @@ -156,29 +157,20 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/linux-low.c /* Start an inferior process and returns its pid. ALLARGS is a vector of program-name and args. */ -@@ -662,7 +685,7 @@ linux_create_inferior (char *program, ch - +@@ -584,7 +607,7 @@ linux_create_inferior (char *program, ch if (pid == 0) { -- ptrace (PTRACE_TRACEME, 0, (PTRACE_ARG3_TYPE) 0, (PTRACE_ARG4_TYPE) 0); + close_most_fds (); +- ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0); + linux_traceme (program); #ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */ signal (__SIGRTMIN + 1, SIG_DFL); -@@ -4685,7 +4708,7 @@ linux_tracefork_grandchild (void *arg) - static int - linux_tracefork_child (void *arg) - { -- ptrace (PTRACE_TRACEME, 0, (PTRACE_ARG3_TYPE) 0, (PTRACE_ARG4_TYPE) 0); -+ linux_traceme ("PTRACE_O_TRACEFORK test"); - kill (getpid (), SIGSTOP); - - #if !(defined(__UCLIBC__) && defined(HAS_NOMMU)) -Index: gdb-7.6.50.20130731-cvs/gdb/inf-ptrace.c +Index: gdb-7.6.90.20140127/gdb/inf-ptrace.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/inf-ptrace.c 2014-02-06 17:40:32.535145965 +0100 ++++ gdb-7.6.90.20140127/gdb/inf-ptrace.c 2014-02-06 17:40:35.510149167 +0100 +@@ -105,7 +105,15 @@ static void inf_ptrace_me (void) { /* "Trace me, Dr. Memory!" */ @@ -194,11 +186,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/inf-ptrace.c } /* Start a new inferior Unix child process. EXEC_FILE is the file to -Index: gdb-7.6.50.20130731-cvs/gdb/linux-nat.c +Index: gdb-7.6.90.20140127/gdb/linux-nat.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/linux-nat.c 2014-02-06 17:40:32.537145968 +0100 ++++ gdb-7.6.90.20140127/gdb/linux-nat.c 2014-02-06 17:40:35.511149168 +0100 +@@ -1283,6 +1283,7 @@ linux_nat_create_inferior (struct target #ifdef HAVE_PERSONALITY int personality_orig = 0, personality_set = 0; #endif /* HAVE_PERSONALITY */ @@ -206,7 +198,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/linux-nat.c /* The fork_child mechanism is synchronous and calls target_wait, so we have to mask the async mode. */ -@@ -1578,7 +1579,10 @@ linux_nat_create_inferior (struct target +@@ -1307,7 +1308,10 @@ linux_nat_create_inferior (struct target /* Make sure we report all signals during startup. */ linux_nat_pass_signals (0, NULL); @@ -218,7 +210,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/linux-nat.c #ifdef HAVE_PERSONALITY if (personality_set) -@@ -1590,6 +1594,24 @@ linux_nat_create_inferior (struct target +@@ -1319,6 +1323,24 @@ linux_nat_create_inferior (struct target safe_strerror (errno)); } #endif /* HAVE_PERSONALITY */ @@ -243,11 +235,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/linux-nat.c } static void -Index: gdb-7.6.50.20130731-cvs/gdb/config.in +Index: gdb-7.6.90.20140127/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 @@ +--- gdb-7.6.90.20140127.orig/gdb/config.in 2014-02-06 17:40:32.538145969 +0100 ++++ gdb-7.6.90.20140127/gdb/config.in 2014-02-06 17:40:35.511149168 +0100 +@@ -213,6 +213,9 @@ /* Define if librpm library is being used. */ #undef HAVE_LIBRPM @@ -257,7 +249,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/config.in /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -@@ -372,6 +375,9 @@ +@@ -345,6 +348,9 @@ /* Define to 1 if you have the `sbrk' function. */ #undef HAVE_SBRK @@ -267,11 +259,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/config.in /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE -Index: gdb-7.6.50.20130731-cvs/gdb/configure +Index: gdb-7.6.90.20140127/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 +--- gdb-7.6.90.20140127.orig/gdb/configure 2014-02-06 17:40:32.541145972 +0100 ++++ gdb-7.6.90.20140127/gdb/configure 2014-02-06 17:40:35.515149172 +0100 +@@ -12861,6 +12861,64 @@ cat >>confdefs.h <<_ACEOF _ACEOF @@ -336,24 +328,21 @@ Index: gdb-7.6.50.20130731-cvs/gdb/configure # 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 +Index: gdb-7.6.90.20140127/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 +--- gdb-7.6.90.20140127.orig/gdb/gdbserver/config.in 2014-02-06 17:40:32.542145973 +0100 ++++ gdb-7.6.90.20140127/gdb/gdbserver/config.in 2014-02-06 17:54:06.923021799 +0100 +@@ -78,6 +78,9 @@ + /* Define to 1 if you have the `mcheck' library (-lmcheck). */ + #undef HAVE_LIBMCHECK -+/* 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 @@ +@@ -151,6 +154,9 @@ /* Define to 1 if you have the `readlink' function. */ #undef HAVE_READLINK @@ -363,11 +352,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/config.in /* Define to 1 if you have the header file. */ #undef HAVE_SGTTY_H -Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure +Index: gdb-7.6.90.20140127/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 +--- gdb-7.6.90.20140127.orig/gdb/gdbserver/configure 2014-02-06 17:40:32.543145974 +0100 ++++ gdb-7.6.90.20140127/gdb/gdbserver/configure 2014-02-06 17:40:35.516149173 +0100 +@@ -6170,6 +6170,64 @@ if $want_ipa ; then fi fi diff --git a/gdb-bz541866-rwatch-before-run.patch b/gdb-bz541866-rwatch-before-run.patch index 46650e3..e6073eb 100644 --- a/gdb-bz541866-rwatch-before-run.patch +++ b/gdb-bz541866-rwatch-before-run.patch @@ -1,20 +1,20 @@ -Index: gdb-7.5.91.20130323/gdb/config/i386/linux64.mh +Index: gdb-7.6.90.20140127/gdb/config/i386/linux64.mh =================================================================== ---- 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 \ +--- gdb-7.6.90.20140127.orig/gdb/config/i386/linux64.mh 2014-02-06 17:30:23.021489736 +0100 ++++ gdb-7.6.90.20140127/gdb/config/i386/linux64.mh 2014-02-06 17:30:44.984513403 +0100 +@@ -5,7 +5,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \ proc-service.o linux-thread-db.o linux-fork.o \ - linux-procfs.o linux-ptrace.o linux-btrace.o + linux-procfs.o linux-ptrace.o linux-btrace.o \ + linux-waitpid.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.5.91.20130323/gdb/config/i386/linux.mh +Index: gdb-7.6.90.20140127/gdb/config/i386/linux.mh =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/config/i386/linux.mh 2014-02-06 17:30:15.893482056 +0100 ++++ gdb-7.6.90.20140127/gdb/config/i386/linux.mh 2014-02-06 17:30:23.021489736 +0100 @@ -1,6 +1,6 @@ # Host: Intel 386 running GNU/Linux. @@ -23,10 +23,10 @@ Index: gdb-7.5.91.20130323/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.5.91.20130323/gdb/config/i386/nm-linux.h +Index: gdb-7.6.90.20140127/gdb/config/i386/nm-linux.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/config/i386/nm-linux.h 2013-03-23 19:48:22.757990256 +0100 ++++ gdb-7.6.90.20140127/gdb/config/i386/nm-linux.h 2014-02-06 17:30:23.021489736 +0100 @@ -0,0 +1,28 @@ +/* Native support for GNU/Linux i386. + @@ -56,10 +56,10 @@ Index: gdb-7.5.91.20130323/gdb/config/i386/nm-linux.h +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 + +#endif /* NM_LINUX64_H */ -Index: gdb-7.5.91.20130323/gdb/config/i386/nm-linux64.h +Index: gdb-7.6.90.20140127/gdb/config/i386/nm-linux64.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/config/i386/nm-linux64.h 2013-03-23 19:48:22.757990256 +0100 ++++ gdb-7.6.90.20140127/gdb/config/i386/nm-linux64.h 2014-02-06 17:30:23.021489736 +0100 @@ -0,0 +1,28 @@ +/* Native support for GNU/Linux amd64. + @@ -89,11 +89,11 @@ Index: gdb-7.5.91.20130323/gdb/config/i386/nm-linux64.h +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 + +#endif /* NM_LINUX64_H */ -Index: gdb-7.5.91.20130323/gdb/target.h +Index: gdb-7.6.90.20140127/gdb/target.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/target.h 2014-02-06 17:30:15.894482057 +0100 ++++ gdb-7.6.90.20140127/gdb/target.h 2014-02-06 17:30:23.022489737 +0100 +@@ -1521,8 +1521,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.5.91.20130323/gdb/target.h /* Returns the number of debug registers needed to watch the given memory region, or zero if not supported. */ -Index: gdb-7.5.91.20130323/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130323/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2013-03-23 19:48:22.758990238 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2014-02-06 17:30:23.022489737 +0100 @@ -0,0 +1,40 @@ +# Copyright 2009, 2010 Free Software Foundation, Inc. + diff --git a/gdb-bz601887-dwarf4-rh-test.patch b/gdb-bz601887-dwarf4-rh-test.patch index 4774bda..a103da1 100644 --- a/gdb-bz601887-dwarf4-rh-test.patch +++ b/gdb-bz601887-dwarf4-rh-test.patch @@ -1,5 +1,7 @@ ---- /dev/null 2010-06-08 20:35:46.800278452 +0200 -+++ gdb-7.1/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S 2010-06-09 15:22:57.000000000 +0200 +Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S 2014-02-06 22:02:21.981449555 +0100 @@ -0,0 +1,167 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -168,8 +170,10 @@ + .string "main" + .ident "GCC: (GNU) 4.4.4 20100503 (Red Hat 4.4.4-2)" + .section .note.GNU-stack,"",@progbits ---- /dev/null 2010-06-08 20:35:46.800278452 +0200 -+++ gdb-7.1/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c 2010-06-09 15:21:35.000000000 +0200 +Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c 2014-02-06 22:02:21.981449555 +0100 @@ -0,0 +1,22 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -193,8 +197,10 @@ +{ + return 0; +} ---- /dev/null 2010-06-08 20:35:46.800278452 +0200 -+++ gdb-7.1/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp 2010-06-09 15:26:21.000000000 +0200 +Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp 2014-02-06 22:12:10.788032417 +0100 @@ -0,0 +1,42 @@ +# Copyright 2010 Free Software Foundation, Inc. + @@ -229,7 +235,7 @@ +set testfile "rh-dwarf4-x86_64" +set srcfile ${testfile}.S +set executable ${testfile}.x -+set binfile ${objdir}/${subdir}/${executable} ++set binfile [standard_output_file ${executable}] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { + return -1 diff --git a/gdb-core-open-vdso-warning.patch b/gdb-core-open-vdso-warning.patch index 6c42e5a..5bd3ef9 100644 --- a/gdb-core-open-vdso-warning.patch +++ b/gdb-core-open-vdso-warning.patch @@ -3,89 +3,10 @@ Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Inp [ New patch variant. ] -Index: gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c -=================================================================== ---- 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) - { -- warning (_("Can't read pathname for load map: %s."), -- safe_strerror (errcode)); -+ /* During the first ever DSO list reading some strings may be -+ unreadable as residing in the ld.so readonly memory not being -+ present in a dumped core file. Delay the error check after -+ the first pass of DSO list scanning when ld.so should be -+ already mapped in and all the DSO list l_name memory gets -+ readable. */ -+ -+ if (master_so_list () != NULL) -+ warning (_("Can't read pathname for load map: %s."), -+ safe_strerror (errcode)); -+ - do_cleanups (old_chain); - continue; - } -Index: gdb-7.6.50.20130731-cvs/gdb/solib.c -=================================================================== ---- 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) - { - const struct target_so_ops *ops = solib_ops (target_gdbarch ()); - struct so_list *inferior = ops->current_sos(); -@@ -840,6 +840,21 @@ Do you need \"set solib-search-path\" or - } - } - -+/* Wrapper for Fedora: gdb-core-open-vdso-warning.patch */ -+ -+static void -+update_solib_list (int from_tty, struct target_ops *target) -+{ -+ struct so_list *saved_so_list_head = so_list_head; -+ -+ update_solib_list_1 (from_tty, target); -+ -+ /* If this was the very first DSO list scan and we possibly read in ld.so -+ recheck all the formerly unreadable DSO names strings. */ -+ -+ if (saved_so_list_head == NULL && so_list_head != NULL) -+ update_solib_list_1 (from_tty, target); -+} - - /* Return non-zero if NAME is the libpthread shared library. - -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/corefile.exp -=================================================================== ---- 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 - } -+ -+ -+# Test Linux specific vDSO warning: -+# warning: Can't read pathname for load map: Input/output error. -+ -+clean_restart ${testfile} -+ -+set test "core-file vdso warning" -+gdb_test_multiple "core-file $corefile" $test { -+ -re "warning: Can't read pathname for load map: Input/output error\\.\r\n.*\r\n$gdb_prompt $" { -+ fail $test -+ } -+ -re "\r\n$gdb_prompt $" { -+ pass $test -+ } -+} +commit 7d760051ffb8a23cdc51342d4e6243fbc462f73f +Author: Ulrich Weigand +Date: Wed Sep 25 11:52:50 2013 +0000 + Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/solib-symbol.exp =================================================================== --- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/solib-symbol.exp 2013-08-02 16:27:28.833259471 +0200 diff --git a/gdb-gdb-add-index-script.patch b/gdb-gdb-add-index-script.patch index d63077c..da88642 100644 --- a/gdb-gdb-add-index-script.patch +++ b/gdb-gdb-add-index-script.patch @@ -40,12 +40,12 @@ 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.6.50.20130731-cvs/gdb/Makefile.in +Index: gdb-7.6.90.20140127/gdb/Makefile.in =================================================================== ---- 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 \ +--- gdb-7.6.90.20140127.orig/gdb/Makefile.in 2014-02-06 17:37:54.555975958 +0100 ++++ gdb-7.6.90.20140127/gdb/Makefile.in 2014-02-06 17:38:52.110038415 +0100 +@@ -1093,6 +1093,15 @@ install-only: install-gstack $(CONFIG_IN + $(INSTALL_SCRIPT) gcore \ $(DESTDIR)$(bindir)/$$transformed_name; \ fi + transformed_name=`t='$(program_transform_name)'; \ @@ -55,16 +55,16 @@ Index: gdb-7.6.50.20130731-cvs/gdb/Makefile.in + else \ + true ; \ + fi ; \ -+ $(INSTALL_PROGRAM) $(srcdir)/gdb-add-index \ ++ $(INSTALL_PROGRAM) $(srcdir)/contrib/gdb-add-index.sh \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do - install-python: -Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo + install-strip: +Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/doc/gdb.texinfo 2014-02-06 17:37:50.822971940 +0100 ++++ gdb-7.6.90.20140127/gdb/doc/gdb.texinfo 2014-02-06 17:37:54.565975968 +0100 +@@ -17749,6 +17749,14 @@ There are currently some limitation on i for DWARF debugging information, not stabs. And, they do not currently work for programs using Ada. @@ -79,7 +79,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo @node Symbol Errors @section Errors Reading Symbol Files -@@ -43044,6 +43052,7 @@ switch (die->tag) +@@ -43878,6 +43886,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 @@ -87,7 +87,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo @end menu @node gdb man -@@ -43696,6 +43705,54 @@ gdb(1), @code{info -f gdb -n Startup} +@@ -44530,6 +44539,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 @@ -142,46 +142,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo @smallexample info gdb -Index: gdb-7.6.50.20130731-cvs/gdb/gdb-add-index +Index: gdb-7.6.90.20140127/gdb/doc/Makefile.in =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.50.20130731-cvs/gdb/gdb-add-index 2013-08-02 16:32:08.271690176 +0200 -@@ -0,0 +1,30 @@ -+#! /bin/sh -+ -+# Add a .gdb_index section to a file. -+ -+# Copyright (C) 2010 Free Software Foundation, Inc. -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+file="$1" -+dir="${file%/*}" -+ -+# We don't care if gdb gives an error. -+gdb -nx -iex 'set auto-load no' --batch-silent -ex "file $file" -ex "save gdb-index $dir" -+ -+if test -f "${file}.gdb-index"; then -+ objcopy --add-section .gdb_index="${file}.gdb-index" --set-section-flags .gdb_index=readonly "$file" "$file" -+ rm -f "${file}.gdb-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 +--- gdb-7.6.90.20140127.orig/gdb/doc/Makefile.in 2014-02-06 17:37:50.824971942 +0100 ++++ gdb-7.6.90.20140127/gdb/doc/Makefile.in 2014-02-06 17:37:54.565975968 +0100 +@@ -165,7 +165,7 @@ POD2MAN5 = pod2man --center="GNU Develop --release="gdb-`sed q version.subst`" --section=5 # List of man pages generated from gdb.texi @@ -190,7 +155,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/doc/Makefile.in MAN5S = gdbinit.5 MANS = $(MAN1S) $(MAN5S) -@@ -630,6 +630,13 @@ gcore.1: $(GDB_DOC_FILES) +@@ -590,6 +590,13 @@ gcore.1: $(GDB_DOC_FILES) mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f gcore.pod diff --git a/gdb-glibc-strstr-workaround.patch b/gdb-glibc-strstr-workaround.patch index dc9242e..c6383db 100644 --- a/gdb-glibc-strstr-workaround.patch +++ b/gdb-glibc-strstr-workaround.patch @@ -1,8 +1,8 @@ -Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c +Index: gdb-7.6.90.20140127/gdb/dwarf2read.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-02-06 18:18:09.676572271 +0100 ++++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-02-06 18:18:42.664607823 +0100 +@@ -17646,6 +17646,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, &objfile->objfile_obstack); linkagename = dwarf2_physname (name, die, cu); @@ -11,7 +11,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c + * invalid IFUNC DW_AT_linkage_name: memmove strstr time + * http://sourceware.org/bugzilla/show_bug.cgi?id=14166 */ + if (strcmp (linkagename, "strstr") == 0 -+ && strstr (objfile->name, "/libc") != NULL) ++ && strstr (objfile_name (objfile), "/libc") != NULL) + { + struct objfile *objfile_msym; + struct minimal_symbol *msym; @@ -28,10 +28,10 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp 2013-08-02 16:37:51.620241697 +0200 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp 2014-02-06 18:18:16.294579381 +0100 @@ -0,0 +1,108 @@ +# Copyright (C) 2012 Free Software Foundation, Inc. + diff --git a/gdb-implicit-this.patch b/gdb-implicit-this.patch deleted file mode 100644 index 0ce72dd..0000000 --- a/gdb-implicit-this.patch +++ /dev/null @@ -1,299 +0,0 @@ -Index: gdb-7.6.50.20130731-cvs/gdb/c-exp.y -=================================================================== ---- gdb-7.6.50.20130731-cvs.orig/gdb/c-exp.y 2013-11-09 18:41:48.706718127 +0100 -+++ gdb-7.6.50.20130731-cvs/gdb/c-exp.y 2013-11-09 18:42:19.291697661 +0100 -@@ -2944,6 +2944,30 @@ classify_inner_name (const struct block - { - case LOC_BLOCK: - case LOC_LABEL: -+ { -+ struct field_of_this_result fot; -+ -+ /* We might have erroneously found a constructor where we wanted -+ a type name. The trick is ascertaining what the user wanted. -+ If cp_lookup_nested_symbol found a constructor, but it is for a -+ different type than CONTEXT, then this is really a type, not a -+ constructor. Look for the type and return that. */ -+ memset (&fot, 0, sizeof (fot)); -+ check_field (type, copy, &fot); -+ if (fot.fn_field != NULL -+ && TYPE_FN_FIELD_CONSTRUCTOR (fot.fn_field->fn_fields, 0) -+ && !types_equal (type, fot.type)) -+ { -+ struct symbol *sym; -+ -+ sym = lookup_symbol (copy, block, STRUCT_DOMAIN, NULL); -+ if (sym != NULL) -+ { -+ yylval.tsym.type = SYMBOL_TYPE (sym); -+ return TYPENAME; -+ } -+ } -+ } - return ERROR; - - case LOC_TYPEDEF: -Index: gdb-7.6.50.20130731-cvs/gdb/symtab.c -=================================================================== ---- gdb-7.6.50.20130731-cvs.orig/gdb/symtab.c 2013-11-09 18:41:48.708718125 +0100 -+++ gdb-7.6.50.20130731-cvs/gdb/symtab.c 2013-11-09 18:42:19.293697660 +0100 -@@ -1293,7 +1293,7 @@ lookup_language_this (const struct langu - return 1 if the component named NAME from the ultimate target - structure/union is defined, otherwise, return 0. */ - --static int -+int - check_field (struct type *type, const char *name, - struct field_of_this_result *is_a_field_of_this) - { -Index: gdb-7.6.50.20130731-cvs/gdb/symtab.h -=================================================================== ---- gdb-7.6.50.20130731-cvs.orig/gdb/symtab.h 2013-11-09 18:42:19.293697660 +0100 -+++ gdb-7.6.50.20130731-cvs/gdb/symtab.h 2013-11-09 18:42:34.023687872 +0100 -@@ -1377,4 +1377,9 @@ void initialize_symbol (struct symbol *) - - struct template_symbol *allocate_template_symbol (struct objfile *); - -+/* See comment in symtab.c. */ -+ -+int check_field (struct type *type, const char *name, -+ struct field_of_this_result *is_a_field_of_this); -+ - #endif /* !defined(SYMTAB_H) */ -Index: gdb-7.6.50.20130731-cvs/gdb/valops.c -=================================================================== ---- gdb-7.6.50.20130731-cvs.orig/gdb/valops.c 2013-11-09 18:41:48.712718123 +0100 -+++ gdb-7.6.50.20130731-cvs/gdb/valops.c 2013-11-09 18:42:19.294697659 +0100 -@@ -3226,10 +3226,35 @@ value_struct_elt_for_reference (struct t - return value_from_longest - (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain), - offset + (TYPE_FIELD_BITPOS (t, i) >> 3)); -- else if (noside == EVAL_AVOID_SIDE_EFFECTS) -+ else if (noside != EVAL_NORMAL) - return allocate_value (TYPE_FIELD_TYPE (t, i)); - else -- error (_("Cannot reference non-static field \"%s\""), name); -+ { -+ /* Try to evaluate NAME as a qualified name with implicit -+ this pointer. In this case, attempt to return the -+ equivalent to `this->*(&TYPE::NAME)'. */ -+ v = value_of_this_silent (current_language); -+ if (v != NULL) -+ { -+ struct value *ptr; -+ long mem_offset; -+ struct type *type, *tmp; -+ -+ ptr = value_aggregate_elt (domain, name, NULL, 1, noside); -+ type = check_typedef (value_type (ptr)); -+ gdb_assert (type != NULL -+ && TYPE_CODE (type) == TYPE_CODE_MEMBERPTR); -+ tmp = lookup_pointer_type (TYPE_DOMAIN_TYPE (type)); -+ v = value_cast_pointers (tmp, v, 1); -+ mem_offset = value_as_long (ptr); -+ tmp = lookup_pointer_type (TYPE_TARGET_TYPE (type)); -+ result = value_from_pointer (tmp, -+ value_as_long (v) + mem_offset); -+ return value_ind (result); -+ } -+ -+ error (_("Cannot reference non-static field \"%s\""), name); -+ } - } - } - -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.cp/impl-this.cc -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.cp/impl-this.cc 2013-11-09 18:42:19.294697659 +0100 -@@ -0,0 +1,96 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 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 . */ -+ -+#ifdef DEBUG -+#include -+#endif -+ -+class A -+{ -+public: -+ int i; -+ int z; -+ A () : i (1), z (10) {} -+}; -+ -+class B : public virtual A -+{ -+public: -+ int i; -+ B () : i (2) {} -+}; -+ -+class C : public virtual A -+{ -+public: -+ int i; -+ int c; -+ C () : i (3), c (30) {} -+}; -+ -+class D : public B, public C -+{ -+public: -+ int i; -+ int x; -+ D () : i (4), x (40) {} -+ -+#ifdef DEBUG -+#define SUM(X) \ -+ do \ -+ { \ -+ sum += (X); \ -+ printf ("" #X " = %d\n", (X)); \ -+ } \ -+ while (0) -+#else -+#define SUM(X) sum += (X) -+#endif -+ -+int -+f (void) -+ { -+ int sum = 0; -+ -+ SUM (i); -+ SUM (D::i); -+ SUM (D::B::i); -+ SUM (B::i); -+ SUM (D::C::i); -+ SUM (C::i); -+ SUM (D::B::A::i); -+ SUM (B::A::i); -+ SUM (A::i); -+ SUM (D::C::A::i); -+ SUM (C::A::i); -+ SUM (D::x); -+ SUM (x); -+ SUM (D::C::c); -+ SUM (C::c); -+ SUM (c); -+ -+ return sum; -+ } -+}; -+ -+int -+main (void) -+{ -+ D d; -+ -+ return d.f (); -+} -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.cp/impl-this.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.cp/impl-this.exp 2013-11-09 18:42:19.295697659 +0100 -@@ -0,0 +1,89 @@ -+# Copyright 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 . -+ -+# This file is part of the gdb testsuite -+ -+# Test expressions which assume an implicit "this" with a qualified -+# name. -+ -+if {[skip_cplus_tests]} { continue } -+ -+standard_testfile .cc -+ -+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { -+ return -1 -+} -+ -+# First test expressions when there is no context. -+gdb_test "print i" "No symbol \"i\" in current context." -+gdb_test "print D::i" "Cannot reference non-static field \"i\"" -+gdb_test "print D::B::i" "Cannot reference non-static field \"i\"" -+gdb_test "print B::i" "Cannot reference non-static field \"i\"" -+gdb_test "print D::C::i" "Cannot reference non-static field \"i\"" -+gdb_test "print C::i" "Cannot reference non-static field \"i\"" -+gdb_test "print D::B::A::i" "Cannot reference non-static field \"i\"" -+gdb_test "print B::A::i" "Cannot reference non-static field \"i\"" -+gdb_test "print A::i" "Cannot reference non-static field \"i\"" -+gdb_test "print D::C::A::i" "Cannot reference non-static field \"i\"" -+gdb_test "print C::A::i" "Cannot reference non-static field \"i\"" -+gdb_test "print D::x" "Cannot reference non-static field \"x\"" -+gdb_test "print x" "No symbol \"x\" in current context." -+gdb_test "print D::C::c" "Cannot reference non-static field \"c\"" -+gdb_test "print C::c" "Cannot reference non-static field \"c\"" -+gdb_test "print c" "No symbol \"c\" in current context." -+ -+# Run to D::f. -+if {![runto_main]} { -+ perror "couldn't run to main" -+ continue -+} -+ -+gdb_breakpoint "D::f" -+gdb_continue_to_breakpoint "run to D::f" -+ -+# Now test valid expressions in the class hierarchy for D. -+gdb_test "print i" "= 4" -+gdb_test "print D::i" "= 4" -+gdb_test "print D::B::i" "= 2" -+gdb_test "print B::i" "= 2" -+gdb_test "print D::C::i" "= 3" -+gdb_test "print C::i" "= 3" -+gdb_test "print D::B::A::i" "= 1" -+gdb_test "print B::A::i" "= 1" -+gdb_test "print A::i" "= 1" -+gdb_test "print D::C::A::i" "= 1" -+gdb_test "print C::A::i" "= 1" -+gdb_test "print D::x" "= 40" -+gdb_test "print x" "= 40" -+gdb_test "print D::C::c" "= 30" -+gdb_test "print C::c" "= 30" -+gdb_test "print c" "= 30" -+ -+# Test some invalid expressions -+gdb_test "print D::B::c" "There is no field named c" -+gdb_test "print D::B::A::c" "There is no field named c" -+gdb_test "print D::C::A::c" "There is no field named c" -+gdb_test "print B::c" "There is no field named c" -+gdb_test "print B::A::c" "There is no field named c" -+gdb_test "print C::A::c" "There is no field named c" -+gdb_test "print D::B::x" "There is no field named x" -+gdb_test "print D::B::A::x" "There is no field named x" -+gdb_test "print B::x" "There is no field named x" -+gdb_test "print B::A::x" "There is no field named x" -+gdb_test "print D::C::x" "There is no field named x" -+gdb_test "print C::x" "There is no field named x" -+gdb_test "print D::C::A::x" "There is no field named x" -+gdb_test "print C::A::x" "There is no field named x" -+ diff --git a/gdb-python-stacksmash.patch b/gdb-python-stacksmash.patch new file mode 100644 index 0000000..c36e65f --- /dev/null +++ b/gdb-python-stacksmash.patch @@ -0,0 +1,65 @@ +http://sourceware.org/ml/gdb-patches/2014-02/msg00216.html +Subject: [patch] [python] Re: GDB crashing on gdb.python/py-linetable.exp + + +--7AUc2qLy4jB3hD7Z +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +On Fri, 07 Feb 2014 11:45:04 +0100, Phil Muldoon wrote: +> I've tried most of the morning to reproduce this on Fedora 19, with +> -lmcheck and after several thousand test runs I can't reproduce. + +Due to the requirement of specific stack layout I found it is reproducible for +me on Fedora 20 x86_64 with (it sure could be reduced): + +CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" LDFLAGS="-static-libstdc++ -static-libgcc -Wl,-z,relro" ./configure --with-system-readline;make +(ulimit -c unlimited;/usr/bin/runtest gdb.python/py-linetable.exp) + +The fix is obvious, I will check it in. + +- int py_line; ++ gdb_py_longest py_line; +[...] + + + +Regards, +Jan + +--7AUc2qLy4jB3hD7Z +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline; filename=1 + +gdb/ +2014-02-07 Jan Kratochvil + + Fix Python stack corruption. + * python/py-linetable.c (ltpy_get_pcs_for_line, ltpy_has_line): Use + gdb_py_longest. + +diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c +index e83d46d..8b5362b 100644 +--- a/gdb/python/py-linetable.c ++++ b/gdb/python/py-linetable.c +@@ -168,7 +168,7 @@ static PyObject * + ltpy_get_pcs_for_line (PyObject *self, PyObject *args) + { + struct symtab *symtab; +- int py_line; ++ gdb_py_longest py_line; + struct linetable_entry *best_entry = NULL; + linetable_entry_object *result; + VEC (CORE_ADDR) *pcs = NULL; +@@ -200,7 +200,7 @@ static PyObject * + ltpy_has_line (PyObject *self, PyObject *args) + { + struct symtab *symtab; +- int py_line; ++ gdb_py_longest py_line; + int index; + + LTPY_REQUIRE_VALID (self, symtab); + +--7AUc2qLy4jB3hD7Z-- + diff --git a/gdb-rhbz1013453-value-struct-elt-memory-leak.patch b/gdb-rhbz1013453-value-struct-elt-memory-leak.patch deleted file mode 100644 index a1af0ea..0000000 --- a/gdb-rhbz1013453-value-struct-elt-memory-leak.patch +++ /dev/null @@ -1,136 +0,0 @@ -https://sourceware.org/ml/gdb-patches/2013-07/msg00469.html - -Hi. -This patch adds the missing calls to check_typedef -and adds a testcase to show the issue. - -The PR is not closeable yet, but the remaining issues are more cleanups -than actual bug fixes. - -Regression tested on amd64-linux. - -I will check this in in a few days if there are no objections. - -[The multiple calls to check_typedef (value_type (*argp)) are -bothersome, but the code is simpler this way, and I expect -resolving the rest of the issues in 15695 to potentially change this -code significantly.] - ---- - -commit cbb25189b69e501ddca64917d810b54bb1466c93 -Author: Doug Evans -Date: Thu Aug 1 23:59:47 2013 +0000 - - PR symtab/15695 - * valops.c (value_struct_elt): Add missing call to check_typedef. - (value_find_oload_method_list): Ditto. - - testsuite/ - * gdb.base/func-ptr.exp: New file. - * gdb.base/func-ptr.c: New file. - -2013-08-01 Doug Evans - - PR symtab/15695 - * valops.c (value_struct_elt): Add missing call to check_typedef. - (value_find_oload_method_list): Ditto. - -2013-08-01 Doug Evans - - PR symtab/15695 - * gdb.base/func-ptr.exp: New file. - * gdb.base/func-ptr.c: New file. - -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/func-ptr.c -=================================================================== ---- /dev/null -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/func-ptr.c -@@ -0,0 +1,30 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 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 . */ -+ -+void -+bar () -+{ -+} -+ -+typedef void foo (void); -+foo *pbar = bar; -+ -+int -+main () -+{ -+ return 0; -+} -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/func-ptr.exp -=================================================================== ---- /dev/null -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/func-ptr.exp -@@ -0,0 +1,30 @@ -+# Copyright 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 . -+ -+# This testcase exercises bug 15695. -+# Trying to print foo->bar if foo is a pointer to a typedef of a pointer -+# to a function will put gdb into an infinite loop. -+ -+if { [prepare_for_testing func-ptr.exp "func-ptr" {func-ptr.c} {debug}] } { -+ return -1 -+} -+ -+if ![runto_main] { -+ fail "Can't run to main" -+ return 0 -+} -+ -+# This would put gdb into an infinite loop. -+gdb_test "print pbar->baz" "Attempt to extract .*" -Index: gdb-7.6.50.20130731-cvs/gdb/valops.c -=================================================================== ---- gdb-7.6.50.20130731-cvs.orig/gdb/valops.c -+++ gdb-7.6.50.20130731-cvs/gdb/valops.c -@@ -2275,7 +2275,7 @@ value_struct_elt (struct value **argp, s - { - *argp = value_ind (*argp); - /* Don't coerce fn pointer to fn and then back again! */ -- if (TYPE_CODE (value_type (*argp)) != TYPE_CODE_FUNC) -+ if (TYPE_CODE (check_typedef (value_type (*argp))) != TYPE_CODE_FUNC) - *argp = coerce_array (*argp); - t = check_typedef (value_type (*argp)); - } -@@ -2439,7 +2439,7 @@ value_find_oload_method_list (struct val - { - *argp = value_ind (*argp); - /* Don't coerce fn pointer to fn and then back again! */ -- if (TYPE_CODE (value_type (*argp)) != TYPE_CODE_FUNC) -+ if (TYPE_CODE (check_typedef (value_type (*argp))) != TYPE_CODE_FUNC) - *argp = coerce_array (*argp); - t = check_typedef (value_type (*argp)); - } diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch index 5fc6369..c0f2755 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.6.50.20130731-cvs/gdb/ada-lang.c +Index: gdb-7.6.90.20140127/gdb/ada-lang.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/ada-lang.c 2014-02-06 18:07:54.341911093 +0100 ++++ gdb-7.6.90.20140127/gdb/ada-lang.c 2014-02-06 18:07:58.898915990 +0100 @@ -80,7 +80,7 @@ static struct type *desc_bounds_type (st static struct value *desc_bounds (struct value *); @@ -680,7 +680,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.c val = value_cast (value_type (component), val); -@@ -4082,7 +4085,7 @@ ensure_lval (struct value *val) +@@ -4085,7 +4088,7 @@ ensure_lval (struct value *val) if (VALUE_LVAL (val) == not_lval || VALUE_LVAL (val) == lval_internalvar) { @@ -689,7 +689,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.c const CORE_ADDR addr = value_as_long (value_allocate_space_in_inferior (len)); -@@ -4156,7 +4159,7 @@ static CORE_ADDR +@@ -4159,7 +4162,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.6.50.20130731-cvs/gdb/ada-lang.c gdb_byte *buf = alloca (len); CORE_ADDR addr; -@@ -6087,7 +6090,7 @@ value_tag_from_contents_and_address (str +@@ -6145,7 +6148,7 @@ value_tag_from_contents_and_address (str const gdb_byte *valaddr, CORE_ADDR address) { @@ -707,7 +707,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.c struct type *tag_type; if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, -@@ -6552,7 +6555,7 @@ ada_in_variant (LONGEST val, struct type +@@ -6610,7 +6613,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.6.50.20130731-cvs/gdb/ada-lang.c struct type *arg_type) { struct type *type; -@@ -6564,7 +6567,7 @@ ada_value_primitive_field (struct value +@@ -6622,7 +6625,7 @@ ada_value_primitive_field (struct value if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) { @@ -725,7 +725,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.c int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); return ada_value_primitive_packed_val (arg1, value_contents (arg1), -@@ -6591,9 +6594,9 @@ ada_value_primitive_field (struct value +@@ -6649,9 +6652,9 @@ ada_value_primitive_field (struct value Returns 1 if found, 0 otherwise. */ static int @@ -737,7 +737,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.c int *index_p) { int i; -@@ -6611,8 +6614,8 @@ find_struct_field (const char *name, str +@@ -6669,8 +6672,8 @@ find_struct_field (const char *name, str for (i = 0; i < TYPE_NFIELDS (type); i += 1) { @@ -748,7 +748,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.c const char *t_field_name = TYPE_FIELD_NAME (type, i); if (t_field_name == NULL) -@@ -6682,7 +6685,7 @@ num_visible_fields (struct type *type) +@@ -6740,7 +6743,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.6.50.20130731-cvs/gdb/ada-lang.c struct type *type) { int i; -@@ -6715,7 +6718,7 @@ ada_search_struct_field (char *name, str +@@ -6773,7 +6776,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.6.50.20130731-cvs/gdb/ada-lang.c for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) { -@@ -6733,8 +6736,8 @@ ada_search_struct_field (char *name, str +@@ -6791,8 +6794,8 @@ ada_search_struct_field (char *name, str return NULL; } @@ -777,7 +777,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.c /* Return field #INDEX in ARG, where the index is that returned by -@@ -6743,7 +6746,7 @@ static struct value *ada_index_struct_fi +@@ -6801,7 +6804,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.6.50.20130731-cvs/gdb/ada-lang.c struct type *type) { return ada_index_struct_field_1 (&index, arg, offset, type); -@@ -6755,7 +6758,7 @@ ada_index_struct_field (int index, struc +@@ -6813,7 +6816,7 @@ ada_index_struct_field (int index, struc * *INDEX_P. */ static struct value * @@ -795,7 +795,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.c struct type *type) { int i; -@@ -6845,7 +6848,8 @@ ada_value_struct_elt (struct value *arg, +@@ -6903,7 +6906,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.6.50.20130731-cvs/gdb/ada-lang.c struct type *field_type; CORE_ADDR address; -@@ -7158,8 +7162,8 @@ ada_coerce_ref (struct value *val0) +@@ -7216,8 +7220,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.6.50.20130731-cvs/gdb/ada-lang.c { return (off + alignment - 1) & ~(alignment - 1); } -@@ -7538,10 +7542,9 @@ ada_template_to_fixed_record_type_1 (str +@@ -7596,10 +7600,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.6.50.20130731-cvs/gdb/ada-lang.c int f; /* Compute the number of fields in this record type that are going -@@ -7612,7 +7615,7 @@ ada_template_to_fixed_record_type_1 (str +@@ -7670,7 +7673,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.6.50.20130731-cvs/gdb/ada-lang.c field_valaddr = cond_offset_host (field_valaddr, field_offset); field_address = cond_offset_target (field_address, field_offset); -@@ -7741,11 +7744,11 @@ ada_template_to_fixed_record_type_1 (str +@@ -7799,11 +7802,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.6.50.20130731-cvs/gdb/ada-lang.c } else { -@@ -8082,7 +8085,8 @@ to_fixed_array_type (struct type *type0, +@@ -8140,7 +8143,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,11 +864,11 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/ada-lang.h +Index: gdb-7.6.90.20140127/gdb/ada-lang.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/ada-lang.h 2014-02-06 18:07:54.342911094 +0100 ++++ gdb-7.6.90.20140127/gdb/ada-lang.h 2014-02-06 18:07:58.899915990 +0100 +@@ -180,7 +180,7 @@ extern void ada_print_type (struct type extern void ada_print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream); @@ -877,7 +877,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -@@ -184,7 +184,7 @@ extern void ada_emit_char (int, struct t +@@ -195,7 +195,7 @@ extern void ada_emit_char (int, struct t extern void ada_printchar (int, struct type *, struct ui_file *); extern void ada_printstr (struct ui_file *, struct type *, const gdb_byte *, @@ -886,7 +886,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.h const struct value_print_options *); struct value *ada_convert_actual (struct value *actual, -@@ -257,7 +257,7 @@ extern int ada_is_constrained_packed_arr +@@ -268,7 +268,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.6.50.20130731-cvs/gdb/ada-lang.h struct type *); extern struct type *ada_coerce_to_simple_array_type (struct type *); -Index: gdb-7.6.50.20130731-cvs/gdb/ada-typeprint.c +Index: gdb-7.6.90.20140127/gdb/ada-typeprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/ada-typeprint.c 2014-02-06 18:07:54.342911094 +0100 ++++ gdb-7.6.90.20140127/gdb/ada-typeprint.c 2014-02-06 18:07:58.899915990 +0100 @@ -829,8 +829,8 @@ ada_print_type (struct type *type0, cons const char *name = ada_type_name (type); @@ -920,12 +920,12 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-typeprint.c break; case TYPE_CODE_ENUM: if (show < 0) -Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c +Index: gdb-7.6.90.20140127/gdb/ada-valprint.c =================================================================== ---- 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 *); +--- gdb-7.6.90.20140127.orig/gdb/ada-valprint.c 2014-02-06 18:07:54.343911095 +0100 ++++ gdb-7.6.90.20140127/gdb/ada-valprint.c 2014-02-06 18:15:00.766368981 +0100 +@@ -35,11 +35,11 @@ + #include "objfiles.h" static int print_field_values (struct type *, const gdb_byte *, - int, @@ -933,19 +933,12 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c struct ui_file *, int, const struct value *, const struct value_print_options *, -- int, struct type *, int); -+ int, struct type *, LONGEST); - - static void adjust_type_signedness (struct type *); - --static void ada_val_print_1 (struct type *, const gdb_byte *, int, CORE_ADDR, -- struct ui_file *, int, -+static void ada_val_print_1 (struct type *, const gdb_byte *, LONGEST, -+ CORE_ADDR, struct ui_file *, int, - const struct value *, - const struct value_print_options *); +- int, struct type *, int, ++ int, struct type *, LONGEST, + const struct language_defn *); -@@ -143,7 +143,7 @@ val_print_packed_array_elements (struct + +@@ -131,7 +131,7 @@ val_print_packed_array_elements (struct unsigned int things_printed = 0; unsigned len; struct type *elttype, *index_type; @@ -954,7 +947,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0); struct value *mark = value_mark (); LONGEST low = 0; -@@ -292,7 +292,7 @@ ada_emit_char (int c, struct type *type, +@@ -280,7 +280,7 @@ ada_emit_char (int c, struct type *type, of a character. */ static int @@ -963,7 +956,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c enum bfd_endian byte_order) { if (type_len == 1) -@@ -462,11 +462,11 @@ ada_print_scalar (struct type *type, LON +@@ -442,11 +442,11 @@ ada_print_scalar (struct type *type, LON static void printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, @@ -977,7 +970,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; -@@ -481,9 +481,9 @@ printstr (struct ui_file *stream, struct +@@ -461,9 +461,9 @@ printstr (struct ui_file *stream, struct { /* Position of the character we are examining to see whether it is repeated. */ @@ -989,7 +982,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c QUIT; -@@ -514,7 +514,8 @@ printstr (struct ui_file *stream, struct +@@ -494,7 +494,8 @@ printstr (struct ui_file *stream, struct ada_emit_char (char_at (string, i, type_len, byte_order), elttype, stream, '\'', type_len); fputs_filtered ("'", stream); @@ -999,7 +992,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -@@ -542,7 +543,7 @@ printstr (struct ui_file *stream, struct +@@ -522,7 +523,7 @@ printstr (struct ui_file *stream, struct void ada_printstr (struct ui_file *stream, struct type *type, @@ -1008,45 +1001,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -556,7 +557,7 @@ ada_printstr (struct ui_file *stream, st - - void - ada_val_print (struct type *type, const gdb_byte *valaddr, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - const struct value *val, - const struct value_print_options *options) -@@ -588,8 +589,8 @@ ada_val_print_array (struct type *type, - { - enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); - struct type *elttype = TYPE_TARGET_TYPE (type); -- unsigned int eltlen; -- unsigned int len; -+ ULONGEST eltlen; -+ ULONGEST len; - - /* We know that ELTTYPE cannot possibly be null, because we found - that TYPE is a string-like type. Similarly, the size of ELTTYPE -@@ -607,7 +608,7 @@ ada_val_print_array (struct type *type, - elements up to it. */ - if (options->stop_print_at_null) - { -- int temp_len; -+ LONGEST temp_len; - - /* Look for a NULL char. */ - for (temp_len = 0; -@@ -640,7 +641,7 @@ ada_val_print_array (struct type *type, - - static void - ada_val_print_1 (struct type *type, const gdb_byte *valaddr, -- int offset, CORE_ADDR address, -+ LONGEST offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - const struct value *original_value, - const struct value_print_options *options) -@@ -915,12 +916,12 @@ ada_val_print_1 (struct type *type, cons +@@ -532,12 +533,12 @@ ada_printstr (struct ui_file *stream, st static int print_variant_part (struct type *type, int field_num, @@ -1056,12 +1011,12 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c const struct value *val, const struct value_print_options *options, int comma_needed, -- struct type *outer_type, int outer_offset) -+ struct type *outer_type, LONGEST outer_offset) +- struct type *outer_type, int outer_offset, ++ struct type *outer_type, LONGEST outer_offset, + const struct language_defn *language) { struct type *var_type = TYPE_FIELD_TYPE (type, field_num); - int which = ada_which_variant_applies (var_type, outer_type, -@@ -1027,11 +1028,11 @@ print_record (struct type *type, const g +@@ -573,11 +574,11 @@ print_variant_part (struct type *type, i static int print_field_values (struct type *type, const gdb_byte *valaddr, @@ -1070,12 +1025,12 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c const struct value *val, const struct value_print_options *options, int comma_needed, -- struct type *outer_type, int outer_offset) -+ struct type *outer_type, LONGEST outer_offset) +- struct type *outer_type, int outer_offset, ++ struct type *outer_type, LONGEST outer_offset, + const struct language_defn *language) { int i, len; - -@@ -1097,7 +1098,7 @@ print_field_values (struct type *type, c +@@ -644,7 +645,7 @@ print_field_values (struct type *type, c } else { @@ -1084,10 +1039,48 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c int bit_size = TYPE_FIELD_BITSIZE (type, i); struct value_print_options opts; -Index: gdb-7.6.50.20130731-cvs/gdb/annotate.c +@@ -690,8 +691,8 @@ ada_val_print_string (struct type *type, + { + enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); + struct type *elttype = TYPE_TARGET_TYPE (type); +- unsigned int eltlen; +- unsigned int len; ++ ULONGEST eltlen; ++ ULONGEST len; + + /* We know that ELTTYPE cannot possibly be null, because we assume + that we're called only when TYPE is a string-like type. +@@ -710,7 +711,7 @@ ada_val_print_string (struct type *type, + elements up to it. */ + if (options->stop_print_at_null) + { +- int temp_len; ++ LONGEST temp_len; + + /* Look for a NULL char. */ + for (temp_len = 0; +@@ -1069,7 +1070,7 @@ ada_val_print_ref (struct type *type, co + + static void + ada_val_print_1 (struct type *type, const gdb_byte *valaddr, +- int offset, CORE_ADDR address, ++ LONGEST offset, CORE_ADDR address, + struct ui_file *stream, int recurse, + const struct value *original_value, + const struct value_print_options *options, +@@ -1150,7 +1151,7 @@ ada_val_print_1 (struct type *type, cons + + void + ada_val_print (struct type *type, const gdb_byte *valaddr, +- int embedded_offset, CORE_ADDR address, ++ LONGEST embedded_offset, CORE_ADDR address, + struct ui_file *stream, int recurse, + const struct value *val, + const struct value_print_options *options) +Index: gdb-7.6.90.20140127/gdb/annotate.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/annotate.c 2014-02-06 18:07:54.343911095 +0100 ++++ gdb-7.6.90.20140127/gdb/annotate.c 2014-02-06 18:07:58.900915992 +0100 @@ -523,21 +523,21 @@ annotate_frame_end (void) } @@ -1114,10 +1107,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/annotate.c } void -Index: gdb-7.6.50.20130731-cvs/gdb/annotate.h +Index: gdb-7.6.90.20140127/gdb/annotate.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/annotate.h 2014-02-06 18:07:54.343911095 +0100 ++++ gdb-7.6.90.20140127/gdb/annotate.h 2014-02-06 18:07:58.901915993 +0100 @@ -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 +1122,10 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/arm-linux-nat.c +Index: gdb-7.6.90.20140127/gdb/arm-linux-nat.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/arm-linux-nat.c 2014-02-06 18:07:54.343911095 +0100 ++++ gdb-7.6.90.20140127/gdb/arm-linux-nat.c 2014-02-06 18:07:58.901915993 +0100 @@ -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,11 +1135,11 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/ax-gdb.c +Index: gdb-7.6.90.20140127/gdb/ax-gdb.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/ax-gdb.c 2014-02-06 18:07:54.344911096 +0100 ++++ gdb-7.6.90.20140127/gdb/ax-gdb.c 2014-02-06 18:07:58.902915994 +0100 +@@ -82,12 +82,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 *); static void gen_fetch (struct agent_expr *, struct type *); @@ -1161,7 +1154,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c static void gen_sym_offset (struct agent_expr *, struct symbol *); static void gen_var_ref (struct gdbarch *, struct agent_expr *ax, struct axs_value *value, struct symbol *var); -@@ -136,15 +136,16 @@ static void gen_deref (struct agent_expr +@@ -135,15 +135,16 @@ static void gen_deref (struct agent_expr static void gen_address_of (struct agent_expr *, struct axs_value *); static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1181,7 +1174,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c struct type *type); static void gen_struct_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, -@@ -539,7 +540,7 @@ gen_fetch (struct agent_expr *ax, struct +@@ -538,7 +539,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 +1183,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c { if (distance > 0) { -@@ -593,7 +594,7 @@ gen_frame_locals_address (struct gdbarch +@@ -592,7 +593,7 @@ gen_frame_locals_address (struct gdbarch programming in ML, it would be clearer why these are the same thing. */ static void @@ -1199,7 +1192,7 @@ Index: gdb-7.6.50.20130731-cvs/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 -@@ -1249,7 +1250,7 @@ gen_address_of (struct agent_expr *ax, s +@@ -1248,7 +1249,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 +1201,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c { /* Note that ops[i] fetches 8 << i bits. */ static enum agent_op ops[] -@@ -1284,13 +1285,13 @@ gen_bitfield_ref (struct expression *exp +@@ -1283,13 +1284,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 +1220,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c /* The index in ops of the opcode we're considering. */ int op; -@@ -1409,7 +1410,7 @@ gen_bitfield_ref (struct expression *exp +@@ -1408,7 +1409,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 +1229,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c { /* Is this a bitfield? */ if (TYPE_FIELD_PACKED (type, fieldno)) -@@ -1434,7 +1435,7 @@ gen_primitive_field (struct expression * +@@ -1433,7 +1434,7 @@ gen_primitive_field (struct expression * static int gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1245,10 +1238,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c { int i, rslt; int nbases = TYPE_N_BASECLASSES (type); -Index: gdb-7.6.50.20130731-cvs/gdb/ax-general.c +Index: gdb-7.6.90.20140127/gdb/ax-general.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/ax-general.c 2014-02-06 18:07:54.345911097 +0100 ++++ gdb-7.6.90.20140127/gdb/ax-general.c 2014-02-06 18:07:58.902915994 +0100 @@ -195,7 +195,7 @@ ax_zero_ext (struct agent_expr *x, int n /* Append a trace_quick instruction to EXPR, to record N bytes. */ @@ -1258,10 +1251,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ax-general.c { /* N must fit in a byte. */ if (n < 0 || n > 255) -Index: gdb-7.6.50.20130731-cvs/gdb/ax.h +Index: gdb-7.6.90.20140127/gdb/ax.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/ax.h 2014-02-06 18:07:54.345911097 +0100 ++++ gdb-7.6.90.20140127/gdb/ax.h 2014-02-06 18:07:58.902915994 +0100 @@ -207,7 +207,7 @@ extern void ax_ext (struct agent_expr *E extern void ax_zero_ext (struct agent_expr *EXPR, int N); @@ -1271,11 +1264,11 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/breakpoint.c +Index: gdb-7.6.90.20140127/gdb/breakpoint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/breakpoint.c 2014-02-06 18:07:54.348911100 +0100 ++++ gdb-7.6.90.20140127/gdb/breakpoint.c 2014-02-06 18:07:58.906915998 +0100 +@@ -6754,7 +6754,7 @@ breakpoint_address_match (struct address static int breakpoint_address_match_range (struct address_space *aspace1, CORE_ADDR addr1, @@ -1284,7 +1277,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.c CORE_ADDR addr2) { return ((gdbarch_has_global_breakpoints (target_gdbarch ()) -@@ -11247,7 +11247,7 @@ can_use_hardware_watchpoint (struct valu +@@ -11353,7 +11353,7 @@ can_use_hardware_watchpoint (struct valu && TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) { CORE_ADDR vaddr = value_address (v); @@ -1293,10 +1286,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.c int num_regs; len = (target_exact_watchpoints -Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.h +Index: gdb-7.6.90.20140127/gdb/breakpoint.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/breakpoint.h 2014-02-06 18:07:54.348911100 +0100 ++++ gdb-7.6.90.20140127/gdb/breakpoint.h 2014-02-06 18:07:58.906915998 +0100 @@ -242,7 +242,7 @@ struct bp_target_info /* If this is a ranged breakpoint, then this field contains the @@ -1315,11 +1308,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.h /* Type of hardware watchpoint. */ enum target_hw_bp_type watchpoint_type; -Index: gdb-7.6.50.20130731-cvs/gdb/c-lang.c +Index: gdb-7.6.90.20140127/gdb/c-lang.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/c-lang.c 2014-02-06 18:07:54.349911101 +0100 ++++ gdb-7.6.90.20140127/gdb/c-lang.c 2014-02-06 18:07:58.907915999 +0100 +@@ -190,7 +190,7 @@ c_printchar (int c, struct type *type, s void c_printstr (struct ui_file *stream, struct type *type, @@ -1328,7 +1321,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/c-lang.c const char *user_encoding, int force_ellipses, const struct value_print_options *options) { -@@ -663,7 +663,7 @@ evaluate_subexp_c (struct type *expect_t +@@ -679,7 +679,7 @@ evaluate_subexp_c (struct type *expect_t } else { @@ -1337,7 +1330,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/c-lang.c /* Write the terminating character. */ for (i = 0; i < TYPE_LENGTH (type); ++i) -@@ -672,7 +672,7 @@ evaluate_subexp_c (struct type *expect_t +@@ -688,7 +688,7 @@ evaluate_subexp_c (struct type *expect_t if (satisfy_expected) { LONGEST low_bound, high_bound; @@ -1346,10 +1339,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/c-lang.c if (get_discrete_bounds (TYPE_INDEX_TYPE (expect_type), &low_bound, &high_bound) < 0) -Index: gdb-7.6.50.20130731-cvs/gdb/c-lang.h +Index: gdb-7.6.90.20140127/gdb/c-lang.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/c-lang.h 2014-02-06 18:07:54.349911101 +0100 ++++ gdb-7.6.90.20140127/gdb/c-lang.h 2014-02-06 18:07:58.907915999 +0100 @@ -73,7 +73,7 @@ extern void c_print_typedef (struct type struct ui_file *); @@ -1385,10 +1378,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/c-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *, -Index: gdb-7.6.50.20130731-cvs/gdb/c-valprint.c +Index: gdb-7.6.90.20140127/gdb/c-valprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/c-valprint.c 2014-02-06 18:07:54.349911101 +0100 ++++ gdb-7.6.90.20140127/gdb/c-valprint.c 2014-02-06 18:07:58.907915999 +0100 @@ -132,7 +132,7 @@ static const struct generic_val_print_de void @@ -1430,10 +1423,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/c-valprint.c struct value_print_options opts = *options; opts.deref_ref = 1; -Index: gdb-7.6.50.20130731-cvs/gdb/cp-abi.c +Index: gdb-7.6.90.20140127/gdb/cp-abi.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/cp-abi.c 2014-02-06 18:07:54.350911103 +0100 ++++ gdb-7.6.90.20140127/gdb/cp-abi.c 2014-02-06 18:07:58.908916001 +0100 @@ -68,13 +68,13 @@ is_operator_name (const char *name) return (*current_cp_abi.is_operator_name) (name); } @@ -1469,10 +1462,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cp-abi.c { struct type *ret = NULL; volatile struct gdb_exception e; -Index: gdb-7.6.50.20130731-cvs/gdb/cp-abi.h +Index: gdb-7.6.90.20140127/gdb/cp-abi.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/cp-abi.h 2014-02-06 18:07:54.350911103 +0100 ++++ gdb-7.6.90.20140127/gdb/cp-abi.h 2014-02-06 18:07:58.908916001 +0100 @@ -108,7 +108,7 @@ extern struct value *value_virtual_fn_fi struct fn_field *f, int j, @@ -1527,10 +1520,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cp-abi.h void (*print_method_ptr) (const gdb_byte *contents, struct type *type, struct ui_file *stream); -Index: gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c +Index: gdb-7.6.90.20140127/gdb/cp-valprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/cp-valprint.c 2014-02-06 18:07:54.350911103 +0100 ++++ gdb-7.6.90.20140127/gdb/cp-valprint.c 2014-02-06 18:07:58.908916001 +0100 @@ -82,7 +82,7 @@ static void cp_print_static_field (struc const struct value_print_options *); @@ -1549,7 +1542,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -342,7 +342,7 @@ cp_print_value_fields (struct type *type +@@ -339,7 +339,7 @@ cp_print_value_fields (struct type *type } else if (i == vptr_fieldno && type == vptr_basetype) { @@ -1558,7 +1551,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c struct type *i_type = TYPE_FIELD_TYPE (type, i); if (valprint_check_validity (stream, i_type, i_offset, val)) -@@ -425,7 +425,7 @@ cp_print_value_fields (struct type *type +@@ -422,7 +422,7 @@ cp_print_value_fields (struct type *type void cp_print_value_fields_rtti (struct type *type, @@ -1567,7 +1560,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -441,7 +441,8 @@ cp_print_value_fields_rtti (struct type +@@ -438,7 +438,8 @@ cp_print_value_fields_rtti (struct type TARGET_CHAR_BIT * TYPE_LENGTH (type))) { struct value *value; @@ -1577,7 +1570,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c /* Ugh, we have to convert back to a value here. */ value = value_from_contents_and_address (type, valaddr + offset, -@@ -465,7 +466,7 @@ cp_print_value_fields_rtti (struct type +@@ -462,7 +463,7 @@ cp_print_value_fields_rtti (struct type static void cp_print_value (struct type *type, struct type *real_type, @@ -1586,7 +1579,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -475,7 +476,7 @@ cp_print_value (struct type *type, struc +@@ -472,7 +473,7 @@ cp_print_value (struct type *type, struc = (struct type **) obstack_next_free (&dont_print_vb_obstack); struct obstack tmp_obstack = dont_print_vb_obstack; int i, n_baseclasses = TYPE_N_BASECLASSES (type); @@ -1595,7 +1588,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c struct type *thistype; if (dont_print_vb == 0) -@@ -489,7 +490,7 @@ cp_print_value (struct type *type, struc +@@ -486,7 +487,7 @@ cp_print_value (struct type *type, struc for (i = 0; i < n_baseclasses; i++) { @@ -1604,10 +1597,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c int skip; struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); const char *basename = TYPE_NAME (baseclass); -Index: gdb-7.6.50.20130731-cvs/gdb/d-lang.h +Index: gdb-7.6.90.20140127/gdb/d-lang.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/d-lang.h 2014-02-06 18:07:54.351911104 +0100 ++++ gdb-7.6.90.20140127/gdb/d-lang.h 2014-02-06 18:07:58.908916001 +0100 @@ -25,7 +25,7 @@ extern char *d_demangle (const char *mangled, int options); @@ -1617,10 +1610,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/d-lang.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.6.50.20130731-cvs/gdb/d-valprint.c +Index: gdb-7.6.90.20140127/gdb/d-valprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/d-valprint.c 2014-02-06 18:07:54.351911104 +0100 ++++ gdb-7.6.90.20140127/gdb/d-valprint.c 2014-02-06 18:07:58.909916001 +0100 @@ -29,7 +29,7 @@ static int @@ -1643,11 +1636,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/d-valprint.c const struct value_print_options *options) { int ret; -Index: gdb-7.6.50.20130731-cvs/gdb/doublest.c +Index: gdb-7.6.90.20140127/gdb/doublest.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/doublest.c 2014-02-06 18:07:54.351911104 +0100 ++++ gdb-7.6.90.20140127/gdb/doublest.c 2014-02-06 18:07:58.909916001 +0100 +@@ -767,7 +767,7 @@ floatformat_from_doublest (const struct but not passed on by GDB. This should be fixed. */ static const struct floatformat * @@ -1656,7 +1649,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/doublest.c { const struct floatformat *format; -@@ -772,8 +772,8 @@ floatformat_from_length (struct gdbarch +@@ -795,8 +795,8 @@ floatformat_from_length (struct gdbarch else format = NULL; if (format == NULL) @@ -1667,11 +1660,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/doublest.c return format; } -Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c +Index: gdb-7.6.90.20140127/gdb/dwarf2loc.c =================================================================== ---- 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, +--- gdb-7.6.90.20140127.orig/gdb/dwarf2loc.c 2014-02-06 18:07:54.352911105 +0100 ++++ gdb-7.6.90.20140127/gdb/dwarf2loc.c 2014-02-06 18:07:58.910916003 +0100 +@@ -1709,19 +1709,19 @@ insert_bits (unsigned int datum, BITS_BIG_ENDIAN is taken directly from gdbarch. */ static void @@ -1697,7 +1690,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c dest_avail = 8 - dest_offset_bits % 8; -@@ -1763,13 +1763,13 @@ static void +@@ -1759,13 +1759,13 @@ static void read_pieced_value (struct value *v) { int i; @@ -1713,7 +1706,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c size_t buffer_size = 0; gdb_byte *buffer = NULL; struct cleanup *cleanup; -@@ -1796,8 +1796,8 @@ read_pieced_value (struct value *v) +@@ -1792,8 +1792,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 +1717,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c const gdb_byte *intermediate_buffer; /* Compute size, source, and destination offsets for copying, in -@@ -1946,13 +1946,13 @@ static void +@@ -1942,13 +1942,13 @@ static void write_pieced_value (struct value *to, struct value *from) { int i; @@ -1740,7 +1733,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c size_t buffer_size = 0; gdb_byte *buffer = NULL; struct cleanup *cleanup; -@@ -1980,8 +1980,8 @@ write_pieced_value (struct value *to, st +@@ -1976,8 +1976,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 +1744,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c int need_bitwise; const gdb_byte *source_buffer; -@@ -2110,8 +2110,8 @@ write_pieced_value (struct value *to, st +@@ -2107,8 +2107,8 @@ write_pieced_value (struct value *to, st implicit pointer. */ static int @@ -1762,7 +1755,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c enum dwarf_value_location check_for) { struct piece_closure *c -@@ -2127,7 +2127,7 @@ check_pieced_value_bits (const struct va +@@ -2124,7 +2124,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 +1764,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2165,8 +2165,8 @@ check_pieced_value_bits (const struct va +@@ -2162,8 +2162,8 @@ check_pieced_value_bits (const struct va } static int @@ -1782,7 +1775,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c { return check_pieced_value_bits (value, bit_offset, bit_length, DWARF_VALUE_MEMORY); -@@ -2184,8 +2184,8 @@ check_pieced_value_invalid (const struct +@@ -2181,8 +2181,8 @@ check_pieced_value_invalid (const struct a synthetic pointer. */ static int @@ -1793,7 +1786,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c { return check_pieced_value_bits (value, bit_offset, bit_length, DWARF_VALUE_IMPLICIT_POINTER); -@@ -2210,9 +2210,10 @@ indirect_pieced_value (struct value *val +@@ -2207,9 +2207,10 @@ indirect_pieced_value (struct value *val struct type *type; struct frame_info *frame; struct dwarf2_locexpr_baton baton; @@ -1806,7 +1799,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c type = check_typedef (value_type (value)); if (TYPE_CODE (type) != TYPE_CODE_PTR) -@@ -2226,7 +2227,7 @@ indirect_pieced_value (struct value *val +@@ -2223,7 +2224,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 +1808,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2467,7 +2468,7 @@ dwarf2_evaluate_loc_desc_full (struct ty +@@ -2491,7 +2492,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 +1817,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c if (byte_offset + TYPE_LENGTH (type) > n) invalid_synthetic_pointer (); -Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c +Index: gdb-7.6.90.20140127/gdb/dwarf2read.c =================================================================== ---- 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 ( +--- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-02-06 18:07:54.356911109 +0100 ++++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-02-06 18:07:58.913916006 +0100 +@@ -1893,12 +1893,12 @@ dwarf2_complex_location_expr_complaint ( } static void @@ -1845,7 +1838,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c } static void -@@ -11215,8 +11215,8 @@ dwarf2_add_field (struct field_info *fip +@@ -12190,8 +12190,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,11 +1849,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c attr = dwarf2_attr (die, DW_AT_byte_size, cu); if (attr) -Index: gdb-7.6.50.20130731-cvs/gdb/eval.c +Index: gdb-7.6.90.20140127/gdb/eval.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/eval.c 2014-02-06 18:07:54.358911111 +0100 ++++ gdb-7.6.90.20140127/gdb/eval.c 2014-02-06 18:07:58.914916007 +0100 +@@ -298,7 +298,8 @@ evaluate_struct_tuple (struct value *str while (--nargs >= 0) { struct value *val = NULL; @@ -1870,7 +1863,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/eval.c bfd_byte *addr; fieldno++; -@@ -356,7 +357,7 @@ init_array_element (struct value *array, +@@ -360,7 +361,7 @@ init_array_element (struct value *array, enum noside noside, LONGEST low_bound, LONGEST high_bound) { LONGEST index; @@ -1879,7 +1872,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/eval.c if (exp->elts[*pos].opcode == BINOP_COMMA) { -@@ -713,11 +714,11 @@ binop_promote (const struct language_def +@@ -718,11 +719,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 +1887,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/eval.c int unsigned_operation; /* Determine type length and signedness after promotion for -@@ -900,7 +901,7 @@ evaluate_subexp_standard (struct type *e +@@ -905,7 +906,7 @@ evaluate_subexp_standard (struct type *e struct value **argvec; int code; int ix; @@ -1903,7 +1896,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/eval.c struct type **arg_types; int save_pos1; struct symbol *function = NULL; -@@ -1080,7 +1081,7 @@ evaluate_subexp_standard (struct type *e +@@ -1085,7 +1086,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 +1905,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/eval.c LONGEST low_bound, high_bound, index; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -2075,7 +2076,8 @@ evaluate_subexp_standard (struct type *e +@@ -2080,7 +2081,8 @@ evaluate_subexp_standard (struct type *e { struct type *type = value_type (arg1); struct type *real_type; @@ -1922,11 +1915,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/eval.c struct value_print_options opts; get_user_print_options (&opts); -Index: gdb-7.6.50.20130731-cvs/gdb/f-lang.c +Index: gdb-7.6.90.20140127/gdb/f-lang.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/f-lang.c 2014-02-06 18:07:54.358911111 +0100 ++++ gdb-7.6.90.20140127/gdb/f-lang.c 2014-02-06 18:07:58.914916007 +0100 +@@ -104,7 +104,7 @@ f_printchar (int c, struct type *type, s static void f_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, @@ -1935,10 +1928,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/f-lang.c const struct value_print_options *options) { const char *type_encoding = f_get_encoding (type); -Index: gdb-7.6.50.20130731-cvs/gdb/f-lang.h +Index: gdb-7.6.90.20140127/gdb/f-lang.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/f-lang.h 2014-02-06 18:07:54.358911111 +0100 ++++ gdb-7.6.90.20140127/gdb/f-lang.h 2014-02-06 18:07:58.914916007 +0100 @@ -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 +1941,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/f-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -Index: gdb-7.6.50.20130731-cvs/gdb/f-valprint.c +Index: gdb-7.6.90.20140127/gdb/f-valprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/f-valprint.c 2014-02-06 18:07:54.359911112 +0100 ++++ gdb-7.6.90.20140127/gdb/f-valprint.c 2014-02-06 18:07:58.915916008 +0100 @@ -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 +2009,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/f-valprint.c val_print (TYPE_FIELD_TYPE (type, index), valaddr, embedded_offset + offset, -Index: gdb-7.6.50.20130731-cvs/gdb/findvar.c +Index: gdb-7.6.90.20140127/gdb/findvar.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/findvar.c 2014-02-06 18:07:54.359911112 +0100 ++++ gdb-7.6.90.20140127/gdb/findvar.c 2014-02-06 18:07:58.915916008 +0100 +@@ -623,7 +623,7 @@ default_value_from_register (struct type struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2029,7 +2022,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/findvar.c struct value *value = allocate_value (type); VALUE_LVAL (value) = lval_register; -@@ -685,10 +685,10 @@ void +@@ -656,10 +656,10 @@ void read_frame_register_value (struct value *value, struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2043,7 +2036,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/findvar.c gdb_assert (VALUE_LVAL (value) == lval_register); -@@ -703,7 +703,7 @@ read_frame_register_value (struct value +@@ -674,7 +674,7 @@ read_frame_register_value (struct value while (len > 0) { struct value *regval = get_frame_register_value (frame, regnum); @@ -2052,11 +2045,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/findvar.c if (value_optimized_out (regval)) { -Index: gdb-7.6.50.20130731-cvs/gdb/frame.c +Index: gdb-7.6.90.20140127/gdb/frame.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/frame.c 2014-02-06 18:07:54.360911113 +0100 ++++ gdb-7.6.90.20140127/gdb/frame.c 2014-02-06 18:07:58.915916008 +0100 +@@ -1247,7 +1247,7 @@ deprecated_frame_register_read (struct f int get_frame_register_bytes (struct frame_info *frame, int regnum, @@ -2065,7 +2058,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/frame.c int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -1211,7 +1211,7 @@ get_frame_register_bytes (struct frame_i +@@ -1276,7 +1276,7 @@ get_frame_register_bytes (struct frame_i } if (len > maxsize) error (_("Bad debug information detected: " @@ -2074,11 +2067,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/frame.c /* Copy the data. */ while (len > 0) -Index: gdb-7.6.50.20130731-cvs/gdb/frame.h +Index: gdb-7.6.90.20140127/gdb/frame.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/frame.h 2014-02-06 18:07:54.360911113 +0100 ++++ gdb-7.6.90.20140127/gdb/frame.h 2014-02-06 18:07:58.916916009 +0100 +@@ -556,7 +556,7 @@ extern void put_frame_register (struct f contents are optimized out or unavailable, set *OPTIMIZEDP, *UNAVAILABLEP accordingly. */ extern int get_frame_register_bytes (struct frame_info *frame, int regnum, @@ -2087,11 +2080,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/frame.h gdb_byte *myaddr, int *optimizedp, int *unavailablep); -Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c +Index: gdb-7.6.90.20140127/gdb/gdbtypes.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/gdbtypes.c 2014-02-06 18:07:54.361911114 +0100 ++++ gdb-7.6.90.20140127/gdb/gdbtypes.c 2014-02-06 18:07:58.916916009 +0100 +@@ -2108,7 +2108,7 @@ allocate_gnat_aux_type (struct type *typ least as long as OBJFILE. */ struct type * @@ -2100,7 +2093,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c const char *name, struct objfile *objfile) { struct type *type; -@@ -2322,8 +2322,8 @@ is_public_ancestor (struct type *base, s +@@ -2339,8 +2339,8 @@ is_public_ancestor (struct type *base, s static int is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -2111,7 +2104,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c CORE_ADDR address, struct value *val) { int i, count = 0; -@@ -2334,7 +2334,7 @@ is_unique_ancestor_worker (struct type * +@@ -2351,7 +2351,7 @@ is_unique_ancestor_worker (struct type * for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) { struct type *iter; @@ -2120,7 +2113,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c iter = check_typedef (TYPE_BASECLASS (dclass, i)); -@@ -2375,7 +2375,7 @@ is_unique_ancestor_worker (struct type * +@@ -2392,7 +2392,7 @@ is_unique_ancestor_worker (struct type * int is_unique_ancestor (struct type *base, struct value *val) { @@ -2129,7 +2122,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c return is_unique_ancestor_worker (base, value_type (val), &offset, value_contents_for_printing (val), -@@ -3303,7 +3303,7 @@ recursive_dump_type (struct type *type, +@@ -3530,7 +3530,7 @@ recursive_dump_type (struct type *type, break; } puts_filtered ("\n"); @@ -2138,7 +2131,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c if (TYPE_OBJFILE_OWNED (type)) { printfi_filtered (spaces, "objfile "); -@@ -3427,8 +3427,8 @@ recursive_dump_type (struct type *type, +@@ -3654,8 +3654,8 @@ recursive_dump_type (struct type *type, idx, plongest (TYPE_FIELD_ENUMVAL (type, idx))); else printfi_filtered (spaces + 2, @@ -2149,7 +2142,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c TYPE_FIELD_BITSIZE (type, idx)); gdb_print_host_address (TYPE_FIELD_TYPE (type, idx), gdb_stdout); printf_filtered (" name '%s' (", -@@ -3942,7 +3942,7 @@ copy_type (const struct type *type) +@@ -4169,7 +4169,7 @@ copy_type (const struct type *type) struct type * arch_type (struct gdbarch *gdbarch, @@ -2158,10 +2151,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c { struct type *type; -Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.h +Index: gdb-7.6.90.20140127/gdb/gdbtypes.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/gdbtypes.h 2014-02-06 18:07:54.362911115 +0100 ++++ gdb-7.6.90.20140127/gdb/gdbtypes.h 2014-02-06 18:11:46.431160650 +0100 @@ -606,7 +606,7 @@ struct main_type gdbarch_bits_big_endian=0 targets, it is the bit offset to the LSB. */ @@ -2180,8 +2173,8 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.h /* Core type, shared by a group of qualified types. */ struct main_type *main_type; -@@ -1542,11 +1542,12 @@ extern struct type *alloc_type_copy (con - extern struct gdbarch *get_type_arch (const struct type *); +@@ -1546,11 +1546,12 @@ extern struct gdbarch *get_type_arch (co + extern struct type *get_target_type (struct type *type); /* Helper function to construct objfile-owned types. */ -extern struct type *init_type (enum type_code, int, int, const char *, @@ -2195,10 +2188,10 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/gnu-v2-abi.c +Index: gdb-7.6.90.20140127/gdb/gnu-v2-abi.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/gnu-v2-abi.c 2014-02-06 18:07:54.362911115 +0100 ++++ gdb-7.6.90.20140127/gdb/gnu-v2-abi.c 2014-02-06 18:07:58.917916010 +0100 @@ -85,7 +85,7 @@ gnuv2_is_operator_name (const char *name TYPE is the type in which F is located. */ static struct value * @@ -2250,10 +2243,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gnu-v2-abi.c gnuv2_baseclass_offset (type, i, valaddr, embedded_offset, address, val); -Index: gdb-7.6.50.20130731-cvs/gdb/gnu-v3-abi.c +Index: gdb-7.6.90.20140127/gdb/gnu-v3-abi.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/gnu-v3-abi.c 2014-02-06 18:07:54.363911116 +0100 ++++ gdb-7.6.90.20140127/gdb/gnu-v3-abi.c 2014-02-06 18:07:58.918916011 +0100 @@ -112,7 +112,7 @@ build_gdb_vtable_type (struct gdbarch *a { struct type *t; @@ -2328,10 +2321,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/gnu-v3-abi.c struct type *basetype; if (BASETYPE_VIA_VIRTUAL (domain, i)) -Index: gdb-7.6.50.20130731-cvs/gdb/go-lang.h +Index: gdb-7.6.90.20140127/gdb/go-lang.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/go-lang.h 2014-02-06 18:07:54.363911116 +0100 ++++ gdb-7.6.90.20140127/gdb/go-lang.h 2014-02-06 18:07:58.918916011 +0100 @@ -83,7 +83,7 @@ extern void go_print_type (struct type * /* Defined in go-valprint.c. */ @@ -2341,10 +2334,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/go-lang.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.6.50.20130731-cvs/gdb/go-valprint.c +Index: gdb-7.6.90.20140127/gdb/go-valprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/go-valprint.c 2014-02-06 18:07:54.363911116 +0100 ++++ gdb-7.6.90.20140127/gdb/go-valprint.c 2014-02-06 18:07:58.918916011 +0100 @@ -37,7 +37,7 @@ static void @@ -2367,10 +2360,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/go-valprint.c const struct value_print_options *options) { CHECK_TYPEDEF (type); -Index: gdb-7.6.50.20130731-cvs/gdb/i386-nat.c +Index: gdb-7.6.90.20140127/gdb/i386-nat.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/i386-nat.c 2014-02-06 18:07:54.363911116 +0100 ++++ gdb-7.6.90.20140127/gdb/i386-nat.c 2014-02-06 18:07:58.918916011 +0100 @@ -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,10 +2393,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/i386-nat.c { struct i386_debug_reg_state *state = i386_debug_reg_state (ptid_get_pid (inferior_ptid)); -Index: gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c +Index: gdb-7.6.90.20140127/gdb/inf-ttrace.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/inf-ttrace.c 2014-02-06 18:07:54.364911117 +0100 ++++ gdb-7.6.90.20140127/gdb/inf-ttrace.c 2014-02-06 18:07:58.918916011 +0100 @@ -365,7 +365,7 @@ inf_ttrace_can_use_hw_breakpoint (int ty } @@ -2413,10 +2406,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c { return 1; } -Index: gdb-7.6.50.20130731-cvs/gdb/jv-lang.c +Index: gdb-7.6.90.20140127/gdb/jv-lang.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/jv-lang.c 2014-02-06 18:07:54.364911117 +0100 ++++ gdb-7.6.90.20140127/gdb/jv-lang.c 2014-02-06 18:07:58.919916012 +0100 @@ -436,7 +436,7 @@ java_link_class_type (struct gdbarch *gd for (i = TYPE_N_BASECLASSES (type); i < nfields; i++) { @@ -2435,10 +2428,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/jv-lang.c const struct value_print_options *options) { const char *type_encoding = java_get_encoding (type); -Index: gdb-7.6.50.20130731-cvs/gdb/jv-lang.h +Index: gdb-7.6.90.20140127/gdb/jv-lang.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/jv-lang.h 2014-02-06 18:07:54.364911117 +0100 ++++ gdb-7.6.90.20140127/gdb/jv-lang.h 2014-02-06 18:07:58.919916012 +0100 @@ -42,8 +42,8 @@ struct builtin_java_type extern const struct builtin_java_type *builtin_java_type (struct gdbarch *); @@ -2450,10 +2443,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/jv-lang.h const struct value *, const struct value_print_options *); -Index: gdb-7.6.50.20130731-cvs/gdb/jv-valprint.c +Index: gdb-7.6.90.20140127/gdb/jv-valprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/jv-valprint.c 2014-02-06 18:07:54.365911119 +0100 ++++ gdb-7.6.90.20140127/gdb/jv-valprint.c 2014-02-06 18:07:58.919916012 +0100 @@ -266,7 +266,7 @@ java_value_print (struct value *val, str static void @@ -2463,7 +2456,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/jv-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -465,7 +465,7 @@ java_print_value_fields (struct type *ty +@@ -459,7 +459,7 @@ java_print_value_fields (struct type *ty void java_val_print (struct type *type, const gdb_byte *valaddr, @@ -2472,11 +2465,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/jv-valprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.6.50.20130731-cvs/gdb/language.c +Index: gdb-7.6.90.20140127/gdb/language.c =================================================================== ---- 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 * +--- gdb-7.6.90.20140127.orig/gdb/language.c 2014-02-06 18:07:54.365911119 +0100 ++++ gdb-7.6.90.20140127/gdb/language.c 2014-02-06 18:07:58.919916012 +0100 +@@ -722,7 +722,7 @@ unk_lang_printchar (int c, struct type * static void unk_lang_printstr (struct ui_file *stream, struct type *type, @@ -2485,7 +2478,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/language.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -740,7 +740,7 @@ unk_lang_print_type (struct type *type, +@@ -741,7 +741,7 @@ unk_lang_print_type (struct type *type, static void unk_lang_val_print (struct type *type, const gdb_byte *valaddr, @@ -2494,11 +2487,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/language.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.6.50.20130731-cvs/gdb/language.h +Index: gdb-7.6.90.20140127/gdb/language.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/language.h 2014-02-06 18:07:54.365911119 +0100 ++++ gdb-7.6.90.20140127/gdb/language.h 2014-02-06 18:07:58.919916012 +0100 +@@ -182,7 +182,7 @@ struct language_defn struct ui_file * stream); void (*la_printstr) (struct ui_file * stream, struct type *elttype, @@ -2507,7 +2500,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/language.h const char *encoding, int force_ellipses, const struct value_print_options *); -@@ -217,7 +217,7 @@ struct language_defn +@@ -224,7 +224,7 @@ struct language_defn void (*la_val_print) (struct type *type, const gdb_byte *contents, @@ -2516,11 +2509,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/language.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.6.50.20130731-cvs/gdb/m2-lang.c +Index: gdb-7.6.90.20140127/gdb/m2-lang.c =================================================================== ---- 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, +--- gdb-7.6.90.20140127.orig/gdb/m2-lang.c 2014-02-06 18:07:54.366911120 +0100 ++++ gdb-7.6.90.20140127/gdb/m2-lang.c 2014-02-06 18:07:58.920916013 +0100 +@@ -104,10 +104,10 @@ m2_printchar (int c, struct type *type, static void m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, @@ -2533,7 +2526,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/m2-lang.c unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; -@@ -121,9 +121,9 @@ m2_printstr (struct ui_file *stream, str +@@ -122,9 +122,9 @@ m2_printstr (struct ui_file *stream, str { /* Position of the character we are examining to see whether it is repeated. */ @@ -2545,7 +2538,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/m2-lang.c QUIT; -@@ -149,7 +149,7 @@ m2_printstr (struct ui_file *stream, str +@@ -150,7 +150,7 @@ m2_printstr (struct ui_file *stream, str in_quotes = 0; } m2_printchar (string[i], type, stream); @@ -2554,10 +2547,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/m2-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.6.50.20130731-cvs/gdb/m2-lang.h +Index: gdb-7.6.90.20140127/gdb/m2-lang.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/m2-lang.h 2014-02-06 18:07:54.366911120 +0100 ++++ gdb-7.6.90.20140127/gdb/m2-lang.h 2014-02-06 18:07:58.920916013 +0100 @@ -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 +2560,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/m2-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -Index: gdb-7.6.50.20130731-cvs/gdb/m2-typeprint.c +Index: gdb-7.6.90.20140127/gdb/m2-typeprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/m2-typeprint.c 2014-02-06 18:07:54.366911120 +0100 ++++ gdb-7.6.90.20140127/gdb/m2-typeprint.c 2014-02-06 18:07:58.920916013 +0100 @@ -233,9 +233,12 @@ static void m2_array (struct type *type, m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 1); } @@ -2587,10 +2580,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/m2-typeprint.c } fprintf_filtered (stream, "] OF "); m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); -Index: gdb-7.6.50.20130731-cvs/gdb/m2-valprint.c +Index: gdb-7.6.90.20140127/gdb/m2-valprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/m2-valprint.c 2014-02-06 18:07:54.366911120 +0100 ++++ gdb-7.6.90.20140127/gdb/m2-valprint.c 2014-02-06 18:07:58.920916013 +0100 @@ -35,7 +35,7 @@ static int print_unpacked_pointer (struc struct ui_file *stream); static void @@ -2656,10 +2649,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/m2-valprint.c /* Look for a NULL char. */ for (temp_len = 0; -Index: gdb-7.6.50.20130731-cvs/gdb/memrange.c +Index: gdb-7.6.90.20140127/gdb/memrange.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/memrange.c 2014-02-06 18:07:54.366911120 +0100 ++++ gdb-7.6.90.20140127/gdb/memrange.c 2014-02-06 18:07:58.920916013 +0100 @@ -21,8 +21,8 @@ #include "memrange.h" @@ -2671,10 +2664,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/memrange.c { ULONGEST h, l; -Index: gdb-7.6.50.20130731-cvs/gdb/memrange.h +Index: gdb-7.6.90.20140127/gdb/memrange.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/memrange.h 2014-02-06 18:07:54.367911121 +0100 ++++ gdb-7.6.90.20140127/gdb/memrange.h 2014-02-06 18:07:58.921916014 +0100 @@ -30,7 +30,7 @@ struct mem_range CORE_ADDR start; @@ -2695,10 +2688,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/memrange.h /* Sort ranges by start address, then coalesce contiguous or overlapping ranges. */ -Index: gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c +Index: gdb-7.6.90.20140127/gdb/mips-linux-nat.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/mips-linux-nat.c 2014-02-06 18:07:54.367911121 +0100 ++++ gdb-7.6.90.20140127/gdb/mips-linux-nat.c 2014-02-06 18:07:58.921916014 +0100 @@ -588,7 +588,7 @@ mips_linux_stopped_data_address (struct the specified region can be covered by the watch registers. */ @@ -2708,10 +2701,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c { struct pt_watch_regs dummy_regs; int i; -Index: gdb-7.6.50.20130731-cvs/gdb/opencl-lang.c +Index: gdb-7.6.90.20140127/gdb/opencl-lang.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/opencl-lang.c 2014-02-06 18:07:54.367911121 +0100 ++++ gdb-7.6.90.20140127/gdb/opencl-lang.c 2014-02-06 18:07:58.921916014 +0100 @@ -80,11 +80,11 @@ builtin_opencl_type (struct gdbarch *gdb static struct type * @@ -2838,11 +2831,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/opencl-lang.c if (!value_bits_synthetic_pointer (c->val, c->indices[i] * elsize + comp_offset, -Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.c +Index: gdb-7.6.90.20140127/gdb/p-lang.c =================================================================== ---- 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) +--- gdb-7.6.90.20140127.orig/gdb/p-lang.c 2014-02-06 18:07:54.368911122 +0100 ++++ gdb-7.6.90.20140127/gdb/p-lang.c 2014-02-06 18:07:58.921916014 +0100 +@@ -96,8 +96,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. */ int @@ -2853,7 +2846,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.c struct type **char_type, const char **arrayname) { -@@ -216,12 +216,12 @@ pascal_printchar (int c, struct type *ty +@@ -217,12 +217,12 @@ pascal_printchar (int c, struct type *ty void pascal_printstr (struct ui_file *stream, struct type *type, @@ -2868,7 +2861,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.c unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; -@@ -249,9 +249,9 @@ pascal_printstr (struct ui_file *stream, +@@ -250,9 +250,9 @@ pascal_printstr (struct ui_file *stream, { /* Position of the character we are examining to see whether it is repeated. */ @@ -2880,7 +2873,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.c unsigned long int current_char; QUIT; -@@ -283,7 +283,7 @@ pascal_printstr (struct ui_file *stream, +@@ -284,7 +284,7 @@ pascal_printstr (struct ui_file *stream, in_quotes = 0; } pascal_printchar (current_char, type, stream); @@ -2889,10 +2882,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.h +Index: gdb-7.6.90.20140127/gdb/p-lang.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/p-lang.h 2014-02-06 18:07:54.368911122 +0100 ++++ gdb-7.6.90.20140127/gdb/p-lang.h 2014-02-06 18:07:58.922916016 +0100 @@ -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 +2920,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.h CORE_ADDR, struct ui_file *, int, const struct value *, -Index: gdb-7.6.50.20130731-cvs/gdb/p-valprint.c +Index: gdb-7.6.90.20140127/gdb/p-valprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/p-valprint.c 2014-02-06 18:07:54.368911122 +0100 ++++ gdb-7.6.90.20140127/gdb/p-valprint.c 2014-02-06 18:07:58.922916016 +0100 @@ -58,7 +58,7 @@ static const struct generic_val_print_de void @@ -2992,10 +2985,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/p-valprint.c volatile struct gdb_exception ex; int skip = 0; -Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c +Index: gdb-7.6.90.20140127/gdb/ppc-linux-nat.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/ppc-linux-nat.c 2014-02-06 18:07:54.369911123 +0100 ++++ gdb-7.6.90.20140127/gdb/ppc-linux-nat.c 2014-02-06 18:07:58.922916016 +0100 @@ -1496,7 +1496,7 @@ ppc_linux_can_use_hw_breakpoint (int typ } @@ -3005,11 +2998,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c { /* Handle sub-8-byte quantities. */ if (len <= 0) -Index: gdb-7.6.50.20130731-cvs/gdb/printcmd.c +Index: gdb-7.6.90.20140127/gdb/printcmd.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/printcmd.c 2014-02-06 18:07:54.370911124 +0100 ++++ gdb-7.6.90.20140127/gdb/printcmd.c 2014-02-06 18:07:58.923916017 +0100 +@@ -289,7 +289,7 @@ print_formatted (struct value *val, int struct ui_file *stream) { struct type *type = check_typedef (value_type (val)); @@ -3018,7 +3011,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/printcmd.c if (VALUE_LVAL (val) == lval_memory) next_address = value_address (val) + len; -@@ -368,7 +368,7 @@ print_scalar_formatted (const void *vala +@@ -367,7 +367,7 @@ print_scalar_formatted (const void *vala { struct gdbarch *gdbarch = get_type_arch (type); LONGEST val_long = 0; @@ -3027,11 +3020,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/printcmd.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); /* String printing should go through val_print_scalar_formatted. */ -Index: gdb-7.6.50.20130731-cvs/gdb/procfs.c +Index: gdb-7.6.90.20140127/gdb/procfs.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/procfs.c 2014-02-06 18:07:54.370911124 +0100 ++++ gdb-7.6.90.20140127/gdb/procfs.c 2014-02-06 18:07:58.924916018 +0100 +@@ -4924,7 +4924,7 @@ procfs_remove_watchpoint (CORE_ADDR addr } static int @@ -3040,10 +3033,10 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/python/py-prettyprint.c +Index: gdb-7.6.90.20140127/gdb/python/py-prettyprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/python/py-prettyprint.c 2014-02-06 18:07:54.371911125 +0100 ++++ gdb-7.6.90.20140127/gdb/python/py-prettyprint.c 2014-02-06 18:07:58.924916018 +0100 @@ -688,7 +688,7 @@ print_children (PyObject *printer, const int @@ -3062,11 +3055,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/python/py-prettyprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.6.50.20130731-cvs/gdb/python/python.h +Index: gdb-7.6.90.20140127/gdb/python/python.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/python/python.h 2014-02-06 18:07:54.371911125 +0100 ++++ gdb-7.6.90.20140127/gdb/python/python.h 2014-02-06 18:07:58.924916018 +0100 +@@ -111,7 +111,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 +3068,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/python/python.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.6.50.20130731-cvs/gdb/regcache.c +Index: gdb-7.6.90.20140127/gdb/regcache.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/regcache.c 2014-02-06 18:07:54.372911126 +0100 ++++ gdb-7.6.90.20140127/gdb/regcache.c 2014-02-06 18:07:58.924916018 +0100 @@ -899,7 +899,7 @@ typedef void (regcache_write_ftype) (str static enum register_status @@ -3124,10 +3117,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -Index: gdb-7.6.50.20130731-cvs/gdb/regcache.h +Index: gdb-7.6.90.20140127/gdb/regcache.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/regcache.h 2014-02-06 18:07:54.372911126 +0100 ++++ gdb-7.6.90.20140127/gdb/regcache.h 2014-02-06 18:07:58.925916019 +0100 @@ -89,9 +89,9 @@ extern void regcache_raw_write_unsigned extern enum register_status @@ -3155,11 +3148,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/regcache.h /* Special routines to read/write the PC. */ -Index: gdb-7.6.50.20130731-cvs/gdb/remote.c +Index: gdb-7.6.90.20140127/gdb/remote.c =================================================================== ---- 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 = +--- gdb-7.6.90.20140127.orig/gdb/remote.c 2014-02-06 18:07:54.374911128 +0100 ++++ gdb-7.6.90.20140127/gdb/remote.c 2014-02-06 18:07:58.926916020 +0100 +@@ -8413,7 +8413,7 @@ int remote_hw_watchpoint_length_limit = int remote_hw_breakpoint_limit = -1; static int @@ -3168,23 +3161,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/remote.c { if (remote_hw_watchpoint_length_limit == 0) return 0; -Index: gdb-7.6.50.20130731-cvs/gdb/s390-nat.c +Index: gdb-7.6.90.20140127/gdb/spu-multiarch.c =================================================================== ---- 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 - } - - static int --s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, int cnt) -+s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST cnt) - { - return 1; - } -Index: gdb-7.6.50.20130731-cvs/gdb/spu-multiarch.c -=================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/spu-multiarch.c 2014-02-06 18:07:54.374911128 +0100 ++++ gdb-7.6.90.20140127/gdb/spu-multiarch.c 2014-02-06 18:07:58.927916021 +0100 @@ -118,7 +118,7 @@ spu_thread_architecture (struct target_o /* Override the to_region_ok_for_hw_watchpoint routine. */ @@ -3194,11 +3174,11 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/stack.c +Index: gdb-7.6.90.20140127/gdb/stack.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/stack.c 2014-02-06 18:07:54.375911129 +0100 ++++ gdb-7.6.90.20140127/gdb/stack.c 2014-02-06 18:07:58.927916021 +0100 +@@ -180,7 +180,7 @@ print_stack_frame (struct frame_info *fr argument (not just the first nameless argument). */ static void @@ -3207,7 +3187,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/stack.c int first, struct ui_file *stream) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -500,7 +500,7 @@ print_frame_args (struct symbol *func, s +@@ -526,7 +526,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 +3196,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/stack.c /* Number of ints of arguments that we have printed so far. */ int args_printed = 0; struct cleanup *old_chain; -@@ -538,8 +538,8 @@ print_frame_args (struct symbol *func, s +@@ -564,8 +564,8 @@ print_frame_args (struct symbol *func, s case LOC_ARG: case LOC_REF_ARG: { @@ -3227,7 +3207,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/stack.c /* Compute address of next argument by adding the size of this argument and rounding to an int boundary. */ -@@ -674,7 +674,7 @@ print_frame_args (struct symbol *func, s +@@ -700,7 +700,7 @@ print_frame_args (struct symbol *func, s enough about the stack to find them. */ if (num != -1) { @@ -3236,11 +3216,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/stack.c if (highest_offset == -1) start = gdbarch_frame_args_skip (get_frame_arch (frame)); -Index: gdb-7.6.50.20130731-cvs/gdb/symmisc.c +Index: gdb-7.6.90.20140127/gdb/symmisc.c =================================================================== ---- 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) +--- gdb-7.6.90.20140127.orig/gdb/symmisc.c 2014-02-06 18:07:54.375911129 +0100 ++++ gdb-7.6.90.20140127/gdb/symmisc.c 2014-02-06 18:07:58.927916021 +0100 +@@ -529,11 +529,11 @@ print_symbol (void *args) case LOC_CONST_BYTES: { @@ -3255,11 +3235,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/symmisc.c for (i = 0; i < TYPE_LENGTH (type); i++) fprintf_filtered (outfile, " %02x", (unsigned) SYMBOL_VALUE_BYTES (symbol)[i]); -Index: gdb-7.6.50.20130731-cvs/gdb/target.c +Index: gdb-7.6.90.20140127/gdb/target.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/target.c 2014-02-06 18:07:54.376911130 +0100 ++++ gdb-7.6.90.20140127/gdb/target.c 2014-02-06 18:07:58.928916022 +0100 +@@ -52,7 +52,7 @@ static void default_terminal_info (const static int default_watchpoint_addr_within_range (struct target_ops *, CORE_ADDR, CORE_ADDR, int); @@ -3268,7 +3248,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/target.c static void tcomplain (void) ATTRIBUTE_NORETURN; -@@ -127,7 +127,7 @@ static int debug_to_stopped_data_address +@@ -116,7 +116,7 @@ static int debug_to_stopped_data_address static int debug_to_watchpoint_addr_within_range (struct target_ops *, CORE_ADDR, CORE_ADDR, int); @@ -3277,7 +3257,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/target.c static int debug_to_can_accel_watchpoint_condition (CORE_ADDR, int, int, struct expression *); -@@ -3586,7 +3586,7 @@ target_fileio_read_stralloc (const char +@@ -3599,7 +3599,7 @@ target_fileio_read_stralloc (const char static int @@ -3286,7 +3266,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/target.c { return (len <= gdbarch_ptr_bit (target_gdbarch ()) / TARGET_CHAR_BIT); } -@@ -4541,7 +4541,7 @@ debug_to_can_use_hw_breakpoint (int type +@@ -4566,7 +4566,7 @@ debug_to_can_use_hw_breakpoint (int type } static int @@ -3295,11 +3275,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/target.c { CORE_ADDR retval; -Index: gdb-7.6.50.20130731-cvs/gdb/target.h +Index: gdb-7.6.90.20140127/gdb/target.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/target.h 2014-02-06 18:07:54.377911131 +0100 ++++ gdb-7.6.90.20140127/gdb/target.h 2014-02-06 18:07:58.929916023 +0100 +@@ -428,7 +428,7 @@ struct target_ops /* Documentation of this routine is provided with the corresponding target_* macro. */ @@ -3308,11 +3288,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/target.h int (*to_can_accel_watchpoint_condition) (CORE_ADDR, int, int, struct expression *); -Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c +Index: gdb-7.6.90.20140127/gdb/tracepoint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/tracepoint.c 2014-02-06 18:07:54.379911134 +0100 ++++ gdb-7.6.90.20140127/gdb/tracepoint.c 2014-02-06 18:07:58.930916024 +0100 +@@ -935,13 +935,13 @@ add_register (struct collection_list *co static void add_memrange (struct collection_list *memranges, int type, bfd_signed_vma base, @@ -3328,7 +3308,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c } /* type: memrange_absolute == memory, other n == basereg */ -@@ -976,7 +976,7 @@ collect_symbol (struct collection_list * +@@ -971,7 +971,7 @@ collect_symbol (struct collection_list * CORE_ADDR scope, int trace_string) { @@ -3337,7 +3317,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c unsigned int reg; bfd_signed_vma offset; int treat_as_expr = 0; -@@ -1000,8 +1000,8 @@ collect_symbol (struct collection_list * +@@ -995,8 +995,8 @@ collect_symbol (struct collection_list * char tmp[40]; sprintf_vma (tmp, offset); @@ -3348,7 +3328,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c tmp /* address */); } /* A struct may be a C++ class with static fields, go to general -@@ -1033,8 +1033,8 @@ collect_symbol (struct collection_list * +@@ -1028,8 +1028,8 @@ collect_symbol (struct collection_list * offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3359,7 +3339,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from frame ptr reg %d\n", reg); } -@@ -1045,8 +1045,8 @@ collect_symbol (struct collection_list * +@@ -1040,8 +1040,8 @@ collect_symbol (struct collection_list * offset = 0; if (info_verbose) { @@ -3370,7 +3350,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from reg %d\n", reg); } -@@ -1057,8 +1057,8 @@ collect_symbol (struct collection_list * +@@ -1052,8 +1052,8 @@ collect_symbol (struct collection_list * offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3381,7 +3361,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from frame ptr reg %d\n", reg); } -@@ -2716,7 +2716,8 @@ scope_info (char *args, int from_tty) +@@ -2711,7 +2711,8 @@ scope_info (char *args, int from_tty) const char *symname; char *save_args = args; struct block_iterator iter; @@ -3391,7 +3371,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c struct gdbarch *gdbarch; int regno; -@@ -2852,8 +2853,11 @@ scope_info (char *args, int from_tty) +@@ -2847,8 +2848,11 @@ scope_info (char *args, int from_tty) } } if (SYMBOL_TYPE (sym)) @@ -3405,10 +3385,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c } if (BLOCK_FUNCTION (block)) break; -Index: gdb-7.6.50.20130731-cvs/gdb/typeprint.c +Index: gdb-7.6.90.20140127/gdb/typeprint.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/typeprint.c 2014-02-06 18:07:54.379911134 +0100 ++++ gdb-7.6.90.20140127/gdb/typeprint.c 2014-02-06 18:07:58.930916024 +0100 @@ -409,7 +409,7 @@ whatis_exp (char *exp, int show) struct type *real_type = NULL; struct type *type; @@ -3418,10 +3398,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/typeprint.c int using_enc = 0; struct value_print_options opts; struct type_print_options flags = default_ptype_flags; -Index: gdb-7.6.50.20130731-cvs/gdb/valarith.c +Index: gdb-7.6.90.20140127/gdb/valarith.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/valarith.c 2014-02-06 18:07:54.380911135 +0100 ++++ gdb-7.6.90.20140127/gdb/valarith.c 2014-02-06 18:07:58.930916024 +0100 @@ -190,15 +190,15 @@ value_subscript (struct value *array, LO to doubles, but no longer does. */ @@ -3475,11 +3455,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valarith.c for (i = 0; i < len; i++) { -Index: gdb-7.6.50.20130731-cvs/gdb/valops.c +Index: gdb-7.6.90.20140127/gdb/valops.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/valops.c 2014-02-06 18:07:54.382911137 +0100 ++++ gdb-7.6.90.20140127/gdb/valops.c 2014-02-06 18:11:09.072119918 +0100 +@@ -51,11 +51,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 +3473,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c static int find_oload_champ_namespace (struct value **, int, const char *, const char *, -@@ -85,7 +85,7 @@ oload_classification classify_oload_matc +@@ -83,7 +83,7 @@ oload_classification classify_oload_matc int, int); static struct value *value_struct_elt_for_reference (struct type *, @@ -3502,7 +3482,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c char *, struct type *, int, enum noside); -@@ -102,8 +102,8 @@ static CORE_ADDR allocate_space_in_infer +@@ -100,8 +100,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 +3493,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c void _initialize_valops (void); -@@ -188,7 +188,7 @@ find_function_in_inferior (const char *n +@@ -186,7 +186,7 @@ find_function_in_inferior (const char *n space. */ struct value * @@ -3522,7 +3502,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c { struct objfile *objf; struct value *val = find_function_in_inferior ("malloc", &objf); -@@ -261,7 +261,8 @@ value_cast_structs (struct type *type, s +@@ -259,7 +259,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 +3512,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c struct type *real_type; real_type = value_rtti_type (v2, &full, &top, &using_enc); -@@ -400,12 +401,12 @@ value_cast (struct type *type, struct va +@@ -398,12 +399,12 @@ value_cast (struct type *type, struct va if (code1 == TYPE_CODE_ARRAY) { struct type *element_type = TYPE_TARGET_TYPE (type); @@ -3547,7 +3527,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c LONGEST low_bound, high_bound, new_length; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -639,7 +640,7 @@ value_reinterpret_cast (struct type *typ +@@ -637,7 +638,7 @@ value_reinterpret_cast (struct type *typ static int dynamic_cast_check_1 (struct type *desired_type, const gdb_byte *valaddr, @@ -3556,7 +3536,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c CORE_ADDR address, struct value *val, struct type *search_type, -@@ -651,8 +652,8 @@ dynamic_cast_check_1 (struct type *desir +@@ -649,8 +650,8 @@ dynamic_cast_check_1 (struct type *desir for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i) { @@ -3567,7 +3547,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c if (class_types_same_p (desired_type, TYPE_BASECLASS (search_type, i))) { -@@ -686,7 +687,7 @@ dynamic_cast_check_1 (struct type *desir +@@ -684,7 +685,7 @@ dynamic_cast_check_1 (struct type *desir static int dynamic_cast_check_2 (struct type *desired_type, const gdb_byte *valaddr, @@ -3576,7 +3556,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c CORE_ADDR address, struct value *val, struct type *search_type, -@@ -696,7 +697,7 @@ dynamic_cast_check_2 (struct type *desir +@@ -694,7 +695,7 @@ dynamic_cast_check_2 (struct type *desir for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i) { @@ -3585,7 +3565,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c if (! BASETYPE_VIA_PUBLIC (search_type, i)) continue; -@@ -727,7 +728,8 @@ dynamic_cast_check_2 (struct type *desir +@@ -725,7 +726,8 @@ dynamic_cast_check_2 (struct type *desir struct value * value_dynamic_cast (struct type *type, struct value *arg) { @@ -3595,7 +3575,7 @@ Index: gdb-7.6.50.20130731-cvs/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; -@@ -1007,7 +1009,7 @@ value_at_lazy (struct type *type, CORE_A +@@ -1005,7 +1007,7 @@ value_at_lazy (struct type *type, CORE_A } void @@ -3604,7 +3584,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length) { -@@ -1157,7 +1159,7 @@ value_assign (struct value *toval, struc +@@ -1155,7 +1157,7 @@ value_assign (struct value *toval, struc { const gdb_byte *dest_buffer; CORE_ADDR changed_addr; @@ -3613,7 +3593,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c gdb_byte buffer[sizeof (LONGEST)]; if (value_bitsize (toval)) -@@ -1236,7 +1238,7 @@ value_assign (struct value *toval, struc +@@ -1234,7 +1236,7 @@ value_assign (struct value *toval, struc if (value_bitsize (toval)) { struct value *parent = value_parent (toval); @@ -3622,7 +3602,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c int changed_len; gdb_byte buffer[sizeof (LONGEST)]; int optim, unavail; -@@ -1716,7 +1718,7 @@ value_array (int lowbound, int highbound +@@ -1715,7 +1717,7 @@ value_array (int lowbound, int highbound { int nelem; int idx; @@ -3631,7 +3611,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c struct value *val; struct type *arraytype; -@@ -1891,7 +1893,7 @@ typecmp (int staticp, int varargs, int n +@@ -1890,7 +1892,7 @@ typecmp (int staticp, int varargs, int n static void update_search_result (struct value **result_ptr, struct value *v, @@ -3640,7 +3620,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c const char *name, struct type *type) { if (v != NULL) -@@ -1915,10 +1917,10 @@ update_search_result (struct value **res +@@ -1914,10 +1916,10 @@ update_search_result (struct value **res lookup is ambiguous. */ static void @@ -3653,7 +3633,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c struct type *outermost_type) { int i; -@@ -1973,7 +1975,7 @@ do_search_struct_field (const char *name +@@ -1966,7 +1968,7 @@ do_search_struct_field (const char *name . */ struct value *v = NULL; @@ -3662,7 +3642,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c /* This is pretty gross. In G++, the offset in an anonymous union is relative to the beginning of the -@@ -2012,7 +2014,7 @@ do_search_struct_field (const char *name +@@ -2005,7 +2007,7 @@ do_search_struct_field (const char *name && (strcmp_iw (name, TYPE_BASECLASS_NAME (type, i)) == 0)); @@ -3671,7 +3651,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2087,11 +2089,11 @@ do_search_struct_field (const char *name +@@ -2078,11 +2080,11 @@ do_search_struct_field (const char *name fields, look for a baseclass named NAME. */ static struct value * @@ -3685,7 +3665,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c do_search_struct_field (name, arg1, offset, type, looking_for_baseclass, &result, &boffset, type); -@@ -2108,7 +2110,7 @@ search_struct_field (const char *name, s +@@ -2099,7 +2101,7 @@ search_struct_field (const char *name, s static struct value * search_struct_method (const char *name, struct value **arg1p, @@ -3694,7 +3674,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c int *static_memfuncp, struct type *type) { int i; -@@ -2172,8 +2174,8 @@ search_struct_method (const char *name, +@@ -2163,8 +2165,8 @@ search_struct_method (const char *name, for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--) { @@ -3705,7 +3685,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2355,8 +2357,8 @@ value_struct_elt (struct value **argp, s +@@ -2391,8 +2393,8 @@ value_struct_elt_bitpos (struct value ** static struct fn_field * find_method_list (struct value **argp, const char *method, @@ -3716,7 +3696,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c { int i; struct fn_field *f; -@@ -2389,7 +2391,7 @@ find_method_list (struct value **argp, c +@@ -2425,7 +2427,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 +3705,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2425,7 +2427,7 @@ find_method_list (struct value **argp, c +@@ -2461,7 +2463,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 +3714,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c { struct type *t; -@@ -2515,7 +2517,7 @@ find_overload_match (struct value **args +@@ -2551,7 +2553,7 @@ find_overload_match (struct value **args /* Number of overloaded instances being considered. */ int num_fns = 0; struct type *basetype = NULL; @@ -3743,7 +3723,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL); -@@ -3185,7 +3187,7 @@ compare_parameters (struct type *t1, str +@@ -3221,7 +3223,7 @@ compare_parameters (struct type *t1, str the form "DOMAIN::NAME". */ static struct value * @@ -3752,16 +3732,16 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c struct type *curtype, char *name, struct type *intype, int want_address, -@@ -3222,7 +3224,7 @@ value_struct_elt_for_reference (struct t +@@ -3255,7 +3257,7 @@ value_struct_elt_for_reference (struct t if (want_address) return value_from_longest (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain), - offset + (LONGEST) (TYPE_FIELD_BITPOS (t, i) >> 3)); + offset + (TYPE_FIELD_BITPOS (t, i) >> 3)); - else if (noside == EVAL_AVOID_SIDE_EFFECTS) + else if (noside != EVAL_NORMAL) return allocate_value (TYPE_FIELD_TYPE (t, i)); else -@@ -3365,7 +3367,7 @@ value_struct_elt_for_reference (struct t +@@ -3423,7 +3425,7 @@ value_struct_elt_for_reference (struct t for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--) { struct value *v; @@ -3770,7 +3750,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (t, i)) base_offset = 0; -@@ -3455,7 +3457,7 @@ value_maybe_namespace_elt (const struct +@@ -3513,7 +3515,7 @@ value_maybe_namespace_elt (const struct struct type * value_rtti_indirect_type (struct value *v, int *full, @@ -3779,7 +3759,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c { struct value *target; struct type *type, *real_type, *target_type; -@@ -3505,12 +3507,12 @@ value_rtti_indirect_type (struct value * +@@ -3563,12 +3565,12 @@ value_rtti_indirect_type (struct value * struct value * value_full_object (struct value *argp, struct type *rtype, @@ -3794,11 +3774,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valops.c int using_enc = 0; struct value *new_val; -Index: gdb-7.6.50.20130731-cvs/gdb/valprint.c +Index: gdb-7.6.90.20140127/gdb/valprint.c =================================================================== ---- 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) +--- gdb-7.6.90.20140127.orig/gdb/valprint.c 2014-02-06 18:07:54.383911138 +0100 ++++ gdb-7.6.90.20140127/gdb/valprint.c 2014-02-06 18:07:58.932916026 +0100 +@@ -302,7 +302,7 @@ val_print_scalar_type_p (struct type *ty int valprint_check_validity (struct ui_file *stream, struct type *type, @@ -3807,7 +3787,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valprint.c const struct value *val) { CHECK_TYPEDEF (type); -@@ -366,7 +366,7 @@ val_print_invalid_address (struct ui_fil +@@ -375,7 +375,7 @@ val_print_invalid_address (struct ui_fil void generic_val_print (struct type *type, const gdb_byte *valaddr, @@ -3816,7 +3796,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valprint.c struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, -@@ -728,7 +728,7 @@ generic_val_print (struct type *type, co +@@ -737,7 +737,7 @@ generic_val_print (struct type *type, co RECURSE. */ void @@ -3825,7 +3805,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -940,7 +940,7 @@ val_print_type_code_flags (struct type * +@@ -958,7 +958,7 @@ val_print_type_code_flags (struct type * void val_print_scalar_formatted (struct type *type, @@ -3834,7 +3814,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valprint.c const struct value *val, const struct value_print_options *options, int size, -@@ -1481,7 +1481,7 @@ print_decimal_chars (struct ui_file *str +@@ -1499,7 +1499,7 @@ print_decimal_chars (struct ui_file *str void print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, @@ -3843,7 +3823,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valprint.c { const gdb_byte *p; -@@ -1598,23 +1598,23 @@ maybe_print_array_index (struct type *in +@@ -1616,23 +1616,23 @@ maybe_print_array_index (struct type *in void val_print_array_elements (struct type *type, @@ -3873,7 +3853,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valprint.c LONGEST low_bound, high_bound; struct cleanup *back_to; CORE_ADDR saved_address = address; -@@ -1709,7 +1709,7 @@ val_print_array_elements (struct type *t +@@ -1727,7 +1727,7 @@ val_print_array_elements (struct type *t address, stream, recurse + 1, val, options, current_language); annotate_elt_rep (reps); @@ -3882,7 +3862,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valprint.c annotate_elt_rep_end (); i = rep1 - 1; -@@ -2360,7 +2360,7 @@ print_converted_chars_to_obstack (struct +@@ -2382,7 +2382,7 @@ print_converted_chars_to_obstack (struct void generic_printstr (struct ui_file *stream, struct type *type, @@ -3891,10 +3871,10 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/valprint.h +Index: gdb-7.6.90.20140127/gdb/valprint.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/valprint.h 2014-02-06 18:07:54.384911139 +0100 ++++ gdb-7.6.90.20140127/gdb/valprint.h 2014-02-06 18:07:58.932916026 +0100 @@ -115,11 +115,11 @@ extern void maybe_print_array_index (str struct ui_file *stream, const struct value_print_options *); @@ -3927,7 +3907,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valprint.h extern void print_char_chars (struct ui_file *, struct type *, const gdb_byte *, unsigned int, enum bfd_endian); -@@ -190,7 +190,7 @@ struct generic_val_print_decorations +@@ -194,7 +194,7 @@ struct generic_val_print_decorations extern void generic_val_print (struct type *type, const gdb_byte *valaddr, @@ -3936,7 +3916,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/valprint.h struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, -@@ -200,7 +200,7 @@ extern void generic_emit_char (int c, st +@@ -204,7 +204,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,10 +3925,10 @@ Index: gdb-7.6.50.20130731-cvs/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.6.50.20130731-cvs/gdb/value.c +Index: gdb-7.6.90.20140127/gdb/value.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/value.c 2014-02-06 18:07:54.386911141 +0100 ++++ gdb-7.6.90.20140127/gdb/value.c 2014-02-06 18:10:39.376088625 +0100 @@ -69,10 +69,10 @@ struct internal_function struct range { @@ -3982,7 +3962,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c { range_s what; int i; -@@ -241,7 +241,7 @@ struct value +@@ -246,7 +246,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 +3971,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c /* Only used for bitfields; number of bits contained in them. */ int bitsize; -@@ -311,8 +311,8 @@ struct value +@@ -316,8 +316,8 @@ struct value `type', and `embedded_offset' is zero, so everything works normally. */ struct type *enclosing_type; @@ -4002,17 +3982,17 @@ Index: gdb-7.6.50.20130731-cvs/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 -@@ -334,7 +334,8 @@ struct value - }; +@@ -348,7 +348,8 @@ value_bits_available (const struct value + } int -value_bytes_available (const struct value *value, int offset, int length) +value_bytes_available (const struct value *value, LONGEST offset, + LONGEST length) { - gdb_assert (!value->lazy); - -@@ -355,7 +356,8 @@ value_entirely_available (struct value * + return value_bits_available (value, + offset * TARGET_CHAR_BIT, +@@ -555,7 +556,8 @@ mark_value_bits_unavailable (struct valu } void @@ -4020,9 +4000,9 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c +mark_value_bytes_unavailable (struct value *value, LONGEST offset, + LONGEST length) { - range_s newr; - int i; -@@ -526,7 +528,7 @@ mark_value_bytes_unavailable (struct val + mark_value_bits_unavailable (value, + offset * TARGET_CHAR_BIT, +@@ -569,7 +571,7 @@ mark_value_bytes_unavailable (struct val static int find_first_range_overlap (VEC(range_s) *ranges, int pos, @@ -4031,7 +4011,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c { range_s *r; int i; -@@ -539,9 +541,9 @@ find_first_range_overlap (VEC(range_s) * +@@ -760,9 +762,9 @@ value_available_contents_bits_eq (const } int @@ -4042,9 +4022,9 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c + const struct value *val2, LONGEST offset2, + LONGEST length) { - int idx1 = 0, idx2 = 0; - -@@ -767,13 +769,13 @@ deprecated_set_value_type (struct value + return value_available_contents_bits_eq (val1, offset1 * TARGET_CHAR_BIT, + val2, offset2 * TARGET_CHAR_BIT, +@@ -927,13 +929,13 @@ deprecated_set_value_type (struct value value->type = type; } @@ -4060,7 +4040,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c { value->offset = offset; } -@@ -932,8 +934,9 @@ value_contents_all (struct value *value) +@@ -1103,8 +1105,9 @@ value_contents_all (struct value *value) DST_OFFSET+LENGTH) range are wholly available. */ void @@ -4072,7 +4052,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c { range_s *r; int i; -@@ -981,8 +984,8 @@ value_contents_copy_raw (struct value *d +@@ -1156,8 +1159,8 @@ value_contents_copy_raw (struct value *d DST_OFFSET+LENGTH) range are wholly available. */ void @@ -4083,7 +4063,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c { require_not_optimized_out (src); -@@ -1087,7 +1090,7 @@ value_entirely_optimized_out (const stru +@@ -1262,7 +1265,7 @@ value_entirely_optimized_out (const stru } int @@ -4092,7 +4072,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c { if (!value->optimized_out) return 1; -@@ -1100,7 +1103,7 @@ value_bits_valid (const struct value *va +@@ -1275,7 +1278,7 @@ value_bits_valid (const struct value *va int value_bits_synthetic_pointer (const struct value *value, @@ -4101,7 +4081,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c { if (value->lval != lval_computed || !value->location.computed.funcs->check_synthetic_pointer) -@@ -1110,26 +1113,26 @@ value_bits_synthetic_pointer (const stru +@@ -1285,26 +1288,26 @@ value_bits_synthetic_pointer (const stru length); } @@ -4132,7 +4112,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c { value->pointed_to_offset = val; } -@@ -1982,7 +1985,7 @@ get_internalvar_function (struct interna +@@ -2157,7 +2160,7 @@ get_internalvar_function (struct interna } void @@ -4141,7 +4121,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c int bitsize, struct value *newval) { gdb_byte *addr; -@@ -2689,7 +2692,7 @@ set_value_enclosing_type (struct value * +@@ -2863,7 +2866,7 @@ set_value_enclosing_type (struct value * FIELDNO says which field. */ struct value * @@ -4150,7 +4130,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c int fieldno, struct type *arg_type) { struct value *v; -@@ -2717,7 +2720,7 @@ value_primitive_field (struct value *arg +@@ -2891,7 +2894,7 @@ value_primitive_field (struct value *arg bit. Assume that the address, offset, and embedded offset are sufficiently aligned. */ @@ -4159,7 +4139,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c int container_bitsize = TYPE_LENGTH (type) * 8; if (arg1->optimized_out) -@@ -2744,7 +2747,7 @@ value_primitive_field (struct value *arg +@@ -2918,7 +2921,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 +4148,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c /* Lazy register values with offsets are not supported. */ if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1)) -@@ -2834,7 +2837,7 @@ value_field (struct value *arg1, int fie +@@ -3008,7 +3011,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 +4157,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c { struct value *v; struct type *ftype = TYPE_FN_FIELD_TYPE (f, j); -@@ -2894,8 +2897,8 @@ value_fn_field (struct value **arg1p, st +@@ -3068,8 +3071,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 +4168,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c LONGEST *result) { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (field_type)); -@@ -2903,7 +2906,7 @@ unpack_value_bits_as_long_1 (struct type +@@ -3077,7 +3080,7 @@ unpack_value_bits_as_long_1 (struct type ULONGEST valmask; int lsbcount; int bytes_read; @@ -4197,7 +4177,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c /* Read the minimum number of bytes required; there may not be enough bytes to read an entire ULONGEST. */ -@@ -2973,7 +2976,7 @@ unpack_value_bits_as_long_1 (struct type +@@ -3147,7 +3150,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 +4186,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c const struct value *original_value, LONGEST *result) { -@@ -2991,10 +2994,10 @@ unpack_value_bits_as_long (struct type * +@@ -3165,10 +3168,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 +4199,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); struct type *field_type = TYPE_FIELD_TYPE (type, fieldno); -@@ -3010,7 +3013,7 @@ unpack_value_field_as_long_1 (struct typ +@@ -3184,7 +3187,7 @@ unpack_value_field_as_long_1 (struct typ int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, @@ -4228,7 +4208,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c const struct value *val, LONGEST *result) { gdb_assert (val != NULL); -@@ -3042,7 +3045,7 @@ unpack_field_as_long (struct type *type, +@@ -3216,7 +3219,7 @@ unpack_field_as_long (struct type *type, struct value * value_field_bitfield (struct type *type, int fieldno, const gdb_byte *valaddr, @@ -4237,7 +4217,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c { LONGEST l; -@@ -3069,12 +3072,12 @@ value_field_bitfield (struct type *type, +@@ -3243,12 +3246,12 @@ value_field_bitfield (struct type *type, void modify_field (struct type *type, gdb_byte *addr, @@ -4252,10 +4232,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.c /* Normalize BITPOS. */ addr += bitpos / 8; -Index: gdb-7.6.50.20130731-cvs/gdb/value.h +Index: gdb-7.6.90.20140127/gdb/value.h =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/value.h 2014-02-06 18:07:54.387911142 +0100 ++++ gdb-7.6.90.20140127/gdb/value.h 2014-02-06 18:09:23.064006360 +0100 @@ -82,8 +82,8 @@ extern void set_value_parent (struct val within the registers structure. Note also the member embedded_offset below. */ @@ -4310,7 +4290,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h const struct value *val); extern struct value *allocate_optimized_out_value (struct type *type); -@@ -415,13 +416,13 @@ extern struct value *coerce_array (struc +@@ -420,13 +421,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,25 +4306,25 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h /* Given a value, determine whether the contents bytes starting at OFFSET and extending for LENGTH bytes are available. This returns -@@ -429,7 +430,7 @@ extern int value_bits_synthetic_pointer +@@ -434,7 +435,7 @@ extern int value_bits_synthetic_pointer byte is unavailable. */ extern int value_bytes_available (const struct value *value, - int offset, int length); + LONGEST offset, LONGEST length); - /* Like value_bytes_available, but return false if any byte in the - whole object is unavailable. */ -@@ -439,7 +440,7 @@ extern int value_entirely_available (str + /* Given a value, determine whether the contents bits starting at + OFFSET and extending for LENGTH bits are available. This returns +@@ -456,7 +457,7 @@ extern int value_entirely_unavailable (s LENGTH bytes as unavailable. */ extern void mark_value_bytes_unavailable (struct value *value, - int offset, int length); + LONGEST offset, LONGEST length); - /* Compare LENGTH bytes of VAL1's contents starting at OFFSET1 with - LENGTH bytes of VAL2's contents starting at OFFSET2. -@@ -449,7 +450,7 @@ extern void mark_value_bytes_unavailable + /* Mark VALUE's content bits starting at OFFSET and extending for + LENGTH bits as unavailable. */ +@@ -472,7 +473,7 @@ extern void mark_value_bits_unavailable example, to compare a complete object value with itself, including its enclosing type chunk, you'd do: @@ -4353,7 +4333,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h value_available_contents (val, 0, val, 0, len); Returns true iff the set of available contents match. Unavailable -@@ -476,9 +477,9 @@ extern void mark_value_bytes_unavailable +@@ -499,9 +500,9 @@ extern void mark_value_bits_unavailable gone, it works with const values. Therefore, this routine must not be called with lazy values. */ @@ -4366,7 +4346,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h /* Read LENGTH bytes of memory starting at MEMADDR into BUFFER, which is (or will be copied to) VAL's contents buffer offset by -@@ -487,7 +488,7 @@ extern int value_available_contents_eq ( +@@ -510,7 +511,7 @@ extern int value_available_contents_eq ( memory is likewise unavailable. STACK indicates whether the memory is known to be stack memory. */ @@ -4375,7 +4355,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length); -@@ -521,7 +522,7 @@ extern CORE_ADDR unpack_pointer (struct +@@ -544,7 +545,7 @@ extern CORE_ADDR unpack_pointer (struct extern int unpack_value_bits_as_long (struct type *field_type, const gdb_byte *valaddr, @@ -4384,7 +4364,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h int bitsize, const struct value *original_value, LONGEST *result); -@@ -530,12 +531,12 @@ extern LONGEST unpack_field_as_long (str +@@ -553,12 +554,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, @@ -4399,10 +4379,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h const struct value *val); extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num); -@@ -594,12 +595,12 @@ extern struct value *default_read_var_va +@@ -616,12 +617,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); -extern void value_contents_copy (struct value *dst, int dst_offset, - struct value *src, int src_offset, - int length); @@ -4418,7 +4398,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h extern struct value *allocate_repeat_value (struct type *type, int count); -@@ -671,16 +672,16 @@ extern int find_overload_match (struct v +@@ -698,16 +699,16 @@ extern int find_overload_match (struct v extern struct value *value_field (struct value *arg1, int fieldno); @@ -4438,7 +4418,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h extern struct value *value_cast_pointers (struct type *, struct value *, int); -@@ -774,7 +775,7 @@ extern void set_internalvar_string (stru +@@ -802,7 +803,7 @@ extern void set_internalvar_string (stru extern void clear_internalvar (struct internalvar *var); extern void set_internalvar_component (struct internalvar *var, @@ -4447,7 +4427,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h int bitpos, int bitsize, struct value *newvalue); -@@ -856,7 +857,7 @@ extern struct value *value_x_unop (struc +@@ -883,7 +884,7 @@ extern struct value *value_x_unop (struc enum noside noside); extern struct value *value_fn_field (struct value **arg1p, struct fn_field *f, @@ -4456,7 +4436,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h extern int binop_types_user_defined_p (enum exp_opcode op, struct type *type1, -@@ -884,7 +885,8 @@ extern void release_value_or_incref (str +@@ -911,7 +912,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, @@ -4466,7 +4446,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h extern void type_print (struct type *type, const char *varstring, struct ui_file *stream, int show); -@@ -914,7 +916,7 @@ extern void value_print_array_elements ( +@@ -941,7 +943,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, @@ -4475,7 +4455,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/value.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -963,10 +965,11 @@ extern struct value *value_literal_compl +@@ -990,10 +992,11 @@ extern struct value *value_literal_compl extern struct value *find_function_in_inferior (const char *, struct objfile **); diff --git a/gdb-rhbz795424-bitpos-21of25.patch b/gdb-rhbz795424-bitpos-21of25.patch index 81124fb..7d0b6fe 100644 --- a/gdb-rhbz795424-bitpos-21of25.patch +++ b/gdb-rhbz795424-bitpos-21of25.patch @@ -52,10 +52,10 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-ensure-size_t.patch -Index: gdb-7.5.50.20130118/gdb/alpha-tdep.c +Index: gdb-7.6.90.20140127/gdb/alpha-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/alpha-tdep.c 2013-01-18 23:33:59.277047324 +0100 -+++ gdb-7.5.50.20130118/gdb/alpha-tdep.c 2013-01-18 23:34:02.678051846 +0100 +--- gdb-7.6.90.20140127.orig/gdb/alpha-tdep.c 2014-02-06 18:18:51.005616676 +0100 ++++ gdb-7.6.90.20140127/gdb/alpha-tdep.c 2014-02-06 18:18:53.671621349 +0100 @@ -414,6 +414,13 @@ alpha_push_dummy_call (struct gdbarch *g accumulate_size = 0; else @@ -70,11 +70,11 @@ Index: gdb-7.5.50.20130118/gdb/alpha-tdep.c sp -= accumulate_size; /* Keep sp aligned to a multiple of 16 as the ABI requires. */ -Index: gdb-7.5.50.20130118/gdb/cp-valprint.c +Index: gdb-7.6.90.20140127/gdb/cp-valprint.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/cp-valprint.c 2013-01-18 23:33:59.278047326 +0100 -+++ gdb-7.5.50.20130118/gdb/cp-valprint.c 2013-01-18 23:34:02.679051848 +0100 -@@ -540,6 +540,8 @@ cp_print_value (struct type *type, struc +--- gdb-7.6.90.20140127.orig/gdb/cp-valprint.c 2014-02-06 18:18:51.006616677 +0100 ++++ gdb-7.6.90.20140127/gdb/cp-valprint.c 2014-02-06 18:18:53.671621349 +0100 +@@ -537,6 +537,8 @@ cp_print_value (struct type *type, struc gdb_byte *buf; struct cleanup *back_to; @@ -83,11 +83,11 @@ Index: gdb-7.5.50.20130118/gdb/cp-valprint.c buf = xmalloc (TYPE_LENGTH (baseclass)); back_to = make_cleanup (xfree, buf); -Index: gdb-7.5.50.20130118/gdb/dwarf2loc.c +Index: gdb-7.6.90.20140127/gdb/dwarf2loc.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/dwarf2loc.c 2013-01-18 23:33:59.280047332 +0100 -+++ gdb-7.5.50.20130118/gdb/dwarf2loc.c 2013-01-18 23:34:02.680051851 +0100 -@@ -1784,6 +1784,8 @@ read_pieced_value (struct value *v) +--- gdb-7.6.90.20140127.orig/gdb/dwarf2loc.c 2014-02-06 18:18:51.007616678 +0100 ++++ gdb-7.6.90.20140127/gdb/dwarf2loc.c 2014-02-06 18:18:53.672621293 +0100 +@@ -1821,6 +1821,8 @@ read_pieced_value (struct value *v) this_size = (this_size_bits + source_offset_bits % 8 + 7) / 8; source_offset = source_offset_bits / 8; @@ -96,7 +96,7 @@ Index: gdb-7.5.50.20130118/gdb/dwarf2loc.c if (buffer_size < this_size) { buffer_size = this_size; -@@ -1975,6 +1977,7 @@ write_pieced_value (struct value *to, st +@@ -2012,6 +2014,7 @@ write_pieced_value (struct value *to, st } else { @@ -104,11 +104,11 @@ Index: gdb-7.5.50.20130118/gdb/dwarf2loc.c if (buffer_size < this_size) { buffer_size = this_size; -Index: gdb-7.5.50.20130118/gdb/findcmd.c +Index: gdb-7.6.90.20140127/gdb/findcmd.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/findcmd.c 2013-01-18 23:33:59.280047332 +0100 -+++ gdb-7.5.50.20130118/gdb/findcmd.c 2013-01-18 23:34:02.680051851 +0100 -@@ -187,6 +187,7 @@ parse_find_args (char *args, ULONGEST *m +--- gdb-7.6.90.20140127.orig/gdb/findcmd.c 2014-02-06 18:18:51.008616679 +0100 ++++ gdb-7.6.90.20140127/gdb/findcmd.c 2014-02-06 18:18:53.673621239 +0100 +@@ -185,6 +185,7 @@ parse_find_args (char *args, ULONGEST *m size_t current_offset = pattern_buf_end - pattern_buf; pattern_buf_size = pattern_buf_size_need * 2; @@ -116,11 +116,11 @@ Index: gdb-7.5.50.20130118/gdb/findcmd.c pattern_buf = xrealloc (pattern_buf, pattern_buf_size); pattern_buf_end = pattern_buf + current_offset; } -Index: gdb-7.5.50.20130118/gdb/p-valprint.c +Index: gdb-7.6.90.20140127/gdb/p-valprint.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/p-valprint.c 2013-01-18 23:33:59.281047334 +0100 -+++ gdb-7.5.50.20130118/gdb/p-valprint.c 2013-01-18 23:34:02.680051851 +0100 -@@ -797,6 +797,7 @@ pascal_object_print_value (struct type * +--- gdb-7.6.90.20140127.orig/gdb/p-valprint.c 2014-02-06 18:18:51.008616679 +0100 ++++ gdb-7.6.90.20140127/gdb/p-valprint.c 2014-02-06 18:18:53.673621239 +0100 +@@ -798,6 +798,7 @@ pascal_object_print_value (struct type * gdb_byte *buf; struct cleanup *back_to; @@ -128,11 +128,11 @@ Index: gdb-7.5.50.20130118/gdb/p-valprint.c buf = xmalloc (TYPE_LENGTH (baseclass)); back_to = make_cleanup (xfree, buf); -Index: gdb-7.5.50.20130118/gdb/utils.c +Index: gdb-7.6.90.20140127/gdb/utils.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/utils.c 2013-01-18 23:33:59.282047336 +0100 -+++ gdb-7.5.50.20130118/gdb/utils.c 2013-01-18 23:34:02.681051854 +0100 -@@ -3219,6 +3219,18 @@ host_address_to_string (const void *addr +--- gdb-7.6.90.20140127.orig/gdb/utils.c 2014-02-06 18:18:51.008616679 +0100 ++++ gdb-7.6.90.20140127/gdb/utils.c 2014-02-06 18:18:53.674621186 +0100 +@@ -3169,6 +3169,18 @@ host_address_to_string (const void *addr return str; } @@ -151,11 +151,11 @@ Index: gdb-7.5.50.20130118/gdb/utils.c char * gdb_realpath (const char *filename) { -Index: gdb-7.5.50.20130118/gdb/valops.c +Index: gdb-7.6.90.20140127/gdb/valops.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/valops.c 2013-01-18 23:33:59.283047338 +0100 -+++ gdb-7.5.50.20130118/gdb/valops.c 2013-01-18 23:34:02.682051856 +0100 -@@ -2369,6 +2369,7 @@ search_struct_method (const char *name, +--- gdb-7.6.90.20140127.orig/gdb/valops.c 2014-02-06 18:18:51.009616680 +0100 ++++ gdb-7.6.90.20140127/gdb/valops.c 2014-02-06 18:18:53.675621135 +0100 +@@ -2184,6 +2184,7 @@ search_struct_method (const char *name, struct cleanup *back_to; CORE_ADDR address; @@ -163,11 +163,11 @@ Index: gdb-7.5.50.20130118/gdb/valops.c tmp = xmalloc (TYPE_LENGTH (baseclass)); back_to = make_cleanup (xfree, tmp); address = value_address (*arg1p); -Index: gdb-7.5.50.20130118/gdb/value.c +Index: gdb-7.6.90.20140127/gdb/value.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/value.c 2013-01-18 23:33:59.285047342 +0100 -+++ gdb-7.5.50.20130118/gdb/value.c 2013-01-18 23:34:02.683051858 +0100 -@@ -663,6 +663,7 @@ allocate_value_lazy (struct type *type) +--- gdb-7.6.90.20140127.orig/gdb/value.c 2014-02-06 18:18:51.010616681 +0100 ++++ gdb-7.6.90.20140127/gdb/value.c 2014-02-06 18:19:10.261637398 +0100 +@@ -822,6 +822,7 @@ allocate_value_lazy (struct type *type) description correctly. */ check_typedef (type); @@ -175,8 +175,8 @@ Index: gdb-7.5.50.20130118/gdb/value.c val = (struct value *) xzalloc (sizeof (struct value)); val->contents = NULL; val->next = all_values; -@@ -694,6 +695,8 @@ allocate_value_lazy (struct type *type) - void +@@ -853,6 +854,8 @@ allocate_value_lazy (struct type *type) + static void allocate_value_contents (struct value *val) { + ulongest_fits_host_or_error (TYPE_LENGTH (val->enclosing_type)); @@ -184,7 +184,7 @@ Index: gdb-7.5.50.20130118/gdb/value.c if (!val->contents) val->contents = (gdb_byte *) xzalloc (TYPE_LENGTH (val->enclosing_type)); } -@@ -2672,8 +2675,12 @@ void +@@ -2854,8 +2857,12 @@ void set_value_enclosing_type (struct value *val, struct type *new_encl_type) { if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val))) @@ -199,10 +199,10 @@ Index: gdb-7.5.50.20130118/gdb/value.c val->enclosing_type = new_encl_type; } -Index: gdb-7.5.50.20130118/gdb/vax-tdep.c +Index: gdb-7.6.90.20140127/gdb/vax-tdep.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/vax-tdep.c 2013-01-18 23:34:02.683051858 +0100 -+++ gdb-7.5.50.20130118/gdb/vax-tdep.c 2013-01-18 23:34:34.950094198 +0100 +--- gdb-7.6.90.20140127.orig/gdb/vax-tdep.c 2014-02-06 18:18:51.370617068 +0100 ++++ gdb-7.6.90.20140127/gdb/vax-tdep.c 2014-02-06 18:18:53.676621086 +0100 @@ -223,6 +223,7 @@ vax_return_value (struct gdbarch *gdbarc ULONGEST addr; @@ -211,11 +211,11 @@ Index: gdb-7.5.50.20130118/gdb/vax-tdep.c read_memory (addr, readbuf, len); } -Index: gdb-7.5.50.20130118/gdb/defs.h +Index: gdb-7.6.90.20140127/gdb/defs.h =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/defs.h 2013-01-18 23:34:02.684051860 +0100 -+++ gdb-7.5.50.20130118/gdb/defs.h 2013-01-18 23:34:14.238067193 +0100 -@@ -801,4 +801,6 @@ enum block_enum +--- gdb-7.6.90.20140127.orig/gdb/defs.h 2014-02-06 18:18:51.370617068 +0100 ++++ gdb-7.6.90.20140127/gdb/defs.h 2014-02-06 18:18:53.677621038 +0100 +@@ -768,4 +768,6 @@ enum block_enum #include "utils.h" diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch index c396554..5082b9f 100644 --- a/gdb-rhbz795424-bitpos-22of25.patch +++ b/gdb-rhbz795424-bitpos-22of25.patch @@ -71,7 +71,7 @@ gdb/ChangeLog: (remote_remove_watchpoint): Likewise. (remote_watchpoint_addr_within_range): Expand parameter LENGTH to LONGEST. - * s390-nat.c (s390_insert_watchpoint): Expand parameter LEN to + * s390-linux-nat.c (s390_insert_watchpoint): Expand parameter LEN to LONGEST. (s390_remove_watchpoint): Likewise. * target.c (update_current_target): Expand parameter LEN for @@ -493,10 +493,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -Index: gdb-7.6.50.20130731-cvs/gdb/s390-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/s390-linux-nat.c =================================================================== ---- 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 +--- gdb-7.6.50.20130731-cvs.orig/gdb/s390-linux-nat.c 2013-08-02 16:42:29.578632913 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/s390-linux-nat.c 2013-08-02 16:42:34.103639116 +0200 @@ -516,7 +516,7 @@ s390_fix_watch_points (struct lwp_info * } diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch index 827d64d..0f829a7 100644 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ b/gdb-rhbz795424-bitpos-23of25.patch @@ -96,7 +96,7 @@ gdb/ChangeLog LEN to LONGEST. (ran_out_of_registers_for_arguments): Expand SPACE, JJ to LONGEST. - * s390-tdep.c (s390_value_from_register): Expand LEN to LONGEST. + * s390-linux-tdep.c (s390_value_from_register): Expand LEN to LONGEST. (is_power_of_two): Expand parameter N to ULONGEST. (s390_push_dummy_call): Expand LENGTH to ULONGEST. * score-tdep.c (score_push_dummy_call): Expand ARGLEN to @@ -137,10 +137,10 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-tdep.patch -Index: gdb-7.6.50.20130731-cvs/gdb/alpha-tdep.c +Index: gdb-7.6.90.20140127/gdb/alpha-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/alpha-tdep.c 2014-02-06 18:20:52.970747716 +0100 ++++ gdb-7.6.90.20140127/gdb/alpha-tdep.c 2014-02-06 18:20:57.294752362 +0100 @@ -299,18 +299,18 @@ alpha_push_dummy_call (struct gdbarch *g { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -184,22 +184,22 @@ Index: gdb-7.6.50.20130731-cvs/gdb/alpha-tdep.c memcpy (arg_reg_buffer + offset, contents, tlen); offset += tlen; contents += tlen; -Index: gdb-7.6.50.20130731-cvs/gdb/amd64-tdep.c +Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/amd64-tdep.c 2014-02-06 18:20:52.972747718 +0100 ++++ gdb-7.6.90.20140127/gdb/amd64-tdep.c 2014-02-06 18:21:51.106810814 +0100 +@@ -633,7 +633,7 @@ amd64_return_value (struct gdbarch *gdba + gdb_byte *readbuf, const gdb_byte *writebuf) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum amd64_reg_class class[2]; - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM }; static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM }; int integer_reg = 0; -@@ -769,8 +769,8 @@ amd64_push_arguments (struct regcache *r - that register number (or a negative value otherwise). */ - int *arg_addr_regno = alloca (nargs * sizeof (int)); +@@ -784,8 +784,8 @@ amd64_push_arguments (struct regcache *r + }; + struct value **stack_args = alloca (nargs * sizeof (struct value *)); int num_stack_args = 0; - int num_elements = 0; - int element = 0; @@ -208,7 +208,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/amd64-tdep.c int integer_reg = 0; int sse_reg = 0; int i; -@@ -784,7 +784,7 @@ amd64_push_arguments (struct regcache *r +@@ -797,7 +797,7 @@ amd64_push_arguments (struct regcache *r for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -217,11 +217,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/amd64-tdep.c enum amd64_reg_class class[2]; int needed_integer_regs = 0; int needed_sse_regs = 0; -Index: gdb-7.6.50.20130731-cvs/gdb/amd64-windows-tdep.c +Index: gdb-7.6.90.20140127/gdb/amd64-windows-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/amd64-windows-tdep.c 2014-02-06 18:20:52.973747720 +0100 ++++ gdb-7.6.90.20140127/gdb/amd64-windows-tdep.c 2014-02-06 18:20:57.296752364 +0100 +@@ -288,7 +288,7 @@ amd64_windows_return_value (struct gdbar struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { @@ -230,10 +230,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/amd64-windows-tdep.c int regnum = -1; /* See if our value is returned through a register. If it is, then -Index: gdb-7.6.50.20130731-cvs/gdb/arm-tdep.c +Index: gdb-7.6.90.20140127/gdb/arm-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/arm-tdep.c 2014-02-06 18:20:52.978747725 +0100 ++++ gdb-7.6.90.20140127/gdb/arm-tdep.c 2014-02-06 18:20:57.299752367 +0100 @@ -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. */ @@ -308,11 +308,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/arm-tdep.c struct type *arg_type; struct type *target_type; enum type_code typecode; -Index: gdb-7.6.50.20130731-cvs/gdb/avr-tdep.c +Index: gdb-7.6.90.20140127/gdb/avr-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/avr-tdep.c 2014-02-06 18:20:52.980747727 +0100 ++++ gdb-7.6.90.20140127/gdb/avr-tdep.c 2014-02-06 18:20:57.299752367 +0100 +@@ -1167,13 +1167,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s struct stack_item { @@ -329,7 +329,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/avr-tdep.c { struct stack_item *si; si = xmalloc (sizeof (struct stack_item)); -@@ -1265,12 +1266,12 @@ avr_push_dummy_call (struct gdbarch *gdb +@@ -1262,12 +1263,12 @@ avr_push_dummy_call (struct gdbarch *gdb for (i = 0; i < nargs; i++) { @@ -345,10 +345,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/avr-tdep.c /* Calculate the potential last register needed. */ last_regnum = regnum - (len + (len & 1)); -Index: gdb-7.6.50.20130731-cvs/gdb/bfin-tdep.c +Index: gdb-7.6.90.20140127/gdb/bfin-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/bfin-tdep.c 2014-02-06 18:20:52.980747727 +0100 ++++ gdb-7.6.90.20140127/gdb/bfin-tdep.c 2014-02-06 18:20:57.300752368 +0100 @@ -506,7 +506,7 @@ bfin_push_dummy_call (struct gdbarch *gd gdb_byte buf[4]; int i; @@ -367,11 +367,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/bfin-tdep.c sp -= container_len; write_memory (sp, value_contents_writeable (args[i]), container_len); -Index: gdb-7.6.50.20130731-cvs/gdb/cris-tdep.c +Index: gdb-7.6.90.20140127/gdb/cris-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/cris-tdep.c 2014-02-06 18:20:52.981747728 +0100 ++++ gdb-7.6.90.20140127/gdb/cris-tdep.c 2014-02-06 18:20:57.301752369 +0100 +@@ -665,13 +665,13 @@ static CORE_ADDR cris_unwind_sp (struct struct stack_item { @@ -387,7 +387,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cris-tdep.c { struct stack_item *si; si = xmalloc (sizeof (struct stack_item)); -@@ -849,13 +849,13 @@ cris_push_dummy_call (struct gdbarch *gd +@@ -844,13 +844,13 @@ cris_push_dummy_call (struct gdbarch *gd for (argnum = 0; argnum < nargs; argnum++) { @@ -405,10 +405,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/cris-tdep.c /* How may registers worth of storage do we need for this argument? */ reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0); -Index: gdb-7.6.50.20130731-cvs/gdb/h8300-tdep.c +Index: gdb-7.6.90.20140127/gdb/h8300-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/h8300-tdep.c 2014-02-06 18:20:52.981747728 +0100 ++++ gdb-7.6.90.20140127/gdb/h8300-tdep.c 2014-02-06 18:20:57.301752369 +0100 @@ -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.6.50.20130731-cvs/gdb/h8300-tdep.c for (offset = 0; offset < padded_len; offset += wordsize) { -Index: gdb-7.6.50.20130731-cvs/gdb/hppa-tdep.c +Index: gdb-7.6.90.20140127/gdb/hppa-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/hppa-tdep.c 2014-02-06 18:20:52.982747729 +0100 ++++ gdb-7.6.90.20140127/gdb/hppa-tdep.c 2014-02-06 18:20:57.302752371 +0100 @@ -961,7 +961,7 @@ hppa64_push_dummy_call (struct gdbarch * { struct value *arg = args[i]; @@ -463,11 +463,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/hppa-tdep.c int regnum, offset; if (len > 16) -Index: gdb-7.6.50.20130731-cvs/gdb/i386-darwin-tdep.c +Index: gdb-7.6.90.20140127/gdb/i386-darwin-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/i386-darwin-tdep.c 2014-02-06 18:20:52.982747729 +0100 ++++ gdb-7.6.90.20140127/gdb/i386-darwin-tdep.c 2014-02-06 18:20:57.302752371 +0100 +@@ -164,7 +164,7 @@ i386_darwin_push_dummy_call (struct gdba for (write_pass = 0; write_pass < 2; write_pass++) { @@ -476,11 +476,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/i386-darwin-tdep.c int num_m128 = 0; if (struct_return) -Index: gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c +Index: gdb-7.6.90.20140127/gdb/i386-tdep.c =================================================================== ---- 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-7.6.90.20140127.orig/gdb/i386-tdep.c 2014-02-06 18:20:52.985747732 +0100 ++++ gdb-7.6.90.20140127/gdb/i386-tdep.c 2014-02-06 18:20:57.303752372 +0100 +@@ -2473,7 +2473,7 @@ i386_push_dummy_call (struct gdbarch *gd gdb_byte buf[4]; int i; int write_pass; @@ -489,7 +489,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c /* Determine the total space required for arguments and struct return address in a first pass (allowing for 16-byte-aligned -@@ -2415,7 +2415,7 @@ i386_push_dummy_call (struct gdbarch *gd +@@ -2481,7 +2481,7 @@ i386_push_dummy_call (struct gdbarch *gd for (write_pass = 0; write_pass < 2; write_pass++) { @@ -498,7 +498,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c if (struct_return) { -@@ -2432,7 +2432,7 @@ i386_push_dummy_call (struct gdbarch *gd +@@ -2498,7 +2498,7 @@ i386_push_dummy_call (struct gdbarch *gd for (i = 0; i < nargs; i++) { @@ -507,7 +507,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c if (write_pass) { -@@ -2639,7 +2639,7 @@ i386_reg_struct_return_p (struct gdbarch +@@ -2705,7 +2705,7 @@ i386_reg_struct_return_p (struct gdbarch { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); @@ -516,7 +516,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION -@@ -3094,7 +3094,7 @@ static int +@@ -3249,7 +3249,7 @@ static int i386_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) { @@ -525,7 +525,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c /* Values may be spread across multiple registers. Most debugging formats aren't expressive enough to specify the locations, so -@@ -3127,7 +3127,7 @@ i386_register_to_value (struct frame_inf +@@ -3282,7 +3282,7 @@ i386_register_to_value (struct frame_inf int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -534,7 +534,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c if (i386_fp_regnum_p (gdbarch, regnum)) return i387_register_to_value (frame, regnum, type, to, -@@ -3163,7 +3163,7 @@ static void +@@ -3318,7 +3318,7 @@ static void i386_value_to_register (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *from) { @@ -543,11 +543,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c if (i386_fp_regnum_p (get_frame_arch (frame), regnum)) { -Index: gdb-7.6.50.20130731-cvs/gdb/ia64-tdep.c +Index: gdb-7.6.90.20140127/gdb/ia64-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/ia64-tdep.c 2014-02-06 18:20:52.986747733 +0100 ++++ gdb-7.6.90.20140127/gdb/ia64-tdep.c 2014-02-06 18:20:57.304752373 +0100 +@@ -3851,8 +3851,10 @@ ia64_push_dummy_call (struct gdbarch *gd int argno; struct value *arg; struct type *type; @@ -560,10 +560,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ia64-tdep.c int floatreg; ULONGEST bsp; CORE_ADDR funcdescaddr, pc, global_pointer; -Index: gdb-7.6.50.20130731-cvs/gdb/iq2000-tdep.c +Index: gdb-7.6.90.20140127/gdb/iq2000-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/iq2000-tdep.c 2014-02-06 18:20:52.986747733 +0100 ++++ gdb-7.6.90.20140127/gdb/iq2000-tdep.c 2014-02-06 18:20:57.304752373 +0100 @@ -654,8 +654,9 @@ iq2000_push_dummy_call (struct gdbarch * const bfd_byte *val; bfd_byte buf[4]; @@ -576,10 +576,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/iq2000-tdep.c /* Used to copy struct arguments into the stack. */ CORE_ADDR struct_ptr; -Index: gdb-7.6.50.20130731-cvs/gdb/m32r-tdep.c +Index: gdb-7.6.90.20140127/gdb/m32r-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/m32r-tdep.c 2014-02-06 18:20:52.986747733 +0100 ++++ gdb-7.6.90.20140127/gdb/m32r-tdep.c 2014-02-06 18:20:57.304752373 +0100 @@ -689,7 +689,7 @@ m32r_push_dummy_call (struct gdbarch *gd CORE_ADDR regval; gdb_byte *val; @@ -589,10 +589,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/m32r-tdep.c /* First force sp to a 4-byte alignment. */ sp = sp & ~3; -Index: gdb-7.6.50.20130731-cvs/gdb/m68k-tdep.c +Index: gdb-7.6.90.20140127/gdb/m68k-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/m68k-tdep.c 2014-02-06 18:20:52.987747735 +0100 ++++ gdb-7.6.90.20140127/gdb/m68k-tdep.c 2014-02-06 18:20:57.305752374 +0100 @@ -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.6.50.20130731-cvs/gdb/m68k-tdep.c /* Non-scalars bigger than 4 bytes are left aligned, others are right aligned. */ -Index: gdb-7.6.50.20130731-cvs/gdb/m88k-tdep.c +Index: gdb-7.6.90.20140127/gdb/m88k-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/m88k-tdep.c 2014-02-06 18:20:52.987747735 +0100 ++++ gdb-7.6.90.20140127/gdb/m88k-tdep.c 2014-02-06 18:20:57.305752374 +0100 @@ -260,13 +260,13 @@ m88k_store_arguments (struct regcache *r { struct gdbarch *gdbarch = get_regcache_arch (regcache); @@ -646,10 +646,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/m88k-tdep.c if (m88k_in_register_p (type)) { -Index: gdb-7.6.50.20130731-cvs/gdb/mep-tdep.c +Index: gdb-7.6.90.20140127/gdb/mep-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/mep-tdep.c 2014-02-06 18:20:52.987747735 +0100 ++++ gdb-7.6.90.20140127/gdb/mep-tdep.c 2014-02-06 18:20:57.306752375 +0100 @@ -2272,7 +2272,7 @@ push_large_arguments (CORE_ADDR sp, int for (i = 0; i < argc; i++) @@ -659,10 +659,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/mep-tdep.c if (arg_len > MEP_GPR_SIZE) { -Index: gdb-7.6.50.20130731-cvs/gdb/mips-tdep.c +Index: gdb-7.6.90.20140127/gdb/mips-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/mips-tdep.c 2014-02-06 18:20:52.990747738 +0100 ++++ gdb-7.6.90.20140127/gdb/mips-tdep.c 2014-02-06 18:20:57.307752376 +0100 @@ -402,7 +402,7 @@ static void mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, int reg_num, int length, @@ -808,11 +808,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/mips-tdep.c val = value_contents (arg); -Index: gdb-7.6.50.20130731-cvs/gdb/mn10300-tdep.c +Index: gdb-7.6.90.20140127/gdb/mn10300-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/mn10300-tdep.c 2014-02-06 18:20:52.991747739 +0100 ++++ gdb-7.6.90.20140127/gdb/mn10300-tdep.c 2014-02-06 18:20:57.308752377 +0100 +@@ -1227,7 +1227,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; @@ -821,10 +821,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/mn10300-tdep.c int stack_offset = 0; int argnum; const gdb_byte *val; -Index: gdb-7.6.50.20130731-cvs/gdb/mt-tdep.c +Index: gdb-7.6.90.20140127/gdb/mt-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/mt-tdep.c 2014-02-06 18:20:52.991747739 +0100 ++++ gdb-7.6.90.20140127/gdb/mt-tdep.c 2014-02-06 18:20:57.308752377 +0100 @@ -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.6.50.20130731-cvs/gdb/mt-tdep.c int i, j; /* First handle however many args we can fit into MT_1ST_ARGREG thru -Index: gdb-7.6.50.20130731-cvs/gdb/ppc-sysv-tdep.c +Index: gdb-7.6.90.20140127/gdb/ppc-sysv-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/ppc-sysv-tdep.c 2014-02-06 18:20:52.992747740 +0100 ++++ gdb-7.6.90.20140127/gdb/ppc-sysv-tdep.c 2014-02-06 18:20:57.308752377 +0100 @@ -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)); @@ -897,11 +897,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ppc-sysv-tdep.c if (len < tdep->wordsize) write_memory (gparam + tdep->wordsize - len, val, len); else -Index: gdb-7.6.50.20130731-cvs/gdb/rl78-tdep.c +Index: gdb-7.6.90.20140127/gdb/rl78-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/rl78-tdep.c 2014-02-06 18:20:52.992747740 +0100 ++++ gdb-7.6.90.20140127/gdb/rl78-tdep.c 2014-02-06 18:20:57.309752378 +0100 +@@ -1052,8 +1052,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,10 +912,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/rl78-tdep.c sp -= container_len; write_memory (rl78_make_data_address (sp), -Index: gdb-7.6.50.20130731-cvs/gdb/rs6000-aix-tdep.c +Index: gdb-7.6.90.20140127/gdb/rs6000-aix-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/rs6000-aix-tdep.c 2014-02-06 18:20:52.993747741 +0100 ++++ gdb-7.6.90.20140127/gdb/rs6000-aix-tdep.c 2014-02-06 18:20:57.309752378 +0100 @@ -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); @@ -937,11 +937,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/rs6000-aix-tdep.c if (argbytes) { -Index: gdb-7.6.50.20130731-cvs/gdb/s390-tdep.c +Index: gdb-7.6.90.20140127/gdb/s390-linux-tdep.c =================================================================== ---- 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) +--- gdb-7.6.90.20140127.orig/gdb/s390-linux-tdep.c 2014-02-06 18:20:52.993747741 +0100 ++++ gdb-7.6.90.20140127/gdb/s390-linux-tdep.c 2014-02-06 18:22:17.330838389 +0100 +@@ -2526,7 +2526,7 @@ is_float_like (struct type *type) static int @@ -950,19 +950,19 @@ Index: gdb-7.6.50.20130731-cvs/gdb/s390-tdep.c { return ((n & (n - 1)) == 0); } -@@ -2669,7 +2669,7 @@ s390_push_dummy_call (struct gdbarch *gd +@@ -2712,7 +2712,7 @@ s390_push_dummy_call (struct gdbarch *gd { - struct value *arg = args[i]; - struct type *type = check_typedef (value_type (arg)); -- unsigned length = TYPE_LENGTH (type); -+ ULONGEST length = TYPE_LENGTH (type); + struct value *arg = args[i]; + struct type *type = check_typedef (value_type (arg)); +- unsigned length = TYPE_LENGTH (type); ++ ULONGEST length = TYPE_LENGTH (type); if (s390_function_arg_pass_by_reference (type)) { -Index: gdb-7.6.50.20130731-cvs/gdb/score-tdep.c +Index: gdb-7.6.90.20140127/gdb/score-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/score-tdep.c 2014-02-06 18:20:52.994747742 +0100 ++++ gdb-7.6.90.20140127/gdb/score-tdep.c 2014-02-06 18:20:57.310752379 +0100 @@ -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.6.50.20130731-cvs/gdb/score-tdep.c CORE_ADDR stack_offset = 0; CORE_ADDR addr = 0; -Index: gdb-7.6.50.20130731-cvs/gdb/sh-tdep.c +Index: gdb-7.6.90.20140127/gdb/sh-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/sh-tdep.c 2014-02-06 18:20:52.995747743 +0100 ++++ gdb-7.6.90.20140127/gdb/sh-tdep.c 2014-02-06 18:20:57.310752379 +0100 @@ -807,7 +807,7 @@ sh_skip_prologue (struct gdbarch *gdbarc static int sh_use_struct_convention (int renesas_abi, struct type *type) @@ -1014,10 +1014,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/sh-tdep.c int pass_on_stack = 0; int last_reg_arg = INT_MAX; -Index: gdb-7.6.50.20130731-cvs/gdb/sh64-tdep.c +Index: gdb-7.6.90.20140127/gdb/sh64-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/sh64-tdep.c 2014-02-06 18:20:52.995747743 +0100 ++++ gdb-7.6.90.20140127/gdb/sh64-tdep.c 2014-02-06 18:20:57.311752380 +0100 @@ -1058,7 +1058,7 @@ sh64_push_dummy_call (struct gdbarch *gd CORE_ADDR struct_addr) { @@ -1036,11 +1036,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/sh64-tdep.c int argreg_size; int fp_args[12]; -Index: gdb-7.6.50.20130731-cvs/gdb/sparc-tdep.c +Index: gdb-7.6.90.20140127/gdb/sparc-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/sparc-tdep.c 2014-02-06 18:20:52.996747744 +0100 ++++ gdb-7.6.90.20140127/gdb/sparc-tdep.c 2014-02-06 18:20:57.311752380 +0100 +@@ -502,7 +502,7 @@ sparc32_store_arguments (struct regcache for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -1049,10 +1049,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/sparc-tdep.c if (sparc_structure_or_union_p (type) || (sparc_floating_p (type) && len == 16) -Index: gdb-7.6.50.20130731-cvs/gdb/sparc64-tdep.c +Index: gdb-7.6.90.20140127/gdb/sparc64-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/sparc64-tdep.c 2014-02-06 18:20:52.996747744 +0100 ++++ gdb-7.6.90.20140127/gdb/sparc64-tdep.c 2014-02-06 18:20:57.311752380 +0100 @@ -639,7 +639,8 @@ sparc64_16_byte_align_p (struct type *ty static void @@ -1108,10 +1108,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/sparc64-tdep.c int regnum = -1; gdb_byte buf[16]; -Index: gdb-7.6.50.20130731-cvs/gdb/spu-tdep.c +Index: gdb-7.6.90.20140127/gdb/spu-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/spu-tdep.c 2014-02-06 18:20:52.997747745 +0100 ++++ gdb-7.6.90.20140127/gdb/spu-tdep.c 2014-02-06 18:20:57.312752381 +0100 @@ -1376,7 +1376,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.6.50.20130731-cvs/gdb/spu-tdep.c int preferred_slot; if (spu_scalar_value_p (type)) -Index: gdb-7.6.50.20130731-cvs/gdb/tic6x-tdep.c +Index: gdb-7.6.90.20140127/gdb/tic6x-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/tic6x-tdep.c 2014-02-06 18:20:52.997747745 +0100 ++++ gdb-7.6.90.20140127/gdb/tic6x-tdep.c 2014-02-06 18:20:57.312752381 +0100 @@ -896,7 +896,7 @@ tic6x_push_dummy_call (struct gdbarch *g int argreg = 0; int argnum; @@ -1171,11 +1171,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/tic6x-tdep.c addr = sp + stack_offset; write_memory (addr, val, len); -Index: gdb-7.6.50.20130731-cvs/gdb/tilegx-tdep.c +Index: gdb-7.6.90.20140127/gdb/tilegx-tdep.c =================================================================== ---- 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 * +--- gdb-7.6.90.20140127.orig/gdb/tilegx-tdep.c 2014-02-06 18:20:52.998747746 +0100 ++++ gdb-7.6.90.20140127/gdb/tilegx-tdep.c 2014-02-06 18:20:57.312752381 +0100 +@@ -290,7 +290,7 @@ tilegx_push_dummy_call (struct gdbarch * CORE_ADDR stack_dest = sp; int argreg = TILEGX_R0_REGNUM; int i, j; @@ -1184,10 +1184,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/tilegx-tdep.c static const gdb_byte four_zero_words[16] = { 0 }; /* If struct_return is 1, then the struct return address will -Index: gdb-7.6.50.20130731-cvs/gdb/v850-tdep.c +Index: gdb-7.6.90.20140127/gdb/v850-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/v850-tdep.c 2014-02-06 18:20:52.998747746 +0100 ++++ gdb-7.6.90.20140127/gdb/v850-tdep.c 2014-02-06 18:20:57.313752383 +0100 @@ -1021,7 +1021,7 @@ v850_push_dummy_call (struct gdbarch *gd enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argreg; @@ -1206,10 +1206,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/v850-tdep.c gdb_byte *val; gdb_byte valbuf[v850_reg_size]; -Index: gdb-7.6.50.20130731-cvs/gdb/vax-tdep.c +Index: gdb-7.6.90.20140127/gdb/vax-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/vax-tdep.c 2014-02-06 18:20:52.998747746 +0100 ++++ gdb-7.6.90.20140127/gdb/vax-tdep.c 2014-02-06 18:20:57.313752383 +0100 @@ -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.6.50.20130731-cvs/gdb/vax-tdep.c sp -= (len + 3) & ~3; count += (len + 3) / 4; -Index: gdb-7.6.50.20130731-cvs/gdb/xstormy16-tdep.c +Index: gdb-7.6.90.20140127/gdb/xstormy16-tdep.c =================================================================== ---- 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 +--- gdb-7.6.90.20140127.orig/gdb/xstormy16-tdep.c 2014-02-06 18:20:52.999747748 +0100 ++++ gdb-7.6.90.20140127/gdb/xstormy16-tdep.c 2014-02-06 18:20:57.313752383 +0100 @@ -235,8 +235,9 @@ xstormy16_push_dummy_call (struct gdbarc enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR stack_dest = sp; @@ -1244,11 +1244,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/xstormy16-tdep.c const gdb_byte *val; gdb_byte buf[xstormy16_pc_size]; -Index: gdb-7.6.50.20130731-cvs/gdb/xtensa-tdep.c +Index: gdb-7.6.90.20140127/gdb/xtensa-tdep.c =================================================================== ---- 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 * +--- gdb-7.6.90.20140127.orig/gdb/xtensa-tdep.c 2014-02-06 18:20:53.000747749 +0100 ++++ gdb-7.6.90.20140127/gdb/xtensa-tdep.c 2014-02-06 18:20:57.314752384 +0100 +@@ -1652,8 +1652,7 @@ xtensa_store_return_value (struct type * if (len > (callsize > 8 ? 8 : 16)) internal_error (__FILE__, __LINE__, @@ -1258,7 +1258,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/xtensa-tdep.c areg = arreg_number (gdbarch, gdbarch_tdep (gdbarch)->a0_base + 2 + callsize, wb); -@@ -1728,18 +1727,18 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1727,18 +1726,18 @@ xtensa_push_dummy_call (struct gdbarch * { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -1280,7 +1280,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/xtensa-tdep.c int regno; /* regno if in register. */ } u; }; -@@ -1763,9 +1762,10 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1762,9 +1761,10 @@ xtensa_push_dummy_call (struct gdbarch * { struct value *arg = args[i]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1294,7 +1294,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/xtensa-tdep.c switch (TYPE_CODE (arg_type)) { case TYPE_CODE_INT: -@@ -1835,8 +1835,8 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1834,8 +1834,8 @@ xtensa_push_dummy_call (struct gdbarch * info->align = TYPE_LENGTH (builtin_type (gdbarch)->builtin_long); break; } @@ -1304,7 +1304,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/xtensa-tdep.c /* Align size and onstack_size. */ size = (size + info->align - 1) & ~(info->align - 1); -@@ -1881,7 +1881,7 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1880,7 +1880,7 @@ xtensa_push_dummy_call (struct gdbarch * if (info->onstack) { @@ -1313,7 +1313,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/xtensa-tdep.c CORE_ADDR offset = sp + info->u.offset; /* Odd-sized structs are aligned to the lower side of a memory -@@ -1897,7 +1897,7 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1896,7 +1896,7 @@ xtensa_push_dummy_call (struct gdbarch * } else { diff --git a/gdb-rhel5-gcc44.patch b/gdb-rhel5-gcc44.patch index 172d067..6ffbb2a 100644 --- a/gdb-rhel5-gcc44.patch +++ b/gdb-rhel5-gcc44.patch @@ -1,10 +1,10 @@ Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as the default gcc and gfortran binaries are from gcc-4.1. -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/vla.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/vla.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.base/vla.exp 2013-01-18 23:43:04.455756362 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/vla.exp 2013-01-18 23:43:08.082761164 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.base/vla.exp 2014-02-06 18:26:05.115083077 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/vla.exp 2014-02-06 18:26:06.689084765 +0100 @@ -16,7 +16,25 @@ set testfile vla set srcfile ${testfile}.c @@ -32,10 +32,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/vla.exp untested "Couldn't compile test program" return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-interp.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/break-interp.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.base/break-interp.exp 2013-01-18 23:43:04.456756365 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-interp.exp 2013-01-18 23:43:08.082761164 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.base/break-interp.exp 2014-02-06 18:26:05.116083078 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/break-interp.exp 2014-02-06 18:26:06.689084765 +0100 @@ -34,9 +34,29 @@ if [get_compiler_info] { return -1 } @@ -67,10 +67,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-interp.exp return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/common-block.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/common-block.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/common-block.exp 2013-01-18 23:43:08.082761164 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/common-block.exp 2013-01-18 23:44:23.047856182 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/common-block.exp 2014-02-06 18:26:05.116083078 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/common-block.exp 2014-02-06 18:26:06.690084760 +0100 @@ -22,8 +22,25 @@ if {[skip_fortran_tests]} { standard_testfile .f90 @@ -99,10 +99,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/common-block.exp return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dwarf-stride.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/dwarf-stride.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2013-01-18 23:43:04.456756365 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2013-01-18 23:43:08.083761148 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2014-02-06 18:26:05.117083079 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2014-02-06 18:26:06.690084760 +0100 @@ -27,7 +27,25 @@ set testfile dwarf-stride set srcfile ${testfile}.f90 @@ -130,10 +130,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dwarf-stride.exp return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dynamic.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/dynamic.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2013-01-18 23:43:04.457756367 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dynamic.exp 2013-01-18 23:43:08.083761148 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2014-02-06 18:26:05.117083079 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/dynamic.exp 2014-02-06 18:26:06.690084760 +0100 @@ -25,7 +25,25 @@ set testfile "dynamic" set srcfile ${testfile}.f90 set binfile ${objdir}/${subdir}/${testfile} @@ -161,10 +161,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dynamic.exp untested "Couldn't compile ${srcfile}" return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/library-module.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/library-module.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/library-module.exp 2013-01-18 23:43:04.457756367 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/library-module.exp 2013-01-18 23:43:08.083761148 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/library-module.exp 2014-02-06 18:26:05.117083079 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/library-module.exp 2014-02-06 18:26:06.690084760 +0100 @@ -23,16 +23,34 @@ if [get_compiler_info] { return -1 } @@ -204,10 +204,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/library-module.exp untested "Couldn't compile ${srcfile}" return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/module.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/module.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/module.exp 2013-01-18 23:43:04.457756367 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/module.exp 2013-01-18 23:43:08.083761148 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/module.exp 2014-02-06 18:26:05.118083080 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/module.exp 2014-02-06 18:26:06.690084760 +0100 @@ -15,7 +15,25 @@ standard_testfile .f90 @@ -235,10 +235,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/module.exp return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/string.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/string.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/string.exp 2013-01-18 23:43:04.457756367 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/string.exp 2013-01-18 23:43:08.083761148 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/string.exp 2014-02-06 18:26:05.118083080 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/string.exp 2014-02-06 18:26:06.691084763 +0100 @@ -23,7 +23,25 @@ set testfile "string" set srcfile ${testfile}.f90 set binfile ${objdir}/${subdir}/${testfile} @@ -266,10 +266,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/string.exp untested "Couldn't compile ${srcfile}" return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/omp-step.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2013-01-18 23:43:04.458756369 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp 2013-01-18 23:43:08.083761148 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2014-02-06 18:26:05.118083080 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/omp-step.exp 2014-02-06 18:26:06.691084763 +0100 @@ -15,7 +15,26 @@ set testfile "omp-step" @@ -298,10 +298,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/derived-type.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/derived-type.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2013-01-18 23:43:04.458756369 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/derived-type.exp 2013-01-18 23:43:08.084761135 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2014-02-06 18:26:05.119083082 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/derived-type.exp 2014-02-06 18:26:06.691084763 +0100 @@ -22,7 +22,25 @@ if { [skip_fortran_tests] } { return -1 standard_testfile .f90 @@ -329,10 +329,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/derived-type.exp return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/subarray.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/subarray.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/subarray.exp 2013-01-18 23:43:04.458756369 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/subarray.exp 2013-01-18 23:43:08.084761135 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/subarray.exp 2014-02-06 18:26:05.119083082 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/subarray.exp 2014-02-06 18:26:06.691084763 +0100 @@ -22,7 +22,25 @@ if { [skip_fortran_tests] } { return -1 standard_testfile .f @@ -360,10 +360,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/subarray.exp return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.threads/tls-sepdebug.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/tls-sepdebug.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2013-01-18 23:43:04.459756371 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2013-01-18 23:43:08.084761135 +0100 +--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2014-02-06 18:26:05.119083082 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2014-02-06 18:26:06.691084763 +0100 @@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi # FIXME: gcc dependency (-Wl,-soname). @@ -391,13 +391,13 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.threads/tls-sepdebug.exp untested "Couldn't compile test library" return -1 } -Index: gdb-7.5.50.20130118/gdb/testsuite/lib/prelink-support.exp +Index: gdb-7.6.90.20140127/gdb/testsuite/lib/prelink-support.exp =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/testsuite/lib/prelink-support.exp 2013-01-18 23:43:04.459756371 +0100 -+++ gdb-7.5.50.20130118/gdb/testsuite/lib/prelink-support.exp 2013-01-18 23:43:08.084761135 +0100 -@@ -119,9 +119,31 @@ proc file_copy {src dest} { +--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/prelink-support.exp 2014-02-06 18:26:06.692084767 +0100 ++++ gdb-7.6.90.20140127/gdb/testsuite/lib/prelink-support.exp 2014-02-06 18:27:44.960190192 +0100 +@@ -118,9 +118,31 @@ proc file_copy {src dest} { proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} { - global objdir subdir + global subdir - if {[build_executable $testname $executable $sources $options] == -1} { - return "" @@ -426,6 +426,6 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/lib/prelink-support.exp + return "" + } + - set binfile ${objdir}/${subdir}/${executable} + set binfile [standard_output_file ${executable}] - set command "ldd $binfile" + set ldd [gdb_find_ldd] diff --git a/gdb-test-bt-cfi-without-die.patch b/gdb-test-bt-cfi-without-die.patch index 5f1f967..82f9d2d 100644 --- a/gdb-test-bt-cfi-without-die.patch +++ b/gdb-test-bt-cfi-without-die.patch @@ -70,11 +70,10 @@ gdb/testsuite/ create mode 100644 gdb/testsuite/gdb.base/cfi-without-die-main.c create mode 100644 gdb/testsuite/gdb.base/cfi-without-die.exp -diff --git a/gdb/testsuite/gdb.base/cfi-without-die-caller.c b/gdb/testsuite/gdb.base/cfi-without-die-caller.c -new file mode 100644 -index 0000000..afdfd53 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/cfi-without-die-caller.c +Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-caller.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-caller.c 2014-02-06 19:35:23.485863819 +0100 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -104,11 +103,10 @@ index 0000000..afdfd53 + /* Modify the return value to prevent any tail-call optimization. */ + return (*callback) () - one; +} -diff --git a/gdb/testsuite/gdb.base/cfi-without-die-main.c b/gdb/testsuite/gdb.base/cfi-without-die-main.c -new file mode 100644 -index 0000000..8451c4b ---- /dev/null -+++ b/gdb/testsuite/gdb.base/cfi-without-die-main.c +Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-main.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-main.c 2014-02-06 19:35:23.485863819 +0100 @@ -0,0 +1,32 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -142,11 +140,10 @@ index 0000000..8451c4b +{ + return caller (callback); +} -diff --git a/gdb/testsuite/gdb.base/cfi-without-die.exp b/gdb/testsuite/gdb.base/cfi-without-die.exp -new file mode 100644 -index 0000000..db6d248 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/cfi-without-die.exp +Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die.exp 2014-02-06 20:26:00.775208847 +0100 @@ -0,0 +1,67 @@ +# Copyright 2010 Free Software Foundation, Inc. + @@ -169,9 +166,9 @@ index 0000000..db6d248 +set srcmainfile ${testfile}-main.c +set srccallerfile ${testfile}-caller.c +set executable ${testfile} -+set objmainfile ${objdir}/${subdir}/${testfile}-main.o -+set objcallerfile ${objdir}/${subdir}/${testfile}-caller.o -+set binfile ${objdir}/${subdir}/${executable} ++set objmainfile [standard_output_file ${testfile}-main.o] ++set objcallerfile [standard_output_file ${testfile}-caller.o] ++set binfile [standard_output_file ${executable}] + +if { [gdb_compile "${srcdir}/${subdir}/${srccallerfile}" ${objcallerfile} \ + object [list {additional_flags=-fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables}]] != "" @@ -215,6 +212,3 @@ index 0000000..db6d248 +# #1 0x00000000004004e9 in caller () +# #2 0x00000000004004cd in main () at ... +gdb_test "bt" "#0 +callback \[^\r\n\]+\r\n#1 \[^\r\n\]+ in caller \[^\r\n\]+\r\n#2 \[^\r\n\]+ in main \[^\r\n\]+" "verify unwindin works for CFI without DIEs" --- -1.7.1.1 - diff --git a/gdb-test-dw2-aranges.patch b/gdb-test-dw2-aranges.patch index 5ddcf9d..3d0f429 100644 --- a/gdb-test-dw2-aranges.patch +++ b/gdb-test-dw2-aranges.patch @@ -20,11 +20,10 @@ Date: Sat Aug 15 15:05:54 2009 +0200 * gdb.dwarf2/dw2-aranges.exp, gdb.dwarf2/dw2-aranges.S: New files. -diff --git a/gdb/testsuite/gdb.dwarf2/dw2-aranges.S b/gdb/testsuite/gdb.dwarf2/dw2-aranges.S -new file mode 100644 -index 0000000..d5b9ca5a ---- /dev/null -+++ b/gdb/testsuite/gdb.dwarf2/dw2-aranges.S +Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/dw2-aranges.S +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.7/gdb/testsuite/gdb.dwarf2/dw2-aranges.S 2014-02-06 22:02:22.087449660 +0100 @@ -0,0 +1,140 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -166,11 +165,10 @@ index 0000000..d5b9ca5a + .byte 0 /* aranges segment_size */ + +.Laranges_end: -diff --git a/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp -new file mode 100644 -index 0000000..39632d5 ---- /dev/null -+++ b/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp +Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.7/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp 2014-02-06 22:09:08.322852771 +0100 @@ -0,0 +1,40 @@ +# Copyright 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. + @@ -202,7 +200,7 @@ index 0000000..39632d5 + +set testfile "dw2-aranges" +set srcfile ${testfile}.S -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {nodebug}] != "" } { + return -1 diff --git a/gdb-testsuite-nohostid.patch b/gdb-testsuite-nohostid.patch new file mode 100644 index 0000000..dc880a8 --- /dev/null +++ b/gdb-testsuite-nohostid.patch @@ -0,0 +1,50 @@ +http://sourceware.org/ml/gdb-patches/2014-02/msg00158.html +Subject: [patch] testsuite: Fix "ERROR: no fileid for" + + +--azLHFNyN32YCQGCU +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +Hi, + +a35cfb4007cee8cb84106412cd17f4e12f13345b is the first bad commit +commit a35cfb4007cee8cb84106412cd17f4e12f13345b +Author: Maciej W. Rozycki +Date: Thu Oct 24 23:32:30 2013 +0100 + +$ runtest gdb.base/solib-disc.exp +Running ./gdb.base/solib-disc.exp ... +ERROR: no fileid for host1 +[...] + + +Jan + +--azLHFNyN32YCQGCU +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline; filename="gdbfinish.patch" + +gdb/testsuite/ +2014-02-06 Jan Kratochvil + + Fix "ERROR: no fileid for" in the testsuite. + * lib/gdb.exp (gdb_finish): Check gdb_spawn_id. + +diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp +index 533b81b..5c53cdf 100644 +--- a/gdb/testsuite/lib/gdb.exp ++++ b/gdb/testsuite/lib/gdb.exp +@@ -3708,7 +3708,8 @@ proc gdb_finish { } { + global cleanfiles + + # Give persistent gdbserver a chance to terminate before GDB is killed. +- if {[info exists gdbserver_reconnect_p] && $gdbserver_reconnect_p} { ++ if {[info exists gdbserver_reconnect_p] && $gdbserver_reconnect_p ++ && [info exists gdb_spawn_id]} { + send_gdb "kill\n"; + gdb_expect 10 { + -re "y or n" { + +--azLHFNyN32YCQGCU-- + diff --git a/gdb-upstream.patch b/gdb-upstream.patch index 72bcce4..0936e1c 100644 --- a/gdb-upstream.patch +++ b/gdb-upstream.patch @@ -1,1061 +1,66 @@ -commit 1aa4cd774ca674ee6061e2068a410bb67c8bc812 -Author: Andrew Pinski -Date: Thu Sep 12 07:14:37 2013 +0000 - - 2013-09-12 Andrew Pinski - - * aarch64-linux-nat.c (aarch64_linux_set_debug_regs): Zero out regs. - -diff --git a/gdb/ChangeLog b/gdb/ChangeLog -index fa3de16..903dcba 100644 -### a/gdb/ChangeLog -### b/gdb/ChangeLog -## -1,3 +1,7 @@ -+2013-09-12 Andrew Pinski -+ -+ * aarch64-linux-nat.c (aarch64_linux_set_debug_regs): Zero out regs. -+ - 2013-09-10 Andreas Arnez - - * config/s390/s390.mh (NATDEPFILES): Add linux-waitpid.o. -diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c -index 846f156..f685619 100644 ---- a/gdb/aarch64-linux-nat.c -+++ b/gdb/aarch64-linux-nat.c -@@ -312,6 +312,7 @@ aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, - 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; - - - -commit 05feb1933f80f2d55e132adc657d3152947af3d1 -Author: Will Newton -Date: Thu Oct 10 10:40:42 2013 +0000 - - gdb/aarch64-linux-tdep.c: Call linux_init_abi. - - If we are running on a Linux platform we should call linux_init_abi - in order to get all the useful hooks it enables. - - gdb/ChangeLog: - - 2013-10-10 Will Newton - - * aarch64-linux-tdep.c (aarch64_linux_init_abi): Call - linux_init_abi. - -diff --git a/gdb/ChangeLog b/gdb/ChangeLog -index 4372579..7a41967 100644 -### a/gdb/ChangeLog -### b/gdb/ChangeLog -## -1,3 +1,8 @@ -+2013-10-10 Will Newton -+ -+ * aarch64-linux-tdep.c (aarch64_linux_init_abi): Call -+ linux_init_abi. -+ - 2013-10-10 Joel Brobecker - - * cli/cli-cmds.c (show_baud_rate): Moved to serial.c as -diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c -index 8e66425..bcfcce2 100644 ---- a/gdb/aarch64-linux-tdep.c -+++ b/gdb/aarch64-linux-tdep.c -@@ -270,6 +270,8 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) - - tdep->lowest_pc = 0x8000; - -+ linux_init_abi (info, gdbarch); -+ - set_solib_svr4_fetch_link_map_offsets (gdbarch, - svr4_lp64_fetch_link_map_offsets); - - - - -pre-req for: -[PATCH, AArch64] Fix bug in hardware watchpoint/breakpoint handling -commit c623a6ef72a8d7dbbb646345f75646710cb9bb68 -Author: Will Newton -Date: Mon Sep 16 14:22:19 2013 +0000 - - gdbserver, aarch64: Zero out regs in aarch64_linux_set_debug_regs. - - Apply the same fix that was applied to aarch64-linux-nat.c. - - 2013-09-16 Will Newton - - * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero - out regs. - -diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog -index 73191f4..1082e78 100644 -### a/gdb/gdbserver/ChangeLog -### b/gdb/gdbserver/ChangeLog -## -1,3 +1,8 @@ -+2013-09-16 Will Newton -+ -+ * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero -+ out regs. -+ - 2013-09-06 Pedro Alves - - * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h) -diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c -index e37f602..93246b3 100644 ---- a/gdb/gdbserver/linux-aarch64-low.c -+++ b/gdb/gdbserver/linux-aarch64-low.c -@@ -600,6 +600,7 @@ aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, - 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; - - - -[PATCH, AArch64] Fix bug in hardware watchpoint/breakpoint handling -https://sourceware.org/ml/gdb-patches/2013-12/msg00707.html -commit f45c82da381e0ce5ce51b7fb24d0d28611d266b8 -Author: Yufeng Zhang -Date: Wed Dec 18 16:47:33 2013 +0000 - - gdb/ - - * aarch64-linux-nat.c (aarch64_linux_set_debug_regs): Set - iov.iov_len with the real length in use. - - gdb/gdbserver/ - - * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set - iov.iov_len with the real length in use. - -diff --git a/gdb/ChangeLog b/gdb/ChangeLog -index 7d9308f..513c593 100644 -### a/gdb/ChangeLog -### b/gdb/ChangeLog -## -1,3 +1,8 @@ -+2013-12-18 Yufeng Zhang -+ -+ * aarch64-linux-nat.c (aarch64_linux_set_debug_regs): Set -+ iov.iov_len with the real length in use. -+ - 2013-12-18 Yao Qi - - * target.h (target_xfer_partial_ftype): New typedef. -diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c -index 256725b..7d76833 100644 ---- a/gdb/aarch64-linux-nat.c -+++ b/gdb/aarch64-linux-nat.c -@@ -314,10 +314,13 @@ aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, - - memset (®s, 0, sizeof (regs)); - iov.iov_base = ®s; -- iov.iov_len = sizeof (regs); - count = watchpoint ? aarch64_num_wp_regs : aarch64_num_bp_regs; - addr = watchpoint ? state->dr_addr_wp : state->dr_addr_bp; - ctrl = watchpoint ? state->dr_ctrl_wp : state->dr_ctrl_bp; -+ if (count == 0) -+ return; -+ iov.iov_len = (offsetof (struct user_hwdebug_state, dbg_regs[count - 1]) -+ + sizeof (regs.dbg_regs [count - 1])); - - for (i = 0; i < count; i++) - { -diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog -index c73840f..2847796 100644 -### a/gdb/gdbserver/ChangeLog -### b/gdb/gdbserver/ChangeLog -## -1,3 +1,8 @@ -+2013-12-18 Yufeng Zhang -+ -+ * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set -+ iov.iov_len with the real length in use. -+ - 2013-12-13 Joel Brobecker - - * Makefile.in (safe-ctype.o, lbasename.o): New rules. -diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c -index 93246b3..c2d271a 100644 ---- a/gdb/gdbserver/linux-aarch64-low.c -+++ b/gdb/gdbserver/linux-aarch64-low.c -@@ -602,10 +602,13 @@ aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, - - memset (®s, 0, sizeof (regs)); - iov.iov_base = ®s; -- iov.iov_len = sizeof (regs); - count = watchpoint ? aarch64_num_wp_regs : aarch64_num_bp_regs; - addr = watchpoint ? state->dr_addr_wp : state->dr_addr_bp; - ctrl = watchpoint ? state->dr_ctrl_wp : state->dr_ctrl_bp; -+ if (count == 0) -+ return; -+ iov.iov_len = (offsetof (struct user_hwdebug_state, dbg_regs[count - 1]) -+ + sizeof (regs.dbg_regs [count - 1])); - - for (i = 0; i < count; i++) - { - +http://sourceware.org/ml/gdb-patches/2014-02/msg00179.html +Subject: [obv] testsuite: Fix i386-sse-stack-align.exp regression since GDB_PARALLEL -commit 9a95e75ee9944cbe6fe3021b92a7c4de87be6fe1 -Author: Yao Qi -Date: Wed Aug 14 11:53:11 2013 +0000 - - gdb/ - - PR gdb/15837: - * frame.h (read_frame_local): Declare. - * mi/mi-cmd-stack.c (list_args_or_locals): Call - read_frame_local. - * stack.c (read_frame_local): New. - -### a/gdb/ChangeLog -### b/gdb/ChangeLog -## -1,3 +1,11 @@ -+2013-08-14 Yao Qi -+ -+ PR gdb/15837: -+ * frame.h (read_frame_local): Declare. -+ * mi/mi-cmd-stack.c (list_args_or_locals): Call -+ read_frame_local. -+ * stack.c (read_frame_local): New. -+ - 2013-06-28 Pedro Alves - - PR tui/14880 ---- a/gdb/frame.h -+++ b/gdb/frame.h -@@ -714,6 +714,8 @@ struct frame_arg - extern void read_frame_arg (struct symbol *sym, struct frame_info *frame, - struct frame_arg *argp, - struct frame_arg *entryargp); -+extern void read_frame_local (struct symbol *sym, struct frame_info *frame, -+ struct frame_arg *argp); - - extern void args_info (char *, int); - ---- a/gdb/mi/mi-cmd-stack.c -+++ b/gdb/mi/mi-cmd-stack.c -@@ -417,7 +417,10 @@ list_args_or_locals (enum what_to_list what, enum print_values values, - && TYPE_CODE (type) != TYPE_CODE_UNION) - { - case PRINT_ALL_VALUES: -- read_frame_arg (sym2, fi, &arg, &entryarg); -+ if (SYMBOL_IS_ARGUMENT (sym)) -+ read_frame_arg (sym2, fi, &arg, &entryarg); -+ else -+ read_frame_local (sym2, fi, &arg); - } - break; - } ---- a/gdb/stack.c -+++ b/gdb/stack.c -@@ -296,6 +296,27 @@ print_frame_arg (const struct frame_arg *arg) - annotate_arg_end (); - } - -+/* Read in inferior function local SYM at FRAME into ARGP. Caller is -+ responsible for xfree of ARGP->ERROR. This function never throws an -+ exception. */ -+ -+void -+read_frame_local (struct symbol *sym, struct frame_info *frame, -+ struct frame_arg *argp) -+{ -+ volatile struct gdb_exception except; -+ struct value *val = NULL; -+ -+ TRY_CATCH (except, RETURN_MASK_ERROR) -+ { -+ val = read_var_value (sym, frame); -+ } -+ -+ argp->error = (val == NULL) ? xstrdup (except.message) : NULL; -+ argp->sym = sym; -+ argp->val = val; -+} -+ - /* Read in inferior function parameter SYM at FRAME into ARGP. Caller is - responsible for xfree of ARGP->ERROR. This function never throws an - exception. */ - - - -commit 4b0f5fbb253fbbe9c2f4578ebd7dd94204a46477 -Author: Jan Kratochvil -Date: Thu Aug 29 14:24:16 2013 +0000 - - PR server/15604 - - gdb/gdbserver/ - 2013-08-29 Jan Kratochvil - - PR server/15604 - * linux-low.c - (linux_create_inferior) : - Close LISTEN_DESC and optionally REMOTE_DESC. - (lynx_create_inferior) : - Close LISTEN_DESC and optionally REMOTE_DESC. - * remote-utils.c (remote_desc, listen_desc): Remove static qualifier. - * server.h (remote_desc, listen_desc): New declaration. - * spu-low.c - (spu_create_inferior) : - Close LISTEN_DESC and optionally REMOTE_DESC. - -### a/gdb/gdbserver/ChangeLog -### b/gdb/gdbserver/ChangeLog -## -1,3 +1,17 @@ -+2013-08-29 Jan Kratochvil -+ -+ PR server/15604 -+ * linux-low.c -+ (linux_create_inferior) : -+ Close LISTEN_DESC and optionally REMOTE_DESC. -+ (lynx_create_inferior) : -+ Close LISTEN_DESC and optionally REMOTE_DESC. -+ * remote-utils.c (remote_desc, listen_desc): Remove static qualifier. -+ * server.h (remote_desc, listen_desc): New declaration. -+ * spu-low.c -+ (spu_create_inferior) : -+ Close LISTEN_DESC and optionally REMOTE_DESC. -+ - 2013-05-31 Doug Evans - - PR server/15594 ---- a/gdb/gdbserver/linux-low.c -+++ b/gdb/gdbserver/linux-low.c -@@ -668,6 +668,12 @@ linux_create_inferior (char *program, char **allargs) - /* Errors ignored. */; - } - } -+ else -+ { -+ close (listen_desc); -+ if (gdb_connected ()) -+ close (remote_desc); -+ } - - execv (program, allargs); - if (errno == ENOENT) ---- a/gdb/gdbserver/lynx-low.c -+++ b/gdb/gdbserver/lynx-low.c -@@ -218,6 +218,12 @@ lynx_create_inferior (char *program, char **allargs) - pgrp = getpid(); - setpgid (0, pgrp); - ioctl (0, TIOCSPGRP, &pgrp); -+ if (!remote_connection_is_stdio ()) -+ { -+ close (listen_desc); -+ if (gdb_connected ()) -+ close (remote_desc); -+ } - lynx_ptrace (PTRACE_TRACEME, null_ptid, 0, 0, 0); - execv (program, allargs); - fprintf (stderr, "Cannot exec %s: %s.\n", program, strerror (errno)); ---- a/gdb/gdbserver/remote-utils.c -+++ b/gdb/gdbserver/remote-utils.c -@@ -108,8 +108,8 @@ struct ui_file *gdb_stdlog; - - static int remote_is_stdio = 0; - --static gdb_fildes_t remote_desc = INVALID_DESCRIPTOR; --static gdb_fildes_t listen_desc = INVALID_DESCRIPTOR; -+gdb_fildes_t remote_desc = INVALID_DESCRIPTOR; -+gdb_fildes_t listen_desc = INVALID_DESCRIPTOR; - - /* FIXME headerize? */ - extern int using_threads; ---- a/gdb/gdbserver/server.h -+++ b/gdb/gdbserver/server.h -@@ -274,6 +274,8 @@ extern void hostio_last_error_from_errno (char *own_buf); - /* From remote-utils.c */ - - extern int remote_debug; -+extern gdb_fildes_t remote_desc; -+extern gdb_fildes_t listen_desc; - extern int noack_mode; - extern int transport_is_reliable; - ---- a/gdb/gdbserver/spu-low.c -+++ b/gdb/gdbserver/spu-low.c -@@ -273,6 +273,12 @@ spu_create_inferior (char *program, char **allargs) - - if (pid == 0) - { -+ if (!remote_connection_is_stdio ()) -+ { -+ close (listen_desc); -+ if (gdb_connected ()) -+ close (remote_desc); -+ } - ptrace (PTRACE_TRACEME, 0, 0, 0); - - setpgid (0, 0); +--u3/rZRmxL6MmkK24 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +Hi Tom, +$ make check//unix/-m32 RUNTESTFLAGS="gdb.arch/i386-sse-stack-align.exp GDB_PARALLEL=1" +[...] +Running /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp ... +ERROR: (/home/jkratoch/redhat/gdb-clean/gdb/testsuite.unix.-m32/outputs/gdb.arch/i386-sse-stack-align/i386-sse-stack-align) No such file or directory -commit 510604eee7892c54d98eefa2893afb823c721406 -Author: Jan Kratochvil -Date: Wed Aug 28 17:55:56 2013 +0000 - PR gdb/15415 - - gdb/ - 2013-08-27 Jan Kratochvil - - PR gdb/15415 - * corefile.c (get_exec_file): Use exec_filename. - * defs.h (OPF_DISABLE_REALPATH): New definition. Add new comment. - * exec.c (exec_close): Free EXEC_FILENAME. - (exec_file_attach): New variable canonical_pathname. Use - OPF_DISABLE_REALPATH. Call gdb_realpath explicitly. Set - EXEC_FILENAME. - * exec.h (exec_filename): New. - * inferior.c (print_inferior, inferior_command): Use - PSPACE_EXEC_FILENAME. - * mi/mi-main.c (print_one_inferior): Likewise. - * progspace.c (clone_program_space, print_program_space): Likewise. - * progspace.h (struct program_space): New field pspace_exec_filename. - * source.c (openp): Describe OPF_DISABLE_REALPATH. New variable - realpath_fptr, initialize it from OPF_DISABLE_REALPATH, use it. - - gdb/testsuite/ - 2013-08-27 Jan Kratochvil - - PR gdb/15415 - * gdb.base/argv0-symlink.c: New file. - * gdb.base/argv0-symlink.exp: New file. +Checked in. -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/corefile.c gdb-7.6.50.20130731-cvs/gdb/corefile.c ---- gdb-7.6.50.20130731-cvs-orig/gdb/corefile.c 2013-07-31 21:41:54.000000000 +0200 -+++ gdb-7.6.50.20130731-cvs/gdb/corefile.c 2014-01-19 16:24:46.238323054 +0100 -@@ -182,8 +182,8 @@ validate_files (void) - char * - get_exec_file (int err) - { -- if (exec_bfd) -- return bfd_get_filename (exec_bfd); -+ if (exec_filename) -+ return exec_filename; - if (!err) - return NULL; - -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/defs.h gdb-7.6.50.20130731-cvs/gdb/defs.h ---- gdb-7.6.50.20130731-cvs-orig/gdb/defs.h 2013-07-31 21:41:54.000000000 +0200 -+++ gdb-7.6.50.20130731-cvs/gdb/defs.h 2014-01-19 16:24:46.239323054 +0100 -@@ -346,8 +346,10 @@ extern const char *pc_prefix (CORE_ADDR) - - /* From source.c */ - -+/* See openp function definition for their description. */ - #define OPF_TRY_CWD_FIRST 0x01 - #define OPF_SEARCH_IN_PATH 0x02 -+#define OPF_DISABLE_REALPATH 0x04 - - extern int openp (const char *, int, const char *, int, char **); - -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/exec.c gdb-7.6.50.20130731-cvs/gdb/exec.c ---- gdb-7.6.50.20130731-cvs-orig/gdb/exec.c 2013-07-31 21:41:54.000000000 +0200 -+++ gdb-7.6.50.20130731-cvs/gdb/exec.c 2014-01-19 16:25:18.616315354 +0100 -@@ -102,6 +102,9 @@ exec_close (void) - exec_bfd_mtime = 0; - - remove_target_sections (&exec_bfd); -+ -+ xfree (exec_filename); -+ exec_filename = NULL; - } - } - -@@ -179,12 +182,13 @@ exec_file_attach (char *filename, int fr - else - { - struct cleanup *cleanups; -- char *scratch_pathname; -+ char *scratch_pathname, *canonical_pathname; - int scratch_chan; - struct target_section *sections = NULL, *sections_end = NULL; - char **matching; - -- scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, filename, -+ scratch_chan = openp (getenv ("PATH"), -+ OPF_TRY_CWD_FIRST | OPF_DISABLE_REALPATH, filename, - write_files ? O_RDWR | O_BINARY : O_RDONLY | O_BINARY, - &scratch_pathname); - #if defined(__GO32__) || defined(_WIN32) || defined(__CYGWIN__) -@@ -193,7 +197,9 @@ exec_file_attach (char *filename, int fr - char *exename = alloca (strlen (filename) + 5); - - strcat (strcpy (exename, filename), ".exe"); -- scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, exename, -+ scratch_chan = openp (getenv ("PATH"), -+ OPF_TRY_CWD_FIRST | OPF_DISABLE_REALPATH, -+ exename, - write_files ? O_RDWR | O_BINARY : O_RDONLY | O_BINARY, - &scratch_pathname); - } -@@ -203,11 +209,16 @@ exec_file_attach (char *filename, int fr - - cleanups = make_cleanup (xfree, scratch_pathname); - -+ /* gdb_bfd_open (and its variants) prefers canonicalized pathname for -+ better BFD caching. */ -+ canonical_pathname = gdb_realpath (scratch_pathname); -+ make_cleanup (xfree, canonical_pathname); -+ - if (write_files) -- exec_bfd = gdb_bfd_fopen (scratch_pathname, gnutarget, -+ exec_bfd = gdb_bfd_fopen (canonical_pathname, gnutarget, - FOPEN_RUB, scratch_chan); - else -- exec_bfd = gdb_bfd_open (scratch_pathname, gnutarget, scratch_chan); -+ exec_bfd = gdb_bfd_open (canonical_pathname, gnutarget, scratch_chan); - - if (!exec_bfd) - { -@@ -215,6 +226,9 @@ exec_file_attach (char *filename, int fr - scratch_pathname, bfd_errmsg (bfd_get_error ())); - } - -+ gdb_assert (exec_filename == NULL); -+ exec_filename = xstrdup (scratch_pathname); -+ - if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) - { - /* Make sure to close exec_bfd, or else "run" might try to use -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/exec.h gdb-7.6.50.20130731-cvs/gdb/exec.h ---- gdb-7.6.50.20130731-cvs-orig/gdb/exec.h 2013-07-31 21:41:54.000000000 +0200 -+++ gdb-7.6.50.20130731-cvs/gdb/exec.h 2014-01-19 16:24:46.262323049 +0100 -@@ -32,6 +32,7 @@ extern struct target_ops exec_ops; - - #define exec_bfd current_program_space->ebfd - #define exec_bfd_mtime current_program_space->ebfd_mtime -+#define exec_filename current_program_space->pspace_exec_filename - - /* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR. - Returns 0 if OK, 1 on error. */ -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/inferior.c gdb-7.6.50.20130731-cvs/gdb/inferior.c ---- gdb-7.6.50.20130731-cvs-orig/gdb/inferior.c 2013-07-31 21:41:54.000000000 +0200 -+++ gdb-7.6.50.20130731-cvs/gdb/inferior.c 2014-01-19 16:24:46.264323048 +0100 -@@ -588,9 +588,8 @@ print_inferior (struct ui_out *uiout, ch - ui_out_field_string (uiout, "target-id", - inferior_pid_to_str (inf->pid)); - -- if (inf->pspace->ebfd) -- ui_out_field_string (uiout, "exec", -- bfd_get_filename (inf->pspace->ebfd)); -+ if (inf->pspace->pspace_exec_filename != NULL) -+ ui_out_field_string (uiout, "exec", inf->pspace->pspace_exec_filename); - else - ui_out_field_skip (uiout, "exec"); - -@@ -704,8 +703,8 @@ inferior_command (char *args, int from_t - printf_filtered (_("[Switching to inferior %d [%s] (%s)]\n"), - inf->num, - inferior_pid_to_str (inf->pid), -- (inf->pspace->ebfd -- ? bfd_get_filename (inf->pspace->ebfd) -+ (inf->pspace->pspace_exec_filename != NULL -+ ? inf->pspace->pspace_exec_filename - : _(""))); - - if (inf->pid != 0) -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/mi/mi-main.c gdb-7.6.50.20130731-cvs/gdb/mi/mi-main.c ---- gdb-7.6.50.20130731-cvs-orig/gdb/mi/mi-main.c 2013-07-31 21:41:54.000000000 +0200 -+++ gdb-7.6.50.20130731-cvs/gdb/mi/mi-main.c 2014-01-19 16:24:46.273323046 +0100 -@@ -573,10 +573,10 @@ print_one_inferior (struct inferior *inf - if (inferior->pid != 0) - ui_out_field_int (uiout, "pid", inferior->pid); - -- if (inferior->pspace->ebfd) -+ if (inferior->pspace->pspace_exec_filename != NULL) - { - ui_out_field_string (uiout, "executable", -- bfd_get_filename (inferior->pspace->ebfd)); -+ inferior->pspace->pspace_exec_filename); - } - - data.cores = 0; -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/progspace.c gdb-7.6.50.20130731-cvs/gdb/progspace.c ---- gdb-7.6.50.20130731-cvs-orig/gdb/progspace.c 2013-01-02 02:54:56.000000000 +0100 -+++ gdb-7.6.50.20130731-cvs/gdb/progspace.c 2014-01-19 16:24:46.275323045 +0100 -@@ -196,8 +196,8 @@ clone_program_space (struct program_spac - - set_current_program_space (dest); - -- if (src->ebfd != NULL) -- exec_file_attach (bfd_get_filename (src->ebfd), 0); -+ if (src->pspace_exec_filename != NULL) -+ exec_file_attach (src->pspace_exec_filename, 0); - - if (src->symfile_object_file != NULL) - symbol_file_add_main (src->symfile_object_file->name, 0); -@@ -336,9 +336,8 @@ print_program_space (struct ui_out *uiou - - ui_out_field_int (uiout, "id", pspace->num); - -- if (pspace->ebfd) -- ui_out_field_string (uiout, "exec", -- bfd_get_filename (pspace->ebfd)); -+ if (pspace->pspace_exec_filename) -+ ui_out_field_string (uiout, "exec", pspace->pspace_exec_filename); - else - ui_out_field_skip (uiout, "exec"); - -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/progspace.h gdb-7.6.50.20130731-cvs/gdb/progspace.h ---- gdb-7.6.50.20130731-cvs-orig/gdb/progspace.h 2013-01-02 02:54:56.000000000 +0100 -+++ gdb-7.6.50.20130731-cvs/gdb/progspace.h 2014-01-19 16:24:46.276323045 +0100 -@@ -148,6 +148,10 @@ struct program_space - bfd *ebfd; - /* The last-modified time, from when the exec was brought in. */ - long ebfd_mtime; -+ /* Similar to bfd_get_filename (exec_bfd) but in original form given -+ by user, without symbolic links and pathname resolved. -+ It needs to be freed by xfree. It is not NULL iff EBFD is not NULL. */ -+ char *pspace_exec_filename; - - /* The address space attached to this program space. More than one - program space may be bound to the same address space. In the -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/source.c gdb-7.6.50.20130731-cvs/gdb/source.c ---- gdb-7.6.50.20130731-cvs-orig/gdb/source.c 2013-07-31 21:41:54.000000000 +0200 -+++ gdb-7.6.50.20130731-cvs/gdb/source.c 2014-01-19 16:24:46.278323045 +0100 -@@ -692,6 +692,11 @@ is_regular_file (const char *name) - and the file, sigh! Emacs gets confuzzed by this when we print the - source file name!!! - -+ If OPTS does not have OPF_DISABLE_REALPATH set return FILENAME_OPENED -+ resolved by gdb_realpath. Even with OPF_DISABLE_REALPATH this function -+ still returns filename starting with "/". If FILENAME_OPENED is NULL -+ this option has no effect. -+ - If a file is found, return the descriptor. - Otherwise, return -1, with errno set for the last name we tried to open. */ - -@@ -851,19 +856,27 @@ done: - /* If a file was opened, canonicalize its filename. */ - if (fd < 0) - *filename_opened = NULL; -- else if (IS_ABSOLUTE_PATH (filename)) -- *filename_opened = gdb_realpath (filename); - else - { -- /* Beware the // my son, the Emacs barfs, the botch that catch... */ -+ char *(*realpath_fptr) (const char *); - -- char *f = concat (current_directory, -- IS_DIR_SEPARATOR (current_directory[strlen (current_directory) - 1]) -- ? "" : SLASH_STRING, -- filename, (char *)NULL); -+ realpath_fptr = ((opts & OPF_DISABLE_REALPATH) != 0 -+ ? xstrdup : gdb_realpath); - -- *filename_opened = gdb_realpath (f); -- xfree (f); -+ if (IS_ABSOLUTE_PATH (filename)) -+ *filename_opened = realpath_fptr (filename); -+ else -+ { -+ /* Beware the // my son, the Emacs barfs, the botch that catch... */ -+ -+ char *f = concat (current_directory, -+ IS_DIR_SEPARATOR (current_directory[strlen (current_directory) - 1]) -+ ? "" : SLASH_STRING, -+ filename, (char *)NULL); -+ -+ *filename_opened = realpath_fptr (f); -+ xfree (f); -+ } - } - } - -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/testsuite/gdb.base/argv0-symlink.c gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/argv0-symlink.c ---- gdb-7.6.50.20130731-cvs-orig/gdb/testsuite/gdb.base/argv0-symlink.c 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/argv0-symlink.c 2014-01-19 16:24:46.286323043 +0100 -@@ -0,0 +1,22 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 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 . */ -+ -+int -+main (int argc, char **argv) -+{ -+ return 0; -+} -diff -dup -ruNp gdb-7.6.50.20130731-cvs-orig/gdb/testsuite/gdb.base/argv0-symlink.exp gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/argv0-symlink.exp ---- gdb-7.6.50.20130731-cvs-orig/gdb/testsuite/gdb.base/argv0-symlink.exp 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/argv0-symlink.exp 2014-01-19 16:24:46.287323043 +0100 -@@ -0,0 +1,62 @@ -+# Copyright 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 . -+ -+standard_testfile -+ -+if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1 } { -+ return -1 -+} -+ -+set test "kept file symbolic link name" -+set filelink "${testfile}-filelink" -+ -+remote_file host delete [standard_output_file $filelink] -+set status [remote_exec host "ln -sf ${testfile} [standard_output_file $filelink]"] -+if {[lindex $status 0] != 0} { -+ unsupported "$test (host does not support symbolic links)" -+ return 0 -+} -+ -+clean_restart "$filelink" -+ -+if ![runto_main] { -+ untested "could not run to main" -+ return -1 -+} -+ -+gdb_test {print argv[0]} "/$filelink\"" $test -+ -+ -+set test "kept directory symbolic link name" -+set dirlink "${testfile}-dirlink" -+ -+# 'ln -sf' does not overwrite symbol link to a directory. -+# 'remote_file host delete' uses stat (not lstat), therefore it refuses to -+# delete a directory. -+remote_exec host "rm -f [standard_output_file $dirlink]" -+set status [remote_exec host "ln -sf . [standard_output_file $dirlink]"] -+if {[lindex $status 0] != 0} { -+ unsupported "$test (host does not support symbolic links)" -+ return 0 -+} -+ -+clean_restart "$dirlink/$filelink" -+ -+if ![runto_main] { -+ untested "could not run to main" -+ return -1 -+} -+ -+gdb_test {print argv[0]} "/$dirlink/$filelink\"" $test +Jan +--u3/rZRmxL6MmkK24 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline; filename=1 -commit 4856b6bc835e25ab0f48462104152701c864858c +commit 3c77faf33dc4c7bb693f05f44077ed687e9f8217 Author: Jan Kratochvil -Date: Sun Oct 13 16:11:08 2013 +0000 +Date: Thu Feb 6 23:14:20 2014 +0100 - Improve Executable displayed path (PR 15415 regression kind #2) - - gdb/ - 2013-10-13 Jan Kratochvil - - Canonicalize directories for EXEC_FILENAME. - * exec.c (exec_file_attach): Use gdb_realpath_keepfile for - exec_filename. - * utils.c (gdb_realpath_keepfile): New function. - * utils.h (gdb_realpath_keepfile): New declaration. + Fix i386-sse-stack-align.exp regression since GDB_PARALLEL. gdb/testsuite/ - 2013-10-13 Jan Kratochvil + 2014-02-06 Jan Kratochvil - Canonicalize directories for EXEC_FILENAME. - * gdb.base/argv0-symlink.exp - (kept file symbolic link name for info inferiors): New. - (kept directory symbolic link name): Setup kfail. - (kept directory symbolic link name for info inferiors): New. + Fix i386-sse-stack-align.exp regression since GDB_PARALLEL. + * gdb.arch/i386-sse-stack-align.exp: Use standard_output_file. -### a/gdb/ChangeLog -### b/gdb/ChangeLog -## -1,3 +1,11 @@ -+2013-10-13 Jan Kratochvil -+ -+ Canonicalize directories for EXEC_FILENAME. -+ * exec.c (exec_file_attach): Use gdb_realpath_keepfile for -+ exec_filename. -+ * utils.c (gdb_realpath_keepfile): New function. -+ * utils.h (gdb_realpath_keepfile): New declaration. -+ - 2013-10-11 Doug Evans - - * Makefile.in (GDBFLAGS): New variable. ---- a/gdb/exec.c -+++ b/gdb/exec.c -@@ -224,7 +224,7 @@ exec_file_attach (char *filename, int from_tty) - } - - gdb_assert (exec_filename == NULL); -- exec_filename = xstrdup (scratch_pathname); -+ exec_filename = gdb_realpath_keepfile (scratch_pathname); - - if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) - { +diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog +index 8c846b8..13ccaf3 100644 ### a/gdb/testsuite/ChangeLog ### b/gdb/testsuite/ChangeLog -## -1,3 +1,11 @@ -+2013-10-13 Jan Kratochvil -+ -+ Canonicalize directories for EXEC_FILENAME. -+ * gdb.base/argv0-symlink.exp -+ (kept file symbolic link name for info inferiors): New. -+ (kept directory symbolic link name): Setup kfail. -+ (kept directory symbolic link name for info inferiors): New. -+ - 2013-10-11 Andreas Arnez - - * gdb.arch/s390-multiarch.exp: New file. ---- a/gdb/testsuite/gdb.base/argv0-symlink.exp -+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp -@@ -37,6 +37,7 @@ if ![runto_main] { - } - - gdb_test {print argv[0]} "/$filelink\"" $test -+gdb_test "info inferiors" "/$subdir/$filelink *" "$test for info inferiors" - - - set test "kept directory symbolic link name" -@@ -59,4 +60,9 @@ if ![runto_main] { - return -1 - } - -+# gdbserver does not have this issue. -+if ![is_remote target] { -+ setup_kfail "*-*-*" gdb/15934 -+} - gdb_test {print argv[0]} "/$dirlink/$filelink\"" $test -+gdb_test "info inferiors" "/$subdir/$filelink *" "$test for info inferiors" ---- a/gdb/utils.c -+++ b/gdb/utils.c -@@ -3233,6 +3233,52 @@ gdb_realpath (const char *filename) - return xstrdup (filename); - } - -+/* Return a copy of FILENAME, with its directory prefix canonicalized -+ by gdb_realpath. */ -+ -+char * -+gdb_realpath_keepfile (const char *filename) -+{ -+ const char *base_name = lbasename (filename); -+ char *dir_name; -+ char *real_path; -+ char *result; -+ -+ /* Extract the basename of filename, and return immediately -+ a copy of filename if it does not contain any directory prefix. */ -+ if (base_name == filename) -+ return xstrdup (filename); -+ -+ dir_name = alloca ((size_t) (base_name - filename + 2)); -+ /* Allocate enough space to store the dir_name + plus one extra -+ character sometimes needed under Windows (see below), and -+ then the closing \000 character. */ -+ strncpy (dir_name, filename, base_name - filename); -+ dir_name[base_name - filename] = '\000'; -+ -+#ifdef HAVE_DOS_BASED_FILE_SYSTEM -+ /* We need to be careful when filename is of the form 'd:foo', which -+ is equivalent of d:./foo, which is totally different from d:/foo. */ -+ if (strlen (dir_name) == 2 && isalpha (dir_name[0]) && dir_name[1] == ':') -+ { -+ dir_name[2] = '.'; -+ dir_name[3] = '\000'; -+ } -+#endif -+ -+ /* Canonicalize the directory prefix, and build the resulting -+ filename. If the dirname realpath already contains an ending -+ directory separator, avoid doubling it. */ -+ real_path = gdb_realpath (dir_name); -+ if (IS_DIR_SEPARATOR (real_path[strlen (real_path) - 1])) -+ result = concat (real_path, base_name, (char *) NULL); -+ else -+ result = concat (real_path, SLASH_STRING, base_name, (char *) NULL); -+ -+ xfree (real_path); -+ return result; -+} -+ - ULONGEST - align_up (ULONGEST v, int n) - { ---- a/gdb/utils.h -+++ b/gdb/utils.h -@@ -128,6 +128,8 @@ extern struct cleanup *make_bpstat_clear_actions_cleanup (void); - - extern char *gdb_realpath (const char *); - -+extern char *gdb_realpath_keepfile (const char *); -+ - extern int gdb_filename_fnmatch (const char *pattern, const char *string, - int flags); - - - - -commit 24890efdabbd9d827cdd2088b022f070da04b14f -Author: Tom Tromey -Date: Fri Oct 18 13:12:32 2013 -0600 - - fix argv0-symlink.exp for parallel mode - - argv0-symlink.exp doesn't work properly if standard_output_file puts - files into a per-test subdirectory. That's because it assumes that - files appear in $subdir, which is no longer true. - - This patch fixes the problem by computing the correct directory at - runtime. - - Tested both with and without GDB_PARALLEL on x86-64 Fedora 18. - - 2013-11-04 Tom Tromey - - * gdb.base/argv0-symlink.exp: Compute executable's directory - dynamically. - -### a/gdb/testsuite/ChangeLog -### b/gdb/testsuite/ChangeLog -## -1,5 +1,10 @@ - 2013-11-04 Tom Tromey - -+ * gdb.base/argv0-symlink.exp: Compute executable's directory -+ dynamically. -+ -+2013-11-04 Tom Tromey -+ - * gdb.asm/asm-source.exp: Use standard_output_file. - - 2013-11-04 Tom Tromey ---- a/gdb/testsuite/gdb.base/argv0-symlink.exp -+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp -@@ -37,7 +37,14 @@ if ![runto_main] { - } - - gdb_test {print argv[0]} "/$filelink\"" $test --gdb_test "info inferiors" "/$subdir/$filelink *" "$test for info inferiors" +## -1,3 +1,8 @@ ++2014-02-06 Jan Kratochvil + -+# For a link named /PATH/TO/DIR/LINK, we want to check the output -+# against "/DIR/LINK", but computed in a way that doesn't make -+# assumptions about the test directory layout. -+set full_filelink [standard_output_file $filelink] -+set lastdir [file tail [file dirname $full_filelink]] ++ Fix i386-sse-stack-align.exp regression since GDB_PARALLEL. ++ * gdb.arch/i386-sse-stack-align.exp: Use standard_output_file. + -+gdb_test "info inferiors" "/$lastdir/$filelink *" "$test for info inferiors" + 2014-02-06 Doug Evans + * gdb.python/py-breakpoint.exp (test_bkpt_eval_funcs): Update expected +diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp +index b5a7e1e..462df1f 100644 +--- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp ++++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp +@@ -22,7 +22,7 @@ set testfile "i386-sse-stack-align" + set srcfile ${testfile}.S + set csrcfile ${testfile}.c + set executable ${testfile} +-set binfile ${objdir}/${subdir}/${executable} ++set binfile [standard_output_file ${executable}] + set opts {} - set test "kept directory symbolic link name" -@@ -65,4 +72,4 @@ if ![is_remote target] { - setup_kfail "*-*-*" gdb/15934 - } - gdb_test {print argv[0]} "/$dirlink/$filelink\"" $test --gdb_test "info inferiors" "/$subdir/$filelink *" "$test for info inferiors" -+gdb_test "info inferiors" "/$lastdir/$filelink *" "$test for info inferiors" - - - -http://sourceware.org/ml/gdb-patches/2014-01/msg00722.html -Subject: [patch] Fix gdb.base/argv0-symlink.exp FAIL in long dirpath - - ---VbJkn9YxBvnuCH5J -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline - -Hi, - -when you build GDB in a very long directory pathname it will: - -(gdb) print argv[0] -$1 = 0x7fffffffdb07 "/home/jkratoch/redhat/", 'x' ... -(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name - -With the fix: - -(gdb) print argv[0] -$1 = 0x7fffffffdb07 "/home/jkratoch/redhat/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/gdb-test/gdb/testsuite/gdb.base/argv0-symlink-filelink" -(gdb) PASS: gdb.base/argv0-symlink.exp: kept file symbolic link name - -The "set print repeats unlimited" part is there to prevent the following -output, it would still PASS (as only its tail is matched) but it is not much -correct. - -(gdb) print argv[0] -$1 = 0x7fffffffdb07 "/home/jkratoch/redhat/", 'x' , "/gdb-test/gdb/testsuite/gdb.base/argv0-symlink-filelink" -(gdb) PASS: gdb.base/argv0-symlink.exp: kept file symbolic link name - -I will check it in. - -Tested on x86_64-fedora20-linux-gnu. - - -Jan - ---VbJkn9YxBvnuCH5J -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline; filename="argv0.patch" - -gdb/testsuite/ -2014-01-19 Jan Kratochvil - - Fix gdb.base/argv0-symlink.exp FAIL in long dirpath. - * gdb.base/argv0-symlink.exp (elements first, repeats first) - (elements second, repeats second): New. - -diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp -index 0e0202d..7bf5c2f 100644 ---- a/gdb/testsuite/gdb.base/argv0-symlink.exp -+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp -@@ -36,6 +36,10 @@ if ![runto_main] { - return -1 - } - -+# Very long directory paths could be cut below. -+gdb_test_no_output "set print elements unlimited" "elements first" -+gdb_test_no_output "set print repeats unlimited" "repeats first" -+ - gdb_test {print argv[0]} "/$filelink\"" $test - - # For a link named /PATH/TO/DIR/LINK, we want to check the output -@@ -67,6 +71,10 @@ if ![runto_main] { - return -1 - } - -+# Very long directory paths could be cut below. -+gdb_test_no_output "set print elements unlimited" "elements second" -+gdb_test_no_output "set print repeats unlimited" "repeats second" -+ - # gdbserver does not have this issue. - if ![is_remote target] { - setup_kfail "*-*-*" gdb/15934 + if [info exists COMPILE] { ---VbJkn9YxBvnuCH5J-- +--u3/rZRmxL6MmkK24-- diff --git a/gdb.spec b/gdb.spec index 4d5a30e..1b8fc4f 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1,5 +1,6 @@ # rpmbuild parameters: # --with testsuite: Run the testsuite (biarch if possible). Default is without. +# --with asan: gcc -fsanitize=address # --without python: No python support. # --with profile: gcc -fprofile-generate / -fprofile-use: Before better # workload gets run it decreases the general performance now. @@ -29,22 +30,22 @@ Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages Name: %{?scl_prefix}gdb # 6e5c95e6cf1e3c37bd3a822ca9e6721caab97a85 -%global snap 20130731 +#global snap 20140127 # Freeze it when GDB gets branched -%global snapsrc 20130731 +%global snapsrc 20140108 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20121213 -Version: 7.6.50.%{snap} +Version: 7.7 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 20%{?dist} +Release: 1%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain Group: Development/Debuggers # 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}-cvs.tar.bz2 +Source: gdb-%{version}.tar.bz2 Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) URL: http://gnu.org/software/gdb/ @@ -53,7 +54,7 @@ Obsoletes: devtoolset-1.0-%{pkg_name} %endif # For our convenience -%global gdb_src %{pkg_name}-%{version}-cvs +%global gdb_src %{pkg_name}-%{version} %global gdb_build build-%{_target_platform} # Make sure we get rid of the old package gdb64, now that we have unified @@ -297,10 +298,6 @@ Patch282: gdb-6.7-charsign-test.patch #=fedoratest+ppc Patch284: gdb-6.7-ppc-clobbered-registers-O2-test.patch -# Testsuite fixes for more stable/comparable results. -#=fedoratest -Patch287: gdb-6.7-testsuite-stable-results.patch - # Test ia64 memory leaks of the code using libunwind. #=fedoratest Patch289: gdb-6.5-ia64-libunwind-leak-test.patch @@ -524,13 +521,11 @@ Patch832: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch # Fix crash on 'enable count' (Simon Marchi, BZ 993118). Patch843: gdb-enable-count-crash.patch -# Fix the case when GDB leaks memory because value_struct_elt -# does not call check_typedef. (Doug Evans, BZ 15695, filed as -# RH BZ 1013453). -Patch844: gdb-rhbz1013453-value-struct-elt-memory-leak.patch +# Fix testsuite "ERROR: no fileid for". +Patch846: gdb-testsuite-nohostid.patch -# Fix explicit Class:: inside class scope (BZ 874817, Keith Seitz). -Patch845: gdb-implicit-this.patch +# Fix Python stack corruption. +Patch847: gdb-python-stacksmash.patch %if 0%{!?rhel:1} || 0%{?rhel} > 6 # RL_STATE_FEDORA_GDB would not be found for: @@ -771,7 +766,6 @@ find -name "*.info*"|xargs rm -f %patch276 -p1 %patch282 -p1 %patch284 -p1 -%patch287 -p1 %patch289 -p1 %patch290 -p1 %patch294 -p1 @@ -826,8 +820,8 @@ find -name "*.info*"|xargs rm -f %patch818 -p1 %patch832 -p1 %patch843 -p1 -%patch844 -p1 -%patch845 -p1 +%patch846 -p1 +%patch847 -p1 %patch393 -p1 %if 0%{!?el5:1} || 0%{?scl:1} @@ -893,8 +887,8 @@ do mkdir %{gdb_build}$fprofile cd %{gdb_build}$fprofile -export CFLAGS="$RPM_OPT_FLAGS" -export LDFLAGS="%{?__global_ldflags}" +export CFLAGS="$RPM_OPT_FLAGS %{?_with_asan:-fsanitize=address}" +export LDFLAGS="%{?__global_ldflags} %{?_with_asan:-fsanitize=address}" # --htmldir and --pdfdir are not used as they are used from %{gdb_build}. ../configure \ @@ -1346,6 +1340,10 @@ fi %endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch" %changelog +* Fri Feb 7 2014 Jan Kratochvil - 7.7-1.fc21 +- Rebase to FSF GDB 7.7. +- New rpmbuild option: --with asan + * Thu Jan 23 2014 Jan Kratochvil - 7.6.50.20140119-20.fc20 - [s390*,ppc*] Enable secondary targets s390* and ppc* (BZ 1056259). diff --git a/sources b/sources index 2055164..25660cf 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ 4981307aa9619bbec5b73261e4e41c8d gdb-libstdc++-v3-python-r155978.tar.bz2 -8ce4e757790139e3f07652a2b49d79ff gdb-7.6.50.20130624.tar.bz2 -f16c33bdd9d0030d0c2a42d5f319f841 gdb-7.6.50.20130731-cvs.tar.bz2 +271a18f41858a7e98b28ae4eb91287c9 gdb-7.7.tar.bz2