Rebase to FSF GDB 7.7.

- New rpmbuild option: --with asan
This commit is contained in:
Jan Kratochvil 2014-02-07 19:38:14 +01:00
parent ff3b0d487c
commit 2c55a5441d
37 changed files with 2384 additions and 4035 deletions

3
.gitignore vendored
View File

@ -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

View File

@ -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.
+

View File

@ -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 <fcntl.h>
#include "gdb_string.h"
@@ -1834,8 +1835,9 @@ dwarf2_has_info (struct objfile *objfile
#include <string.h>
@@ -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. */

View File

@ -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@

View File

@ -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]

View File

@ -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.
+

View File

@ -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 <fcntl.h>
#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, &sections, &sections_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);
}

View File

@ -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 <dlfcn.h>
#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;
};

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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 <sys/stat.h>
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] = ' ';
+
+ strcpy (&link_all[len_orig + 1], link0_resolved);
}
+ xfree (link0_resolved);
+ }
- gdb_bfd_unref (abfd);
- abfd = NULL;
+ strcpy (&link_all[len_orig + 1], 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
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/symfile.h 2013-08-02 17:07:17.886739513 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/symfile.h 2013-08-02 17:07:28.446753308 +0200
@@ -597,6 +597,12 @@ void free_symfile_segment_data (struct s
extern struct cleanup *increment_reading_symtab (void);
+/* build-id support. */
+extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr);
+extern char *build_id_to_filename (const struct elf_build_id *build_id,
+ char **link_return, int add_debug_suffix);
+extern void debug_print_missing (const char *binary, const char *debug);
+
/* From dwarf2read.c */
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
Index: gdb-7.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
}
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 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."
}
}
+ # 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] {
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
+}
Index: gdb-7.6.90.20140127/gdb/build-id.h
===================================================================
--- 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. */
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);
+
+extern char *build_id_to_filename (const struct elf_build_id *build_id,
+ char **link_return);
/* 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);
#endif /* BUILD_ID_H */
Index: gdb-7.6.90.20140127/gdb/dwarf2read.c
===================================================================
--- 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)
}
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);
if (dwz_bfd == NULL)
error (_("could not find '.gnu_debugaltlink' file for %s"),

View File

@ -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.
+

View File

@ -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

View File

@ -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;

View File

@ -1,108 +0,0 @@
gdb/testsuite/gdb.base/fileio.c:
gdb/testsuite/gdb.base/fileio.exp:
2007-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* 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

View File

@ -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 <zlib.h>
#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 */

File diff suppressed because it is too large Load Diff

View File

@ -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 <stdint.h>
+#ifdef HAVE_SELINUX_SELINUX_H
+# include <selinux/selinux.h>
+#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 <libunwind-ia64.h> 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 <sgtty.h> 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

View File

@ -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.
+

View File

@ -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

View File

@ -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 <uweigand@de.ibm.com>
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

View File

@ -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 <http://www.gnu.org/licenses/>.
+
+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

View File

@ -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.
+

View File

@ -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 <http://www.gnu.org/licenses/>. */
+
+#ifdef DEBUG
+#include <stdio.h>
+#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 <http://www.gnu.org/licenses/>.
+
+# 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"
+

View File

@ -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 <jan.kratochvil@redhat.com>
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--

View File

@ -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 <dje@google.com>
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 <dje@google.com>
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 <dje@google.com>
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 <http://www.gnu.org/licenses/>. */
+
+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 <http://www.gnu.org/licenses/>.
+
+# 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));
}

File diff suppressed because it is too large Load Diff

View File

@ -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"

View File

@ -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 *
}

View File

@ -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
{

View File

@ -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]

View File

@ -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

View File

@ -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

View File

@ -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 <macro@codesourcery.com>
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 <jan.kratochvil@redhat.com>
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--

File diff suppressed because it is too large Load Diff

View File

@ -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 <jan.kratochvil@redhat.com> - 7.7-1.fc21
- Rebase to FSF GDB 7.7.
- New rpmbuild option: --with asan
* Thu Jan 23 2014 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.6.50.20140119-20.fc20
- [s390*,ppc*] Enable secondary targets s390* and ppc* (BZ 1056259).

View File

@ -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