Rebase to FSF GDB 7.9.50.20150531 (pre-7.10 trunk snapshot).

This commit is contained in:
Jan Kratochvil 2015-05-31 20:47:21 +02:00
parent 19dab0f219
commit 32f92b2e34
32 changed files with 1221 additions and 2602 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
/gdb-libstdc++-v3-python-r155978.tar.bz2 /gdb-libstdc++-v3-python-r155978.tar.bz2
/gdb-7.9.1.tar.xz /gdb-7.9.50.20150531.tar.xz

View File

@ -11,10 +11,10 @@
* gdb.texinfo (File Options): Document --readnever. * gdb.texinfo (File Options): Document --readnever.
Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo Index: gdb-7.9.50.20150520/gdb/doc/gdb.texinfo
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/doc/gdb.texinfo 2015-01-01 17:01:08.308881292 +0100 --- gdb-7.9.50.20150520.orig/gdb/doc/gdb.texinfo 2015-05-31 16:34:58.436379663 +0200
+++ gdb-7.8.50.20141228/gdb/doc/gdb.texinfo 2015-01-01 17:01:10.302880126 +0100 +++ gdb-7.9.50.20150520/gdb/doc/gdb.texinfo 2015-05-31 16:35:03.452416381 +0200
@@ -1032,6 +1032,12 @@ Read each symbol file's entire symbol ta @@ -1032,6 +1032,12 @@ Read each symbol file's entire symbol ta
the default, which is to read it incrementally as it is needed. the default, which is to read it incrementally as it is needed.
This makes startup slower, but makes future operations faster. This makes startup slower, but makes future operations faster.
@ -28,19 +28,19 @@ Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo
@end table @end table
@node Mode Options @node Mode Options
Index: gdb-7.8.50.20141228/gdb/main.c Index: gdb-7.9.50.20150520/gdb/main.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/main.c 2015-01-01 17:01:08.312881290 +0100 --- gdb-7.9.50.20150520.orig/gdb/main.c 2015-05-31 16:34:58.439379685 +0200
+++ gdb-7.8.50.20141228/gdb/main.c 2015-01-01 17:01:10.303880125 +0100 +++ gdb-7.9.50.20150520/gdb/main.c 2015-05-31 16:35:20.547541518 +0200
@@ -590,6 +590,7 @@ captured_main (void *data) @@ -604,6 +604,7 @@ captured_main (void *data)
{"xdb", no_argument, &xdb_commands, 1}, {"tui", no_argument, 0, OPT_TUI},
{"dbx", no_argument, &dbx_commands, 1}, {"dbx", no_argument, &dbx_commands, 1},
{"readnow", no_argument, &readnow_symbol_files, 1}, {"readnow", no_argument, &readnow_symbol_files, 1},
+ {"readnever", no_argument, &readnever_symbol_files, 1}, + {"readnever", no_argument, &readnever_symbol_files, 1},
{"r", no_argument, &readnow_symbol_files, 1}, {"r", no_argument, &readnow_symbol_files, 1},
{"quiet", no_argument, &quiet, 1}, {"quiet", no_argument, &quiet, 1},
{"q", no_argument, &quiet, 1}, {"q", no_argument, &quiet, 1},
@@ -1245,6 +1246,7 @@ Selection of debuggee and its files:\n\n @@ -1253,6 +1254,7 @@ Selection of debuggee and its files:\n\n
--se=FILE Use FILE as symbol file and executable file.\n\ --se=FILE Use FILE as symbol file and executable file.\n\
--symbols=SYMFILE Read symbols from SYMFILE.\n\ --symbols=SYMFILE Read symbols from SYMFILE.\n\
--readnow Fully read symbol files on first access.\n\ --readnow Fully read symbol files on first access.\n\
@ -48,10 +48,10 @@ Index: gdb-7.8.50.20141228/gdb/main.c
--write Set writing into executable and core files.\n\n\ --write Set writing into executable and core files.\n\n\
"), stream); "), stream);
fputs_unfiltered (_("\ fputs_unfiltered (_("\
Index: gdb-7.8.50.20141228/gdb/symfile.c Index: gdb-7.9.50.20150520/gdb/symfile.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/symfile.c 2015-01-01 17:01:08.313881289 +0100 --- gdb-7.9.50.20150520.orig/gdb/symfile.c 2015-05-31 16:34:58.440379692 +0200
+++ gdb-7.8.50.20141228/gdb/symfile.c 2015-01-01 17:01:10.304880125 +0100 +++ gdb-7.9.50.20150520/gdb/symfile.c 2015-05-31 16:35:03.454416395 +0200
@@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup ( @@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup (
/* Global variables owned by this file. */ /* Global variables owned by this file. */
@ -60,10 +60,10 @@ Index: gdb-7.8.50.20141228/gdb/symfile.c
/* Functions this file defines. */ /* Functions this file defines. */
Index: gdb-7.8.50.20141228/gdb/dwarf2read.c Index: gdb-7.9.50.20150520/gdb/dwarf2read.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/dwarf2read.c 2015-01-01 17:01:08.319881285 +0100 --- gdb-7.9.50.20150520.orig/gdb/dwarf2read.c 2015-05-31 16:34:58.446379736 +0200
+++ gdb-7.8.50.20141228/gdb/dwarf2read.c 2015-01-01 17:01:26.888870511 +0100 +++ gdb-7.9.50.20150520/gdb/dwarf2read.c 2015-05-31 16:35:03.459416432 +0200
@@ -69,6 +69,7 @@ @@ -69,6 +69,7 @@
#include "source.h" #include "source.h"
#include "filestuff.h" #include "filestuff.h"
@ -72,7 +72,7 @@ Index: gdb-7.8.50.20141228/gdb/dwarf2read.c
#include <fcntl.h> #include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
@@ -1989,7 +1990,8 @@ dwarf2_has_info (struct objfile *objfile @@ -2050,7 +2051,8 @@ dwarf2_has_info (struct objfile *objfile
(void *) names); (void *) names);
dwarf2_per_objfile->objfile = objfile; dwarf2_per_objfile->objfile = objfile;
} }
@ -82,10 +82,10 @@ Index: gdb-7.8.50.20141228/gdb/dwarf2read.c
&& dwarf2_per_objfile->info.s.asection != NULL && dwarf2_per_objfile->info.s.asection != NULL
&& !dwarf2_per_objfile->abbrev.is_virtual && !dwarf2_per_objfile->abbrev.is_virtual
&& dwarf2_per_objfile->abbrev.s.asection != NULL); && dwarf2_per_objfile->abbrev.s.asection != NULL);
Index: gdb-7.8.50.20141228/gdb/top.h Index: gdb-7.9.50.20150520/gdb/top.h
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/top.h 2015-01-01 17:01:08.320881284 +0100 --- gdb-7.9.50.20150520.orig/gdb/top.h 2015-05-31 16:34:58.448379751 +0200
+++ gdb-7.8.50.20141228/gdb/top.h 2015-01-01 17:01:10.310880121 +0100 +++ gdb-7.9.50.20150520/gdb/top.h 2015-05-31 16:35:03.459416432 +0200
@@ -67,6 +67,7 @@ extern void set_prompt (const char *s); @@ -67,6 +67,7 @@ extern void set_prompt (const char *s);
/* From random places. */ /* From random places. */

View File

@ -1,40 +1,39 @@
Index: gdb-7.8.50.20141228/gdb/testsuite/configure.ac Index: gdb-7.9.50.20150520/gdb/testsuite/configure.ac
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/testsuite/configure.ac 2015-01-01 17:00:26.123908948 +0100 --- gdb-7.9.50.20150520.orig/gdb/testsuite/configure.ac 2015-05-31 16:34:02.396969450 +0200
+++ gdb-7.8.50.20141228/gdb/testsuite/configure.ac 2015-01-01 17:00:43.168897773 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/configure.ac 2015-05-31 16:34:33.443196711 +0200
@@ -106,6 +106,6 @@ AC_OUTPUT([Makefile \ @@ -114,5 +114,5 @@ AC_OUTPUT([Makefile \
gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \ gdb.guile/Makefile gdb.linespec/Makefile \
gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile \
gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/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.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.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \ + gdb.perf/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile]) gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
Index: gdb-7.8.50.20141228/gdb/testsuite/configure Index: gdb-7.9.50.20150520/gdb/testsuite/configure
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/testsuite/configure 2015-01-01 17:00:26.124908947 +0100 --- gdb-7.9.50.20150520.orig/gdb/testsuite/configure 2015-05-31 16:33:53.154901798 +0200
+++ gdb-7.8.50.20141228/gdb/testsuite/configure 2015-01-01 17:00:59.467887088 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/configure 2015-05-31 16:34:48.654308057 +0200
@@ -3458,7 +3458,7 @@ if test "${build}" = "${host}" -a "${hos @@ -3514,7 +3514,7 @@ program_transform_name=`$as_echo "$progr
fi ac_config_files="$ac_config_files lib/pdtrace"
-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.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/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.guile/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.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.guile/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.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/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.guile/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" +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.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.guile/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.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
@@ -4190,6 +4190,7 @@ do @@ -4242,6 +4242,7 @@ do
"gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;;
"gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;; "gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
"gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/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.perf/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.perf/Makefile" ;;
+ "gdb.pie/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pie/Makefile" ;;
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;; "gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;; "gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.c "gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;;
Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.c 2015-01-01 17:00:43.169897773 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.c 2015-05-31 16:34:02.398969465 +0200
@@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
+/* This program is intended to be started outside of gdb, and then +/* 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 + attached to by gdb. Thus, it simply spins in a loop. The loop
@ -56,10 +55,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.c
+ } + }
+ return 0; + return 0;
+} +}
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach2.c Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach2.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach2.c 2015-01-01 17:00:43.170897772 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach2.c 2015-05-31 16:34:02.398969465 +0200
@@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
+/* This program is intended to be started outside of gdb, and then +/* 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 + attached to by gdb. Thus, it simply spins in a loop. The loop
@ -85,10 +84,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach2.c
+ } + }
+ return (0); + return (0);
+} +}
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.c Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.c 2015-01-01 17:00:43.170897772 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.c 2015-05-31 16:34:02.399969472 +0200
@@ -0,0 +1,146 @@ @@ -0,0 +1,146 @@
+/* This testcase is part of GDB, the GNU debugger. +/* This testcase is part of GDB, the GNU debugger.
+ +
@ -236,10 +235,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.c
+ } + }
+ return 0; + return 0;
+} +}
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break1.c Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break1.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break1.c 2015-01-01 17:00:43.170897772 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break1.c 2015-05-31 16:34:02.399969472 +0200
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
+/* This testcase is part of GDB, the GNU debugger. +/* This testcase is part of GDB, the GNU debugger.
+ +
@ -285,10 +284,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break1.c
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */ +void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
+void marker4 (d) long d; {} /* set breakpoint 13 here */ +void marker4 (d) long d; {} /* set breakpoint 13 here */
+#endif +#endif
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/coremaker.c Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/coremaker.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/coremaker.c 2015-01-01 17:00:43.170897772 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/coremaker.c 2015-05-31 16:34:02.399969472 +0200
@@ -0,0 +1,142 @@ @@ -0,0 +1,142 @@
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999 +/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
+ Free Software Foundation, Inc. + Free Software Foundation, Inc.
@ -432,10 +431,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/coremaker.c
+ return 0; + return 0;
+} +}
+ +
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.exp 2015-01-01 17:00:43.171897771 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp 2015-05-31 16:34:02.400969480 +0200
@@ -0,0 +1,417 @@ @@ -0,0 +1,417 @@
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc. +# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
+ +
@ -854,10 +853,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.exp
+do_call_attach_tests +do_call_attach_tests
+ +
+return 0 +return 0
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.exp 2015-01-01 17:00:43.172897771 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp 2015-05-31 16:34:02.401969487 +0200
@@ -0,0 +1,962 @@ @@ -0,0 +1,962 @@
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, +# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2002, 2003, 2004 +# 2000, 2002, 2003, 2004
@ -1821,10 +1820,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.exp
+ send_gdb "set args main\n" + send_gdb "set args main\n"
+ gdb_expect -re ".*$gdb_prompt $" {} + gdb_expect -re ".*$gdb_prompt $" {}
+} +}
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/corefile.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/corefile.exp 2015-01-01 17:00:43.172897771 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp 2015-05-31 16:34:02.401969487 +0200
@@ -0,0 +1,233 @@ @@ -0,0 +1,233 @@
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc. +# Free Software Foundation, Inc.
@ -2059,10 +2058,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/corefile.exp
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)" +gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
+ +
+gdb_test "core" "No core file now." +gdb_test "core" "No core file now."
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/Makefile.in Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/Makefile.in
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/Makefile.in 2015-01-01 17:00:43.172897771 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/Makefile.in 2015-05-31 16:34:02.401969487 +0200
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
+VPATH = @srcdir@ +VPATH = @srcdir@
+srcdir = @srcdir@ +srcdir = @srcdir@

View File

@ -1,28 +0,0 @@
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190810
2006-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
* remote.c (remote_wait): Suggestion on crash due to nonmatching target.
(remote_async_wait): Likewise.
Index: gdb-6.8.50.20090818/gdb/remote.c
===================================================================
--- gdb-6.8.50.20090818.orig/gdb/remote.c 2009-08-18 21:00:35.000000000 +0200
+++ gdb-6.8.50.20090818/gdb/remote.c 2009-08-18 21:04:46.000000000 +0200
@@ -4408,8 +4408,13 @@ Packet: '%s'\n"),
VEC_safe_push (cached_reg_t, event->regcache, &cached_reg);
}
+ /* It may also occur on amd64 which defaults to 32-bit i386
+ target. gdbserver(1) is not aware of the `set architecture'
+ name itself as it is not using libbfd. */
if (*p != ';')
- error (_("Remote register badly formatted: %s\nhere: %s"),
+ error (_("Remote register badly formatted: %s\nhere: %s"
+ "\nTry to load the executable by `file' first,"
+ "\nyou may also check `set/show architecture'."),
buf, p);
++p;
}

View File

@ -58,10 +58,10 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
* exec.c (exec_file_attach): Print a more useful error message if the * exec.c (exec_file_attach): Print a more useful error message if the
user did "gdb core". user did "gdb core".
Index: gdb-7.8.50.20141228/gdb/exec.c Index: gdb-7.9.50.20150531/gdb/exec.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/exec.c 2015-01-03 23:18:38.097427908 +0100 --- gdb-7.9.50.20150531.orig/gdb/exec.c 2015-05-31 03:48:29.000000000 +0200
+++ gdb-7.8.50.20141228/gdb/exec.c 2015-01-03 23:19:02.448556391 +0100 +++ gdb-7.9.50.20150531/gdb/exec.c 2015-05-31 20:07:35.092878685 +0200
@@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
#include "progspace.h" #include "progspace.h"
#include "gdb_bfd.h" #include "gdb_bfd.h"
@ -70,7 +70,7 @@ Index: gdb-7.8.50.20141228/gdb/exec.c
#include <fcntl.h> #include <fcntl.h>
#include "readline/readline.h" #include "readline/readline.h"
@@ -222,12 +223,27 @@ exec_file_attach (const char *filename, @@ -298,12 +299,27 @@ exec_file_attach (const char *filename,
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
{ {
@ -101,11 +101,11 @@ Index: gdb-7.8.50.20141228/gdb/exec.c
} }
if (build_section_table (exec_bfd, &sections, &sections_end)) if (build_section_table (exec_bfd, &sections, &sections_end))
Index: gdb-7.8.50.20141228/gdb/main.c Index: gdb-7.9.50.20150531/gdb/main.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/main.c 2015-01-03 23:18:38.098427913 +0100 --- gdb-7.9.50.20150531.orig/gdb/main.c 2015-05-31 20:07:34.183872824 +0200
+++ gdb-7.8.50.20141228/gdb/main.c 2015-01-03 23:22:10.157546792 +0100 +++ gdb-7.9.50.20150531/gdb/main.c 2015-05-31 20:10:05.095845935 +0200
@@ -426,6 +426,36 @@ typedef struct cmdarg { @@ -435,6 +435,37 @@ typedef struct cmdarg {
/* Define type VEC (cmdarg_s). */ /* Define type VEC (cmdarg_s). */
DEF_VEC_O (cmdarg_s); DEF_VEC_O (cmdarg_s);
@ -120,11 +120,11 @@ Index: gdb-7.8.50.20141228/gdb/main.c
+ +
+ gdb_assert (exec_bfd == NULL); + gdb_assert (exec_bfd == NULL);
+ +
+ TRY_CATCH (e, RETURN_MASK_ALL) + TRY
+ { + {
+ exec_file_attach (filename, from_tty); + exec_file_attach (filename, from_tty);
+ } + }
+ if (e.reason < 0) + CATCH (e, RETURN_MASK_ALL)
+ { + {
+ if (e.error == IS_CORE_ERROR) + if (e.error == IS_CORE_ERROR)
+ { + {
@ -137,12 +137,13 @@ Index: gdb-7.8.50.20141228/gdb/main.c
+ } + }
+ throw_exception (e); + throw_exception (e);
+ } + }
+ END_CATCH
+} +}
+ +
static int static int
captured_main (void *data) captured_main (void *data)
{ {
@@ -910,6 +940,8 @@ captured_main (void *data) @@ -923,6 +954,8 @@ captured_main (void *data)
{ {
symarg = argv[optind]; symarg = argv[optind];
execarg = argv[optind]; execarg = argv[optind];
@ -151,7 +152,7 @@ Index: gdb-7.8.50.20141228/gdb/main.c
optind++; optind++;
} }
@@ -1069,11 +1101,26 @@ captured_main (void *data) @@ -1080,11 +1113,25 @@ captured_main (void *data)
&& symarg != NULL && symarg != NULL
&& strcmp (execarg, symarg) == 0) && strcmp (execarg, symarg) == 0)
{ {
@ -171,23 +172,22 @@ Index: gdb-7.8.50.20141228/gdb/main.c
open it, better only print one error message. open it, better only print one error message.
- catch_command_errors returns non-zero on success! */ - catch_command_errors returns non-zero on success! */
- if (catch_command_errors_const (exec_file_attach, execarg, - if (catch_command_errors_const (exec_file_attach, execarg,
- !batch_flag, RETURN_MASK_ALL)) - !batch_flag))
+ catch_command_errors returns non-zero on success! + catch_command_errors returns non-zero on success!
+ Do not load EXECARG as a symbol file if it has been already processed + Do not load EXECARG as a symbol file if it has been already processed
+ as a core file. */ + as a core file. */
+ if (catch_command_errors_const (func, execarg, !batch_flag, + if (catch_command_errors_const (func, execarg, !batch_flag)
+ RETURN_MASK_ALL)
+ && core_bfd == NULL) + && core_bfd == NULL)
catch_command_errors_const (symbol_file_add_main, symarg, catch_command_errors_const (symbol_file_add_main, symarg,
!batch_flag, RETURN_MASK_ALL); !batch_flag);
} }
Index: gdb-7.8.50.20141228/gdb/common/common-exceptions.h Index: gdb-7.9.50.20150531/gdb/common/common-exceptions.h
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/common/common-exceptions.h 2015-01-03 23:18:38.097427908 +0100 --- gdb-7.9.50.20150531.orig/gdb/common/common-exceptions.h 2015-05-31 03:48:29.000000000 +0200
+++ gdb-7.8.50.20141228/gdb/common/common-exceptions.h 2015-01-03 23:19:02.449556396 +0100 +++ gdb-7.9.50.20150531/gdb/common/common-exceptions.h 2015-05-31 20:07:35.093878692 +0200
@@ -99,6 +99,9 @@ enum errors { @@ -105,6 +105,9 @@ enum errors {
/* Requested feature, method, mechanism, etc. is not supported. */ "_ERROR" is appended to the name. */
NOT_SUPPORTED_ERROR, MAX_COMPLETIONS_REACHED_ERROR,
+ /* Attempt to load a core file as executable. */ + /* Attempt to load a core file as executable. */
+ IS_CORE_ERROR, + IS_CORE_ERROR,

View File

@ -9,12 +9,12 @@ Index: gdb-7.5.50.20130310/gdb/solib-svr4.c
- struct elf_build_id *build_id; - struct elf_build_id *build_id;
+ struct elf_build_id *build_id = NULL; + struct elf_build_id *build_id = NULL;
strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1); strncpy (newobj->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
/* May get overwritten below. */ /* May get overwritten below. */
strcpy (new->so_name, new->so_original_name); strcpy (newobj->so_name, newobj->so_original_name);
- build_id = build_id_addr_get (new->lm_info->l_ld); - build_id = build_id_addr_get (newobj->lm_info->l_ld);
+ /* In the case the main executable was found according to its build-id + /* In the case the main executable was found according to its build-id
+ (from a core file) prevent loading a different build of a library + (from a core file) prevent loading a different build of a library
+ with accidentally the same SO_NAME. + with accidentally the same SO_NAME.
@ -28,7 +28,7 @@ Index: gdb-7.5.50.20130310/gdb/solib-svr4.c
+ to the only existing file loaded that time - the executable. */ + to the only existing file loaded that time - the executable. */
+ if (symfile_objfile != NULL + if (symfile_objfile != NULL
+ && (symfile_objfile->flags & OBJF_BUILD_ID_CORE_LOADED) != 0) + && (symfile_objfile->flags & OBJF_BUILD_ID_CORE_LOADED) != 0)
+ build_id = build_id_addr_get (new->lm_info->l_ld); + build_id = build_id_addr_get (newobj->lm_info->l_ld);
if (build_id != NULL) if (build_id != NULL)
{ {
char *name, *build_id_filename; char *name, *build_id_filename;
@ -37,7 +37,7 @@ Index: gdb-7.5.50.20130310/gdb/solib-svr4.c
} }
else else
- { - {
- debug_print_missing (new->so_name, build_id_filename); - debug_print_missing (newobj->so_name, build_id_filename);
- -
- /* In the case the main executable was found according to - /* In the case the main executable was found according to
- its build-id (from a core file) prevent loading - its build-id (from a core file) prevent loading
@ -51,9 +51,9 @@ Index: gdb-7.5.50.20130310/gdb/solib-svr4.c
- if (symfile_objfile != NULL - if (symfile_objfile != NULL
- && (symfile_objfile->flags - && (symfile_objfile->flags
- & OBJF_BUILD_ID_CORE_LOADED) != 0) - & OBJF_BUILD_ID_CORE_LOADED) != 0)
- new->so_name[0] = 0; - newobj->so_name[0] = 0;
- } - }
+ debug_print_missing (new->so_name, build_id_filename); + debug_print_missing (newobj->so_name, build_id_filename);
xfree (build_id_filename); xfree (build_id_filename);
xfree (build_id); xfree (build_id);

View File

@ -1,7 +1,7 @@
Index: gdb-7.8.50.20141228/gdb/corelow.c Index: gdb-7.9.50.20150520/gdb/corelow.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/corelow.c 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/corelow.c 2015-05-31 16:38:55.123112227 +0200
+++ gdb-7.8.50.20141228/gdb/corelow.c 2015-01-03 23:12:08.691349454 +0100 +++ gdb-7.9.50.20150520/gdb/corelow.c 2015-05-31 16:38:57.601130366 +0200
@@ -45,6 +45,10 @@ @@ -45,6 +45,10 @@
#include "gdb_bfd.h" #include "gdb_bfd.h"
#include "completer.h" #include "completer.h"
@ -67,7 +67,7 @@ Index: gdb-7.8.50.20141228/gdb/corelow.c
/* This routine opens and sets up the core file bfd. */ /* This routine opens and sets up the core file bfd. */
static void static void
@@ -405,6 +456,14 @@ core_open (const char *arg, int from_tty @@ -404,6 +455,14 @@ core_open (const char *arg, int from_tty
switch_to_thread (thread->ptid); switch_to_thread (thread->ptid);
} }
@ -82,7 +82,7 @@ Index: gdb-7.8.50.20141228/gdb/corelow.c
post_create_inferior (&core_ops, from_tty); post_create_inferior (&core_ops, from_tty);
/* Now go through the target stack looking for threads since there /* Now go through the target stack looking for threads since there
@@ -1035,4 +1094,11 @@ _initialize_corelow (void) @@ -1058,4 +1117,11 @@ _initialize_corelow (void)
init_core_ops (); init_core_ops ();
add_target_with_completer (&core_ops, filename_completer); add_target_with_completer (&core_ops, filename_completer);
@ -94,11 +94,11 @@ Index: gdb-7.8.50.20141228/gdb/corelow.c
+ NULL, NULL, NULL, + NULL, NULL, NULL,
+ &setlist, &showlist); + &setlist, &showlist);
} }
Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo Index: gdb-7.9.50.20150520/gdb/doc/gdb.texinfo
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/doc/gdb.texinfo 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/doc/gdb.texinfo 2015-05-31 16:38:55.137112330 +0200
+++ gdb-7.8.50.20141228/gdb/doc/gdb.texinfo 2015-01-03 23:12:08.701349509 +0100 +++ gdb-7.9.50.20150520/gdb/doc/gdb.texinfo 2015-05-31 16:38:57.612130447 +0200
@@ -17930,6 +17930,27 @@ information files. @@ -18254,6 +18254,27 @@ information files.
@end table @end table
@ -126,10 +126,10 @@ Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo
@cindex @code{.gnu_debuglink} sections @cindex @code{.gnu_debuglink} sections
@cindex debug link sections @cindex debug link sections
A debug link is a special section of the executable file named A debug link is a special section of the executable file named
Index: gdb-7.8.50.20141228/gdb/solib-svr4.c Index: gdb-7.9.50.20150520/gdb/solib-svr4.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/solib-svr4.c 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/solib-svr4.c 2015-05-31 16:38:55.142112366 +0200
+++ gdb-7.8.50.20141228/gdb/solib-svr4.c 2015-01-03 23:12:08.702349514 +0100 +++ gdb-7.9.50.20150520/gdb/solib-svr4.c 2015-05-31 16:40:33.593819702 +0200
@@ -45,6 +45,7 @@ @@ -45,6 +45,7 @@
#include "auxv.h" #include "auxv.h"
#include "gdb_bfd.h" #include "gdb_bfd.h"
@ -138,22 +138,22 @@ Index: gdb-7.8.50.20141228/gdb/solib-svr4.c
static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
static int svr4_have_link_map_offsets (void); static int svr4_have_link_map_offsets (void);
@@ -1366,9 +1367,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD @@ -1379,9 +1380,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
continue; continue;
} }
- strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1); - strncpy (newobj->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
- new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; - newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
- strcpy (new->so_original_name, new->so_name); - strcpy (newobj->so_original_name, newobj->so_name);
+ { + {
+ struct elf_build_id *build_id; + struct elf_build_id *build_id;
+ +
+ strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1); + strncpy (newobj->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
+ new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; + newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
+ /* May get overwritten below. */ + /* May get overwritten below. */
+ strcpy (new->so_name, new->so_original_name); + strcpy (newobj->so_name, newobj->so_original_name);
+ +
+ build_id = build_id_addr_get (new->lm_info->l_ld); + build_id = build_id_addr_get (newobj->lm_info->l_ld);
+ if (build_id != NULL) + if (build_id != NULL)
+ { + {
+ char *name, *build_id_filename; + char *name, *build_id_filename;
@ -163,13 +163,13 @@ Index: gdb-7.8.50.20141228/gdb/solib-svr4.c
+ name = build_id_to_filename (build_id, &build_id_filename); + name = build_id_to_filename (build_id, &build_id_filename);
+ if (name != NULL) + if (name != NULL)
+ { + {
+ strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1); + strncpy (newobj->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
+ new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; + newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
+ xfree (name); + xfree (name);
+ } + }
+ else + else
+ { + {
+ debug_print_missing (new->so_name, build_id_filename); + debug_print_missing (newobj->so_name, build_id_filename);
+ +
+ /* In the case the main executable was found according to + /* In the case the main executable was found according to
+ its build-id (from a core file) prevent loading + its build-id (from a core file) prevent loading
@ -183,7 +183,7 @@ Index: gdb-7.8.50.20141228/gdb/solib-svr4.c
+ if (symfile_objfile != NULL + if (symfile_objfile != NULL
+ && (symfile_objfile->flags + && (symfile_objfile->flags
+ & OBJF_BUILD_ID_CORE_LOADED) != 0) + & OBJF_BUILD_ID_CORE_LOADED) != 0)
+ new->so_name[0] = 0; + newobj->so_name[0] = 0;
+ } + }
+ +
+ xfree (build_id_filename); + xfree (build_id_filename);
@ -194,11 +194,11 @@ Index: gdb-7.8.50.20141228/gdb/solib-svr4.c
xfree (buffer); xfree (buffer);
/* If this entry has no name, or its name matches the name /* If this entry has no name, or its name matches the name
Index: gdb-7.8.50.20141228/gdb/elfread.c Index: gdb-7.9.50.20150520/gdb/elfread.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/elfread.c 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/elfread.c 2015-05-31 16:38:55.143112374 +0200
+++ gdb-7.8.50.20141228/gdb/elfread.c 2015-01-03 23:12:08.703349519 +0100 +++ gdb-7.9.50.20150520/gdb/elfread.c 2015-05-31 16:38:57.614130462 +0200
@@ -1339,9 +1339,10 @@ elf_symfile_read (struct objfile *objfil @@ -1341,9 +1341,10 @@ elf_symfile_read (struct objfile *objfil
&& objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile == NULL
&& objfile->separate_debug_objfile_backlink == NULL) && objfile->separate_debug_objfile_backlink == NULL)
{ {
@ -211,7 +211,7 @@ Index: gdb-7.8.50.20141228/gdb/elfread.c
if (debugfile == NULL) if (debugfile == NULL)
debugfile = find_separate_debug_file_by_debuglink (objfile); debugfile = find_separate_debug_file_by_debuglink (objfile);
@@ -1355,6 +1356,12 @@ elf_symfile_read (struct objfile *objfil @@ -1357,6 +1358,12 @@ elf_symfile_read (struct objfile *objfil
symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile); symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile);
do_cleanups (cleanup); do_cleanups (cleanup);
} }
@ -224,11 +224,11 @@ Index: gdb-7.8.50.20141228/gdb/elfread.c
} }
} }
Index: gdb-7.8.50.20141228/gdb/symfile.h Index: gdb-7.9.50.20150520/gdb/symfile.h
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/symfile.h 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/symfile.h 2015-05-31 16:38:55.143112374 +0200
+++ gdb-7.8.50.20141228/gdb/symfile.h 2015-01-03 23:12:08.703349519 +0100 +++ gdb-7.9.50.20150520/gdb/symfile.h 2015-05-31 16:38:57.614130462 +0200
@@ -574,6 +574,10 @@ void expand_symtabs_matching (expand_sym @@ -584,6 +584,10 @@ void expand_symtabs_matching (expand_sym
void map_symbol_filenames (symbol_filename_ftype *fun, void *data, void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
int need_fullname); int need_fullname);
@ -239,11 +239,11 @@ Index: gdb-7.8.50.20141228/gdb/symfile.h
/* From dwarf2read.c */ /* From dwarf2read.c */
/* Names for a dwarf2 debugging section. The field NORMAL is the normal /* Names for a dwarf2 debugging section. The field NORMAL is the normal
Index: gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp Index: gdb-7.9.50.20150520/gdb/testsuite/lib/gdb.exp
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/gdb.exp 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/testsuite/lib/gdb.exp 2015-05-31 16:38:55.145112388 +0200
+++ gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp 2015-01-03 23:12:08.704349525 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/lib/gdb.exp 2015-05-31 16:38:57.615130469 +0200
@@ -1522,6 +1522,16 @@ proc default_gdb_start { } { @@ -1573,6 +1573,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0." warning "Couldn't set the width to 0."
} }
} }
@ -260,10 +260,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp
return 0 return 0
} }
Index: gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp Index: gdb-7.9.50.20150520/gdb/testsuite/lib/mi-support.exp
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/mi-support.exp 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/testsuite/lib/mi-support.exp 2015-05-31 16:38:55.146112396 +0200
+++ gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp 2015-01-03 23:12:08.705349530 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/lib/mi-support.exp 2015-05-31 16:38:57.616130476 +0200
@@ -214,6 +214,16 @@ proc default_mi_gdb_start { args } { @@ -214,6 +214,16 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0." warning "Couldn't set the width to 0."
} }
@ -281,10 +281,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp
# If allowing the inferior to have its own PTY then assign the inferior # If allowing the inferior to have its own PTY then assign the inferior
# its own terminal device here. # its own terminal device here.
if { $separate_inferior_pty } { if { $separate_inferior_pty } {
Index: gdb-7.8.50.20141228/gdb/objfiles.h Index: gdb-7.9.50.20150520/gdb/objfiles.h
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/objfiles.h 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/objfiles.h 2015-05-31 16:38:55.147112403 +0200
+++ gdb-7.8.50.20141228/gdb/objfiles.h 2015-01-03 23:12:08.705349530 +0100 +++ gdb-7.9.50.20150520/gdb/objfiles.h 2015-05-31 16:38:57.616130476 +0200
@@ -459,6 +459,10 @@ struct objfile @@ -459,6 +459,10 @@ struct objfile
#define OBJF_NOT_FILENAME (1 << 6) #define OBJF_NOT_FILENAME (1 << 6)
@ -296,10 +296,10 @@ Index: gdb-7.8.50.20141228/gdb/objfiles.h
/* Declarations for functions defined in objfiles.c */ /* Declarations for functions defined in objfiles.c */
extern struct objfile *allocate_objfile (bfd *, const char *name, int); extern struct objfile *allocate_objfile (bfd *, const char *name, int);
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.base/corefile.exp
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/testsuite/gdb.base/corefile.exp 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/testsuite/gdb.base/corefile.exp 2015-05-31 16:38:55.147112403 +0200
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp 2015-01-03 23:12:08.705349530 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.base/corefile.exp 2015-05-31 16:38:57.616130476 +0200
@@ -293,3 +293,33 @@ gdb_test_multiple "core-file $corefile" @@ -293,3 +293,33 @@ gdb_test_multiple "core-file $corefile"
pass $test pass $test
} }
@ -334,14 +334,14 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp
+ gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*" + gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*"
+ pass $wholetest + pass $wholetest
+} +}
Index: gdb-7.8.50.20141228/gdb/build-id.c Index: gdb-7.9.50.20150520/gdb/build-id.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/build-id.c 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/build-id.c 2015-05-31 16:38:55.148112410 +0200
+++ gdb-7.8.50.20141228/gdb/build-id.c 2015-01-03 23:12:40.792523085 +0100 +++ gdb-7.9.50.20150520/gdb/build-id.c 2015-05-31 16:45:35.025722142 +0200
@@ -26,11 +26,64 @@ @@ -27,11 +27,63 @@
#include "symfile.h"
#include "objfiles.h" #include "objfiles.h"
#include "filenames.h" #include "filenames.h"
#include "gdbcore.h"
+#include "libbfd.h" +#include "libbfd.h"
+#include "gdbcore.h" +#include "gdbcore.h"
+#include "gdbcmd.h" +#include "gdbcmd.h"
@ -359,8 +359,6 @@ Index: gdb-7.8.50.20141228/gdb/build-id.c
+ fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"), + fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"),
+ value); + value);
+} +}
-/* See build-id.h. */
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename. +/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */ + FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
+ +
@ -389,23 +387,23 @@ Index: gdb-7.8.50.20141228/gdb/build-id.c
+ retval = xmalloc (sizeof *retval - 1 + size); + retval = xmalloc (sizeof *retval - 1 + size);
+ retval->size = size; + retval->size = size;
+ memcpy (retval->data, data, size); + memcpy (retval->data, data, size);
+
+ return retval; + return retval;
+ } + }
+ p = descdata + BFD_ALIGN (descsz, 4); + p = descdata + BFD_ALIGN (descsz, 4);
+ } + }
+ return NULL; + return NULL;
+} +}
+
+/* See build-id.h. */ /* See build-id.h. */
+
const struct elf_build_id * const struct elf_build_id *
-build_id_bfd_get (bfd *abfd) -build_id_bfd_get (bfd *abfd)
+build_id_bfd_shdr_get (bfd *abfd) +build_id_bfd_shdr_get (bfd *abfd)
{ {
if (!bfd_check_format (abfd, bfd_object) if (!bfd_check_format (abfd, bfd_object)
|| bfd_get_flavour (abfd) != bfd_target_elf_flavour || bfd_get_flavour (abfd) != bfd_target_elf_flavour
@@ -44,6 +97,348 @@ build_id_bfd_get (bfd *abfd) @@ -45,6 +97,348 @@ build_id_bfd_get (bfd *abfd)
return elf_tdata (abfd)->build_id; return elf_tdata (abfd)->build_id;
} }
@ -754,7 +752,7 @@ Index: gdb-7.8.50.20141228/gdb/build-id.c
/* See build-id.h. */ /* See build-id.h. */
int int
@@ -52,7 +447,7 @@ build_id_verify (bfd *abfd, size_t check @@ -53,7 +447,7 @@ build_id_verify (bfd *abfd, size_t check
const struct elf_build_id *found; const struct elf_build_id *found;
int retval = 0; int retval = 0;
@ -763,7 +761,7 @@ Index: gdb-7.8.50.20141228/gdb/build-id.c
if (found == NULL) if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"), warning (_("File \"%s\" has no build-id, file skipped"),
@@ -67,20 +462,56 @@ build_id_verify (bfd *abfd, size_t check @@ -68,20 +462,56 @@ build_id_verify (bfd *abfd, size_t check
return retval; return retval;
} }
@ -824,7 +822,7 @@ Index: gdb-7.8.50.20141228/gdb/build-id.c
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
cause "/.build-id/..." lookups. */ cause "/.build-id/..." lookups. */
@@ -93,8 +524,11 @@ build_id_to_debug_bfd (size_t build_id_l @@ -94,8 +524,11 @@ build_id_to_debug_bfd (size_t build_id_l
size_t debugdir_len = strlen (debugdir); size_t debugdir_len = strlen (debugdir);
const gdb_byte *data = build_id; const gdb_byte *data = build_id;
size_t size = build_id_len; size_t size = build_id_len;
@ -837,7 +835,7 @@ Index: gdb-7.8.50.20141228/gdb/build-id.c
memcpy (link, debugdir, debugdir_len); memcpy (link, debugdir, debugdir_len);
s = &link[debugdir_len]; s = &link[debugdir_len];
@@ -108,44 +542,282 @@ build_id_to_debug_bfd (size_t build_id_l @@ -109,44 +542,282 @@ build_id_to_debug_bfd (size_t build_id_l
*s++ = '/'; *s++ = '/';
while (size-- > 0) while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++); s += sprintf (s, "%02x", (unsigned) *data++);
@ -884,7 +882,7 @@ Index: gdb-7.8.50.20141228/gdb/build-id.c
+ continue; + continue;
+ +
+ /* We expect to be silent on the non-existing files. */ + /* We expect to be silent on the non-existing files. */
+ abfd = gdb_bfd_open_maybe_remote (filename); + abfd = gdb_bfd_open (filename, gnutarget, -1);
+ if (abfd == NULL) + if (abfd == NULL)
+ { + {
+ xfree (filename); + xfree (filename);
@ -897,7 +895,7 @@ Index: gdb-7.8.50.20141228/gdb/build-id.c
+ break; + break;
- /* We expect to be silent on the non-existing files. */ - /* We expect to be silent on the non-existing files. */
- abfd = gdb_bfd_open_maybe_remote (filename); - abfd = gdb_bfd_open (filename, gnutarget, -1);
- if (abfd == NULL) - if (abfd == NULL)
- continue; - continue;
+ gdb_bfd_unref (abfd); + gdb_bfd_unref (abfd);
@ -1137,7 +1135,7 @@ Index: gdb-7.8.50.20141228/gdb/build-id.c
/* Prevent looping on a stripped .debug file. */ /* Prevent looping on a stripped .debug file. */
if (abfd != NULL if (abfd != NULL
&& filename_cmp (bfd_get_filename (abfd), && filename_cmp (bfd_get_filename (abfd),
@@ -165,3 +837,21 @@ find_separate_debug_file_by_buildid (str @@ -166,3 +837,21 @@ find_separate_debug_file_by_buildid (str
} }
return NULL; return NULL;
} }
@ -1159,10 +1157,10 @@ Index: gdb-7.8.50.20141228/gdb/build-id.c
+ +
+ observer_attach_executable_changed (debug_print_executable_changed); + observer_attach_executable_changed (debug_print_executable_changed);
+} +}
Index: gdb-7.8.50.20141228/gdb/build-id.h Index: gdb-7.9.50.20150520/gdb/build-id.h
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/build-id.h 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/build-id.h 2015-05-31 16:38:55.149112418 +0200
+++ gdb-7.8.50.20141228/gdb/build-id.h 2015-01-03 23:12:08.706349536 +0100 +++ gdb-7.9.50.20150520/gdb/build-id.h 2015-05-31 16:38:57.618130491 +0200
@@ -20,9 +20,10 @@ @@ -20,9 +20,10 @@
#ifndef BUILD_ID_H #ifndef BUILD_ID_H
#define BUILD_ID_H #define BUILD_ID_H
@ -1197,11 +1195,11 @@ Index: gdb-7.8.50.20141228/gdb/build-id.h
+ char **build_id_filename_return); + char **build_id_filename_return);
#endif /* BUILD_ID_H */ #endif /* BUILD_ID_H */
Index: gdb-7.8.50.20141228/gdb/dwarf2read.c Index: gdb-7.9.50.20150520/gdb/dwarf2read.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/dwarf2read.c 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/dwarf2read.c 2015-05-31 16:38:55.156112469 +0200
+++ gdb-7.8.50.20141228/gdb/dwarf2read.c 2015-01-03 23:12:08.711349563 +0100 +++ gdb-7.9.50.20150520/gdb/dwarf2read.c 2015-05-31 16:38:57.623130528 +0200
@@ -2443,7 +2443,7 @@ dwarf2_get_dwz_file (void) @@ -2504,7 +2504,7 @@ dwarf2_get_dwz_file (void)
} }
if (dwz_bfd == NULL) if (dwz_bfd == NULL)
@ -1210,20 +1208,20 @@ Index: gdb-7.8.50.20141228/gdb/dwarf2read.c
if (dwz_bfd == NULL) if (dwz_bfd == NULL)
error (_("could not find '.gnu_debugaltlink' file for %s"), error (_("could not find '.gnu_debugaltlink' file for %s"),
Index: gdb-7.8.50.20141228/gdb/python/py-objfile.c Index: gdb-7.9.50.20150520/gdb/python/py-objfile.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/python/py-objfile.c 2015-01-03 23:11:54.018270090 +0100 --- gdb-7.9.50.20150520.orig/gdb/python/py-objfile.c 2015-05-31 16:38:55.157112476 +0200
+++ gdb-7.8.50.20141228/gdb/python/py-objfile.c 2015-01-03 23:12:08.712349568 +0100 +++ gdb-7.9.50.20150520/gdb/python/py-objfile.c 2015-05-31 16:38:57.623130528 +0200
@@ -118,7 +118,7 @@ objfpy_get_build_id (PyObject *self, voi @@ -140,7 +140,7 @@ objfpy_get_build_id (PyObject *self, voi
TRY_CATCH (except, RETURN_MASK_ALL) TRY
{ {
- build_id = build_id_bfd_get (objfile->obfd); - build_id = build_id_bfd_get (objfile->obfd);
+ build_id = build_id_bfd_shdr_get (objfile->obfd); + build_id = build_id_bfd_shdr_get (objfile->obfd);
} }
GDB_PY_HANDLE_EXCEPTION (except); CATCH (except, RETURN_MASK_ALL)
{
@@ -467,7 +467,7 @@ objfpy_lookup_objfile_by_build_id (const @@ -549,7 +549,7 @@ objfpy_lookup_objfile_by_build_id (const
/* Don't return separate debug files. */ /* Don't return separate debug files. */
if (objfile->separate_debug_objfile_backlink != NULL) if (objfile->separate_debug_objfile_backlink != NULL)
continue; continue;

View File

@ -3,10 +3,10 @@
Port to GDB-6.8pre. Port to GDB-6.8pre.
Remove the `[' character from the GDB-6.8 default message. Remove the `[' character from the GDB-6.8 default message.
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.c Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.c 2015-01-06 19:31:40.703988534 +0100 +++ gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.c 2015-05-31 18:23:49.008450716 +0200
@@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
+/* This testcase is part of GDB, the GNU debugger. +/* This testcase is part of GDB, the GNU debugger.
+ +
@ -65,10 +65,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.c
+ } + }
+ return 0; + return 0;
+} +}
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.exp Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.exp 2015-01-06 19:31:40.704988538 +0100 +++ gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.exp 2015-05-31 18:23:49.008450716 +0200
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
+# Copyright 2007 Free Software Foundation, Inc. +# Copyright 2007 Free Software Foundation, Inc.
+ +
@ -106,16 +106,16 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.exp
+gdb_test "" \ +gdb_test "" \
+ "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \ + "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \
+ "Info message caught" + "Info message caught"
Index: gdb-7.8.50.20141228/gdb/infrun.c Index: gdb-7.9.50.20150531/gdb/infrun.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/infrun.c 2015-01-06 19:31:40.262986644 +0100 --- gdb-7.9.50.20150531.orig/gdb/infrun.c 2015-05-31 18:23:41.703405617 +0200
+++ gdb-7.8.50.20141228/gdb/infrun.c 2015-01-06 19:43:54.865219096 +0100 +++ gdb-7.9.50.20150531/gdb/infrun.c 2015-05-31 18:23:49.011450735 +0200
@@ -456,7 +456,7 @@ holding the child stopped. Try \"set de @@ -443,7 +443,7 @@ holding the child stopped. Try \"set de
remove_breakpoints_pid (ptid_get_pid (inferior_ptid)); remove_breakpoints_pid (ptid_get_pid (inferior_ptid));
} }
- if (info_verbose || debug_infrun) - if (info_verbose || debug_infrun)
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_infrun) + if (1 /* Fedora Bug 235197 */ || info_verbose || debug_infrun)
{ {
target_terminal_ours_for_output (); /* Ensure that we have a process ptid. */
fprintf_filtered (gdb_stdlog, ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid));

View File

@ -1,217 +0,0 @@
2007-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
* inferior.h (enum resume_step): New definition.
(resume): Change STEP parameter type to ENUM RESUME_STEP.
* infrun.c (resume): Likewise. Extend debug printing of the STEP
parameter. Lock the scheduler only for intentional stepping.
(proceed): Replace the variable ONESTEP with tristate RESUME_STEP.
Set the third RESUME_STEP state according to BPSTAT_SHOULD_STEP.
(currently_stepping): Change the return type to ENUM RESUME_STEP.
Return RESUME_STEP_NEEDED if it is just due to BPSTAT_SHOULD_STEP.
* linux-nat.c (select_singlestep_lwp_callback): Do not focus on
the software watchpoint events.
* linux-nat.h (struct lwp_info): Redeclare STEP as ENUM RESUME_STEP.
2007-10-19 Jan Kratochvil <jan.kratochvil@redhat.com>
* infrun.c (proceed): RESUME_STEP initialized for non-stepping.
RESUME_STEP set according to STEP only at the end of the function.
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
Index: gdb-7.8.90.20150125/gdb/infrun.c
===================================================================
--- gdb-7.8.90.20150125.orig/gdb/infrun.c 2015-01-25 08:36:16.651716159 +0100
+++ gdb-7.8.90.20150125/gdb/infrun.c 2015-01-25 08:36:26.491758571 +0100
@@ -86,7 +86,7 @@ static void follow_inferior_reset_breakp
static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c);
-static int currently_stepping (struct thread_info *tp);
+static enum resume_step currently_stepping (struct thread_info *tp);
static void xdb_handle_command (char *args, int from_tty);
@@ -1998,7 +1998,7 @@ user_visible_resume_ptid (int step)
resume_ptid = inferior_ptid;
}
else if ((scheduler_mode == schedlock_on)
- || (scheduler_mode == schedlock_step && step))
+ || (scheduler_mode == schedlock_step && step == RESUME_STEP_USER))
{
/* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid;
@@ -2022,7 +2022,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
-resume (int step, enum gdb_signal sig)
+resume (enum resume_step step, enum gdb_signal sig)
{
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
struct regcache *regcache = get_current_regcache ();
@@ -2064,9 +2064,13 @@ resume (int step, enum gdb_signal sig)
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
- "infrun: resume (step=%d, signal=%s), "
+ "infrun: resume (step=%s, signal=%s), "
"trap_expected=%d, current thread [%s] at %s\n",
- step, gdb_signal_to_symbol_string (sig),
+ (step == RESUME_STEP_CONTINUE
+ ? "RESUME_STEP_CONTINUE"
+ : (step == RESUME_STEP_USER ? "RESUME_STEP_USER"
+ : "RESUME_STEP_NEEDED")),
+ gdb_signal_to_symbol_string (sig),
tp->control.trap_expected,
target_pid_to_str (inferior_ptid),
paddress (gdbarch, pc));
@@ -2543,6 +2547,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
struct thread_info *tp;
CORE_ADDR pc;
struct address_space *aspace;
+ enum resume_step resume_step = RESUME_STEP_CONTINUE;
/* If we're stopped at a fork/vfork, follow the branch set by the
"set follow-fork-mode" command; otherwise, we'll just proceed
@@ -2586,13 +2591,19 @@ proceed (CORE_ADDR addr, enum gdb_signal
Note, we don't do this in reverse, because we won't
actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */
+ {
tp->stepping_over_breakpoint = 1;
+ resume_step = RESUME_STEP_USER;
+ }
else if (gdbarch_single_step_through_delay_p (gdbarch)
&& gdbarch_single_step_through_delay (gdbarch,
get_current_frame ()))
/* We stepped onto an instruction that needs to be stepped
again before re-inserting the breakpoint, do so. */
+ {
tp->stepping_over_breakpoint = 1;
+ resume_step = RESUME_STEP_USER;
+ }
}
else
{
@@ -2647,6 +2658,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
tp->prev_pc = regcache_read_pc (get_current_regcache ());
switch_to_thread (step_over->ptid);
tp = step_over;
+ resume_step = RESUME_STEP_USER;
}
}
@@ -2699,9 +2711,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
correctly when the inferior is stopped. */
tp->prev_pc = regcache_read_pc (get_current_regcache ());
+ if (tp->control.trap_expected || step)
+ resume_step = RESUME_STEP_USER;
+ if (resume_step == RESUME_STEP_CONTINUE && bpstat_should_step ())
+ resume_step = RESUME_STEP_NEEDED;
+
/* Resume inferior. */
- resume (tp->control.trap_expected || step || bpstat_should_step (),
- tp->suspend.stop_signal);
+ resume (resume_step, tp->suspend.stop_signal);
/* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */
@@ -5684,14 +5700,16 @@ switch_back_to_stepped_thread (struct ex
/* Is thread TP in the middle of single-stepping? */
-static int
+static enum resume_step
currently_stepping (struct thread_info *tp)
{
- return ((tp->control.step_range_end
+ if ((tp->control.step_range_end
&& tp->control.step_resume_breakpoint == NULL)
- || tp->control.trap_expected
- || tp->stepped_breakpoint
- || bpstat_should_step ());
+ || tp->control.trap_expected)
+ return RESUME_STEP_USER;
+ if (bpstat_should_step ())
+ return RESUME_STEP_NEEDED;
+ return RESUME_STEP_CONTINUE;
}
/* Inferior has stepped into a subroutine call with source code that
Index: gdb-7.8.90.20150125/gdb/linux-nat.c
===================================================================
--- gdb-7.8.90.20150125.orig/gdb/linux-nat.c 2015-01-25 08:36:16.653716168 +0100
+++ gdb-7.8.90.20150125/gdb/linux-nat.c 2015-01-25 08:36:26.492758576 +0100
@@ -2648,7 +2648,11 @@ static int
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
{
if (lp->last_resume_kind == resume_step
- && lp->status != 0)
+ && lp->status != 0
+ /* We do not focus on software watchpoints as we would not catch
+ STEPPING_PAST_SINGLESTEP_BREAKPOINT breakpoints in some other thread
+ as they would remain pending due to `Push back breakpoint for %s'. */
+ && lp->step == RESUME_STEP_USER)
return 1;
else
return 0;
Index: gdb-7.8.90.20150125/gdb/linux-nat.h
===================================================================
--- gdb-7.8.90.20150125.orig/gdb/linux-nat.h 2015-01-25 08:36:16.653716168 +0100
+++ gdb-7.8.90.20150125/gdb/linux-nat.h 2015-01-25 08:36:44.948838126 +0100
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "target.h"
+#include "infrun.h"
#include <signal.h>
@@ -88,8 +89,8 @@ struct lwp_info
running and not stepping, this is 0. */
CORE_ADDR stop_pc;
- /* Non-zero if we were stepping this LWP. */
- int step;
+ /* The kind of stepping of this LWP. */
+ enum resume_step step;
/* The reason the LWP last stopped, if we need to track it
(breakpoint, watchpoint, etc.) */
Index: gdb-7.8.90.20150125/gdb/infrun.h
===================================================================
--- gdb-7.8.90.20150125.orig/gdb/infrun.h 2015-01-25 08:36:16.654716172 +0100
+++ gdb-7.8.90.20150125/gdb/infrun.h 2015-01-25 08:36:26.493758580 +0100
@@ -92,7 +92,14 @@ extern void proceed (CORE_ADDR, enum gdb
/* The `resume' routine should only be called in special circumstances.
Normally, use `proceed', which handles a lot of bookkeeping. */
-extern void resume (int, enum gdb_signal);
+enum resume_step
+ {
+ /* currently_stepping () should return non-zero for non-continue. */
+ RESUME_STEP_CONTINUE = 0,
+ RESUME_STEP_USER, /* Stepping is intentional by the user. */
+ RESUME_STEP_NEEDED /* Stepping only for software watchpoints. */
+ };
+extern void resume (enum resume_step, enum gdb_signal);
/* Return a ptid representing the set of threads that we will proceed,
in the perspective of the user/frontend. */
Index: gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
===================================================================
--- gdb-7.8.90.20150125.orig/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp 2015-01-25 08:36:16.654716172 +0100
+++ gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp 2015-01-25 08:36:26.493758580 +0100
@@ -97,7 +97,7 @@ gdb_test "set debug infrun 1"
gdb_test \
"step" \
- ".*need to step-over.*resume \\(step=1.*signal arrived while stepping over breakpoint.*switching back to stepped thread.*stepped to a different line.*callme.*" \
+ ".*need to step-over.*resume \\(step=RESUME_STEP_USER.*signal arrived while stepping over breakpoint.*switching back to stepped thread.*stepped to a different line.*callme.*" \
"step"
set cnt_after [get_value "args\[$my_number\]" "get count after step"]

View File

@ -1,8 +1,8 @@
Index: gdb-7.8.90.20150125/gdb/linux-nat.c Index: gdb-7.9.50.20150531/gdb/linux-nat.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/linux-nat.c 2015-01-25 08:42:49.381408899 +0100 --- gdb-7.9.50.20150531.orig/gdb/linux-nat.c 2015-05-31 18:23:56.147494790 +0200
+++ gdb-7.8.90.20150125/gdb/linux-nat.c 2015-01-25 08:43:16.378525322 +0100 +++ gdb-7.9.50.20150531/gdb/linux-nat.c 2015-05-31 18:24:01.935530759 +0200
@@ -174,6 +174,9 @@ blocked. */ @@ -168,6 +168,9 @@ blocked. */
static struct target_ops *linux_ops; static struct target_ops *linux_ops;
static struct target_ops linux_ops_saved; static struct target_ops linux_ops_saved;
@ -12,7 +12,7 @@ Index: gdb-7.8.90.20150125/gdb/linux-nat.c
/* The method to call, if any, when a new thread is attached. */ /* The method to call, if any, when a new thread is attached. */
static void (*linux_nat_new_thread) (struct lwp_info *); static void (*linux_nat_new_thread) (struct lwp_info *);
@@ -924,6 +927,7 @@ linux_nat_post_attach_wait (ptid_t ptid, @@ -981,6 +984,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
if (debug_linux_nat) if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog, fprintf_unfiltered (gdb_stdlog,
"LNPAW: Attaching to a stopped process\n"); "LNPAW: Attaching to a stopped process\n");
@ -20,7 +20,7 @@ Index: gdb-7.8.90.20150125/gdb/linux-nat.c
/* The process is definitely stopped. It is in a job control /* The process is definitely stopped. It is in a job control
stop, unless the kernel predates the TASK_STOPPED / stop, unless the kernel predates the TASK_STOPPED /
@@ -1424,6 +1428,9 @@ get_pending_status (struct lwp_info *lp, @@ -1468,6 +1472,9 @@ get_pending_status (struct lwp_info *lp,
gdb_signal_to_string (signo)); gdb_signal_to_string (signo));
} }
@ -30,7 +30,7 @@ Index: gdb-7.8.90.20150125/gdb/linux-nat.c
return 0; return 0;
} }
@@ -1537,6 +1544,8 @@ linux_nat_detach (struct target_ops *ops @@ -1581,6 +1588,8 @@ linux_nat_detach (struct target_ops *ops
} }
else else
linux_ops->to_detach (ops, args, from_tty); linux_ops->to_detach (ops, args, from_tty);
@ -39,7 +39,7 @@ Index: gdb-7.8.90.20150125/gdb/linux-nat.c
} }
/* Resume execution of the inferior process. If STEP is nonzero, /* Resume execution of the inferior process. If STEP is nonzero,
@@ -1741,6 +1750,14 @@ linux_nat_resume (struct target_ops *ops @@ -1839,6 +1848,14 @@ linux_nat_resume (struct target_ops *ops
return; return;
} }
@ -54,7 +54,7 @@ Index: gdb-7.8.90.20150125/gdb/linux-nat.c
if (resume_many) if (resume_many)
iterate_over_lwps (ptid, linux_nat_resume_callback, lp); iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
@@ -3723,6 +3740,8 @@ linux_nat_mourn_inferior (struct target_ @@ -3935,6 +3952,8 @@ linux_nat_mourn_inferior (struct target_
/* Let the arch-specific native code know this process is gone. */ /* Let the arch-specific native code know this process is gone. */
linux_nat_forget_process (pid); linux_nat_forget_process (pid);
@ -63,10 +63,10 @@ Index: gdb-7.8.90.20150125/gdb/linux-nat.c
} }
/* Convert a native/host siginfo object, into/from the siginfo in the /* Convert a native/host siginfo object, into/from the siginfo in the
Index: gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/attach-stopped.exp Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.threads/attach-stopped.exp
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-01-25 08:42:49.382408903 +0100 --- gdb-7.9.50.20150531.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-05-31 18:23:56.148494796 +0200
+++ gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-01-25 08:43:16.379525327 +0100 +++ gdb-7.9.50.20150531/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-05-31 18:24:01.935530759 +0200
@@ -61,7 +61,65 @@ proc corefunc { threadtype } { @@ -61,7 +61,65 @@ proc corefunc { threadtype } {
gdb_reinitialize_dir $srcdir/$subdir gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile} gdb_load ${binfile}
@ -134,12 +134,12 @@ Index: gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/attach-stopped.exp
set test "$threadtype: attach2 to stopped, after setting file" set test "$threadtype: attach2 to stopped, after setting file"
gdb_test_multiple "attach $testpid" "$test" { gdb_test_multiple "attach $testpid" "$test" {
Index: gdb-7.8.90.20150125/gdb/infrun.c Index: gdb-7.9.50.20150531/gdb/infrun.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/infrun.c 2015-01-25 08:42:49.385408916 +0100 --- gdb-7.9.50.20150531.orig/gdb/infrun.c 2015-05-31 18:23:56.150494809 +0200
+++ gdb-7.8.90.20150125/gdb/infrun.c 2015-01-25 08:43:16.381525335 +0100 +++ gdb-7.9.50.20150531/gdb/infrun.c 2015-05-31 18:24:01.938530778 +0200
@@ -600,6 +600,11 @@ holding the child stopped. Try \"set de @@ -591,6 +591,11 @@ holding the child stopped. Try \"set de
child_pid); target_pid_to_str (process_ptid));
} }
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly. + /* We should check PID_WAS_STOPPED and detach it stopped accordingly.

View File

@ -1,105 +0,0 @@
--- /dev/null 2009-04-19 14:49:00.974648389 +0200
+++ gdb-6.8/gdb/testsuite/gdb.arch/i386-biarch-core.exp 2009-04-19 16:30:12.000000000 +0200
@@ -0,0 +1,61 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2009 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Test ability to load an elf64-i386 core file. The provided core file was
+# elf64-x8664 one but it got binary patched to i386:
+# Elf32_Ehdr.e_machine @0x12..0x13
+# Elf64_Ehdr.e_machine @0x12..0x13
+# #define EM_386 3 /* Intel 80386 */
+# #define EM_X86_64 62 /* AMD x86-64 architecture */
+# patch @0x12: 0x3E -> 0x03
+
+if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then {
+ verbose "Skipping i386-biarch-core test."
+ return
+}
+
+set testfile "i386-biarch-core"
+set corebz2uufile ${srcdir}/${subdir}/${testfile}.core.bz2.uu
+set corefile ${objdir}/${subdir}/${testfile}.core
+# Entry point of the original executable.
+set address 0x400078
+
+if {[catch "system \"uudecode -o - ${corebz2uufile} | bzip2 -dc >${corefile}\""] != 0} {
+ untested "failed uudecode or bzip2"
+ return -1
+}
+file stat ${corefile} corestat
+if {$corestat(size) != 102400} {
+ untested "uudecode or bzip2 produce invalid result"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+# Wrongly built GDB complains by:
+# "..." is not a core dump: File format not recognized
+# As the provided test core has 64bit PRSTATUS i386 built GDB cannot parse it.
+# This is just a problem of the test care, real-world elf64-i386 file will have
+# 32bit PRSTATUS. One cannot prepare elf64-i386 core file from elf32-i386 by
+# objcopy as it corrupts the core file beyond all recognition.
+# "\r\nCore was generated by `\[^\r\n\]*'\\.\r\nProgram terminated with signal 11, Segmentation fault\\.\r\n.*"
+gdb_test "core-file ${corefile}"
+
+gdb_test "x/i $address" "\r\n\[ \t\]*$address:\[ \t\]*hlt\[ \t\]*" ".text is readable"
--- /dev/null 2009-04-19 14:49:00.974648389 +0200
+++ gdb-6.8/gdb/testsuite/gdb.arch/i386-biarch-core.S 2009-04-19 14:52:28.000000000 +0200
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+ .globl _start
+_start:
+ hlt
--- /dev/null 2009-04-19 14:49:00.974648389 +0200
+++ gdb-6.8/gdb/testsuite/gdb.arch/i386-biarch-core.core.bz2.uu 2009-04-19 15:02:12.000000000 +0200
@@ -0,0 +1,13 @@
+begin 600 i386-biarch-core.core.bz2
+M0EIH.3%!629361`P1\P`!)?_____\9'@"8Q)6P380'9@'&#`0D@``"``%(``
+M@`#`"!<(L`%F"(:$GH13::F-)M&D&U,AD:`--#)M0&FT0XR9--,)D9`P(Q-&
+M",(-&F``02)%38HT]0T`&AH```'H@``T^>9T*(,("&)SE`>`9@+GP=[,N)KB
+M'I8BL(L]N5TCY\%V]/?DB.BN*UZ'U@]TN7-]UJ5\_%0QTT<*086#%MHT7XVJ
+M9D"+C!"2*L:8D1XPD!`--M@*XT1H5RFYN&)(!0P0#:`I:;2;$5M&\*9"0@%:
+MK@X[T()M)9N7`D$VA!^63)%,;@8LT`(7\K&[7G;U:"B6'!GG+46ALOZF.2F-
+M!@>C*%86X$-]C2`KE;HG)UL(913VR2G]0BD:J=Z_`G@S,`W%.8RMS-#5P:J0
+MAJ2\8&X?@DE;UF68QHM<,D`('::J65/S:PAG*R-09["8DBI)'V]Y.[(/AM*L
+M"X_O^V;%FY.S6Q]FM=D37>5F,%4-F1ZF#,CFJVU;H*^IT<(%<V`.32$`JU["
+/G`68?\7<D4X4)`0,$?,`
+`
+end

View File

@ -5,11 +5,11 @@ Some of the threads may not be properly PTRACE_DETACHed which hurts if they
should have been detached with SIGSTOP (as they are accidentally left running should have been detached with SIGSTOP (as they are accidentally left running
on the debugger termination). on the debugger termination).
Index: gdb-7.7.90.20140613/gdb/defs.h Index: gdb-7.9.50.20150520/gdb/defs.h
=================================================================== ===================================================================
--- gdb-7.7.90.20140613.orig/gdb/defs.h 2014-06-13 23:10:18.876623018 +0200 --- gdb-7.9.50.20150520.orig/gdb/defs.h 2015-05-31 18:06:24.579002757 +0200
+++ gdb-7.7.90.20140613/gdb/defs.h 2014-06-13 23:10:52.450660505 +0200 +++ gdb-7.9.50.20150520/gdb/defs.h 2015-05-31 18:06:29.253031613 +0200
@@ -174,6 +174,7 @@ extern void set_quit_flag (void); @@ -145,6 +145,7 @@ extern void set_quit_flag (void);
/* Flag that function quit should call quit_force. */ /* Flag that function quit should call quit_force. */
extern volatile int sync_quit_force_run; extern volatile int sync_quit_force_run;
@ -17,13 +17,13 @@ Index: gdb-7.7.90.20140613/gdb/defs.h
extern int immediate_quit; extern int immediate_quit;
extern void quit (void); extern void quit (void);
Index: gdb-7.7.90.20140613/gdb/top.c Index: gdb-7.9.50.20150520/gdb/top.c
=================================================================== ===================================================================
--- gdb-7.7.90.20140613.orig/gdb/top.c 2014-06-13 23:10:15.910619715 +0200 --- gdb-7.9.50.20150520.orig/gdb/top.c 2015-05-31 18:06:24.580002763 +0200
+++ gdb-7.7.90.20140613/gdb/top.c 2014-06-13 23:10:18.877623020 +0200 +++ gdb-7.9.50.20150520/gdb/top.c 2015-05-31 18:06:29.254031619 +0200
@@ -1378,7 +1378,9 @@ quit_force (char *args, int from_tty) @@ -1463,7 +1463,9 @@ quit_force (char *args, int from_tty)
if (ex.reason < 0) \ qt.args = args;
exception_print (gdb_stderr, ex) qt.from_tty = from_tty;
- /* We want to handle any quit errors and exit regardless. */ - /* We want to handle any quit errors and exit regardless. */
+ /* We want to handle any quit errors and exit regardless but we should never + /* We want to handle any quit errors and exit regardless but we should never
@ -31,12 +31,12 @@ Index: gdb-7.7.90.20140613/gdb/top.c
+ quit_flag_cleanup = 1; + quit_flag_cleanup = 1;
/* Get out of tfind mode, and kill or detach all inferiors. */ /* Get out of tfind mode, and kill or detach all inferiors. */
DO_TRY TRY
Index: gdb-7.7.90.20140613/gdb/utils.c Index: gdb-7.9.50.20150520/gdb/utils.c
=================================================================== ===================================================================
--- gdb-7.7.90.20140613.orig/gdb/utils.c 2014-06-13 23:10:18.878623021 +0200 --- gdb-7.9.50.20150520.orig/gdb/utils.c 2015-05-31 18:06:24.582002776 +0200
+++ gdb-7.7.90.20140613/gdb/utils.c 2014-06-13 23:10:38.307644652 +0200 +++ gdb-7.9.50.20150520/gdb/utils.c 2015-05-31 18:06:29.255031625 +0200
@@ -125,6 +125,11 @@ int job_control; @@ -122,6 +122,11 @@ int job_control;
int immediate_quit; int immediate_quit;
@ -48,11 +48,11 @@ Index: gdb-7.7.90.20140613/gdb/utils.c
/* Nonzero means that strings with character values >0x7F should be printed /* Nonzero means that strings with character values >0x7F should be printed
as octal escapes. Zero means just print the value (e.g. it's an as octal escapes. Zero means just print the value (e.g. it's an
international character, and the terminal or window can cope.) */ international character, and the terminal or window can cope.) */
Index: gdb-7.7.90.20140613/gdb/extension.c Index: gdb-7.9.50.20150520/gdb/extension.c
=================================================================== ===================================================================
--- gdb-7.7.90.20140613.orig/gdb/extension.c 2014-06-13 03:59:36.000000000 +0200 --- gdb-7.9.50.20150520.orig/gdb/extension.c 2015-05-31 18:06:24.582002776 +0200
+++ gdb-7.7.90.20140613/gdb/extension.c 2014-06-13 23:11:32.434704853 +0200 +++ gdb-7.9.50.20150520/gdb/extension.c 2015-05-31 18:06:29.256031632 +0200
@@ -817,6 +817,9 @@ check_quit_flag (void) @@ -833,6 +833,9 @@ check_quit_flag (void)
int i, result = 0; int i, result = 0;
const struct extension_language_defn *extlang; const struct extension_language_defn *extlang;

View File

@ -1,11 +1,11 @@
Index: gdb-7.6.90.20140127/gdb/gdb_bfd.c Index: gdb-7.9.50.20150520/gdb/gdb_bfd.c
=================================================================== ===================================================================
--- gdb-7.6.90.20140127.orig/gdb/gdb_bfd.c 2014-02-06 17:39:46.370096290 +0100 --- gdb-7.9.50.20150520.orig/gdb/gdb_bfd.c 2015-05-31 17:02:57.742303086 +0200
+++ gdb-7.6.90.20140127/gdb/gdb_bfd.c 2014-02-06 17:40:14.996127247 +0100 +++ gdb-7.9.50.20150520/gdb/gdb_bfd.c 2015-05-31 17:03:20.145444480 +0200
@@ -29,12 +29,14 @@ @@ -24,12 +24,14 @@
#ifdef HAVE_ZLIB_H #include "hashtab.h"
#include <zlib.h> #include "filestuff.h"
#endif #include "vec.h"
+#ifndef __sparc__ +#ifndef __sparc__
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
#include <sys/mman.h> #include <sys/mman.h>
@ -14,10 +14,10 @@ Index: gdb-7.6.90.20140127/gdb/gdb_bfd.c
#endif #endif
#endif #endif
+#endif +#endif
#include "target.h"
#include "gdb/fileio.h"
typedef bfd *bfdp; @@ -408,6 +410,7 @@ free_one_bfd_section (bfd *abfd, asectio
DEF_VEC_P (bfdp);
@@ -210,6 +212,7 @@ free_one_bfd_section (bfd *abfd, asectio
if (sect != NULL && sect->data != NULL) if (sect != NULL && sect->data != NULL)
{ {
@ -25,7 +25,7 @@ Index: gdb-7.6.90.20140127/gdb/gdb_bfd.c
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
if (sect->map_addr != NULL) if (sect->map_addr != NULL)
{ {
@@ -220,6 +223,7 @@ free_one_bfd_section (bfd *abfd, asectio @@ -418,6 +421,7 @@ free_one_bfd_section (bfd *abfd, asectio
} }
else else
#endif #endif
@ -33,7 +33,7 @@ Index: gdb-7.6.90.20140127/gdb/gdb_bfd.c
xfree (sect->data); xfree (sect->data);
} }
} }
@@ -371,6 +375,7 @@ gdb_bfd_map_section (asection *sectp, bf @@ -569,6 +573,7 @@ gdb_bfd_map_section (asection *sectp, bf
if (descriptor->data != NULL) if (descriptor->data != NULL)
goto done; goto done;
@ -41,7 +41,7 @@ Index: gdb-7.6.90.20140127/gdb/gdb_bfd.c
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
if (!bfd_is_section_compressed (abfd, sectp)) if (!bfd_is_section_compressed (abfd, sectp))
{ {
@@ -405,6 +410,7 @@ gdb_bfd_map_section (asection *sectp, bf @@ -603,6 +608,7 @@ gdb_bfd_map_section (asection *sectp, bf
} }
} }
#endif /* HAVE_MMAP */ #endif /* HAVE_MMAP */

View File

@ -1,8 +1,8 @@
Index: gdb-7.7.50.20140609/gdb/gdbtypes.h Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
=================================================================== ===================================================================
--- gdb-7.7.50.20140609.orig/gdb/gdbtypes.h 2014-06-13 20:23:55.210626427 +0200 --- gdb-7.9.50.20150520.orig/gdb/gdbtypes.h 2015-05-31 16:55:29.723475485 +0200
+++ gdb-7.7.50.20140609/gdb/gdbtypes.h 2014-06-13 20:24:26.156658622 +0200 +++ gdb-7.9.50.20150520/gdb/gdbtypes.h 2015-05-31 16:55:49.716601669 +0200
@@ -440,6 +440,7 @@ enum field_loc_kind @@ -462,6 +462,7 @@ enum field_loc_kind
{ {
FIELD_LOC_KIND_BITPOS, /**< bitpos */ FIELD_LOC_KIND_BITPOS, /**< bitpos */
FIELD_LOC_KIND_ENUMVAL, /**< enumval */ FIELD_LOC_KIND_ENUMVAL, /**< enumval */
@ -10,15 +10,15 @@ Index: gdb-7.7.50.20140609/gdb/gdbtypes.h
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */ FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
FIELD_LOC_KIND_PHYSNAME, /**< physname */ FIELD_LOC_KIND_PHYSNAME, /**< physname */
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */ FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */
@@ -617,6 +618,7 @@ struct main_type @@ -513,6 +514,7 @@ union field_location
field. Otherwise, physname is the mangled label of the field. Otherwise, physname is the mangled label of the
static field. */ static field. */
+ /* This address is unrelocated by the objfile's ANOFFSET. */ + /* This address is unrelocated by the objfile's ANOFFSET. */
CORE_ADDR physaddr; CORE_ADDR physaddr;
const char *physname; const char *physname;
@@ -1262,6 +1264,7 @@ extern void allocate_gnat_aux_type (stru @@ -1386,6 +1388,7 @@ extern void set_type_vptr_basetype (stru
#define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval) #define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0) #define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname) #define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
@ -26,7 +26,7 @@ Index: gdb-7.7.50.20140609/gdb/gdbtypes.h
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr) #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block) #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
#define SET_FIELD_BITPOS(thisfld, bitpos) \ #define SET_FIELD_BITPOS(thisfld, bitpos) \
@@ -1273,6 +1276,7 @@ extern void allocate_gnat_aux_type (stru @@ -1397,6 +1400,7 @@ extern void set_type_vptr_basetype (stru
#define SET_FIELD_PHYSNAME(thisfld, name) \ #define SET_FIELD_PHYSNAME(thisfld, name) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
FIELD_STATIC_PHYSNAME (thisfld) = (name)) FIELD_STATIC_PHYSNAME (thisfld) = (name))
@ -34,7 +34,7 @@ Index: gdb-7.7.50.20140609/gdb/gdbtypes.h
#define SET_FIELD_PHYSADDR(thisfld, addr) \ #define SET_FIELD_PHYSADDR(thisfld, addr) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
FIELD_STATIC_PHYSADDR (thisfld) = (addr)) FIELD_STATIC_PHYSADDR (thisfld) = (addr))
@@ -1289,6 +1293,7 @@ extern void allocate_gnat_aux_type (stru @@ -1413,6 +1417,7 @@ extern void set_type_vptr_basetype (stru
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
@ -42,10 +42,10 @@ Index: gdb-7.7.50.20140609/gdb/gdbtypes.h
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n)) #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
Index: gdb-7.7.50.20140609/gdb/jv-lang.c Index: gdb-7.9.50.20150520/gdb/jv-lang.c
=================================================================== ===================================================================
--- gdb-7.7.50.20140609.orig/gdb/jv-lang.c 2014-06-13 20:23:55.211626428 +0200 --- gdb-7.9.50.20150520.orig/gdb/jv-lang.c 2015-05-31 16:55:29.724475491 +0200
+++ gdb-7.7.50.20140609/gdb/jv-lang.c 2014-06-13 20:23:56.278627534 +0200 +++ gdb-7.9.50.20150520/gdb/jv-lang.c 2015-05-31 16:55:30.820482408 +0200
@@ -427,7 +427,8 @@ java_link_class_type (struct gdbarch *gd @@ -427,7 +427,8 @@ java_link_class_type (struct gdbarch *gd
fields = NULL; fields = NULL;
@ -66,11 +66,11 @@ Index: gdb-7.7.50.20140609/gdb/jv-lang.c
else else
SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset); SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset);
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */ if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
Index: gdb-7.7.50.20140609/gdb/value.c Index: gdb-7.9.50.20150520/gdb/value.c
=================================================================== ===================================================================
--- gdb-7.7.50.20140609.orig/gdb/value.c 2014-06-13 20:23:55.212626429 +0200 --- gdb-7.9.50.20150520.orig/gdb/value.c 2015-05-31 16:55:29.725475497 +0200
+++ gdb-7.7.50.20140609/gdb/value.c 2014-06-13 20:23:56.279627535 +0200 +++ gdb-7.9.50.20150520/gdb/value.c 2015-05-31 16:55:30.821482415 +0200
@@ -2783,7 +2783,8 @@ value_static_field (struct type *type, i @@ -2951,7 +2951,8 @@ value_static_field (struct type *type, i
{ {
case FIELD_LOC_KIND_PHYSADDR: case FIELD_LOC_KIND_PHYSADDR:
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno), retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),

View File

@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectArcher
http://sourceware.org/gdb/wiki/ArcherBranchManagement http://sourceware.org/gdb/wiki/ArcherBranchManagement
GIT snapshot: GIT snapshot:
commit d1a09bf2f8e7e3f752a1bbeba135bc080bf0c865 commit c8a8413e160d935c12cbc6e484dd8b7ab80f5f62
tromey/python tromey/python
@ -16,10 +16,10 @@ index 0000000..173b8ea
+This branch originally held the Python code for gdb. It still exists +This branch originally held the Python code for gdb. It still exists
+because a small amount of code here has not yet been merged upstream. +because a small amount of code here has not yet been merged upstream.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index be69b6f..a4483e4 100644 index 95104ef..a9b198a 100644
--- a/gdb/Makefile.in --- a/gdb/Makefile.in
+++ b/gdb/Makefile.in +++ b/gdb/Makefile.in
@@ -1515,6 +1515,12 @@ stamp-h: $(srcdir)/config.in config.status @@ -1534,6 +1534,12 @@ stamp-h: $(srcdir)/config.in config.status
CONFIG_LINKS= \ CONFIG_LINKS= \
$(SHELL) config.status $(SHELL) config.status
@ -33,11 +33,11 @@ index be69b6f..a4483e4 100644
$(SHELL) config.status --recheck $(SHELL) config.status --recheck
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
index 00c70bb..f93ffdd 100644 index 30cfd17..e977b30 100644
--- a/gdb/data-directory/Makefile.in --- a/gdb/data-directory/Makefile.in
+++ b/gdb/data-directory/Makefile.in +++ b/gdb/data-directory/Makefile.in
@@ -64,7 +64,10 @@ PYTHON_FILE_LIST = \ @@ -65,7 +65,10 @@ PYTHON_FILE_LIST = \
gdb/printing.py \ gdb/unwinder.py \
gdb/prompt.py \ gdb/prompt.py \
gdb/xmethod.py \ gdb/xmethod.py \
+ gdb/types.py \ + gdb/types.py \
@ -46,8 +46,8 @@ index 00c70bb..f93ffdd 100644
+ gdb/command/pahole.py \ + gdb/command/pahole.py \
gdb/command/xmethods.py \ gdb/command/xmethods.py \
gdb/command/frame_filters.py \ gdb/command/frame_filters.py \
gdb/command/type_printers.py \ gdb/command/unwinders.py \
@@ -74,6 +77,8 @@ PYTHON_FILE_LIST = \ @@ -76,6 +79,8 @@ PYTHON_FILE_LIST = \
gdb/function/__init__.py \ gdb/function/__init__.py \
gdb/function/caller_is.py \ gdb/function/caller_is.py \
gdb/function/strfns.py \ gdb/function/strfns.py \
@ -57,7 +57,7 @@ index 00c70bb..f93ffdd 100644
gdb/printer/bound_registers.py gdb/printer/bound_registers.py
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index e086c33..5dfeb1d 100644 index 1665372..c4caffc 100644
--- a/gdb/doc/gdb.texinfo --- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo
@@ -1225,6 +1225,16 @@ for remote debugging. @@ -1225,6 +1225,16 @@ for remote debugging.
@ -78,7 +78,7 @@ index e086c33..5dfeb1d 100644
@item -tui @item -tui
@cindex @code{--tui} @cindex @code{--tui}
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 234ce5c..e940125 100644 index 57ec22e..13beb05 100644
--- a/gdb/doc/python.texi --- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi +++ b/gdb/doc/python.texi
@@ -88,8 +88,6 @@ containing @code{end}. For example: @@ -88,8 +88,6 @@ containing @code{end}. For example:
@ -111,7 +111,7 @@ index 05a38b2..9801fdf 100644
set variable $gdb_init_done = 1 set variable $gdb_init_done = 1
diff --git a/gdb/main.c b/gdb/main.c diff --git a/gdb/main.c b/gdb/main.c
index accd927..ed211f6 100644 index aecd60a..d0f7834 100644
--- a/gdb/main.c --- a/gdb/main.c
+++ b/gdb/main.c +++ b/gdb/main.c
@@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
@ -122,7 +122,7 @@ index accd927..ed211f6 100644
#include "source.h" #include "source.h"
#include "cli/cli-cmds.h" #include "cli/cli-cmds.h"
#include "objfiles.h" #include "objfiles.h"
@@ -444,6 +445,8 @@ captured_main (void *data) @@ -453,6 +454,8 @@ captured_main (void *data)
char *cdarg = NULL; char *cdarg = NULL;
char *ttyarg = NULL; char *ttyarg = NULL;
@ -131,7 +131,7 @@ index accd927..ed211f6 100644
/* These are static so that we can take their address in an /* These are static so that we can take their address in an
initializer. */ initializer. */
static int print_help; static int print_help;
@@ -649,10 +652,14 @@ captured_main (void *data) @@ -663,10 +666,14 @@ captured_main (void *data)
{"args", no_argument, &set_args, 1}, {"args", no_argument, &set_args, 1},
{"l", required_argument, 0, 'l'}, {"l", required_argument, 0, 'l'},
{"return-child-result", no_argument, &return_child_result, 1}, {"return-child-result", no_argument, &return_child_result, 1},
@ -147,7 +147,7 @@ index accd927..ed211f6 100644
{ {
int option_index; int option_index;
@@ -670,6 +677,9 @@ captured_main (void *data) @@ -684,6 +691,9 @@ captured_main (void *data)
case 0: case 0:
/* Long option that just sets a flag. */ /* Long option that just sets a flag. */
break; break;
@ -157,7 +157,7 @@ index accd927..ed211f6 100644
case OPT_SE: case OPT_SE:
symarg = optarg; symarg = optarg;
execarg = optarg; execarg = optarg;
@@ -851,7 +861,31 @@ captured_main (void *data) @@ -864,7 +874,31 @@ captured_main (void *data)
/* Now that gdb_init has created the initial inferior, we're in /* Now that gdb_init has created the initial inferior, we're in
position to set args for that inferior. */ position to set args for that inferior. */
@ -190,7 +190,7 @@ index accd927..ed211f6 100644
{ {
/* The remaining options are the command-line options for the /* The remaining options are the command-line options for the
inferior. The first one is the sym/exec file, and the rest inferior. The first one is the sym/exec file, and the rest
@@ -1129,7 +1163,8 @@ captured_main (void *data) @@ -1137,7 +1171,8 @@ captured_main (void *data)
/* Read in the old history after all the command files have been /* Read in the old history after all the command files have been
read. */ read. */
@ -200,7 +200,7 @@ index accd927..ed211f6 100644
if (batch_flag) if (batch_flag)
{ {
@@ -1140,13 +1175,25 @@ captured_main (void *data) @@ -1148,13 +1183,25 @@ captured_main (void *data)
/* Show time and/or space usage. */ /* Show time and/or space usage. */
do_cleanups (pre_stat_chain); do_cleanups (pre_stat_chain);
@ -232,7 +232,7 @@ index accd927..ed211f6 100644
} }
/* No exit -- exit is through quit_command. */ /* No exit -- exit is through quit_command. */
} }
@@ -1180,6 +1227,12 @@ print_gdb_help (struct ui_file *stream) @@ -1188,6 +1235,12 @@ print_gdb_help (struct ui_file *stream)
fputs_unfiltered (_("\ fputs_unfiltered (_("\
This is the GNU debugger. Usage:\n\n\ This is the GNU debugger. Usage:\n\n\
gdb [options] [executable-file [core-file or process-id]]\n\ gdb [options] [executable-file [core-file or process-id]]\n\
@ -245,10 +245,10 @@ index accd927..ed211f6 100644
gdb [options] --args executable-file [inferior-arguments ...]\n\n\ gdb [options] --args executable-file [inferior-arguments ...]\n\n\
"), stream); "), stream);
fputs_unfiltered (_("\ fputs_unfiltered (_("\
@@ -1225,6 +1278,13 @@ Output and user interface control:\n\n\ @@ -1232,6 +1285,13 @@ Output and user interface control:\n\n\
#endif
fputs_unfiltered (_("\ fputs_unfiltered (_("\
--dbx DBX compatibility mode.\n\ --dbx DBX compatibility mode.\n\
--xdb XDB compatibility mode.\n\
+"), stream); +"), stream);
+#if HAVE_PYTHON +#if HAVE_PYTHON
+ fputs_unfiltered (_("\ + fputs_unfiltered (_("\
@ -443,7 +443,7 @@ index 0000000..8742680
+ +
+InScope () +InScope ()
diff --git a/gdb/python/python.c b/gdb/python/python.c diff --git a/gdb/python/python.c b/gdb/python/python.c
index b1d8283..54a2d9b 100644 index 4f88b0e..870a1ba 100644
--- a/gdb/python/python.c --- a/gdb/python/python.c
+++ b/gdb/python/python.c +++ b/gdb/python/python.c
@@ -93,6 +93,8 @@ const struct extension_language_defn extension_language_python = @@ -93,6 +93,8 @@ const struct extension_language_defn extension_language_python =
@ -455,7 +455,7 @@ index b1d8283..54a2d9b 100644
#include "target.h" #include "target.h"
#include "gdbthread.h" #include "gdbthread.h"
#include "interps.h" #include "interps.h"
@@ -1220,6 +1222,83 @@ gdbpy_print_stack (void) @@ -1262,6 +1264,83 @@ gdbpy_print_stack (void)
/* Return the current Progspace. /* Return the current Progspace.
There always is one. */ There always is one. */
@ -539,7 +539,7 @@ index b1d8283..54a2d9b 100644
static PyObject * static PyObject *
gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2) gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2)
@@ -1913,6 +1992,8 @@ static PyMethodDef GdbMethods[] = @@ -1982,6 +2061,8 @@ PyMethodDef python_GdbMethods[] =
Evaluate command, a string, as a gdb CLI command. Optionally returns\n\ Evaluate command, a string, as a gdb CLI command. Optionally returns\n\
a Python String containing the output of the command if to_string is\n\ a Python String containing the output of the command if to_string is\n\
set to True." }, set to True." },
@ -549,7 +549,7 @@ index b1d8283..54a2d9b 100644
"Return a gdb parameter's value" }, "Return a gdb parameter's value" },
diff --git a/gdb/python/python.h b/gdb/python/python.h diff --git a/gdb/python/python.h b/gdb/python/python.h
index 9e99992..c776e59 100644 index e6bfcca..688daa3 100644
--- a/gdb/python/python.h --- a/gdb/python/python.h
+++ b/gdb/python/python.h +++ b/gdb/python/python.h
@@ -25,4 +25,6 @@ @@ -25,4 +25,6 @@
@ -560,7 +560,7 @@ index 9e99992..c776e59 100644
+ +
#endif /* GDB_PYTHON_H */ #endif /* GDB_PYTHON_H */
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index 0b11e12..e35e829 100644 index 9f25a48..88b0842 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp --- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -92,6 +92,10 @@ proc do_steps_and_nexts {} { @@ -92,6 +92,10 @@ proc do_steps_and_nexts {} {
@ -575,7 +575,7 @@ index 0b11e12..e35e829 100644
set description "next over make_command_stats_cleanup and everything it calls" set description "next over make_command_stats_cleanup and everything it calls"
set command "next" set command "next"
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
index e47f340..a7e0a52 100644 index 33fdbe5..264d00f 100644
--- a/gdb/testsuite/gdb.python/py-frame.exp --- a/gdb/testsuite/gdb.python/py-frame.exp
+++ b/gdb/testsuite/gdb.python/py-frame.exp +++ b/gdb/testsuite/gdb.python/py-frame.exp
@@ -95,6 +95,8 @@ gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.r @@ -95,6 +95,8 @@ gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.r
@ -588,7 +588,7 @@ index e47f340..a7e0a52 100644
gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \ gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \
" = True" \ " = True" \
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
index f081ff0..58cce09 100644 index baa17b7..45ad67e 100644
--- a/gdb/testsuite/gdb.python/py-value.exp --- a/gdb/testsuite/gdb.python/py-value.exp
+++ b/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp
@@ -388,6 +388,15 @@ proc test_value_after_death {} { @@ -388,6 +388,15 @@ proc test_value_after_death {} {

View File

@ -37,10 +37,10 @@ gdb/gdbserver/
(linux_create_inferior, linux_tracefork_child): Call it instead of (linux_create_inferior, linux_tracefork_child): Call it instead of
direct ptrace. direct ptrace.
Index: gdb-7.8.90.20150125/gdb/nat/linux-ptrace.c Index: gdb-7.9.50.20150520/gdb/nat/linux-ptrace.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/nat/linux-ptrace.c 2015-01-25 08:36:55.710884511 +0100 --- gdb-7.9.50.20150520.orig/gdb/nat/linux-ptrace.c 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/nat/linux-ptrace.c 2015-01-25 08:38:43.157347627 +0100 +++ gdb-7.9.50.20150520/gdb/nat/linux-ptrace.c 2015-05-31 18:17:19.584046540 +0200
@@ -25,6 +25,10 @@ @@ -25,6 +25,10 @@
#include <stdint.h> #include <stdint.h>
@ -49,10 +49,10 @@ Index: gdb-7.8.90.20150125/gdb/nat/linux-ptrace.c
+# include <selinux/selinux.h> +# include <selinux/selinux.h>
+#endif /* HAVE_SELINUX_SELINUX_H */ +#endif /* HAVE_SELINUX_SELINUX_H */
+ +
/* Stores the currently supported ptrace options. A value of /* Stores the ptrace options supported by the running kernel.
-1 means we did not check for features yet. A value of 0 means A value of -1 means we did not check for features yet. A value
there are no supported features. */ of 0 means there are no supported features. */
@@ -53,6 +57,8 @@ linux_ptrace_attach_fail_reason (pid_t p @@ -49,6 +53,8 @@ linux_ptrace_attach_fail_reason (pid_t p
buffer_xml_printf (buffer, _("process %d is a zombie " buffer_xml_printf (buffer, _("process %d is a zombie "
"- the process has already terminated"), "- the process has already terminated"),
(int) pid); (int) pid);
@ -61,7 +61,7 @@ Index: gdb-7.8.90.20150125/gdb/nat/linux-ptrace.c
} }
/* See linux-ptrace.h. */ /* See linux-ptrace.h. */
@@ -595,6 +601,22 @@ linux_ptrace_init_warnings (void) @@ -583,6 +589,22 @@ linux_ptrace_init_warnings (void)
linux_ptrace_test_ret_to_nx (); linux_ptrace_test_ret_to_nx ();
} }
@ -81,26 +81,26 @@ Index: gdb-7.8.90.20150125/gdb/nat/linux-ptrace.c
+#endif /* HAVE_LIBSELINUX */ +#endif /* HAVE_LIBSELINUX */
+} +}
+ +
/* Set additional ptrace flags to use. Some such flags may be checked /* Extract extended ptrace event from wait status. */
by the implementation above. This function must be called before
any other function in this file; otherwise the flags may not take int
Index: gdb-7.8.90.20150125/gdb/nat/linux-ptrace.h Index: gdb-7.9.50.20150520/gdb/nat/linux-ptrace.h
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/nat/linux-ptrace.h 2015-01-25 08:37:02.800915071 +0100 --- gdb-7.9.50.20150520.orig/gdb/nat/linux-ptrace.h 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/nat/linux-ptrace.h 2015-01-25 08:38:16.565233009 +0100 +++ gdb-7.9.50.20150520/gdb/nat/linux-ptrace.h 2015-05-31 18:17:19.584046540 +0200
@@ -98,6 +98,7 @@ extern void linux_ptrace_attach_fail_rea @@ -149,6 +149,7 @@ extern void linux_ptrace_attach_fail_rea
extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err); extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err);
extern void linux_ptrace_init_warnings (void); extern void linux_ptrace_init_warnings (void);
+extern void linux_ptrace_create_warnings (struct buffer *buffer); +extern void linux_ptrace_create_warnings (struct buffer *buffer);
extern void linux_check_ptrace_features (void);
extern void linux_enable_event_reporting (pid_t pid, int attached); extern void linux_enable_event_reporting (pid_t pid, int attached);
extern void linux_disable_event_reporting (pid_t pid); extern void linux_disable_event_reporting (pid_t pid);
extern int linux_supports_tracefork (void); Index: gdb-7.9.50.20150520/gdb/configure.ac
Index: gdb-7.8.90.20150125/gdb/configure.ac
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/configure.ac 2015-01-25 08:36:55.712884520 +0100 --- gdb-7.9.50.20150520.orig/gdb/configure.ac 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/configure.ac 2015-01-25 08:37:02.801915075 +0100 +++ gdb-7.9.50.20150520/gdb/configure.ac 2015-05-31 18:17:19.585046546 +0200
@@ -2117,6 +2117,10 @@ case $host_os in @@ -2130,6 +2130,10 @@ case $host_os in
esac esac
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
@ -111,11 +111,11 @@ Index: gdb-7.8.90.20150125/gdb/configure.ac
dnl Handle optional features that can be enabled. dnl Handle optional features that can be enabled.
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
Index: gdb-7.8.90.20150125/gdb/gdbserver/configure.ac Index: gdb-7.9.50.20150520/gdb/gdbserver/configure.ac
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/gdbserver/configure.ac 2015-01-25 08:36:55.712884520 +0100 --- gdb-7.9.50.20150520.orig/gdb/gdbserver/configure.ac 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/gdbserver/configure.ac 2015-01-25 08:37:02.801915075 +0100 +++ gdb-7.9.50.20150520/gdb/gdbserver/configure.ac 2015-05-31 18:17:19.585046546 +0200
@@ -461,6 +461,10 @@ if $want_ipa ; then @@ -499,6 +499,10 @@ if $want_ipa ; then
fi fi
fi fi
@ -126,11 +126,11 @@ Index: gdb-7.8.90.20150125/gdb/gdbserver/configure.ac
AC_SUBST(GDBSERVER_DEPFILES) AC_SUBST(GDBSERVER_DEPFILES)
AC_SUBST(GDBSERVER_LIBS) AC_SUBST(GDBSERVER_LIBS)
AC_SUBST(srv_xmlbuiltin) AC_SUBST(srv_xmlbuiltin)
Index: gdb-7.8.90.20150125/gdb/gdbserver/linux-low.c Index: gdb-7.9.50.20150520/gdb/gdbserver/linux-low.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/gdbserver/linux-low.c 2015-01-25 08:36:55.714884529 +0100 --- gdb-7.9.50.20150520.orig/gdb/gdbserver/linux-low.c 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/gdbserver/linux-low.c 2015-01-25 08:37:02.803915084 +0100 +++ gdb-7.9.50.20150520/gdb/gdbserver/linux-low.c 2015-05-31 18:17:19.587046558 +0200
@@ -591,6 +591,29 @@ add_lwp (ptid_t ptid) @@ -749,6 +749,29 @@ add_lwp (ptid_t ptid)
return lwp; return lwp;
} }
@ -160,7 +160,7 @@ Index: gdb-7.8.90.20150125/gdb/gdbserver/linux-low.c
/* Start an inferior process and returns its pid. /* Start an inferior process and returns its pid.
ALLARGS is a vector of program-name and args. */ ALLARGS is a vector of program-name and args. */
@@ -632,7 +655,7 @@ linux_create_inferior (char *program, ch @@ -772,7 +795,7 @@ linux_create_inferior (char *program, ch
if (pid == 0) if (pid == 0)
{ {
close_most_fds (); close_most_fds ();
@ -169,11 +169,11 @@ Index: gdb-7.8.90.20150125/gdb/gdbserver/linux-low.c
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */ #ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
signal (__SIGRTMIN + 1, SIG_DFL); signal (__SIGRTMIN + 1, SIG_DFL);
Index: gdb-7.8.90.20150125/gdb/inf-ptrace.c Index: gdb-7.9.50.20150520/gdb/inf-ptrace.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/inf-ptrace.c 2015-01-25 08:36:55.715884533 +0100 --- gdb-7.9.50.20150520.orig/gdb/inf-ptrace.c 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/inf-ptrace.c 2015-01-25 08:37:02.803915084 +0100 +++ gdb-7.9.50.20150520/gdb/inf-ptrace.c 2015-05-31 18:17:19.588046565 +0200
@@ -67,7 +67,15 @@ static void @@ -79,7 +79,15 @@ static void
inf_ptrace_me (void) inf_ptrace_me (void)
{ {
/* "Trace me, Dr. Memory!" */ /* "Trace me, Dr. Memory!" */
@ -189,36 +189,28 @@ Index: gdb-7.8.90.20150125/gdb/inf-ptrace.c
} }
/* Start a new inferior Unix child process. EXEC_FILE is the file to /* Start a new inferior Unix child process. EXEC_FILE is the file to
Index: gdb-7.8.90.20150125/gdb/linux-nat.c Index: gdb-7.9.50.20150520/gdb/linux-nat.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/linux-nat.c 2015-01-25 08:36:55.717884541 +0100 --- gdb-7.9.50.20150520.orig/gdb/linux-nat.c 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/linux-nat.c 2015-01-25 08:37:52.054127362 +0100 +++ gdb-7.9.50.20150520/gdb/linux-nat.c 2015-05-31 18:17:56.214272683 +0200
@@ -1109,6 +1109,7 @@ linux_nat_create_inferior (struct target @@ -1179,6 +1179,7 @@ linux_nat_create_inferior (struct target
#ifdef HAVE_PERSONALITY {
int personality_orig = 0, personality_set = 0; struct cleanup *restore_personality
#endif /* HAVE_PERSONALITY */ = maybe_disable_address_space_randomization (disable_randomization);
+ volatile struct gdb_exception ex; + volatile struct gdb_exception ex;
/* The fork_child mechanism is synchronous and calls target_wait, so /* The fork_child mechanism is synchronous and calls target_wait, so
we have to mask the async mode. */ we have to mask the async mode. */
@@ -1133,7 +1134,10 @@ linux_nat_create_inferior (struct target @@ -1186,7 +1187,28 @@ linux_nat_create_inferior (struct target
/* Make sure we report all signals during startup. */ /* Make sure we report all signals during startup. */
linux_nat_pass_signals (ops, 0, NULL); linux_nat_pass_signals (ops, 0, NULL);
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty); - linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
+ TRY_CATCH (ex, RETURN_MASK_ERROR) + TRY
+ { + {
+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty); + linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
+ } + }
+ CATCH (ex, RETURN_MASK_ERROR)
#ifdef HAVE_PERSONALITY
if (personality_set)
@@ -1145,6 +1149,24 @@ linux_nat_create_inferior (struct target
safe_strerror (errno));
}
#endif /* HAVE_PERSONALITY */
+
+ if (ex.reason < 0)
+ { + {
+ struct buffer buffer; + struct buffer buffer;
+ char *message, *buffer_s; + char *message, *buffer_s;
@ -235,14 +227,15 @@ Index: gdb-7.8.90.20150125/gdb/linux-nat.c
+ +
+ throw_error (ex.error, "%s%s", buffer_s, message); + throw_error (ex.error, "%s%s", buffer_s, message);
+ } + }
} + END_CATCH
/* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not do_cleanups (restore_personality);
Index: gdb-7.8.90.20150125/gdb/config.in }
Index: gdb-7.9.50.20150520/gdb/config.in
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/config.in 2015-01-25 08:36:55.718884546 +0100 --- gdb-7.9.50.20150520.orig/gdb/config.in 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/config.in 2015-01-25 08:37:02.805915092 +0100 +++ gdb-7.9.50.20150520/gdb/config.in 2015-05-31 18:17:19.589046571 +0200
@@ -213,6 +213,9 @@ @@ -261,6 +261,9 @@
/* Define if librpm library is being used. */ /* Define if librpm library is being used. */
#undef HAVE_LIBRPM #undef HAVE_LIBRPM
@ -252,7 +245,7 @@ Index: gdb-7.8.90.20150125/gdb/config.in
/* Define to 1 if you have the <libunwind-ia64.h> header file. */ /* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H #undef HAVE_LIBUNWIND_IA64_H
@@ -342,6 +345,9 @@ @@ -393,6 +396,9 @@
/* Define to 1 if you have the `scm_new_smob' function. */ /* Define to 1 if you have the `scm_new_smob' function. */
#undef HAVE_SCM_NEW_SMOB #undef HAVE_SCM_NEW_SMOB
@ -262,11 +255,11 @@ Index: gdb-7.8.90.20150125/gdb/config.in
/* Define to 1 if you have the `setlocale' function. */ /* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE #undef HAVE_SETLOCALE
Index: gdb-7.8.90.20150125/gdb/configure Index: gdb-7.9.50.20150520/gdb/configure
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/configure 2015-01-25 08:36:55.722884563 +0100 --- gdb-7.9.50.20150520.orig/gdb/configure 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/configure 2015-01-25 08:37:02.809915110 +0100 +++ gdb-7.9.50.20150520/gdb/configure 2015-05-31 18:17:19.594046602 +0200
@@ -13270,6 +13270,64 @@ cat >>confdefs.h <<_ACEOF @@ -13730,6 +13730,64 @@ cat >>confdefs.h <<_ACEOF
_ACEOF _ACEOF
@ -331,11 +324,11 @@ Index: gdb-7.8.90.20150125/gdb/configure
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
# except that the argument to --with-sysroot is optional. # except that the argument to --with-sysroot is optional.
Index: gdb-7.8.90.20150125/gdb/gdbserver/config.in Index: gdb-7.9.50.20150520/gdb/gdbserver/config.in
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/gdbserver/config.in 2015-01-25 08:36:55.724884572 +0100 --- gdb-7.9.50.20150520.orig/gdb/gdbserver/config.in 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/gdbserver/config.in 2015-01-25 08:37:02.809915110 +0100 +++ gdb-7.9.50.20150520/gdb/gdbserver/config.in 2015-05-31 18:17:19.594046602 +0200
@@ -75,6 +75,9 @@ @@ -113,6 +113,9 @@
/* Define to 1 if you have the `mcheck' library (-lmcheck). */ /* Define to 1 if you have the `mcheck' library (-lmcheck). */
#undef HAVE_LIBMCHECK #undef HAVE_LIBMCHECK
@ -345,7 +338,7 @@ Index: gdb-7.8.90.20150125/gdb/gdbserver/config.in
/* Define if the target supports branch tracing. */ /* Define if the target supports branch tracing. */
#undef HAVE_LINUX_BTRACE #undef HAVE_LINUX_BTRACE
@@ -142,6 +145,9 @@ @@ -186,6 +189,9 @@
/* Define to 1 if you have the `pwrite' function. */ /* Define to 1 if you have the `pwrite' function. */
#undef HAVE_PWRITE #undef HAVE_PWRITE
@ -355,11 +348,11 @@ Index: gdb-7.8.90.20150125/gdb/gdbserver/config.in
/* Define to 1 if you have the <sgtty.h> header file. */ /* Define to 1 if you have the <sgtty.h> header file. */
#undef HAVE_SGTTY_H #undef HAVE_SGTTY_H
Index: gdb-7.8.90.20150125/gdb/gdbserver/configure Index: gdb-7.9.50.20150520/gdb/gdbserver/configure
=================================================================== ===================================================================
--- gdb-7.8.90.20150125.orig/gdb/gdbserver/configure 2015-01-25 08:36:55.726884580 +0100 --- gdb-7.9.50.20150520.orig/gdb/gdbserver/configure 2015-05-31 18:16:54.348890746 +0200
+++ gdb-7.8.90.20150125/gdb/gdbserver/configure 2015-01-25 08:37:02.811915118 +0100 +++ gdb-7.9.50.20150520/gdb/gdbserver/configure 2015-05-31 18:17:19.596046614 +0200
@@ -6199,6 +6199,64 @@ if $want_ipa ; then @@ -7022,6 +7022,64 @@ if $want_ipa ; then
fi fi
fi fi

View File

@ -3,19 +3,19 @@ printed, but a default backtrace will occur in this case.
-- --
Index: gdb-7.8.90.20150214/gdb/python/py-framefilter.c Index: gdb-7.9.50.20150520/gdb/python/py-framefilter.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150214.orig/gdb/python/py-framefilter.c 2015-02-14 17:35:12.277653200 +0100 --- gdb-7.9.50.20150520.orig/gdb/python/py-framefilter.c 2015-05-31 17:36:34.681952530 +0200
+++ gdb-7.8.90.20150214/gdb/python/py-framefilter.c 2015-02-14 17:36:15.737953789 +0100 +++ gdb-7.9.50.20150520/gdb/python/py-framefilter.c 2015-05-31 17:55:01.884788031 +0200
@@ -1506,6 +1506,7 @@ gdbpy_apply_frame_filter (const struct e @@ -1523,6 +1523,7 @@ gdbpy_apply_frame_filter (const struct e
volatile struct gdb_exception except; PyObject *iterable;
PyObject *item; PyObject *item;
htab_t levels_printed; htab_t levels_printed;
+ int count_printed = 0; + int count_printed = 0;
if (!gdb_python_initialized) if (!gdb_python_initialized)
return EXT_LANG_BT_NO_FILTERS; return EXT_LANG_BT_NO_FILTERS;
@@ -1525,24 +1526,7 @@ gdbpy_apply_frame_filter (const struct e @@ -1543,24 +1544,7 @@ gdbpy_apply_frame_filter (const struct e
iterable = bootstrap_python_frame_filters (frame, frame_low, frame_high); iterable = bootstrap_python_frame_filters (frame, frame_low, frame_high);
if (iterable == NULL) if (iterable == NULL)
@ -41,7 +41,7 @@ Index: gdb-7.8.90.20150214/gdb/python/py-framefilter.c
/* If iterable is None, then there are no frame filters registered. /* If iterable is None, then there are no frame filters registered.
If this is the case, defer to default GDB printing routines in MI If this is the case, defer to default GDB printing routines in MI
@@ -1573,15 +1557,40 @@ gdbpy_apply_frame_filter (const struct e @@ -1591,15 +1575,40 @@ gdbpy_apply_frame_filter (const struct e
error and continue with other frames. */ error and continue with other frames. */
if (success == EXT_LANG_BT_ERROR) if (success == EXT_LANG_BT_ERROR)
gdbpy_print_stack (); gdbpy_print_stack ();

View File

@ -1,20 +1,20 @@
Index: gdb-7.8.50.20141228/gdb/config/i386/linux64.mh Index: gdb-7.9.50.20150520/gdb/config/i386/linux64.mh
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/config/i386/linux64.mh 2015-01-01 17:12:53.965472227 +0100 --- gdb-7.9.50.20150520.orig/gdb/config/i386/linux64.mh 2015-05-31 16:59:34.258018827 +0200
+++ gdb-7.8.50.20141228/gdb/config/i386/linux64.mh 2015-01-01 17:12:55.367471414 +0100 +++ gdb-7.9.50.20150520/gdb/config/i386/linux64.mh 2015-05-31 16:59:47.779104163 +0200
@@ -6,7 +6,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \ @@ -7,7 +7,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 linux-waitpid.o linux-personality.o x86-linux.o \
x86-linux-dregs.o
-NAT_FILE= config/nm-linux.h -NAT_FILE= config/nm-linux.h
+NAT_FILE= nm-linux64.h +NAT_FILE= nm-linux64.h
NAT_CDEPS = $(srcdir)/proc-service.list NAT_CDEPS = $(srcdir)/proc-service.list
# The dynamically loaded libthread_db needs access to symbols in the # The dynamically loaded libthread_db needs access to symbols in the
Index: gdb-7.8.50.20141228/gdb/config/i386/linux.mh Index: gdb-7.9.50.20150520/gdb/config/i386/linux.mh
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/config/i386/linux.mh 2015-01-01 17:12:55.367471414 +0100 --- gdb-7.9.50.20150520.orig/gdb/config/i386/linux.mh 2015-05-31 16:56:12.869747796 +0200
+++ gdb-7.8.50.20141228/gdb/config/i386/linux.mh 2015-01-01 17:13:07.568464342 +0100 +++ gdb-7.9.50.20150520/gdb/config/i386/linux.mh 2015-05-31 16:59:34.259018833 +0200
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
# Host: Intel 386 running GNU/Linux. # Host: Intel 386 running GNU/Linux.
@ -23,10 +23,10 @@ Index: gdb-7.8.50.20141228/gdb/config/i386/linux.mh
NATDEPFILES= inf-ptrace.o fork-child.o \ NATDEPFILES= inf-ptrace.o fork-child.o \
x86-nat.o x86-dregs.o i386-linux-nat.o x86-linux-nat.o \ x86-nat.o x86-dregs.o i386-linux-nat.o x86-linux-nat.o \
proc-service.o linux-thread-db.o \ proc-service.o linux-thread-db.o \
Index: gdb-7.8.50.20141228/gdb/config/i386/nm-linux.h Index: gdb-7.9.50.20150520/gdb/config/i386/nm-linux.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/config/i386/nm-linux.h 2015-01-01 17:12:55.368471414 +0100 +++ gdb-7.9.50.20150520/gdb/config/i386/nm-linux.h 2015-05-31 16:59:34.259018833 +0200
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
+/* Native support for GNU/Linux i386. +/* Native support for GNU/Linux i386.
+ +
@ -56,10 +56,10 @@ Index: gdb-7.8.50.20141228/gdb/config/i386/nm-linux.h
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
+ +
+#endif /* NM_LINUX64_H */ +#endif /* NM_LINUX64_H */
Index: gdb-7.8.50.20141228/gdb/config/i386/nm-linux64.h Index: gdb-7.9.50.20150520/gdb/config/i386/nm-linux64.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/config/i386/nm-linux64.h 2015-01-01 17:12:55.368471414 +0100 +++ gdb-7.9.50.20150520/gdb/config/i386/nm-linux64.h 2015-05-31 16:59:34.259018833 +0200
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
+/* Native support for GNU/Linux amd64. +/* Native support for GNU/Linux amd64.
+ +
@ -89,26 +89,26 @@ Index: gdb-7.8.50.20141228/gdb/config/i386/nm-linux64.h
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
+ +
+#endif /* NM_LINUX64_H */ +#endif /* NM_LINUX64_H */
Index: gdb-7.8.50.20141228/gdb/target.h Index: gdb-7.9.50.20150520/gdb/target.h
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/target.h 2015-01-01 17:12:53.967472226 +0100 --- gdb-7.9.50.20150520.orig/gdb/target.h 2015-05-31 16:59:34.260018839 +0200
+++ gdb-7.8.50.20141228/gdb/target.h 2015-01-01 17:12:55.368471414 +0100 +++ gdb-7.9.50.20150520/gdb/target.h 2015-05-31 17:00:11.067251143 +0200
@@ -1754,9 +1754,11 @@ extern char *target_thread_name (struct @@ -1820,9 +1820,11 @@ extern char *target_thread_name (struct
bp_hardware_breakpoint. CNT is the number of such watchpoints used so far CNT is the number of such watchpoints used so far, including this
(including this one?). OTHERTYPE is who knows what... */ one. OTHERTYPE is who knows what... */
+#ifndef target_can_use_hardware_watchpoint +#ifndef target_can_use_hardware_watchpoint
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \ #define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
(*current_target.to_can_use_hw_breakpoint) (&current_target, \ (*current_target.to_can_use_hw_breakpoint) (&current_target, \
TYPE, CNT, OTHERTYPE); TYPE, CNT, OTHERTYPE)
+#endif +#endif
/* Returns the number of debug registers needed to watch the given /* Returns the number of debug registers needed to watch the given
memory region, or zero if not supported. */ memory region, or zero if not supported. */
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2015-01-01 17:12:55.369471413 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2015-05-31 16:59:34.261018846 +0200
@@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
+# Copyright 2009, 2010 Free Software Foundation, Inc. +# Copyright 2009, 2010 Free Software Foundation, Inc.
+ +

View File

@ -1,9 +1,9 @@
https://bugzilla.redhat.com/show_bug.cgi?id=1020004 https://bugzilla.redhat.com/show_bug.cgi?id=1020004
Index: gdb-7.8.50.20141228/gdb/data-directory/Makefile.in Index: gdb-7.9.50.20150520/gdb/data-directory/Makefile.in
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/data-directory/Makefile.in 2015-01-05 22:51:10.707756810 +0100 --- gdb-7.9.50.20150520.orig/gdb/data-directory/Makefile.in 2015-05-31 18:05:43.046746351 +0200
+++ gdb-7.8.50.20141228/gdb/data-directory/Makefile.in 2015-01-05 22:51:48.608923139 +0100 +++ gdb-7.9.50.20150520/gdb/data-directory/Makefile.in 2015-05-31 18:05:58.483841655 +0200
@@ -60,6 +60,8 @@ PYTHON_FILE_LIST = \ @@ -60,6 +60,8 @@ PYTHON_FILE_LIST = \
gdb/frames.py \ gdb/frames.py \
gdb/FrameIterator.py \ gdb/FrameIterator.py \
@ -12,8 +12,8 @@ Index: gdb-7.8.50.20141228/gdb/data-directory/Makefile.in
+ gdb/backtrace.py \ + gdb/backtrace.py \
gdb/types.py \ gdb/types.py \
gdb/printing.py \ gdb/printing.py \
gdb/prompt.py \ gdb/unwinder.py \
@@ -74,6 +76,7 @@ PYTHON_FILE_LIST = \ @@ -76,6 +78,7 @@ PYTHON_FILE_LIST = \
gdb/command/pretty_printers.py \ gdb/command/pretty_printers.py \
gdb/command/prompt.py \ gdb/command/prompt.py \
gdb/command/explore.py \ gdb/command/explore.py \
@ -21,10 +21,10 @@ Index: gdb-7.8.50.20141228/gdb/data-directory/Makefile.in
gdb/function/__init__.py \ gdb/function/__init__.py \
gdb/function/caller_is.py \ gdb/function/caller_is.py \
gdb/function/strfns.py \ gdb/function/strfns.py \
Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/FrameWrapper.py Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/FrameWrapper.py
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/python/lib/gdb/FrameWrapper.py 2015-01-05 22:51:24.706818245 +0100 +++ gdb-7.9.50.20150520/gdb/python/lib/gdb/FrameWrapper.py 2015-05-31 18:05:58.484841661 +0200
@@ -0,0 +1,122 @@ @@ -0,0 +1,122 @@
+# Wrapper API for frames. +# Wrapper API for frames.
+ +
@ -148,10 +148,10 @@ Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/FrameWrapper.py
+ +
+ def __getattr__ (self, name): + def __getattr__ (self, name):
+ return getattr (self.frame, name) + return getattr (self.frame, name)
Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/backtrace.py Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/backtrace.py
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/python/lib/gdb/backtrace.py 2015-01-05 22:51:24.706818245 +0100 +++ gdb-7.9.50.20150520/gdb/python/lib/gdb/backtrace.py 2015-05-31 18:05:58.484841661 +0200
@@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
+# Filtering backtrace. +# Filtering backtrace.
+ +
@ -195,10 +195,10 @@ Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/backtrace.py
+ return iter + return iter
+ return old_frame_filter (iter) + return old_frame_filter (iter)
+ +
Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/command/backtrace.py Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/command/backtrace.py
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/python/lib/gdb/command/backtrace.py 2015-01-05 22:51:24.707818249 +0100 +++ gdb-7.9.50.20150520/gdb/python/lib/gdb/command/backtrace.py 2015-05-31 18:05:58.484841661 +0200
@@ -0,0 +1,106 @@ @@ -0,0 +1,106 @@
+# New backtrace command. +# New backtrace command.
+ +

View File

@ -1,85 +0,0 @@
http://sourceware.org/ml/gdb-patches/2013-06/msg00788.html
Subject: [PATCH] "enable count" user input error handling (PR gdb/15678)
Typing "enable count" by itself crashes GDB. Also, if you omit the
breakpoint number/range, the error message is not very clear:
(gdb) enable count 2
warning: bad breakpoint number at or near ''
(gdb) enable count
Segmentation fault (core dumped)
With this patch, the error messages are slightly more helpful:
(gdb) enable count 2
Argument required (one or more breakpoint numbers).
(gdb) enable count
Argument required (hit count).
They are not as helpful to the user as I would like, but it's better
than crashing. Suggestions are welcome.
Simon
gdb/ChangeLog:
2013-06-26 Simon Marchi <simon.marchi@ericsson.com>
* breakpoint.c (map_breakpoint_numbers): Check for empty args
string.
(enable_count_command): Check args for NULL value.
gdb/testsuite/ChangeLog:
2013-06-26 Simon Marchi <simon.marchi@ericsson.com>
* gdb.base/ena-dis-br.exp: Test "enable count" for bad user input.
---
gdb/breakpoint.c | 9 +++++++--
gdb/testsuite/gdb.base/ena-dis-br.exp | 8 ++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
Index: gdb-7.8.50.20141228/gdb/breakpoint.c
===================================================================
--- gdb-7.8.50.20141228.orig/gdb/breakpoint.c 2015-01-05 22:21:47.631801558 +0100
+++ gdb-7.8.50.20141228/gdb/breakpoint.c 2015-01-05 22:26:13.165005049 +0100
@@ -14849,7 +14849,7 @@ map_breakpoint_numbers (char *args, void
int match;
struct get_number_or_range_state state;
- if (args == 0)
+ if (args == 0 || *args == '\0')
error_no_arg (_("one or more breakpoint numbers"));
init_number_or_range (&state, args);
@@ -15186,7 +15186,12 @@ do_map_enable_count_breakpoint (struct b
static void
enable_count_command (char *args, int from_tty)
{
- int count = get_number (&args);
+ int count;
+
+ if (args == NULL)
+ error_no_arg (_("hit count"));
+
+ count = get_number (&args);
map_breakpoint_numbers (args, do_map_enable_count_breakpoint, &count);
}
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/ena-dis-br.exp
===================================================================
--- gdb-7.8.50.20141228.orig/gdb/testsuite/gdb.base/ena-dis-br.exp 2015-01-05 22:26:13.165005049 +0100
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/ena-dis-br.exp 2015-01-05 22:26:51.357178150 +0100
@@ -151,6 +151,14 @@ set bp [break_at $bp_location7 "line $bp
set bp2 [break_at marker1 " line $bp_location15"]
+gdb_test "enable count" \
+ "Argument required \\(hit count\\)\\." \
+ "enable count missing arguments"
+
+gdb_test "enable count 2" \
+ "Argument required \\(one or more breakpoint numbers\\)\\." \
+ "enable count missing last argument"
+
gdb_test_no_output "enable count 2 $bp" "disable break with count"
gdb_test "continue" \

View File

@ -11,11 +11,13 @@ gdb/
Work around PR libc/13097. Work around PR libc/13097.
* solib.c (update_solib_list): Ignore "linux-vdso.so.1". * solib.c (update_solib_list): Ignore "linux-vdso.so.1".
--- a/gdb/solib.c Index: gdb-7.9.50.20150520/gdb/solib.c
+++ b/gdb/solib.c ===================================================================
@@ -783,8 +783,11 @@ update_solib_list (int from_tty, struct target_ops *target) --- gdb-7.9.50.20150520.orig/gdb/solib.c 2015-05-31 17:04:16.870802493 +0200
+++ gdb-7.9.50.20150520/gdb/solib.c 2015-05-31 17:04:38.824941054 +0200
@@ -893,8 +893,11 @@ update_solib_list (int from_tty, struct
TRY_CATCH (e, RETURN_MASK_ERROR) TRY
{ {
- /* Fill in the rest of the `struct so_list' node. */ - /* Fill in the rest of the `struct so_list' node. */
- if (!solib_map_sections (i)) - if (!solib_map_sections (i))
@ -27,4 +29,3 @@ gdb/
{ {
not_found++; not_found++;
if (not_found_filename == NULL) if (not_found_filename == NULL)

View File

@ -1,589 +0,0 @@
diff -dup -ruNp gdb-7.8.90.20150202-orig/gdb/testsuite/dg-extract-results.py gdb-7.8.90.20150202/gdb/testsuite/dg-extract-results.py
--- gdb-7.8.90.20150202-orig/gdb/testsuite/dg-extract-results.py 2015-02-02 02:58:29.000000000 +0100
+++ gdb-7.8.90.20150202/gdb/testsuite/dg-extract-results.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,585 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
-#
-# This script 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, or (at your option)
-# any later version.
-
-import sys
-import getopt
-import re
-import io
-from datetime import datetime
-from operator import attrgetter
-
-# True if unrecognised lines should cause a fatal error. Might want to turn
-# this on by default later.
-strict = False
-
-# True if the order of .log segments should match the .sum file, false if
-# they should keep the original order.
-sort_logs = True
-
-# A version of open() that is safe against whatever binary output
-# might be added to the log.
-def safe_open (filename):
- if sys.version_info >= (3, 0):
- return open (filename, 'r', errors = 'surrogateescape')
- return open (filename, 'r')
-
-# Force stdout to handle escape sequences from a safe_open file.
-if sys.version_info >= (3, 0):
- sys.stdout = io.TextIOWrapper (sys.stdout.buffer,
- errors = 'surrogateescape')
-
-class Named:
- def __init__ (self, name):
- self.name = name
-
-class ToolRun (Named):
- def __init__ (self, name):
- Named.__init__ (self, name)
- # The variations run for this tool, mapped by --target_board name.
- self.variations = dict()
-
- # Return the VariationRun for variation NAME.
- def get_variation (self, name):
- if name not in self.variations:
- self.variations[name] = VariationRun (name)
- return self.variations[name]
-
-class VariationRun (Named):
- def __init__ (self, name):
- Named.__init__ (self, name)
- # A segment of text before the harness runs start, describing which
- # baseboard files were loaded for the target.
- self.header = None
- # The harnesses run for this variation, mapped by filename.
- self.harnesses = dict()
- # A list giving the number of times each type of result has
- # been seen.
- self.counts = []
-
- # Return the HarnessRun for harness NAME.
- def get_harness (self, name):
- if name not in self.harnesses:
- self.harnesses[name] = HarnessRun (name)
- return self.harnesses[name]
-
-class HarnessRun (Named):
- def __init__ (self, name):
- Named.__init__ (self, name)
- # Segments of text that make up the harness run, mapped by a test-based
- # key that can be used to order them.
- self.segments = dict()
- # Segments of text that make up the harness run but which have
- # no recognized test results. These are typically harnesses that
- # are completely skipped for the target.
- self.empty = []
- # A list of results. Each entry is a pair in which the first element
- # is a unique sorting key and in which the second is the full
- # PASS/FAIL line.
- self.results = []
-
- # Add a segment of text to the harness run. If the segment includes
- # test results, KEY is an example of one of them, and can be used to
- # combine the individual segments in order. If the segment has no
- # test results (e.g. because the harness doesn't do anything for the
- # current configuration) then KEY is None instead. In that case
- # just collect the segments in the order that we see them.
- def add_segment (self, key, segment):
- if key:
- assert key not in self.segments
- self.segments[key] = segment
- else:
- self.empty.append (segment)
-
-class Segment:
- def __init__ (self, filename, start):
- self.filename = filename
- self.start = start
- self.lines = 0
-
-class Prog:
- def __init__ (self):
- # The variations specified on the command line.
- self.variations = []
- # The variations seen in the input files.
- self.known_variations = set()
- # The tools specified on the command line.
- self.tools = []
- # Whether to create .sum rather than .log output.
- self.do_sum = True
- # Regexps used while parsing.
- self.test_run_re = re.compile (r'^Test Run By (\S+) on (.*)$')
- self.tool_re = re.compile (r'^\t\t=== (.*) tests ===$')
- self.result_re = re.compile (r'^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED'
- r'|WARNING|ERROR|UNSUPPORTED|UNTESTED'
- r'|KFAIL):\s*(.+)')
- self.completed_re = re.compile (r'.* completed at (.*)')
- # Pieces of text to write at the head of the output.
- # start_line is a pair in which the first element is a datetime
- # and in which the second is the associated 'Test Run By' line.
- self.start_line = None
- self.native_line = ''
- self.target_line = ''
- self.host_line = ''
- self.acats_premable = ''
- # Pieces of text to write at the end of the output.
- # end_line is like start_line but for the 'runtest completed' line.
- self.acats_failures = []
- self.version_output = ''
- self.end_line = None
- # Known summary types.
- self.count_names = [
- '# of expected passes\t\t',
- '# of unexpected failures\t',
- '# of unexpected successes\t',
- '# of expected failures\t\t',
- '# of unknown successes\t\t',
- '# of known failures\t\t',
- '# of untested testcases\t\t',
- '# of unresolved testcases\t',
- '# of unsupported tests\t\t'
- ]
- self.runs = dict()
-
- def usage (self):
- name = sys.argv[0]
- sys.stderr.write ('Usage: ' + name
- + ''' [-t tool] [-l variant-list] [-L] log-or-sum-file ...
-
- tool The tool (e.g. g++, libffi) for which to create a
- new test summary file. If not specified then output
- is created for all tools.
- variant-list One or more test variant names. If the list is
- not specified then one is constructed from all
- variants in the files for <tool>.
- sum-file A test summary file with the format of those
- created by runtest from DejaGnu.
- If -L is used, merge *.log files instead of *.sum. In this
- mode the exact order of lines may not be preserved, just different
- Running *.exp chunks should be in correct order.
-''')
- sys.exit (1)
-
- def fatal (self, what, string):
- if not what:
- what = sys.argv[0]
- sys.stderr.write (what + ': ' + string + '\n')
- sys.exit (1)
-
- # Parse the command-line arguments.
- def parse_cmdline (self):
- try:
- (options, self.files) = getopt.getopt (sys.argv[1:], 'l:t:L')
- if len (self.files) == 0:
- self.usage()
- for (option, value) in options:
- if option == '-l':
- self.variations.append (value)
- elif option == '-t':
- self.tools.append (value)
- else:
- self.do_sum = False
- except getopt.GetoptError as e:
- self.fatal (None, e.msg)
-
- # Try to parse time string TIME, returning an arbitrary time on failure.
- # Getting this right is just a nice-to-have so failures should be silent.
- def parse_time (self, time):
- try:
- return datetime.strptime (time, '%c')
- except ValueError:
- return datetime.now()
-
- # Parse an integer and abort on failure.
- def parse_int (self, filename, value):
- try:
- return int (value)
- except ValueError:
- self.fatal (filename, 'expected an integer, got: ' + value)
-
- # Return a list that represents no test results.
- def zero_counts (self):
- return [0 for x in self.count_names]
-
- # Return the ToolRun for tool NAME.
- def get_tool (self, name):
- if name not in self.runs:
- self.runs[name] = ToolRun (name)
- return self.runs[name]
-
- # Add the result counts in list FROMC to TOC.
- def accumulate_counts (self, toc, fromc):
- for i in range (len (self.count_names)):
- toc[i] += fromc[i]
-
- # Parse the list of variations after 'Schedule of variations:'.
- # Return the number seen.
- def parse_variations (self, filename, file):
- num_variations = 0
- while True:
- line = file.readline()
- if line == '':
- self.fatal (filename, 'could not parse variation list')
- if line == '\n':
- break
- self.known_variations.add (line.strip())
- num_variations += 1
- return num_variations
-
- # Parse from the first line after 'Running target ...' to the end
- # of the run's summary.
- def parse_run (self, filename, file, tool, variation, num_variations):
- header = None
- harness = None
- segment = None
- final_using = 0
-
- # If this is the first run for this variation, add any text before
- # the first harness to the header.
- if not variation.header:
- segment = Segment (filename, file.tell())
- variation.header = segment
-
- # Parse up until the first line of the summary.
- if num_variations == 1:
- end = '\t\t=== ' + tool.name + ' Summary ===\n'
- else:
- end = ('\t\t=== ' + tool.name + ' Summary for '
- + variation.name + ' ===\n')
- while True:
- line = file.readline()
- if line == '':
- self.fatal (filename, 'no recognised summary line')
- if line == end:
- break
-
- # Look for the start of a new harness.
- if line.startswith ('Running ') and line.endswith (' ...\n'):
- # Close off the current harness segment, if any.
- if harness:
- segment.lines -= final_using
- harness.add_segment (first_key, segment)
- name = line[len ('Running '):-len(' ...\n')]
- harness = variation.get_harness (name)
- segment = Segment (filename, file.tell())
- first_key = None
- final_using = 0
- continue
-
- # Record test results. Associate the first test result with
- # the harness segment, so that if a run for a particular harness
- # has been split up, we can reassemble the individual segments
- # in a sensible order.
- #
- # dejagnu sometimes issues warnings about the testing environment
- # before running any tests. Treat them as part of the header
- # rather than as a test result.
- match = self.result_re.match (line)
- if match and (harness or not line.startswith ('WARNING:')):
- if not harness:
- self.fatal (filename, 'saw test result before harness name')
- name = match.group (2)
- # Ugly hack to get the right order for gfortran.
- if name.startswith ('gfortran.dg/g77/'):
- name = 'h' + name
- key = (name, len (harness.results))
- harness.results.append ((key, line))
- if not first_key and sort_logs:
- first_key = key
-
- # 'Using ...' lines are only interesting in a header. Splitting
- # the test up into parallel runs leads to more 'Using ...' lines
- # than there would be in a single log.
- if line.startswith ('Using '):
- final_using += 1
- else:
- final_using = 0
-
- # Add other text to the current segment, if any.
- if segment:
- segment.lines += 1
-
- # Close off the final harness segment, if any.
- if harness:
- segment.lines -= final_using
- harness.add_segment (first_key, segment)
-
- # Parse the rest of the summary (the '# of ' lines).
- if len (variation.counts) == 0:
- variation.counts = self.zero_counts()
- while True:
- before = file.tell()
- line = file.readline()
- if line == '':
- break
- if line == '\n':
- continue
- if not line.startswith ('# '):
- file.seek (before)
- break
- found = False
- for i in range (len (self.count_names)):
- if line.startswith (self.count_names[i]):
- count = line[len (self.count_names[i]):-1].strip()
- variation.counts[i] += self.parse_int (filename, count)
- found = True
- break
- if not found:
- self.fatal (filename, 'unknown test result: ' + line[:-1])
-
- # Parse an acats run, which uses a different format from dejagnu.
- # We have just skipped over '=== acats configuration ==='.
- def parse_acats_run (self, filename, file):
- # Parse the preamble, which describes the configuration and logs
- # the creation of support files.
- record = (self.acats_premable == '')
- if record:
- self.acats_premable = '\t\t=== acats configuration ===\n'
- while True:
- line = file.readline()
- if line == '':
- self.fatal (filename, 'could not parse acats preamble')
- if line == '\t\t=== acats tests ===\n':
- break
- if record:
- self.acats_premable += line
-
- # Parse the test results themselves, using a dummy variation name.
- tool = self.get_tool ('acats')
- variation = tool.get_variation ('none')
- self.parse_run (filename, file, tool, variation, 1)
-
- # Parse the failure list.
- while True:
- before = file.tell()
- line = file.readline()
- if line.startswith ('*** FAILURES: '):
- self.acats_failures.append (line[len ('*** FAILURES: '):-1])
- continue
- file.seek (before)
- break
-
- # Parse the final summary at the end of a log in order to capture
- # the version output that follows it.
- def parse_final_summary (self, filename, file):
- record = (self.version_output == '')
- while True:
- line = file.readline()
- if line == '':
- break
- if line.startswith ('# of '):
- continue
- if record:
- self.version_output += line
- if line == '\n':
- break
-
- # Parse a .log or .sum file.
- def parse_file (self, filename, file):
- tool = None
- target = None
- num_variations = 1
- while True:
- line = file.readline()
- if line == '':
- return
-
- # Parse the list of variations, which comes before the test
- # runs themselves.
- if line.startswith ('Schedule of variations:'):
- num_variations = self.parse_variations (filename, file)
- continue
-
- # Parse a testsuite run for one tool/variation combination.
- if line.startswith ('Running target '):
- name = line[len ('Running target '):-1]
- if not tool:
- self.fatal (filename, 'could not parse tool name')
- if name not in self.known_variations:
- self.fatal (filename, 'unknown target: ' + name)
- self.parse_run (filename, file, tool,
- tool.get_variation (name),
- num_variations)
- # If there is only one variation then there is no separate
- # summary for it. Record any following version output.
- if num_variations == 1:
- self.parse_final_summary (filename, file)
- continue
-
- # Parse the start line. In the case where several files are being
- # parsed, pick the one with the earliest time.
- match = self.test_run_re.match (line)
- if match:
- time = self.parse_time (match.group (2))
- if not self.start_line or self.start_line[0] > time:
- self.start_line = (time, line)
- continue
-
- # Parse the form used for native testing.
- if line.startswith ('Native configuration is '):
- self.native_line = line
- continue
-
- # Parse the target triplet.
- if line.startswith ('Target is '):
- self.target_line = line
- continue
-
- # Parse the host triplet.
- if line.startswith ('Host is '):
- self.host_line = line
- continue
-
- # Parse the acats premable.
- if line == '\t\t=== acats configuration ===\n':
- self.parse_acats_run (filename, file)
- continue
-
- # Parse the tool name.
- match = self.tool_re.match (line)
- if match:
- tool = self.get_tool (match.group (1))
- continue
-
- # Skip over the final summary (which we instead create from
- # individual runs) and parse the version output.
- if tool and line == '\t\t=== ' + tool.name + ' Summary ===\n':
- if file.readline() != '\n':
- self.fatal (filename, 'expected blank line after summary')
- self.parse_final_summary (filename, file)
- continue
-
- # Parse the completion line. In the case where several files
- # are being parsed, pick the one with the latest time.
- match = self.completed_re.match (line)
- if match:
- time = self.parse_time (match.group (1))
- if not self.end_line or self.end_line[0] < time:
- self.end_line = (time, line)
- continue
-
- # Sanity check to make sure that important text doesn't get
- # dropped accidentally.
- if strict and line.strip() != '':
- self.fatal (filename, 'unrecognised line: ' + line[:-1])
-
- # Output a segment of text.
- def output_segment (self, segment):
- with safe_open (segment.filename) as file:
- file.seek (segment.start)
- for i in range (segment.lines):
- sys.stdout.write (file.readline())
-
- # Output a summary giving the number of times each type of result has
- # been seen.
- def output_summary (self, tool, counts):
- for i in range (len (self.count_names)):
- name = self.count_names[i]
- # dejagnu only prints result types that were seen at least once,
- # but acats always prints a number of unexpected failures.
- if (counts[i] > 0
- or (tool.name == 'acats'
- and name.startswith ('# of unexpected failures'))):
- sys.stdout.write ('%s%d\n' % (name, counts[i]))
-
- # Output unified .log or .sum information for a particular variation,
- # with a summary at the end.
- def output_variation (self, tool, variation):
- self.output_segment (variation.header)
- for harness in sorted (variation.harnesses.values(),
- key = attrgetter ('name')):
- sys.stdout.write ('Running ' + harness.name + ' ...\n')
- if self.do_sum:
- harness.results.sort()
- for (key, line) in harness.results:
- sys.stdout.write (line)
- else:
- # Rearrange the log segments into test order (but without
- # rearranging text within those segments).
- for key in sorted (harness.segments.keys()):
- self.output_segment (harness.segments[key])
- for segment in harness.empty:
- self.output_segment (segment)
- if len (self.variations) > 1:
- sys.stdout.write ('\t\t=== ' + tool.name + ' Summary for '
- + variation.name + ' ===\n\n')
- self.output_summary (tool, variation.counts)
-
- # Output unified .log or .sum information for a particular tool,
- # with a summary at the end.
- def output_tool (self, tool):
- counts = self.zero_counts()
- if tool.name == 'acats':
- # acats doesn't use variations, so just output everything.
- # It also has a different approach to whitespace.
- sys.stdout.write ('\t\t=== ' + tool.name + ' tests ===\n')
- for variation in tool.variations.values():
- self.output_variation (tool, variation)
- self.accumulate_counts (counts, variation.counts)
- sys.stdout.write ('\t\t=== ' + tool.name + ' Summary ===\n')
- else:
- # Output the results in the usual dejagnu runtest format.
- sys.stdout.write ('\n\t\t=== ' + tool.name + ' tests ===\n\n'
- 'Schedule of variations:\n')
- for name in self.variations:
- if name in tool.variations:
- sys.stdout.write (' ' + name + '\n')
- sys.stdout.write ('\n')
- for name in self.variations:
- if name in tool.variations:
- variation = tool.variations[name]
- sys.stdout.write ('Running target '
- + variation.name + '\n')
- self.output_variation (tool, variation)
- self.accumulate_counts (counts, variation.counts)
- sys.stdout.write ('\n\t\t=== ' + tool.name + ' Summary ===\n\n')
- self.output_summary (tool, counts)
-
- def main (self):
- self.parse_cmdline()
- try:
- # Parse the input files.
- for filename in self.files:
- with safe_open (filename) as file:
- self.parse_file (filename, file)
-
- # Decide what to output.
- if len (self.variations) == 0:
- self.variations = sorted (self.known_variations)
- else:
- for name in self.variations:
- if name not in self.known_variations:
- self.fatal (None, 'no results for ' + name)
- if len (self.tools) == 0:
- self.tools = sorted (self.runs.keys())
-
- # Output the header.
- if self.start_line:
- sys.stdout.write (self.start_line[1])
- sys.stdout.write (self.native_line)
- sys.stdout.write (self.target_line)
- sys.stdout.write (self.host_line)
- sys.stdout.write (self.acats_premable)
-
- # Output the main body.
- for name in self.tools:
- if name not in self.runs:
- self.fatal (None, 'no results for ' + name)
- self.output_tool (self.runs[name])
-
- # Output the footer.
- if len (self.acats_failures) > 0:
- sys.stdout.write ('*** FAILURES: '
- + ' '.join (self.acats_failures) + '\n')
- sys.stdout.write (self.version_output)
- if self.end_line:
- sys.stdout.write (self.end_line[1])
- except IOError as e:
- self.fatal (e.filename, e.strerror)
-
-Prog().main()

View File

@ -1,7 +1,8 @@
diff -dup -ruNp gdb-7.8-orig/gdb/doc/python.texi gdb-7.8/gdb/doc/python.texi Index: gdb-7.9.50.20150520/gdb/doc/python.texi
--- gdb-7.8-orig/gdb/doc/python.texi 2014-08-13 22:04:14.162441271 +0200 ===================================================================
+++ gdb-7.8/gdb/doc/python.texi 2014-08-13 22:07:20.894643853 +0200 --- gdb-7.9.50.20150520.orig/gdb/doc/python.texi 2015-05-31 17:57:12.431593983 +0200
@@ -228,6 +228,14 @@ returned as a string. The default is @c +++ gdb-7.9.50.20150520/gdb/doc/python.texi 2015-05-31 17:57:14.654607708 +0200
@@ -229,6 +229,14 @@ returned as a string. The default is @c
return value is @code{None}. If @var{to_string} is @code{True}, the return value is @code{None}. If @var{to_string} is @code{True}, the
@value{GDBN} virtual terminal will be temporarily set to unlimited width @value{GDBN} virtual terminal will be temporarily set to unlimited width
and height, and its pagination will be disabled; @pxref{Screen Size}. and height, and its pagination will be disabled; @pxref{Screen Size}.
@ -16,10 +17,11 @@ diff -dup -ruNp gdb-7.8-orig/gdb/doc/python.texi gdb-7.8/gdb/doc/python.texi
@end defun @end defun
@findex gdb.breakpoints @findex gdb.breakpoints
diff -dup -ruNp gdb-7.8-orig/gdb/python/python-internal.h gdb-7.8/gdb/python/python-internal.h Index: gdb-7.9.50.20150520/gdb/python/python-internal.h
--- gdb-7.8-orig/gdb/python/python-internal.h 2014-08-13 22:04:14.835441977 +0200 ===================================================================
+++ gdb-7.8/gdb/python/python-internal.h 2014-08-13 22:07:20.895643867 +0200 --- gdb-7.9.50.20150520.orig/gdb/python/python-internal.h 2015-05-31 17:57:12.432593989 +0200
@@ -143,6 +143,8 @@ typedef int Py_ssize_t; +++ gdb-7.9.50.20150520/gdb/python/python-internal.h 2015-05-31 17:57:14.654607708 +0200
@@ -142,6 +142,8 @@ typedef int Py_ssize_t;
#define PyGILState_Release(ARG) ((void)(ARG)) #define PyGILState_Release(ARG) ((void)(ARG))
#define PyEval_InitThreads() #define PyEval_InitThreads()
#define PyThreadState_Swap(ARG) ((void)(ARG)) #define PyThreadState_Swap(ARG) ((void)(ARG))
@ -28,18 +30,18 @@ diff -dup -ruNp gdb-7.8-orig/gdb/python/python-internal.h gdb-7.8/gdb/python/pyt
#define PyEval_ReleaseLock() #define PyEval_ReleaseLock()
#endif #endif
diff -dup -ruNp gdb-7.8-orig/gdb/python/python.c gdb-7.8/gdb/python/python.c Index: gdb-7.9.50.20150520/gdb/python/python.c
--- gdb-7.8-orig/gdb/python/python.c 2014-08-13 22:04:14.164441273 +0200 ===================================================================
+++ gdb-7.8/gdb/python/python.c 2014-08-13 22:07:20.895643867 +0200 --- gdb-7.9.50.20150520.orig/gdb/python/python.c 2015-05-31 17:57:14.656607720 +0200
@@ -620,14 +620,19 @@ execute_gdb_command (PyObject *self, PyO +++ gdb-7.9.50.20150520/gdb/python/python.c 2015-05-31 18:02:08.891424227 +0200
@@ -627,13 +627,18 @@ execute_gdb_command (PyObject *self, PyO
{ {
const char *arg; const char *arg;
PyObject *from_tty_obj = NULL, *to_string_obj = NULL; PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
- int from_tty, to_string; - int from_tty, to_string;
- static char *keywords[] = {"command", "from_tty", "to_string", NULL };
+ PyObject *release_gil_obj = NULL; + PyObject *release_gil_obj = NULL;
+ int from_tty, to_string, release_gil; + int from_tty, to_string, release_gil;
volatile struct gdb_exception except;
- static char *keywords[] = {"command", "from_tty", "to_string", NULL };
+ static char *keywords[] = {"command", "from_tty", "to_string", + static char *keywords[] = {"command", "from_tty", "to_string",
+ "release_gil", NULL }; + "release_gil", NULL };
char *result = NULL; char *result = NULL;
@ -55,7 +57,7 @@ diff -dup -ruNp gdb-7.8-orig/gdb/python/python.c gdb-7.8/gdb/python/python.c
return NULL; return NULL;
from_tty = 0; from_tty = 0;
@@ -648,12 +652,28 @@ execute_gdb_command (PyObject *self, PyO @@ -654,12 +659,28 @@ execute_gdb_command (PyObject *self, PyO
to_string = cmp; to_string = cmp;
} }
@ -68,7 +70,7 @@ diff -dup -ruNp gdb-7.8-orig/gdb/python/python.c gdb-7.8/gdb/python/python.c
+ release_gil = cmp; + release_gil = cmp;
+ } + }
+ +
TRY_CATCH (except, RETURN_MASK_ALL) TRY
{ {
/* Copy the argument text in case the command modifies it. */ /* Copy the argument text in case the command modifies it. */
char *copy = xstrdup (arg); char *copy = xstrdup (arg);
@ -84,7 +86,7 @@ diff -dup -ruNp gdb-7.8-orig/gdb/python/python.c gdb-7.8/gdb/python/python.c
make_cleanup_restore_integer (&interpreter_async); make_cleanup_restore_integer (&interpreter_async);
interpreter_async = 0; interpreter_async = 0;
@@ -666,9 +686,21 @@ execute_gdb_command (PyObject *self, PyO @@ -672,11 +693,23 @@ execute_gdb_command (PyObject *self, PyO
execute_command (copy, from_tty); execute_command (copy, from_tty);
} }
@ -94,22 +96,25 @@ diff -dup -ruNp gdb-7.8-orig/gdb/python/python.c gdb-7.8/gdb/python/python.c
+ +
do_cleanups (cleanup); do_cleanups (cleanup);
} }
- GDB_PY_HANDLE_EXCEPTION (except); CATCH (except, RETURN_MASK_ALL)
+ if (except.reason < 0) {
+ { - GDB_PY_HANDLE_EXCEPTION (except);
+ /* Reacquire the GIL if it was released earlier. */ + if (except.reason < 0)
+ if (release_gil) + {
+ PyEval_RestoreThread (state); + /* Reacquire the GIL if it was released earlier. */
+ if (release_gil)
+ PyEval_RestoreThread (state);
+ +
+ gdbpy_convert_exception (except); + gdbpy_convert_exception (except);
+ return NULL; + return NULL;
+ } + }
}
END_CATCH
/* Do any commands attached to breakpoint we stopped at. */ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.c
bpstat_do_actions (); ===================================================================
diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.c gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.c --- /dev/null 1970-01-01 00:00:00.000000000 +0000
--- gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.c 1970-01-01 01:00:00.000000000 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.c 2015-05-31 17:57:14.656607720 +0200
+++ gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.c 2014-08-13 22:33:05.052648912 +0200
@@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
+#include <stdio.h> +#include <stdio.h>
+ +
@ -123,9 +128,10 @@ diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.c gdb-7.8/g
+ printf ("Sleeping %d\n", i); + printf ("Sleeping %d\n", i);
+ } + }
+} +}
diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.exp gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.exp
--- gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.exp 1970-01-01 01:00:00.000000000 +0100 ===================================================================
+++ gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.exp 2014-08-13 22:33:00.660641300 +0200 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.exp 2015-05-31 17:57:14.657607726 +0200
@@ -0,0 +1,69 @@ @@ -0,0 +1,69 @@
+# Copyright (C) 2014 Free Software Foundation, Inc. +# Copyright (C) 2014 Free Software Foundation, Inc.
+ +
@ -196,9 +202,10 @@ diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.exp gdb-7.8
+ } + }
+ } + }
+} +}
diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.py gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.py Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.py
--- gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.py 1970-01-01 01:00:00.000000000 +0100 ===================================================================
+++ gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.py 2014-08-13 22:33:08.996654320 +0200 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.py 2015-05-31 17:57:14.657607726 +0200
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
+import thread +import thread
+import time +import time

View File

@ -1,175 +0,0 @@
http://sourceware.org/ml/gdb-patches/2015-02/msg00091.html
Subject: [patch] Fix Python 3 build error on 32-bit hosts
--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=iso-2022-jp
Content-Disposition: inline
Hi,
on Fedora Rawhide (==22) i686 using --with-python=/usr/bin/python3 one gets:
gcc -g -I. -I. -I./common -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -pthread -I/usr/include/guile/2.0 -I/usr/include/python3.4m -I/usr/include/python3.4m -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o py-value.o -MT py-value.o -MMD -MP -MF .deps/py-value.Tpo -fno-strict-aliasing -DNDEBUG -fwrapv ./python/py-value.c
./python/py-value.c:1696:3: error: initialization from incompatible pointer type [-Werror]
valpy_hash, /*tp_hash*/
^
./python/py-value.c:1696:3: error: (near initialization for $B!F(Bvalue_object_type.tp_hash$B!G(B) [-Werror]
cc1: all warnings being treated as errors
Makefile:2628: recipe for target 'py-value.o' failed
This is because in Python 2 tp_hash was:
typedef long (*hashfunc)(PyObject *);
while in Python 3 tp_hash is:
typedef Py_hash_t (*hashfunc)(PyObject *);
Py_hash_t is int for 32-bit hosts and long for 64-bit hosts. While on 32-bit
hosts sizeof(long)==sizeof(int) still the hashfunc type is formally
incompatible. As this patch should have no compiled code change it is not
really necessary for gdb-7.9, it would fix there just this non-fatal
compilation warning:
./python/py-value.c:1696:3: warning: initialization from incompatible pointer type
valpy_hash, /*tp_hash*/
^
./python/py-value.c:1696:3: warning: (near initialization for $B!F(Bvalue_object_type.tp_hash$B!G(B)
A question is whether the autoconf test isn't an overkill. One could use
instead just:
#if PYTHON_ABI_VERSION >= 3
Also one could use that #if either just at the valpy_hash() definition or one
could provide Py_hash_t in gdb/defs.h or one could provide some GDB_Py_hash_t
in gdb/defs.h.
Tested compilation with:
python-devel-2.7.9-4.fc22.x86_64
python-devel-2.7.9-4.fc22.i686
python3-devel-3.4.2-4.fc22.x86_64
python3-devel-3.4.2-4.fc22.i686
Jan
--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=1
gdb/
2015-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
* configure.ac <"${have_libpython}" != no>: Define Py_hash_t.
* python/py-value.c (valpy_fetch_lazy): Use it. Remove cast to the
return type.
* config.in: Regenerate.
* configure: Regenerate.
diff --git a/gdb/config.in b/gdb/config.in
index 806cbac..44acfac 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -617,6 +617,9 @@
/* Define if the python directory should be relocated when GDB is moved. */
#undef PYTHON_PATH_RELOCATABLE
+/* Provide Python 3 Py_hash_t for Python 2. */
+#undef Py_hash_t
+
/* Relocated directory for source files. */
#undef RELOC_SRCDIR
diff --git a/gdb/configure b/gdb/configure
index 9632f9a..65f5b2c 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -8749,6 +8749,45 @@ rm -f conftest.err conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
$as_echo "${python_has_threads}" >&6; }
CPPFLAGS="${saved_CPPFLAGS}"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Py_hash_t" >&5
+$as_echo_n "checking for Py_hash_t... " >&6; }
+if test "${gdb_cv_Py_hash_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PYTHON_CFLAGS"
+ old_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <Python.h>
+int
+main ()
+{
+Py_hash_t var;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gdb_cv_Py_hash_t=yes
+else
+ gdb_cv_Py_hash_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$old_CPPFLAGS"
+ CFLAGS="$old_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_Py_hash_t" >&5
+$as_echo "$gdb_cv_Py_hash_t" >&6; }
+ if test "x$gdb_cv_Py_hash_t" = "xno"; then
+
+$as_echo "#define Py_hash_t long" >>confdefs.h
+
+ fi
else
# Even if Python support is not compiled in, we need to have this file
# included so that the "python" command, et.al., still exists.
diff --git a/gdb/configure.ac b/gdb/configure.ac
index dfc6947..f335b7b 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1016,6 +1016,25 @@ if test "${have_libpython}" != no; then
]]), [python_has_threads=no], [python_has_threads=yes])
AC_MSG_RESULT(${python_has_threads})
CPPFLAGS="${saved_CPPFLAGS}"
+
+ AC_CACHE_CHECK([for Py_hash_t], gdb_cv_Py_hash_t,
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PYTHON_CFLAGS"
+ old_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+ AC_TRY_COMPILE(
+ [#include <Python.h>],
+ [Py_hash_t var;],
+ gdb_cv_Py_hash_t=yes,
+ gdb_cv_Py_hash_t=no
+ )
+ CPPFLAGS="$old_CPPFLAGS"
+ CFLAGS="$old_CFLAGS"
+ )
+ if test "x$gdb_cv_Py_hash_t" = "xno"; then
+ AC_DEFINE(Py_hash_t, long,
+ [Provide Python 3 Py_hash_t for Python 2.])
+ fi
else
# Even if Python support is not compiled in, we need to have this file
# included so that the "python" command, et.al., still exists.
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 4c4d36e..5a13777 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -895,10 +895,10 @@ valpy_fetch_lazy (PyObject *self, PyObject *args)
/* Calculate and return the address of the PyObject as the value of
the builtin __hash__ call. */
-static long
+static Py_hash_t
valpy_hash (PyObject *self)
{
- return (long) (intptr_t) self;
+ return (intptr_t) self;
}
enum valpy_opcode

View File

@ -1,56 +0,0 @@
http://sourceware.org/ml/gdb-patches/2015-02/msg00361.html
Subject: PR python/17927 (Python 3 testsuite compatability)
This patch updates the Python testsuite to maintain Python 3
compatibility. I'll check it in under the obvious tomorrow (if
nobody objects otherwise.)
Cheers
Phil
2015-02-16 Phil Muldoon <pmuldoon@redhat.com>
PR python/17927
* gdb.python/py-objfile.exp: Use print ()
* gdb.python/py-type.exp: Ditto.
* gdb.python/py-framefilter.py: Update to use map in
Python 3.
--
diff --git a/gdb/testsuite/gdb.python/py-framefilter.py b/gdb/testsuite/gdb.python/py-framefilter.py
index 0de026c..8c65edc 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.py
+++ b/gdb/testsuite/gdb.python/py-framefilter.py
@@ -145,7 +145,10 @@ class ErrorFilter():
gdb.frame_filters [self.name] = self
def filter(self, frame_iter):
- return itertools.imap(ErrorInName, frame_iter)
+ if hasattr(itertools, "imap"):
+ return itertools.imap(ErrorInName, frame_iter)
+ else:
+ return map(ErrorInName, frame_iter)
FrameFilter()
FrameElider()
diff --git a/gdb/testsuite/gdb.python/py-type.exp b/gdb/testsuite/gdb.python/py-type.exp
index c4c8d9f..6c4e5f8 100644
--- a/gdb/testsuite/gdb.python/py-type.exp
+++ b/gdb/testsuite/gdb.python/py-type.exp
@@ -247,10 +247,10 @@ restart_gdb "${binfile}"
# Skip all tests if Python scripting is not enabled.
if { [skip_python_tests] } { continue }
-gdb_test "python print gdb.lookup_type('char').array(1, 0)" \
+gdb_test "python print (gdb.lookup_type('char').array(1, 0))" \
"char \\\[0\\\]"
-gdb_test "python print gdb.lookup_type('char').array(1, -1)" \
+gdb_test "python print (gdb.lookup_type('char').array(1, -1))" \
"Array length must not be negative.*"
with_test_prefix "lang_c" {

File diff suppressed because it is too large Load Diff

View File

@ -137,10 +137,10 @@ Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=bitpos-tdep.patch Content-Disposition: attachment; filename=bitpos-tdep.patch
Index: gdb-7.8.50.20141228/gdb/alpha-tdep.c Index: gdb-7.9.50.20150520/gdb/alpha-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/alpha-tdep.c 2015-01-05 22:18:55.988023607 +0100 --- gdb-7.9.50.20150520.orig/gdb/alpha-tdep.c 2015-05-31 17:15:01.056868035 +0200
+++ gdb-7.8.50.20141228/gdb/alpha-tdep.c 2015-01-05 22:19:08.086078440 +0100 +++ gdb-7.9.50.20150520/gdb/alpha-tdep.c 2015-05-31 17:15:03.419882846 +0200
@@ -298,18 +298,18 @@ alpha_push_dummy_call (struct gdbarch *g @@ -298,18 +298,18 @@ alpha_push_dummy_call (struct gdbarch *g
{ {
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@ -184,20 +184,20 @@ Index: gdb-7.8.50.20141228/gdb/alpha-tdep.c
memcpy (arg_reg_buffer + offset, contents, tlen); memcpy (arg_reg_buffer + offset, contents, tlen);
offset += tlen; offset += tlen;
contents += tlen; contents += tlen;
Index: gdb-7.8.50.20141228/gdb/amd64-tdep.c Index: gdb-7.9.50.20150520/gdb/amd64-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/amd64-tdep.c 2015-01-05 22:18:55.989023612 +0100 --- gdb-7.9.50.20150520.orig/gdb/amd64-tdep.c 2015-05-31 17:15:01.058868047 +0200
+++ gdb-7.8.50.20141228/gdb/amd64-tdep.c 2015-01-05 22:19:08.087078444 +0100 +++ gdb-7.9.50.20150520/gdb/amd64-tdep.c 2015-05-31 17:15:40.253113722 +0200
@@ -700,7 +700,7 @@ amd64_return_value (struct gdbarch *gdba @@ -701,7 +701,7 @@ amd64_return_value (struct gdbarch *gdba
gdb_byte *readbuf, const gdb_byte *writebuf) gdb_byte *readbuf, const gdb_byte *writebuf)
{ {
enum amd64_reg_class class[2]; enum amd64_reg_class theclass[2];
- int len = TYPE_LENGTH (type); - int len = TYPE_LENGTH (type);
+ LONGEST len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type);
static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM }; static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM };
static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM }; static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM };
int integer_reg = 0; int integer_reg = 0;
@@ -851,8 +851,8 @@ amd64_push_arguments (struct regcache *r @@ -852,8 +852,8 @@ amd64_push_arguments (struct regcache *r
}; };
struct value **stack_args = alloca (nargs * sizeof (struct value *)); struct value **stack_args = alloca (nargs * sizeof (struct value *));
int num_stack_args = 0; int num_stack_args = 0;
@ -208,19 +208,19 @@ Index: gdb-7.8.50.20141228/gdb/amd64-tdep.c
int integer_reg = 0; int integer_reg = 0;
int sse_reg = 0; int sse_reg = 0;
int i; int i;
@@ -864,7 +864,7 @@ amd64_push_arguments (struct regcache *r @@ -865,7 +865,7 @@ amd64_push_arguments (struct regcache *r
for (i = 0; i < nargs; i++) for (i = 0; i < nargs; i++)
{ {
struct type *type = value_type (args[i]); struct type *type = value_type (args[i]);
- int len = TYPE_LENGTH (type); - int len = TYPE_LENGTH (type);
+ LONGEST len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type);
enum amd64_reg_class class[2]; enum amd64_reg_class theclass[2];
int needed_integer_regs = 0; int needed_integer_regs = 0;
int needed_sse_regs = 0; int needed_sse_regs = 0;
Index: gdb-7.8.50.20141228/gdb/amd64-windows-tdep.c Index: gdb-7.9.50.20150520/gdb/amd64-windows-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/amd64-windows-tdep.c 2015-01-05 22:18:55.990023616 +0100 --- gdb-7.9.50.20150520.orig/gdb/amd64-windows-tdep.c 2015-05-31 17:15:01.059868054 +0200
+++ gdb-7.8.50.20141228/gdb/amd64-windows-tdep.c 2015-01-05 22:19:08.087078444 +0100 +++ gdb-7.9.50.20150520/gdb/amd64-windows-tdep.c 2015-05-31 17:15:03.421882859 +0200
@@ -288,7 +288,7 @@ amd64_windows_return_value (struct gdbar @@ -288,7 +288,7 @@ amd64_windows_return_value (struct gdbar
struct type *type, struct regcache *regcache, struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf) gdb_byte *readbuf, const gdb_byte *writebuf)
@ -230,11 +230,11 @@ Index: gdb-7.8.50.20141228/gdb/amd64-windows-tdep.c
int regnum = -1; int regnum = -1;
/* See if our value is returned through a register. If it is, then /* See if our value is returned through a register. If it is, then
Index: gdb-7.8.50.20141228/gdb/arm-tdep.c Index: gdb-7.9.50.20150520/gdb/arm-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/arm-tdep.c 2015-01-05 22:18:55.995023639 +0100 --- gdb-7.9.50.20150520.orig/gdb/arm-tdep.c 2015-05-31 17:15:01.069868116 +0200
+++ gdb-7.8.50.20141228/gdb/arm-tdep.c 2015-01-05 22:19:08.089078453 +0100 +++ gdb-7.9.50.20150520/gdb/arm-tdep.c 2015-05-31 17:15:03.425882884 +0200
@@ -3524,7 +3524,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc @@ -3537,7 +3537,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc
array). Vector types are not currently supported, matching the array). Vector types are not currently supported, matching the
generic AAPCS support. */ generic AAPCS support. */
@ -243,7 +243,7 @@ Index: gdb-7.8.50.20141228/gdb/arm-tdep.c
arm_vfp_cprc_sub_candidate (struct type *t, arm_vfp_cprc_sub_candidate (struct type *t,
enum arm_vfp_cprc_base_type *base_type) enum arm_vfp_cprc_base_type *base_type)
{ {
@@ -3587,7 +3587,7 @@ arm_vfp_cprc_sub_candidate (struct type @@ -3600,7 +3600,7 @@ arm_vfp_cprc_sub_candidate (struct type
case TYPE_CODE_ARRAY: case TYPE_CODE_ARRAY:
{ {
@ -252,7 +252,7 @@ Index: gdb-7.8.50.20141228/gdb/arm-tdep.c
unsigned unitlen; unsigned unitlen;
count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type); count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type);
if (count == -1) if (count == -1)
@@ -3607,13 +3607,15 @@ arm_vfp_cprc_sub_candidate (struct type @@ -3620,13 +3620,15 @@ arm_vfp_cprc_sub_candidate (struct type
case TYPE_CODE_STRUCT: case TYPE_CODE_STRUCT:
{ {
@ -271,7 +271,7 @@ Index: gdb-7.8.50.20141228/gdb/arm-tdep.c
if (sub_count == -1) if (sub_count == -1)
return -1; return -1;
count += sub_count; count += sub_count;
@@ -3633,13 +3635,15 @@ arm_vfp_cprc_sub_candidate (struct type @@ -3646,13 +3648,15 @@ arm_vfp_cprc_sub_candidate (struct type
case TYPE_CODE_UNION: case TYPE_CODE_UNION:
{ {
@ -290,7 +290,7 @@ Index: gdb-7.8.50.20141228/gdb/arm-tdep.c
if (sub_count == -1) if (sub_count == -1)
return -1; return -1;
count = (count > sub_count ? count : sub_count); count = (count > sub_count ? count : sub_count);
@@ -3675,7 +3679,7 @@ arm_vfp_call_candidate (struct type *t, @@ -3688,7 +3692,7 @@ arm_vfp_call_candidate (struct type *t,
int *count) int *count)
{ {
enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN;
@ -299,7 +299,7 @@ Index: gdb-7.8.50.20141228/gdb/arm-tdep.c
if (c <= 0 || c > 4) if (c <= 0 || c > 4)
return 0; return 0;
*base_type = b; *base_type = b;
@@ -3756,7 +3760,7 @@ arm_push_dummy_call (struct gdbarch *gdb @@ -3769,7 +3773,7 @@ arm_push_dummy_call (struct gdbarch *gdb
for (argnum = 0; argnum < nargs; argnum++) for (argnum = 0; argnum < nargs; argnum++)
{ {
@ -308,10 +308,10 @@ Index: gdb-7.8.50.20141228/gdb/arm-tdep.c
struct type *arg_type; struct type *arg_type;
struct type *target_type; struct type *target_type;
enum type_code typecode; enum type_code typecode;
Index: gdb-7.8.50.20141228/gdb/avr-tdep.c Index: gdb-7.9.50.20150520/gdb/avr-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/avr-tdep.c 2015-01-05 22:18:55.996023643 +0100 --- gdb-7.9.50.20150520.orig/gdb/avr-tdep.c 2015-05-31 17:15:01.071868129 +0200
+++ gdb-7.8.50.20141228/gdb/avr-tdep.c 2015-01-05 22:19:08.089078453 +0100 +++ gdb-7.9.50.20150520/gdb/avr-tdep.c 2015-05-31 17:15:03.425882884 +0200
@@ -1196,13 +1196,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s @@ -1196,13 +1196,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s
struct stack_item struct stack_item
@ -345,10 +345,10 @@ Index: gdb-7.8.50.20141228/gdb/avr-tdep.c
/* Calculate the potential last register needed. */ /* Calculate the potential last register needed. */
last_regnum = regnum - (len + (len & 1)); last_regnum = regnum - (len + (len & 1));
Index: gdb-7.8.50.20141228/gdb/bfin-tdep.c Index: gdb-7.9.50.20150520/gdb/bfin-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/bfin-tdep.c 2015-01-05 22:18:55.996023643 +0100 --- gdb-7.9.50.20150520.orig/gdb/bfin-tdep.c 2015-05-31 17:15:01.071868129 +0200
+++ gdb-7.8.50.20141228/gdb/bfin-tdep.c 2015-01-05 22:19:08.090078458 +0100 +++ gdb-7.9.50.20150520/gdb/bfin-tdep.c 2015-05-31 17:15:03.426882890 +0200
@@ -504,7 +504,7 @@ bfin_push_dummy_call (struct gdbarch *gd @@ -504,7 +504,7 @@ bfin_push_dummy_call (struct gdbarch *gd
gdb_byte buf[4]; gdb_byte buf[4];
int i; int i;
@ -367,10 +367,10 @@ Index: gdb-7.8.50.20141228/gdb/bfin-tdep.c
sp -= container_len; sp -= container_len;
write_memory (sp, value_contents_writeable (args[i]), container_len); write_memory (sp, value_contents_writeable (args[i]), container_len);
Index: gdb-7.8.50.20141228/gdb/cris-tdep.c Index: gdb-7.9.50.20150520/gdb/cris-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/cris-tdep.c 2015-01-05 22:18:55.997023648 +0100 --- gdb-7.9.50.20150520.orig/gdb/cris-tdep.c 2015-05-31 17:15:01.073868142 +0200
+++ gdb-7.8.50.20141228/gdb/cris-tdep.c 2015-01-05 22:19:08.090078458 +0100 +++ gdb-7.9.50.20150520/gdb/cris-tdep.c 2015-05-31 17:15:03.427882897 +0200
@@ -663,13 +663,13 @@ static CORE_ADDR cris_unwind_sp (struct @@ -663,13 +663,13 @@ static CORE_ADDR cris_unwind_sp (struct
struct stack_item struct stack_item
@ -405,10 +405,10 @@ Index: gdb-7.8.50.20141228/gdb/cris-tdep.c
/* How may registers worth of storage do we need for this argument? */ /* How may registers worth of storage do we need for this argument? */
reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0); reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0);
Index: gdb-7.8.50.20141228/gdb/h8300-tdep.c Index: gdb-7.9.50.20150520/gdb/h8300-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/h8300-tdep.c 2015-01-05 22:18:55.998023652 +0100 --- gdb-7.9.50.20150520.orig/gdb/h8300-tdep.c 2015-05-31 17:15:01.074868148 +0200
+++ gdb-7.8.50.20141228/gdb/h8300-tdep.c 2015-01-05 22:19:08.091078463 +0100 +++ gdb-7.9.50.20150520/gdb/h8300-tdep.c 2015-05-31 17:15:03.427882897 +0200
@@ -639,7 +639,7 @@ h8300_push_dummy_call (struct gdbarch *g @@ -639,7 +639,7 @@ h8300_push_dummy_call (struct gdbarch *g
int struct_return, CORE_ADDR struct_addr) int struct_return, CORE_ADDR struct_addr)
{ {
@ -441,11 +441,11 @@ Index: gdb-7.8.50.20141228/gdb/h8300-tdep.c
for (offset = 0; offset < padded_len; offset += wordsize) for (offset = 0; offset < padded_len; offset += wordsize)
{ {
Index: gdb-7.8.50.20141228/gdb/hppa-tdep.c Index: gdb-7.9.50.20150520/gdb/hppa-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/hppa-tdep.c 2015-01-05 22:18:55.999023657 +0100 --- gdb-7.9.50.20150520.orig/gdb/hppa-tdep.c 2015-05-31 17:15:01.076868160 +0200
+++ gdb-7.8.50.20141228/gdb/hppa-tdep.c 2015-01-05 22:19:08.091078463 +0100 +++ gdb-7.9.50.20150520/gdb/hppa-tdep.c 2015-05-31 17:15:03.428882903 +0200
@@ -960,7 +960,7 @@ hppa64_push_dummy_call (struct gdbarch * @@ -991,7 +991,7 @@ hppa64_push_dummy_call (struct gdbarch *
{ {
struct value *arg = args[i]; struct value *arg = args[i];
struct type *type = value_type (arg); struct type *type = value_type (arg);
@ -454,7 +454,7 @@ Index: gdb-7.8.50.20141228/gdb/hppa-tdep.c
const bfd_byte *valbuf; const bfd_byte *valbuf;
bfd_byte fptrbuf[8]; bfd_byte fptrbuf[8];
int regnum; int regnum;
@@ -1155,7 +1155,7 @@ hppa64_return_value (struct gdbarch *gdb @@ -1186,7 +1186,7 @@ hppa64_return_value (struct gdbarch *gdb
struct type *type, struct regcache *regcache, struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf) gdb_byte *readbuf, const gdb_byte *writebuf)
{ {
@ -463,10 +463,10 @@ Index: gdb-7.8.50.20141228/gdb/hppa-tdep.c
int regnum, offset; int regnum, offset;
if (len > 16) if (len > 16)
Index: gdb-7.8.50.20141228/gdb/i386-darwin-tdep.c Index: gdb-7.9.50.20150520/gdb/i386-darwin-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/i386-darwin-tdep.c 2015-01-05 22:18:55.999023657 +0100 --- gdb-7.9.50.20150520.orig/gdb/i386-darwin-tdep.c 2015-05-31 17:15:01.076868160 +0200
+++ gdb-7.8.50.20141228/gdb/i386-darwin-tdep.c 2015-01-05 22:19:08.091078463 +0100 +++ gdb-7.9.50.20150520/gdb/i386-darwin-tdep.c 2015-05-31 17:15:03.428882903 +0200
@@ -163,7 +163,7 @@ i386_darwin_push_dummy_call (struct gdba @@ -163,7 +163,7 @@ i386_darwin_push_dummy_call (struct gdba
for (write_pass = 0; write_pass < 2; write_pass++) for (write_pass = 0; write_pass < 2; write_pass++)
@ -476,11 +476,11 @@ Index: gdb-7.8.50.20141228/gdb/i386-darwin-tdep.c
int num_m128 = 0; int num_m128 = 0;
if (struct_return) if (struct_return)
Index: gdb-7.8.50.20141228/gdb/i386-tdep.c Index: gdb-7.9.50.20150520/gdb/i386-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/i386-tdep.c 2015-01-05 22:18:56.002023671 +0100 --- gdb-7.9.50.20150520.orig/gdb/i386-tdep.c 2015-05-31 17:15:01.082868198 +0200
+++ gdb-7.8.50.20141228/gdb/i386-tdep.c 2015-01-05 22:19:08.092078467 +0100 +++ gdb-7.9.50.20150520/gdb/i386-tdep.c 2015-05-31 17:15:03.430882915 +0200
@@ -2643,7 +2643,7 @@ i386_push_dummy_call (struct gdbarch *gd @@ -2651,7 +2651,7 @@ i386_push_dummy_call (struct gdbarch *gd
gdb_byte buf[4]; gdb_byte buf[4];
int i; int i;
int write_pass; int write_pass;
@ -489,7 +489,7 @@ Index: gdb-7.8.50.20141228/gdb/i386-tdep.c
/* Determine the total space required for arguments and struct /* Determine the total space required for arguments and struct
return address in a first pass (allowing for 16-byte-aligned return address in a first pass (allowing for 16-byte-aligned
@@ -2651,7 +2651,7 @@ i386_push_dummy_call (struct gdbarch *gd @@ -2659,7 +2659,7 @@ i386_push_dummy_call (struct gdbarch *gd
for (write_pass = 0; write_pass < 2; write_pass++) for (write_pass = 0; write_pass < 2; write_pass++)
{ {
@ -498,7 +498,7 @@ Index: gdb-7.8.50.20141228/gdb/i386-tdep.c
if (struct_return) if (struct_return)
{ {
@@ -2668,7 +2668,7 @@ i386_push_dummy_call (struct gdbarch *gd @@ -2676,7 +2676,7 @@ i386_push_dummy_call (struct gdbarch *gd
for (i = 0; i < nargs; i++) for (i = 0; i < nargs; i++)
{ {
@ -507,7 +507,7 @@ Index: gdb-7.8.50.20141228/gdb/i386-tdep.c
if (write_pass) if (write_pass)
{ {
@@ -2875,7 +2875,7 @@ i386_reg_struct_return_p (struct gdbarch @@ -2883,7 +2883,7 @@ i386_reg_struct_return_p (struct gdbarch
{ {
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum type_code code = TYPE_CODE (type); enum type_code code = TYPE_CODE (type);
@ -516,7 +516,7 @@ Index: gdb-7.8.50.20141228/gdb/i386-tdep.c
gdb_assert (code == TYPE_CODE_STRUCT gdb_assert (code == TYPE_CODE_STRUCT
|| code == TYPE_CODE_UNION || code == TYPE_CODE_UNION
@@ -3621,7 +3621,7 @@ static int @@ -3629,7 +3629,7 @@ static int
i386_convert_register_p (struct gdbarch *gdbarch, i386_convert_register_p (struct gdbarch *gdbarch,
int regnum, struct type *type) int regnum, struct type *type)
{ {
@ -525,7 +525,7 @@ Index: gdb-7.8.50.20141228/gdb/i386-tdep.c
/* Values may be spread across multiple registers. Most debugging /* Values may be spread across multiple registers. Most debugging
formats aren't expressive enough to specify the locations, so formats aren't expressive enough to specify the locations, so
@@ -3654,7 +3654,7 @@ i386_register_to_value (struct frame_inf @@ -3662,7 +3662,7 @@ i386_register_to_value (struct frame_inf
int *optimizedp, int *unavailablep) int *optimizedp, int *unavailablep)
{ {
struct gdbarch *gdbarch = get_frame_arch (frame); struct gdbarch *gdbarch = get_frame_arch (frame);
@ -534,7 +534,7 @@ Index: gdb-7.8.50.20141228/gdb/i386-tdep.c
if (i386_fp_regnum_p (gdbarch, regnum)) if (i386_fp_regnum_p (gdbarch, regnum))
return i387_register_to_value (frame, regnum, type, to, return i387_register_to_value (frame, regnum, type, to,
@@ -3690,7 +3690,7 @@ static void @@ -3698,7 +3698,7 @@ static void
i386_value_to_register (struct frame_info *frame, int regnum, i386_value_to_register (struct frame_info *frame, int regnum,
struct type *type, const gdb_byte *from) struct type *type, const gdb_byte *from)
{ {
@ -543,11 +543,11 @@ Index: gdb-7.8.50.20141228/gdb/i386-tdep.c
if (i386_fp_regnum_p (get_frame_arch (frame), regnum)) if (i386_fp_regnum_p (get_frame_arch (frame), regnum))
{ {
Index: gdb-7.8.50.20141228/gdb/iq2000-tdep.c Index: gdb-7.9.50.20150520/gdb/iq2000-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/iq2000-tdep.c 2015-01-05 22:18:56.003023675 +0100 --- gdb-7.9.50.20150520.orig/gdb/iq2000-tdep.c 2015-05-31 17:15:01.083868204 +0200
+++ gdb-7.8.50.20141228/gdb/iq2000-tdep.c 2015-01-05 22:19:08.092078467 +0100 +++ gdb-7.9.50.20150520/gdb/iq2000-tdep.c 2015-05-31 17:15:03.431882922 +0200
@@ -653,8 +653,9 @@ iq2000_push_dummy_call (struct gdbarch * @@ -651,8 +651,9 @@ iq2000_push_dummy_call (struct gdbarch *
const bfd_byte *val; const bfd_byte *val;
bfd_byte buf[4]; bfd_byte buf[4];
struct type *type; struct type *type;
@ -559,10 +559,10 @@ Index: gdb-7.8.50.20141228/gdb/iq2000-tdep.c
/* Used to copy struct arguments into the stack. */ /* Used to copy struct arguments into the stack. */
CORE_ADDR struct_ptr; CORE_ADDR struct_ptr;
Index: gdb-7.8.50.20141228/gdb/m32r-tdep.c Index: gdb-7.9.50.20150520/gdb/m32r-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/m32r-tdep.c 2015-01-05 22:18:56.003023675 +0100 --- gdb-7.9.50.20150520.orig/gdb/m32r-tdep.c 2015-05-31 17:15:01.083868204 +0200
+++ gdb-7.8.50.20141228/gdb/m32r-tdep.c 2015-01-05 22:19:08.093078472 +0100 +++ gdb-7.9.50.20150520/gdb/m32r-tdep.c 2015-05-31 17:15:03.431882922 +0200
@@ -687,7 +687,7 @@ m32r_push_dummy_call (struct gdbarch *gd @@ -687,7 +687,7 @@ m32r_push_dummy_call (struct gdbarch *gd
CORE_ADDR regval; CORE_ADDR regval;
gdb_byte *val; gdb_byte *val;
@ -572,10 +572,10 @@ Index: gdb-7.8.50.20141228/gdb/m32r-tdep.c
/* First force sp to a 4-byte alignment. */ /* First force sp to a 4-byte alignment. */
sp = sp & ~3; sp = sp & ~3;
Index: gdb-7.8.50.20141228/gdb/m68k-tdep.c Index: gdb-7.9.50.20150520/gdb/m68k-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/m68k-tdep.c 2015-01-05 22:18:56.003023675 +0100 --- gdb-7.9.50.20150520.orig/gdb/m68k-tdep.c 2015-05-31 17:15:01.084868210 +0200
+++ gdb-7.8.50.20141228/gdb/m68k-tdep.c 2015-01-05 22:19:08.093078472 +0100 +++ gdb-7.9.50.20150520/gdb/m68k-tdep.c 2015-05-31 17:15:03.432882928 +0200
@@ -382,7 +382,7 @@ m68k_reg_struct_return_p (struct gdbarch @@ -382,7 +382,7 @@ m68k_reg_struct_return_p (struct gdbarch
{ {
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@ -598,10 +598,10 @@ Index: gdb-7.8.50.20141228/gdb/m68k-tdep.c
/* Non-scalars bigger than 4 bytes are left aligned, others are /* Non-scalars bigger than 4 bytes are left aligned, others are
right aligned. */ right aligned. */
Index: gdb-7.8.50.20141228/gdb/m88k-tdep.c Index: gdb-7.9.50.20150520/gdb/m88k-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/m88k-tdep.c 2015-01-05 22:18:56.004023680 +0100 --- gdb-7.9.50.20150520.orig/gdb/m88k-tdep.c 2015-05-31 17:15:01.085868217 +0200
+++ gdb-7.8.50.20141228/gdb/m88k-tdep.c 2015-01-05 22:19:08.093078472 +0100 +++ gdb-7.9.50.20150520/gdb/m88k-tdep.c 2015-05-31 17:15:03.432882928 +0200
@@ -257,13 +257,13 @@ m88k_store_arguments (struct regcache *r @@ -257,13 +257,13 @@ m88k_store_arguments (struct regcache *r
{ {
struct gdbarch *gdbarch = get_regcache_arch (regcache); struct gdbarch *gdbarch = get_regcache_arch (regcache);
@ -629,10 +629,10 @@ Index: gdb-7.8.50.20141228/gdb/m88k-tdep.c
if (m88k_in_register_p (type)) if (m88k_in_register_p (type))
{ {
Index: gdb-7.8.50.20141228/gdb/mep-tdep.c Index: gdb-7.9.50.20150520/gdb/mep-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/mep-tdep.c 2015-01-05 22:18:56.005023684 +0100 --- gdb-7.9.50.20150520.orig/gdb/mep-tdep.c 2015-05-31 17:15:01.086868223 +0200
+++ gdb-7.8.50.20141228/gdb/mep-tdep.c 2015-01-05 22:19:08.093078472 +0100 +++ gdb-7.9.50.20150520/gdb/mep-tdep.c 2015-05-31 17:15:03.433882934 +0200
@@ -2269,7 +2269,7 @@ push_large_arguments (CORE_ADDR sp, int @@ -2269,7 +2269,7 @@ push_large_arguments (CORE_ADDR sp, int
for (i = 0; i < argc; i++) for (i = 0; i < argc; i++)
@ -642,10 +642,10 @@ Index: gdb-7.8.50.20141228/gdb/mep-tdep.c
if (arg_len > MEP_GPR_SIZE) if (arg_len > MEP_GPR_SIZE)
{ {
Index: gdb-7.8.50.20141228/gdb/mips-tdep.c Index: gdb-7.9.50.20150520/gdb/mips-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/mips-tdep.c 2015-01-05 22:18:56.009023702 +0100 --- gdb-7.9.50.20150520.orig/gdb/mips-tdep.c 2015-05-31 17:15:01.094868273 +0200
+++ gdb-7.8.50.20141228/gdb/mips-tdep.c 2015-01-05 22:19:08.095078481 +0100 +++ gdb-7.9.50.20150520/gdb/mips-tdep.c 2015-05-31 17:15:03.435882947 +0200
@@ -455,7 +455,7 @@ static void @@ -455,7 +455,7 @@ static void
mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_num, int length, int reg_num, int length,
@ -791,10 +791,10 @@ Index: gdb-7.8.50.20141228/gdb/mips-tdep.c
val = value_contents (arg); val = value_contents (arg);
Index: gdb-7.8.50.20141228/gdb/mn10300-tdep.c Index: gdb-7.9.50.20150520/gdb/mn10300-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/mn10300-tdep.c 2015-01-05 22:18:56.010023707 +0100 --- gdb-7.9.50.20150520.orig/gdb/mn10300-tdep.c 2015-05-31 17:15:01.095868279 +0200
+++ gdb-7.8.50.20141228/gdb/mn10300-tdep.c 2015-01-05 22:19:08.096078485 +0100 +++ gdb-7.9.50.20150520/gdb/mn10300-tdep.c 2015-05-31 17:15:03.435882947 +0200
@@ -1225,7 +1225,7 @@ mn10300_push_dummy_call (struct gdbarch @@ -1225,7 +1225,7 @@ mn10300_push_dummy_call (struct gdbarch
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const int push_size = register_size (gdbarch, E_PC_REGNUM); const int push_size = register_size (gdbarch, E_PC_REGNUM);
@ -804,10 +804,10 @@ Index: gdb-7.8.50.20141228/gdb/mn10300-tdep.c
int stack_offset = 0; int stack_offset = 0;
int argnum; int argnum;
const gdb_byte *val; const gdb_byte *val;
Index: gdb-7.8.50.20141228/gdb/mt-tdep.c Index: gdb-7.9.50.20150520/gdb/mt-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/mt-tdep.c 2015-01-05 22:18:56.010023707 +0100 --- gdb-7.9.50.20150520.orig/gdb/mt-tdep.c 2015-05-31 17:15:01.096868286 +0200
+++ gdb-7.8.50.20141228/gdb/mt-tdep.c 2015-01-05 22:19:08.096078485 +0100 +++ gdb-7.9.50.20150520/gdb/mt-tdep.c 2015-05-31 17:15:03.436882953 +0200
@@ -781,9 +781,9 @@ mt_push_dummy_call (struct gdbarch *gdba @@ -781,9 +781,9 @@ mt_push_dummy_call (struct gdbarch *gdba
gdb_byte buf[MT_MAX_STRUCT_SIZE]; gdb_byte buf[MT_MAX_STRUCT_SIZE];
int argreg = MT_1ST_ARGREG; int argreg = MT_1ST_ARGREG;
@ -820,10 +820,10 @@ Index: gdb-7.8.50.20141228/gdb/mt-tdep.c
int i, j; int i, j;
/* First handle however many args we can fit into MT_1ST_ARGREG thru /* First handle however many args we can fit into MT_1ST_ARGREG thru
Index: gdb-7.8.50.20141228/gdb/ppc-sysv-tdep.c Index: gdb-7.9.50.20150520/gdb/ppc-sysv-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/ppc-sysv-tdep.c 2015-01-05 22:18:56.011023711 +0100 --- gdb-7.9.50.20150520.orig/gdb/ppc-sysv-tdep.c 2015-05-31 17:15:01.097868292 +0200
+++ gdb-7.8.50.20141228/gdb/ppc-sysv-tdep.c 2015-01-05 22:19:08.096078485 +0100 +++ gdb-7.9.50.20150520/gdb/ppc-sysv-tdep.c 2015-05-31 17:15:03.436882953 +0200
@@ -66,7 +66,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb @@ -66,7 +66,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function)); int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
@ -868,11 +868,11 @@ Index: gdb-7.8.50.20141228/gdb/ppc-sysv-tdep.c
/* Enforce alignment of stack location, if requested. */ /* Enforce alignment of stack location, if requested. */
if (align > tdep->wordsize) if (align > tdep->wordsize)
Index: gdb-7.8.50.20141228/gdb/rl78-tdep.c Index: gdb-7.9.50.20150520/gdb/rl78-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/rl78-tdep.c 2015-01-05 22:18:56.011023711 +0100 --- gdb-7.9.50.20150520.orig/gdb/rl78-tdep.c 2015-05-31 17:15:01.097868292 +0200
+++ gdb-7.8.50.20141228/gdb/rl78-tdep.c 2015-01-05 22:19:08.096078485 +0100 +++ gdb-7.9.50.20150520/gdb/rl78-tdep.c 2015-05-31 17:15:03.437882959 +0200
@@ -1251,8 +1251,8 @@ rl78_push_dummy_call (struct gdbarch *gd @@ -1333,8 +1333,8 @@ rl78_push_dummy_call (struct gdbarch *gd
for (i = nargs - 1; i >= 0; i--) for (i = nargs - 1; i >= 0; i--)
{ {
struct type *value_type = value_enclosing_type (args[i]); struct type *value_type = value_enclosing_type (args[i]);
@ -883,10 +883,10 @@ Index: gdb-7.8.50.20141228/gdb/rl78-tdep.c
sp -= container_len; sp -= container_len;
write_memory (rl78_make_data_address (sp), write_memory (rl78_make_data_address (sp),
Index: gdb-7.8.50.20141228/gdb/rs6000-aix-tdep.c Index: gdb-7.9.50.20150520/gdb/rs6000-aix-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/rs6000-aix-tdep.c 2015-01-05 22:18:56.012023716 +0100 --- gdb-7.9.50.20150520.orig/gdb/rs6000-aix-tdep.c 2015-05-31 17:15:01.098868298 +0200
+++ gdb-7.8.50.20141228/gdb/rs6000-aix-tdep.c 2015-01-05 22:19:08.097078490 +0100 +++ gdb-7.9.50.20150520/gdb/rs6000-aix-tdep.c 2015-05-31 17:15:03.437882959 +0200
@@ -186,9 +186,9 @@ rs6000_push_dummy_call (struct gdbarch * @@ -186,9 +186,9 @@ rs6000_push_dummy_call (struct gdbarch *
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@ -908,32 +908,32 @@ Index: gdb-7.8.50.20141228/gdb/rs6000-aix-tdep.c
if (argbytes) if (argbytes)
{ {
Index: gdb-7.8.50.20141228/gdb/s390-linux-tdep.c Index: gdb-7.9.50.20150520/gdb/s390-linux-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/s390-linux-tdep.c 2015-01-05 22:18:56.013023720 +0100 --- gdb-7.9.50.20150520.orig/gdb/s390-linux-tdep.c 2015-05-31 17:15:01.099868304 +0200
+++ gdb-7.8.50.20141228/gdb/s390-linux-tdep.c 2015-01-05 22:19:08.097078490 +0100 +++ gdb-7.9.50.20150520/gdb/s390-linux-tdep.c 2015-05-31 17:16:13.285320769 +0200
@@ -2334,7 +2334,7 @@ is_float_like (struct type *type) @@ -2463,7 +2463,7 @@ s390_function_arg_vector (struct type *t
/* Determine whether N is a power of two. */
static int static int
-is_power_of_two (unsigned int n) -is_power_of_two (unsigned int n)
+is_power_of_two (ULONGEST n) +is_power_of_two (ULONGEST n)
{ {
return ((n & (n - 1)) == 0); return n && ((n & (n - 1)) == 0);
} }
@@ -2520,7 +2520,7 @@ s390_push_dummy_call (struct gdbarch *gd @@ -2520,7 +2520,7 @@ s390_handle_arg (struct s390_arg_state *
{ enum bfd_endian byte_order, int is_unnamed)
struct value *arg = args[i]; {
struct type *type = check_typedef (value_type (arg)); struct type *type = check_typedef (value_type (arg));
- unsigned length = TYPE_LENGTH (type); - unsigned int length = TYPE_LENGTH (type);
+ ULONGEST length = TYPE_LENGTH (type); + ULONGEST length = TYPE_LENGTH (type);
int write_mode = as->regcache != NULL;
if (s390_function_arg_pass_by_reference (type)) if (s390_function_arg_float (type))
{ Index: gdb-7.9.50.20150520/gdb/score-tdep.c
Index: gdb-7.8.50.20141228/gdb/score-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/score-tdep.c 2015-01-05 22:18:56.013023720 +0100 --- gdb-7.9.50.20150520.orig/gdb/score-tdep.c 2015-05-31 17:15:01.100868311 +0200
+++ gdb-7.8.50.20141228/gdb/score-tdep.c 2015-01-05 22:19:08.097078490 +0100 +++ gdb-7.9.50.20150520/gdb/score-tdep.c 2015-05-31 17:15:03.439882972 +0200
@@ -514,7 +514,7 @@ score_push_dummy_call (struct gdbarch *g @@ -514,7 +514,7 @@ score_push_dummy_call (struct gdbarch *g
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int argnum; int argnum;
@ -943,10 +943,10 @@ Index: gdb-7.8.50.20141228/gdb/score-tdep.c
CORE_ADDR stack_offset = 0; CORE_ADDR stack_offset = 0;
CORE_ADDR addr = 0; CORE_ADDR addr = 0;
Index: gdb-7.8.50.20141228/gdb/sh-tdep.c Index: gdb-7.9.50.20150520/gdb/sh-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/sh-tdep.c 2015-01-05 22:18:56.014023725 +0100 --- gdb-7.9.50.20150520.orig/gdb/sh-tdep.c 2015-05-31 17:15:01.101868317 +0200
+++ gdb-7.8.50.20141228/gdb/sh-tdep.c 2015-01-05 22:19:08.098078494 +0100 +++ gdb-7.9.50.20150520/gdb/sh-tdep.c 2015-05-31 17:15:03.439882972 +0200
@@ -805,7 +805,7 @@ sh_skip_prologue (struct gdbarch *gdbarc @@ -805,7 +805,7 @@ sh_skip_prologue (struct gdbarch *gdbarc
static int static int
sh_use_struct_convention (int renesas_abi, struct type *type) sh_use_struct_convention (int renesas_abi, struct type *type)
@ -985,10 +985,10 @@ Index: gdb-7.8.50.20141228/gdb/sh-tdep.c
int pass_on_stack = 0; int pass_on_stack = 0;
int last_reg_arg = INT_MAX; int last_reg_arg = INT_MAX;
Index: gdb-7.8.50.20141228/gdb/sh64-tdep.c Index: gdb-7.9.50.20150520/gdb/sh64-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/sh64-tdep.c 2015-01-05 22:18:56.015023729 +0100 --- gdb-7.9.50.20150520.orig/gdb/sh64-tdep.c 2015-05-31 17:15:01.102868323 +0200
+++ gdb-7.8.50.20141228/gdb/sh64-tdep.c 2015-01-05 22:19:08.098078494 +0100 +++ gdb-7.9.50.20150520/gdb/sh64-tdep.c 2015-05-31 17:15:03.440882978 +0200
@@ -1056,7 +1056,7 @@ sh64_push_dummy_call (struct gdbarch *gd @@ -1056,7 +1056,7 @@ sh64_push_dummy_call (struct gdbarch *gd
CORE_ADDR struct_addr) CORE_ADDR struct_addr)
{ {
@ -1007,10 +1007,10 @@ Index: gdb-7.8.50.20141228/gdb/sh64-tdep.c
int argreg_size; int argreg_size;
int fp_args[12]; int fp_args[12];
Index: gdb-7.8.50.20141228/gdb/sparc-tdep.c Index: gdb-7.9.50.20150520/gdb/sparc-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/sparc-tdep.c 2015-01-05 22:18:56.016023734 +0100 --- gdb-7.9.50.20150520.orig/gdb/sparc-tdep.c 2015-05-31 17:15:01.103868329 +0200
+++ gdb-7.8.50.20141228/gdb/sparc-tdep.c 2015-01-05 22:19:08.098078494 +0100 +++ gdb-7.9.50.20150520/gdb/sparc-tdep.c 2015-05-31 17:15:03.441882984 +0200
@@ -525,7 +525,7 @@ sparc32_store_arguments (struct regcache @@ -525,7 +525,7 @@ sparc32_store_arguments (struct regcache
for (i = 0; i < nargs; i++) for (i = 0; i < nargs; i++)
{ {
@ -1020,10 +1020,10 @@ Index: gdb-7.8.50.20141228/gdb/sparc-tdep.c
if (sparc_structure_or_union_p (type) if (sparc_structure_or_union_p (type)
|| (sparc_floating_p (type) && len == 16) || (sparc_floating_p (type) && len == 16)
Index: gdb-7.8.50.20141228/gdb/sparc64-tdep.c Index: gdb-7.9.50.20150520/gdb/sparc64-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/sparc64-tdep.c 2015-01-05 22:18:56.016023734 +0100 --- gdb-7.9.50.20150520.orig/gdb/sparc64-tdep.c 2015-05-31 17:15:01.104868336 +0200
+++ gdb-7.8.50.20141228/gdb/sparc64-tdep.c 2015-01-05 22:19:08.099078499 +0100 +++ gdb-7.9.50.20150520/gdb/sparc64-tdep.c 2015-05-31 17:15:03.441882984 +0200
@@ -636,7 +636,8 @@ sparc64_16_byte_align_p (struct type *ty @@ -636,7 +636,8 @@ sparc64_16_byte_align_p (struct type *ty
static void static void
@ -1079,10 +1079,10 @@ Index: gdb-7.8.50.20141228/gdb/sparc64-tdep.c
int regnum = -1; int regnum = -1;
gdb_byte buf[16]; gdb_byte buf[16];
Index: gdb-7.8.50.20141228/gdb/spu-tdep.c Index: gdb-7.9.50.20150520/gdb/spu-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/spu-tdep.c 2015-01-05 22:18:56.017023739 +0100 --- gdb-7.9.50.20150520.orig/gdb/spu-tdep.c 2015-05-31 17:15:01.105868342 +0200
+++ gdb-7.8.50.20141228/gdb/spu-tdep.c 2015-01-05 22:19:08.099078499 +0100 +++ gdb-7.9.50.20150520/gdb/spu-tdep.c 2015-05-31 17:15:03.442882990 +0200
@@ -1430,7 +1430,7 @@ spu_push_dummy_call (struct gdbarch *gdb @@ -1430,7 +1430,7 @@ spu_push_dummy_call (struct gdbarch *gdb
struct value *arg = args[i]; struct value *arg = args[i];
struct type *type = check_typedef (value_type (arg)); struct type *type = check_typedef (value_type (arg));
@ -1101,10 +1101,10 @@ Index: gdb-7.8.50.20141228/gdb/spu-tdep.c
int preferred_slot; int preferred_slot;
if (spu_scalar_value_p (type)) if (spu_scalar_value_p (type))
Index: gdb-7.8.50.20141228/gdb/tic6x-tdep.c Index: gdb-7.9.50.20150520/gdb/tic6x-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/tic6x-tdep.c 2015-01-05 22:18:56.018023743 +0100 --- gdb-7.9.50.20150520.orig/gdb/tic6x-tdep.c 2015-05-31 17:15:01.106868348 +0200
+++ gdb-7.8.50.20141228/gdb/tic6x-tdep.c 2015-01-05 22:19:08.099078499 +0100 +++ gdb-7.9.50.20150520/gdb/tic6x-tdep.c 2015-05-31 17:15:03.442882990 +0200
@@ -895,7 +895,7 @@ tic6x_push_dummy_call (struct gdbarch *g @@ -895,7 +895,7 @@ tic6x_push_dummy_call (struct gdbarch *g
int argreg = 0; int argreg = 0;
int argnum; int argnum;
@ -1142,10 +1142,10 @@ Index: gdb-7.8.50.20141228/gdb/tic6x-tdep.c
addr = sp + stack_offset; addr = sp + stack_offset;
write_memory (addr, val, len); write_memory (addr, val, len);
Index: gdb-7.8.50.20141228/gdb/tilegx-tdep.c Index: gdb-7.9.50.20150520/gdb/tilegx-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/tilegx-tdep.c 2015-01-05 22:18:56.018023743 +0100 --- gdb-7.9.50.20150520.orig/gdb/tilegx-tdep.c 2015-05-31 17:15:01.107868355 +0200
+++ gdb-7.8.50.20141228/gdb/tilegx-tdep.c 2015-01-05 22:19:08.100078503 +0100 +++ gdb-7.9.50.20150520/gdb/tilegx-tdep.c 2015-05-31 17:15:03.442882990 +0200
@@ -288,7 +288,7 @@ tilegx_push_dummy_call (struct gdbarch * @@ -288,7 +288,7 @@ tilegx_push_dummy_call (struct gdbarch *
CORE_ADDR stack_dest = sp; CORE_ADDR stack_dest = sp;
int argreg = TILEGX_R0_REGNUM; int argreg = TILEGX_R0_REGNUM;
@ -1155,10 +1155,10 @@ Index: gdb-7.8.50.20141228/gdb/tilegx-tdep.c
static const gdb_byte four_zero_words[16] = { 0 }; static const gdb_byte four_zero_words[16] = { 0 };
/* If struct_return is 1, then the struct return address will /* If struct_return is 1, then the struct return address will
Index: gdb-7.8.50.20141228/gdb/v850-tdep.c Index: gdb-7.9.50.20150520/gdb/v850-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/v850-tdep.c 2015-01-05 22:18:56.019023748 +0100 --- gdb-7.9.50.20150520.orig/gdb/v850-tdep.c 2015-05-31 17:15:01.107868355 +0200
+++ gdb-7.8.50.20141228/gdb/v850-tdep.c 2015-01-05 22:19:08.100078503 +0100 +++ gdb-7.9.50.20150520/gdb/v850-tdep.c 2015-05-31 17:15:03.443882997 +0200
@@ -1019,7 +1019,7 @@ v850_push_dummy_call (struct gdbarch *gd @@ -1019,7 +1019,7 @@ v850_push_dummy_call (struct gdbarch *gd
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int argreg; int argreg;
@ -1177,10 +1177,10 @@ Index: gdb-7.8.50.20141228/gdb/v850-tdep.c
gdb_byte *val; gdb_byte *val;
gdb_byte valbuf[v850_reg_size]; gdb_byte valbuf[v850_reg_size];
Index: gdb-7.8.50.20141228/gdb/vax-tdep.c Index: gdb-7.9.50.20150520/gdb/vax-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/vax-tdep.c 2015-01-05 22:18:56.019023748 +0100 --- gdb-7.9.50.20150520.orig/gdb/vax-tdep.c 2015-05-31 17:15:01.108868361 +0200
+++ gdb-7.8.50.20141228/gdb/vax-tdep.c 2015-01-05 22:19:08.100078503 +0100 +++ gdb-7.9.50.20150520/gdb/vax-tdep.c 2015-05-31 17:15:03.443882997 +0200
@@ -111,7 +111,7 @@ vax_store_arguments (struct regcache *re @@ -111,7 +111,7 @@ vax_store_arguments (struct regcache *re
struct gdbarch *gdbarch = get_regcache_arch (regcache); struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@ -1199,10 +1199,10 @@ Index: gdb-7.8.50.20141228/gdb/vax-tdep.c
sp -= (len + 3) & ~3; sp -= (len + 3) & ~3;
count += (len + 3) / 4; count += (len + 3) / 4;
Index: gdb-7.8.50.20141228/gdb/xstormy16-tdep.c Index: gdb-7.9.50.20150520/gdb/xstormy16-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/xstormy16-tdep.c 2015-01-05 22:18:56.020023752 +0100 --- gdb-7.9.50.20150520.orig/gdb/xstormy16-tdep.c 2015-05-31 17:15:01.108868361 +0200
+++ gdb-7.8.50.20141228/gdb/xstormy16-tdep.c 2015-01-05 22:19:08.100078503 +0100 +++ gdb-7.9.50.20150520/gdb/xstormy16-tdep.c 2015-05-31 17:15:03.443882997 +0200
@@ -233,8 +233,9 @@ xstormy16_push_dummy_call (struct gdbarc @@ -233,8 +233,9 @@ xstormy16_push_dummy_call (struct gdbarc
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR stack_dest = sp; CORE_ADDR stack_dest = sp;
@ -1215,10 +1215,10 @@ Index: gdb-7.8.50.20141228/gdb/xstormy16-tdep.c
const gdb_byte *val; const gdb_byte *val;
gdb_byte buf[xstormy16_pc_size]; gdb_byte buf[xstormy16_pc_size];
Index: gdb-7.8.50.20141228/gdb/xtensa-tdep.c Index: gdb-7.9.50.20150520/gdb/xtensa-tdep.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/xtensa-tdep.c 2015-01-05 22:18:56.021023757 +0100 --- gdb-7.9.50.20150520.orig/gdb/xtensa-tdep.c 2015-05-31 17:15:01.110868373 +0200
+++ gdb-7.8.50.20141228/gdb/xtensa-tdep.c 2015-01-05 22:19:08.101078508 +0100 +++ gdb-7.9.50.20150520/gdb/xtensa-tdep.c 2015-05-31 17:15:03.444883003 +0200
@@ -1646,8 +1646,7 @@ xtensa_store_return_value (struct type * @@ -1646,8 +1646,7 @@ xtensa_store_return_value (struct type *
if (len > (callsize > 8 ? 8 : 16)) if (len > (callsize > 8 ? 8 : 16))

View File

@ -1,53 +0,0 @@
commit 7a270e0c9ba0eb738a4c30258ab29c09963fcd4d
Author: Alexander Klimov <alserkli@inbox.ru>
Date: Tue Jan 27 19:56:45 2015 +0200
Fix build failure in symfile.c::unmap_overlay_command (GCC5 bug)
Compilation of (GDB) 7.9.50.20150127-cvs with (GCC) 5.0.0 20150127
fails with
In file included from symfile.c:32:0:
symfile.c: In function 'unmap_overlay_command':
objfiles.h:628:3: error: 'sec' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
for (osect = objfile->sections; osect < objfile->sections_end; osect++) \
^
symfile.c:3442:23: note: 'sec' was declared here
struct obj_section *sec;
^
cc1: all warnings being treated as errors
make[2]: *** [symfile.o] Error 1
make[2]: Leaving directory `gdb/gdb'
While the bug was reported to GCC as
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64823>,
the attached patch simply initializes sec with NULL.
gdb/ChangeLog:
* symfile.c (unmap_overlay_command): Initialize sec to NULL.
Tested on x86_64-linux.
### a/gdb/ChangeLog
### b/gdb/ChangeLog
## -1,3 +1,7 @@
+2015-01-29 Joel Brobecker <brobecker@adacore.com> (tiny patch)
+
+ * symfile.c (unmap_overlay_command): Initialize sec to NULL.
+
2015-01-27 Doug Evans <dje@google.com>
* NEWS: Mention gdb.Objfile.username.
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3439,7 +3439,7 @@ static void
unmap_overlay_command (char *args, int from_tty)
{
struct objfile *objfile;
- struct obj_section *sec;
+ struct obj_section *sec = NULL;
if (!overlay_debugging)
error (_("Overlay debugging not enabled. "

View File

@ -31,30 +31,30 @@ Jan
Content-Type: text/plain; charset=us-ascii Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="vlastringonly.patch" Content-Disposition: inline; filename="vlastringonly.patch"
Index: gdb-7.8.50.20141228/gdb/gdbtypes.c Index: gdb-7.9.50.20150520/gdb/gdbtypes.c
=================================================================== ===================================================================
--- gdb-7.8.50.20141228.orig/gdb/gdbtypes.c 2015-01-08 18:15:18.475682523 +0100 --- gdb-7.9.50.20150520.orig/gdb/gdbtypes.c 2015-05-31 16:14:04.164533833 +0200
+++ gdb-7.8.50.20141228/gdb/gdbtypes.c 2015-01-08 18:39:01.423134700 +0100 +++ gdb-7.9.50.20150520/gdb/gdbtypes.c 2015-05-31 16:14:05.844545344 +0200
@@ -1684,6 +1684,7 @@ is_dynamic_type_internal (struct type *t @@ -1851,6 +1851,7 @@ is_dynamic_type_internal (struct type *t
return !has_static_range (TYPE_RANGE_DATA (type)); }
case TYPE_CODE_ARRAY: case TYPE_CODE_ARRAY:
+ case TYPE_CODE_STRING: + case TYPE_CODE_STRING:
{ {
gdb_assert (TYPE_NFIELDS (type) == 1); gdb_assert (TYPE_NFIELDS (type) == 1);
@@ -1992,6 +1993,7 @@ resolve_dynamic_type_internal (struct ty @@ -2192,6 +2193,7 @@ resolve_dynamic_type_internal (struct ty
} }
case TYPE_CODE_ARRAY: case TYPE_CODE_ARRAY:
+ case TYPE_CODE_STRING: + case TYPE_CODE_STRING:
resolved_type = resolve_dynamic_array (type, addr); resolved_type = resolve_dynamic_array (type, addr_stack);
break; break;
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 2015-01-08 18:15:18.897684435 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 2015-05-31 16:14:05.844545344 +0200
@@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
+! Copyright 2010 Free Software Foundation, Inc. +! Copyright 2010 Free Software Foundation, Inc.
+! +!
@ -80,10 +80,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f9
+ real :: dummy + real :: dummy
+ dummy = 1 + dummy = 1
+end subroutine bar +end subroutine bar
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp 2015-01-08 18:15:18.897684435 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp 2015-05-31 16:14:05.845545351 +0200
@@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
+# Copyright 2010 Free Software Foundation, Inc. +# Copyright 2010 Free Software Foundation, Inc.
+ +
@ -124,10 +124,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
+} +}
+ +
+gdb_test "bt" {foo \(string='hello'.*} +gdb_test "bt" {foo \(string='hello'.*}
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 2015-01-08 18:15:18.897684435 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 2015-05-31 16:14:05.845545351 +0200
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
+! Copyright 2010 Free Software Foundation, Inc. +! Copyright 2010 Free Software Foundation, Inc.
+! +!
@ -165,3 +165,17 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
+ end interface + end interface
+ call foo ('hello') + call foo ('hello')
+end +end
Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp
===================================================================
--- gdb-7.9.50.20150520.orig/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-05-31 16:14:04.167533854 +0200
+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-05-31 16:14:31.073718201 +0200
@@ -33,9 +33,6 @@ gdb_continue_to_breakpoint "var_char-all
gdb_test "print var_char" \
" = \\(PTR TO -> \\( character\\*10 \\)\\) ${hex}" \
"print var_char after allocated first time"
-gdb_test "print *var_char" \
- " = '\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000'" \
- "print *var_char after allocated first time"
gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*10 \\)" \
"whatis var_char first time"
gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*10 \\)" \

View File

@ -6,10 +6,10 @@ GIT snapshot:
commit 511bff520372ffc10fa2ff569c176bdf1e6e475d commit 511bff520372ffc10fa2ff569c176bdf1e6e475d
Index: gdb-7.8.90.20150126/gdb/c-valprint.c Index: gdb-7.9.50.20150520/gdb/c-valprint.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/c-valprint.c 2015-01-26 07:47:25.832758314 +0100 --- gdb-7.9.50.20150520.orig/gdb/c-valprint.c 2015-05-29 08:27:02.657717326 +0200
+++ gdb-7.8.90.20150126/gdb/c-valprint.c 2015-01-26 07:47:42.394829861 +0100 +++ gdb-7.9.50.20150520/gdb/c-valprint.c 2015-05-29 08:27:06.253740209 +0200
@@ -537,7 +537,16 @@ c_value_print (struct value *val, struct @@ -537,7 +537,16 @@ c_value_print (struct value *val, struct
{ {
/* normal case */ /* normal case */
@ -28,12 +28,12 @@ Index: gdb-7.8.90.20150126/gdb/c-valprint.c
fprintf_filtered (stream, ") "); fprintf_filtered (stream, ") ");
} }
} }
Index: gdb-7.8.90.20150126/gdb/dwarf2loc.h Index: gdb-7.9.50.20150520/gdb/dwarf2loc.h
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/dwarf2loc.h 2015-01-26 07:47:25.832758314 +0100 --- gdb-7.9.50.20150520.orig/gdb/dwarf2loc.h 2015-05-29 08:27:02.658717333 +0200
+++ gdb-7.8.90.20150126/gdb/dwarf2loc.h 2015-01-26 07:47:42.395829865 +0100 +++ gdb-7.9.50.20150520/gdb/dwarf2loc.h 2015-05-29 08:27:06.253740209 +0200
@@ -111,6 +111,11 @@ int dwarf2_evaluate_property (const stru @@ -131,6 +131,11 @@ int dwarf2_evaluate_property (const stru
CORE_ADDR address, struct property_addr_info *addr_stack,
CORE_ADDR *value); CORE_ADDR *value);
+/* Checks if a dwarf location definition is valid. +/* Checks if a dwarf location definition is valid.
@ -44,11 +44,11 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2loc.h
/* A helper for the compiler interface that compiles a single dynamic /* A helper for the compiler interface that compiles a single dynamic
property to C code. property to C code.
Index: gdb-7.8.90.20150126/gdb/dwarf2read.c Index: gdb-7.9.50.20150520/gdb/dwarf2read.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/dwarf2read.c 2015-01-26 07:47:25.845758371 +0100 --- gdb-7.9.50.20150520.orig/gdb/dwarf2read.c 2015-05-29 08:27:02.676717447 +0200
+++ gdb-7.8.90.20150126/gdb/dwarf2read.c 2015-01-26 07:48:05.833931116 +0100 +++ gdb-7.9.50.20150520/gdb/dwarf2read.c 2015-05-29 10:04:52.272600212 +0200
@@ -1855,6 +1855,12 @@ static void process_cu_includes (void); @@ -1868,6 +1868,12 @@ static void process_cu_includes (void);
static void check_producer (struct dwarf2_cu *cu); static void check_producer (struct dwarf2_cu *cu);
static void free_line_header_voidp (void *arg); static void free_line_header_voidp (void *arg);
@ -61,7 +61,7 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2read.c
/* Various complaints about symbol reading that don't abort the process. */ /* Various complaints about symbol reading that don't abort the process. */
@@ -14354,29 +14360,92 @@ read_tag_string_type (struct die_info *d @@ -14431,29 +14437,92 @@ read_tag_string_type (struct die_info *d
struct gdbarch *gdbarch = get_objfile_arch (objfile); struct gdbarch *gdbarch = get_objfile_arch (objfile);
struct type *type, *range_type, *index_type, *char_type; struct type *type, *range_type, *index_type, *char_type;
struct attribute *attr; struct attribute *attr;
@ -161,7 +161,7 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2read.c
char_type = language_string_char_type (cu->language_defn, gdbarch); char_type = language_string_char_type (cu->language_defn, gdbarch);
type = create_string_type (NULL, char_type, range_type); type = create_string_type (NULL, char_type, range_type);
@@ -14693,13 +14762,15 @@ read_base_type (struct die_info *die, st @@ -14776,13 +14845,15 @@ read_base_type (struct die_info *die, st
return set_die_type (die, type, cu); return set_die_type (die, type, cu);
} }
@ -178,7 +178,7 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2read.c
{ {
struct dwarf2_property_baton *baton; struct dwarf2_property_baton *baton;
struct obstack *obstack = &cu->objfile->objfile_obstack; struct obstack *obstack = &cu->objfile->objfile_obstack;
@@ -14712,8 +14783,25 @@ attr_to_dynamic_prop (const struct attri @@ -14795,8 +14866,25 @@ attr_to_dynamic_prop (const struct attri
baton = obstack_alloc (obstack, sizeof (*baton)); baton = obstack_alloc (obstack, sizeof (*baton));
baton->referenced_type = NULL; baton->referenced_type = NULL;
baton->locexpr.per_cu = cu->per_cu; baton->locexpr.per_cu = cu->per_cu;
@ -206,38 +206,38 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2read.c
prop->data.baton = baton; prop->data.baton = baton;
prop->kind = PROP_LOCEXPR; prop->kind = PROP_LOCEXPR;
gdb_assert (prop->data.baton != NULL); gdb_assert (prop->data.baton != NULL);
@@ -14743,8 +14831,28 @@ attr_to_dynamic_prop (const struct attri @@ -14832,8 +14920,28 @@ attr_to_dynamic_prop (const struct attri
baton = obstack_alloc (obstack, sizeof (*baton)); baton = obstack_alloc (obstack, sizeof (*baton));
baton->referenced_type = die_type (target_die, target_cu); baton->referenced_type = die_type (target_die, target_cu);
baton->locexpr.per_cu = cu->per_cu; baton->locexpr.per_cu = cu->per_cu;
- baton->locexpr.size = DW_BLOCK (target_attr)->size; - baton->locexpr.size = DW_BLOCK (target_attr)->size;
- baton->locexpr.data = DW_BLOCK (target_attr)->data; - baton->locexpr.data = DW_BLOCK (target_attr)->data;
+ +
+ if (additional_data != NULL && additional_data_size > 0) + if (additional_data != NULL && additional_data_size > 0)
+ { + {
+ gdb_byte *data; + gdb_byte *data;
+ +
+ data = obstack_alloc (&cu->objfile->objfile_obstack, + data = obstack_alloc (&cu->objfile->objfile_obstack,
+ DW_BLOCK (target_attr)->size + additional_data_size); + DW_BLOCK (target_attr)->size + additional_data_size);
+ memcpy (data, DW_BLOCK (target_attr)->data, + memcpy (data, DW_BLOCK (target_attr)->data,
+ DW_BLOCK (target_attr)->size); + DW_BLOCK (target_attr)->size);
+ memcpy (data + DW_BLOCK (target_attr)->size, + memcpy (data + DW_BLOCK (target_attr)->size,
+ additional_data, additional_data_size); + additional_data, additional_data_size);
+ +
+ baton->locexpr.data = data; + baton->locexpr.data = data;
+ baton->locexpr.size = (DW_BLOCK (target_attr)->size + baton->locexpr.size = (DW_BLOCK (target_attr)->size
+ + additional_data_size); + + additional_data_size);
+ } + }
+ else + else
+ { + {
+ baton->locexpr.data = DW_BLOCK (target_attr)->data; + baton->locexpr.data = DW_BLOCK (target_attr)->data;
+ baton->locexpr.size = DW_BLOCK (target_attr)->size; + baton->locexpr.size = DW_BLOCK (target_attr)->size;
+ } + }
+ +
prop->data.baton = baton; prop->data.baton = baton;
prop->kind = PROP_LOCEXPR; prop->kind = PROP_LOCEXPR;
gdb_assert (prop->data.baton != NULL); gdb_assert (prop->data.baton != NULL);
@@ -14779,7 +14887,7 @@ read_subrange_type (struct die_info *die @@ -14887,7 +14995,7 @@ read_subrange_type (struct die_info *die
struct type *base_type, *orig_base_type; struct type *base_type, *orig_base_type;
struct type *range_type; struct type *range_type;
struct attribute *attr; struct attribute *attr;
@ -246,7 +246,7 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2read.c
int low_default_is_valid; int low_default_is_valid;
int high_bound_is_count = 0; int high_bound_is_count = 0;
const char *name; const char *name;
@@ -14799,7 +14907,9 @@ read_subrange_type (struct die_info *die @@ -14907,7 +15015,9 @@ read_subrange_type (struct die_info *die
low.kind = PROP_CONST; low.kind = PROP_CONST;
high.kind = PROP_CONST; high.kind = PROP_CONST;
@ -256,7 +256,7 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2read.c
/* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow
omitting DW_AT_lower_bound. */ omitting DW_AT_lower_bound. */
@@ -14832,19 +14942,26 @@ read_subrange_type (struct die_info *die @@ -14940,19 +15050,26 @@ read_subrange_type (struct die_info *die
break; break;
} }
@ -286,7 +286,7 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2read.c
{ {
/* If bounds are constant do the final calculation here. */ /* If bounds are constant do the final calculation here. */
if (low.kind == PROP_CONST && high.kind == PROP_CONST) if (low.kind == PROP_CONST && high.kind == PROP_CONST)
@@ -14908,7 +15025,7 @@ read_subrange_type (struct die_info *die @@ -15016,7 +15133,7 @@ read_subrange_type (struct die_info *die
&& !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask)) && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask))
high.data.const_val |= negative_mask; high.data.const_val |= negative_mask;
@ -295,18 +295,10 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2read.c
if (high_bound_is_count) if (high_bound_is_count)
TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1; TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1;
@@ -21994,7 +22111,44 @@ set_die_type (struct die_info *die, stru @@ -22128,9 +22245,37 @@ set_die_type (struct die_info *die, stru
&& !HAVE_GNAT_AUX_INFO (type))
INIT_GNAT_SPECIFIC (type);
/* Read DW_AT_data_location and set in type. */
attr = dwarf2_attr (die, DW_AT_data_location, cu);
- if (attr_to_dynamic_prop (attr, die, cu, &prop))
+ if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0))
+ {
+ TYPE_DATA_LOCATION (type)
+ = obstack_alloc (&objfile->objfile_obstack, sizeof (prop));
+ *TYPE_DATA_LOCATION (type) = prop;
+ }
+
+ /* Read DW_AT_allocated and set in type. */ + /* Read DW_AT_allocated and set in type. */
+ attr = dwarf2_attr (die, DW_AT_allocated, cu); + attr = dwarf2_attr (die, DW_AT_allocated, cu);
+ if (attr_form_is_block (attr)) + if (attr_form_is_block (attr))
@ -335,16 +327,17 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2read.c
+ } + }
+ } + }
+ +
+ /* Read DW_AT_data_location and set in type. */ /* Read DW_AT_data_location and set in type. */
+ attr = dwarf2_attr (die, DW_AT_data_location, cu); attr = dwarf2_attr (die, DW_AT_data_location, cu);
- if (attr_to_dynamic_prop (attr, die, cu, &prop))
+ if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0)) + if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0))
{ add_dyn_prop (DYN_PROP_DATA_LOCATION, prop, type, objfile);
TYPE_DATA_LOCATION (type)
= obstack_alloc (&objfile->objfile_obstack, sizeof (prop)); if (dwarf2_per_objfile->die_type_hash == NULL)
Index: gdb-7.8.90.20150126/gdb/f-typeprint.c Index: gdb-7.9.50.20150520/gdb/f-typeprint.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/f-typeprint.c 2015-01-26 07:47:25.846758375 +0100 --- gdb-7.9.50.20150520.orig/gdb/f-typeprint.c 2015-05-29 08:27:02.678717460 +0200
+++ gdb-7.8.90.20150126/gdb/f-typeprint.c 2015-01-26 07:47:42.402829895 +0100 +++ gdb-7.9.50.20150520/gdb/f-typeprint.c 2015-05-29 08:27:06.261740260 +0200
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
#include "gdbcore.h" #include "gdbcore.h"
#include "target.h" #include "target.h"
@ -429,10 +422,10 @@ Index: gdb-7.8.90.20150126/gdb/f-typeprint.c
if (arrayprint_recurse_level == 1) if (arrayprint_recurse_level == 1)
fprintf_filtered (stream, ")"); fprintf_filtered (stream, ")");
else else
Index: gdb-7.8.90.20150126/gdb/f-valprint.c Index: gdb-7.9.50.20150520/gdb/f-valprint.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/f-valprint.c 2015-01-26 07:47:25.847758379 +0100 --- gdb-7.9.50.20150520.orig/gdb/f-valprint.c 2015-05-29 08:26:49.567634019 +0200
+++ gdb-7.8.90.20150126/gdb/f-valprint.c 2015-01-26 07:47:42.403829900 +0100 +++ gdb-7.9.50.20150520/gdb/f-valprint.c 2015-05-29 08:27:06.262740266 +0200
@@ -36,8 +36,6 @@ @@ -36,8 +36,6 @@
extern void _initialize_f_valprint (void); extern void _initialize_f_valprint (void);
@ -619,11 +612,11 @@ Index: gdb-7.8.90.20150126/gdb/f-valprint.c
if (index != TYPE_NFIELDS (type) - 1) if (index != TYPE_NFIELDS (type) - 1)
fputs_filtered (", ", stream); fputs_filtered (", ", stream);
} }
Index: gdb-7.8.90.20150126/gdb/gdbtypes.c Index: gdb-7.9.50.20150520/gdb/gdbtypes.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/gdbtypes.c 2015-01-26 07:47:25.850758392 +0100 --- gdb-7.9.50.20150520.orig/gdb/gdbtypes.c 2015-05-29 08:27:02.683717492 +0200
+++ gdb-7.8.90.20150126/gdb/gdbtypes.c 2015-01-26 07:47:42.404829904 +0100 +++ gdb-7.9.50.20150520/gdb/gdbtypes.c 2015-05-29 10:54:36.236498749 +0200
@@ -815,7 +815,8 @@ allocate_stub_method (struct type *type) @@ -824,7 +824,8 @@ allocate_stub_method (struct type *type)
struct type * struct type *
create_range_type (struct type *result_type, struct type *index_type, create_range_type (struct type *result_type, struct type *index_type,
const struct dynamic_prop *low_bound, const struct dynamic_prop *low_bound,
@ -633,7 +626,7 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
{ {
if (result_type == NULL) if (result_type == NULL)
result_type = alloc_type_copy (index_type); result_type = alloc_type_copy (index_type);
@@ -830,6 +831,7 @@ create_range_type (struct type *result_t @@ -839,6 +840,7 @@ create_range_type (struct type *result_t
TYPE_ZALLOC (result_type, sizeof (struct range_bounds)); TYPE_ZALLOC (result_type, sizeof (struct range_bounds));
TYPE_RANGE_DATA (result_type)->low = *low_bound; TYPE_RANGE_DATA (result_type)->low = *low_bound;
TYPE_RANGE_DATA (result_type)->high = *high_bound; TYPE_RANGE_DATA (result_type)->high = *high_bound;
@ -641,7 +634,7 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0) if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0)
TYPE_UNSIGNED (result_type) = 1; TYPE_UNSIGNED (result_type) = 1;
@@ -858,7 +860,7 @@ struct type * @@ -867,7 +869,7 @@ struct type *
create_static_range_type (struct type *result_type, struct type *index_type, create_static_range_type (struct type *result_type, struct type *index_type,
LONGEST low_bound, LONGEST high_bound) LONGEST low_bound, LONGEST high_bound)
{ {
@ -650,7 +643,7 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
low.kind = PROP_CONST; low.kind = PROP_CONST;
low.data.const_val = low_bound; low.data.const_val = low_bound;
@@ -866,7 +868,11 @@ create_static_range_type (struct type *r @@ -875,7 +877,11 @@ create_static_range_type (struct type *r
high.kind = PROP_CONST; high.kind = PROP_CONST;
high.data.const_val = high_bound; high.data.const_val = high_bound;
@ -663,7 +656,7 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
return result_type; return result_type;
} }
@@ -1020,18 +1026,24 @@ create_array_type_with_stride (struct ty @@ -1068,18 +1074,24 @@ create_array_type_with_stride (struct ty
TYPE_CODE (result_type) = TYPE_CODE_ARRAY; TYPE_CODE (result_type) = TYPE_CODE_ARRAY;
TYPE_TARGET_TYPE (result_type) = element_type; TYPE_TARGET_TYPE (result_type) = element_type;
@ -690,7 +683,7 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
else if (bit_stride > 0) else if (bit_stride > 0)
TYPE_LENGTH (result_type) = TYPE_LENGTH (result_type) =
(bit_stride * (high_bound - low_bound + 1) + 7) / 8; (bit_stride * (high_bound - low_bound + 1) + 7) / 8;
@@ -1630,12 +1642,31 @@ stub_noname_complaint (void) @@ -1789,12 +1801,31 @@ stub_noname_complaint (void)
static int static int
is_dynamic_type_internal (struct type *type, int top_level) is_dynamic_type_internal (struct type *type, int top_level)
{ {
@ -722,7 +715,7 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
/* Types that have a dynamic TYPE_DATA_LOCATION are considered /* Types that have a dynamic TYPE_DATA_LOCATION are considered
dynamic, even if the type itself is statically defined. dynamic, even if the type itself is statically defined.
From a user's point of view, this may appear counter-intuitive; From a user's point of view, this may appear counter-intuitive;
@@ -1656,11 +1687,19 @@ is_dynamic_type_internal (struct type *t @@ -1823,11 +1854,19 @@ is_dynamic_type_internal (struct type *t
{ {
gdb_assert (TYPE_NFIELDS (type) == 1); gdb_assert (TYPE_NFIELDS (type) == 1);
@ -745,14 +738,15 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
} }
case TYPE_CODE_STRUCT: case TYPE_CODE_STRUCT:
@@ -1673,6 +1712,17 @@ is_dynamic_type_internal (struct type *t @@ -1840,6 +1879,18 @@ is_dynamic_type_internal (struct type *t
&& is_dynamic_type_internal (TYPE_FIELD_TYPE (type, i), 0)) && is_dynamic_type_internal (TYPE_FIELD_TYPE (type, i), 0))
return 1; return 1;
} }
+ case TYPE_CODE_PTR: + case TYPE_CODE_PTR:
+ { + {
+ if (TYPE_TARGET_TYPE (type) + if (TYPE_TARGET_TYPE (type)
+ && TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRING) + && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRING
+ || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY))
+ return is_dynamic_type (check_typedef (TYPE_TARGET_TYPE (type))); + return is_dynamic_type (check_typedef (TYPE_TARGET_TYPE (type)));
+ +
+ return 0; + return 0;
@ -763,8 +757,8 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
break; break;
} }
@@ -1701,7 +1751,8 @@ resolve_dynamic_range (struct type *dyn_ @@ -1869,7 +1920,8 @@ resolve_dynamic_range (struct type *dyn_
struct type *static_range_type; struct type *static_range_type, *static_target_type;
const struct dynamic_prop *prop; const struct dynamic_prop *prop;
const struct dwarf2_locexpr_baton *baton; const struct dwarf2_locexpr_baton *baton;
- struct dynamic_prop low_bound, high_bound; - struct dynamic_prop low_bound, high_bound;
@ -773,28 +767,30 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
gdb_assert (TYPE_CODE (dyn_range_type) == TYPE_CODE_RANGE); gdb_assert (TYPE_CODE (dyn_range_type) == TYPE_CODE_RANGE);
@@ -1732,10 +1783,17 @@ resolve_dynamic_range (struct type *dyn_ @@ -1901,12 +1953,19 @@ resolve_dynamic_range (struct type *dyn_
high_bound.kind = PROP_UNDEFINED;
high_bound.data.const_val = 0; high_bound.data.const_val = 0;
} }
+
+ prop = &TYPE_RANGE_DATA (dyn_range_type)->stride; + prop = &TYPE_RANGE_DATA (dyn_range_type)->stride;
+ if (dwarf2_evaluate_property (prop, addr, &value)) + if (dwarf2_evaluate_property (prop, addr_stack, &value))
+ { + {
+ stride.kind = PROP_CONST; + stride.kind = PROP_CONST;
+ stride.data.const_val = value; + stride.data.const_val = value;
+ } + }
+
static_target_type
- = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (dyn_range_type),
+ = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (range_copy),
addr_stack, 0);
- static_range_type = create_range_type (copy_type (dyn_range_type), - static_range_type = create_range_type (copy_type (dyn_range_type),
- TYPE_TARGET_TYPE (dyn_range_type),
- &low_bound, &high_bound);
+ static_range_type = create_range_type (range_copy, + static_range_type = create_range_type (range_copy,
+ TYPE_TARGET_TYPE (range_copy), static_target_type,
- &low_bound, &high_bound);
+ &low_bound, &high_bound, &stride); + &low_bound, &high_bound, &stride);
TYPE_RANGE_DATA (static_range_type)->flag_bound_evaluated = 1; TYPE_RANGE_DATA (static_range_type)->flag_bound_evaluated = 1;
return static_range_type; return static_range_type;
} }
@@ -1751,23 +1809,46 @@ resolve_dynamic_array (struct type *type @@ -1923,23 +1982,47 @@ resolve_dynamic_array (struct type *type
struct type *elt_type; struct type *elt_type;
struct type *range_type; struct type *range_type;
struct type *ary_dim; struct type *ary_dim;
@ -807,17 +803,17 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
elt_type = type; elt_type = type;
range_type = check_typedef (TYPE_INDEX_TYPE (elt_type)); range_type = check_typedef (TYPE_INDEX_TYPE (elt_type));
range_type = resolve_dynamic_range (range_type, addr); range_type = resolve_dynamic_range (range_type, addr_stack);
+ prop = TYPE_ALLOCATED_PROP (type); + prop = TYPE_ALLOCATED_PROP (type);
+ if (dwarf2_evaluate_property (prop, addr, &value)) + if (dwarf2_evaluate_property (prop, addr_stack, &value))
+ { + {
+ TYPE_ALLOCATED_PROP (copy)->kind = PROP_CONST; + TYPE_ALLOCATED_PROP (copy)->kind = PROP_CONST;
+ TYPE_ALLOCATED_PROP (copy)->data.const_val = value; + TYPE_ALLOCATED_PROP (copy)->data.const_val = value;
+ } + }
+ +
+ prop = TYPE_ASSOCIATED_PROP (type); + prop = TYPE_ASSOCIATED_PROP (type);
+ if (dwarf2_evaluate_property (prop, addr, &value)) + if (dwarf2_evaluate_property (prop, addr_stack, &value))
+ { + {
+ TYPE_ASSOCIATED_PROP (copy)->kind = PROP_CONST; + TYPE_ASSOCIATED_PROP (copy)->kind = PROP_CONST;
+ TYPE_ASSOCIATED_PROP (copy)->data.const_val = value; + TYPE_ASSOCIATED_PROP (copy)->data.const_val = value;
@ -826,64 +822,32 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type)); ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type));
- if (ary_dim != NULL && TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY) - if (ary_dim != NULL && TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY)
- elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (type), addr); - elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (type), addr_stack);
+ if (ary_dim != NULL && (TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY + if (ary_dim != NULL && (TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY
+ || TYPE_CODE (ary_dim) == TYPE_CODE_STRING)) + || TYPE_CODE (ary_dim) == TYPE_CODE_STRING))
+ elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (copy), addr); + elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (copy), addr_stack);
else else
elt_type = TYPE_TARGET_TYPE (type); elt_type = TYPE_TARGET_TYPE (type);
- return create_array_type (copy_type (type), - return create_array_type_with_stride (copy_type (type),
- elt_type, - elt_type, range_type,
- range_type); - TYPE_FIELD_BITSIZE (type, 0));
+ if (TYPE_CODE (type) == TYPE_CODE_STRING) + if (TYPE_CODE (type) == TYPE_CODE_STRING
+ && TYPE_FIELD_BITSIZE (type, 0) == 0)
+ return create_string_type (copy, + return create_string_type (copy,
+ elt_type, + elt_type,
+ range_type); + range_type);
+ else + else
+ return create_array_type (copy, + return create_array_type_with_stride (copy,
+ elt_type, + elt_type,
+ range_type); + range_type, TYPE_FIELD_BITSIZE (type, 0));
} }
/* Resolve dynamic bounds of members of the union TYPE to static /* Resolve dynamic bounds of members of the union TYPE to static
@@ -1938,6 +2019,25 @@ resolve_dynamic_type_internal (struct ty @@ -4453,6 +4536,20 @@ copy_type_recursive (struct objfile *obj
else TYPE_DYN_PROP_LIST (type));
TYPE_DATA_LOCATION (resolved_type) = NULL;
+ /* Resolve data_location attribute. */
+ prop = TYPE_DATA_LOCATION (resolved_type);
+ if (dwarf2_evaluate_property (prop, addr, &value))
+ {
+ struct type *range_type = TYPE_INDEX_TYPE (resolved_type);
+
+ /* Adjust the data location with the value of byte stride if set, which
+ can describe the separation between successive elements along the
+ dimension. */
+ if (TYPE_BYTE_STRIDE (range_type) < 0)
+ value += (TYPE_HIGH_BOUND (range_type) - TYPE_LOW_BOUND (range_type))
+ * TYPE_BYTE_STRIDE (range_type);
+
+ TYPE_DATA_LOCATION_ADDR (resolved_type) = value;
+ TYPE_DATA_LOCATION_KIND (resolved_type) = PROP_CONST;
+ }
+ else
+ TYPE_DATA_LOCATION (resolved_type) = NULL;
+
return resolved_type;
}
@@ -4174,6 +4274,27 @@ copy_type_recursive (struct objfile *obj
sizeof (struct dynamic_prop));
}
+ /* Copy the data location information. */
+ if (TYPE_DATA_LOCATION (type) != NULL)
+ {
+ TYPE_DATA_LOCATION (new_type) = xmalloc (sizeof (struct dynamic_prop));
+ *TYPE_DATA_LOCATION (new_type) = *TYPE_DATA_LOCATION (type);
+ }
+
+ /* Copy allocated information. */ + /* Copy allocated information. */
+ if (TYPE_ALLOCATED_PROP (type) != NULL) + if (TYPE_ALLOCATED_PROP (type) != NULL)
+ { + {
@ -901,8 +865,8 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
/* Copy pointers to other types. */ /* Copy pointers to other types. */
if (TYPE_TARGET_TYPE (type)) if (TYPE_TARGET_TYPE (type))
TYPE_TARGET_TYPE (new_type) = TYPE_TARGET_TYPE (new_type) =
@@ -4227,6 +4348,44 @@ copy_type (const struct type *type) @@ -4494,6 +4591,35 @@ copy_type_recursive (struct objfile *obj
sizeof (struct dynamic_prop)); gdb_assert_not_reached ("bad type_specific_kind");
} }
+ if (TYPE_ALLOCATED_PROP (type)) + if (TYPE_ALLOCATED_PROP (type))
@ -923,15 +887,6 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
+ sizeof (struct dynamic_prop)); + sizeof (struct dynamic_prop));
+ } + }
+ +
+ if (TYPE_DATA_LOCATION (type))
+ {
+ TYPE_DATA_LOCATION (new_type)
+ = OBSTACK_ZALLOC (&TYPE_OWNER (type).objfile->objfile_obstack,
+ struct dynamic_prop);
+ memcpy (TYPE_DATA_LOCATION (new_type), TYPE_DATA_LOCATION (type),
+ sizeof (struct dynamic_prop));
+ }
+
+ if (TYPE_NFIELDS (type)) + if (TYPE_NFIELDS (type))
+ { + {
+ int nfields = TYPE_NFIELDS (type); + int nfields = TYPE_NFIELDS (type);
@ -945,26 +900,41 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
+ +
return new_type; return new_type;
} }
Index: gdb-7.8.90.20150126/gdb/gdbtypes.h @@ -4519,6 +4645,14 @@ copy_type (const struct type *type)
TYPE_DYN_PROP_LIST (new_type)
= copy_dynamic_prop_list (&TYPE_OBJFILE (type) -> objfile_obstack,
TYPE_DYN_PROP_LIST (type));
+ if (TYPE_ALLOCATED_PROP (type) != NULL)
+ TYPE_ALLOCATED_PROP (new_type) = obstack_copy
+ (&TYPE_OBJFILE (type)->objfile_obstack, TYPE_ALLOCATED_PROP (type),
+ sizeof (*TYPE_ALLOCATED_PROP (type)));
+ if (TYPE_ASSOCIATED_PROP (type) != NULL)
+ TYPE_ASSOCIATED_PROP (new_type) = obstack_copy
+ (&TYPE_OBJFILE (type)->objfile_obstack, TYPE_ASSOCIATED_PROP (type),
+ sizeof (*TYPE_ASSOCIATED_PROP (type)));
return new_type;
}
Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/gdbtypes.h 2015-01-26 07:47:25.852758401 +0100 --- gdb-7.9.50.20150520.orig/gdb/gdbtypes.h 2015-05-29 08:27:02.685717504 +0200
+++ gdb-7.8.90.20150126/gdb/gdbtypes.h 2015-01-26 07:47:42.405829908 +0100 +++ gdb-7.9.50.20150520/gdb/gdbtypes.h 2015-05-29 08:46:08.862924052 +0200
@@ -660,6 +660,10 @@ struct main_type @@ -569,6 +569,10 @@ struct range_bounds
struct dynamic_prop high; struct dynamic_prop high;
+ /* * Stride of range. */ + /* * Stride of range. */
+ +
+ struct dynamic_prop stride; + struct dynamic_prop stride;
+ +
/* True if HIGH range bound contains the number of elements in the /* True if HIGH range bound contains the number of elements in the
subrange. This affects how the final hight bound is computed. */ subrange. This affects how the final hight bound is computed. */
@@ -720,6 +724,18 @@ struct main_type @@ -741,6 +745,18 @@ struct main_type
this field yields to the location of the data for an object. */
struct dynamic_prop *data_location; /* * Contains all dynamic type properties. */
struct dynamic_prop_list *dyn_prop_list;
+ +
+ /* Structure for DW_AT_allocated. + /* Structure for DW_AT_allocated.
+ The presence of this attribute indicates that the object of the type + The presence of this attribute indicates that the object of the type
@ -980,7 +950,7 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.h
}; };
/* * A ``struct type'' describes a particular instance of a type, with /* * A ``struct type'' describes a particular instance of a type, with
@@ -1198,6 +1214,39 @@ extern void allocate_gnat_aux_type (stru @@ -1255,6 +1271,15 @@ extern void allocate_gnat_aux_type (stru
TYPE_RANGE_DATA(range_type)->high.kind TYPE_RANGE_DATA(range_type)->high.kind
#define TYPE_LOW_BOUND_KIND(range_type) \ #define TYPE_LOW_BOUND_KIND(range_type) \
TYPE_RANGE_DATA(range_type)->low.kind TYPE_RANGE_DATA(range_type)->low.kind
@ -993,16 +963,13 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.h
+#define TYPE_BYTE_STRIDE_KIND(range_type) \ +#define TYPE_BYTE_STRIDE_KIND(range_type) \
+ TYPE_RANGE_DATA(range_type)->stride.kind + TYPE_RANGE_DATA(range_type)->stride.kind
+ +
+
+/* Attribute accessors for the type data location. */ /* Property accessors for the type data location. */
+#define TYPE_DATA_LOCATION(thistype) \ #define TYPE_DATA_LOCATION(thistype) \
+ TYPE_MAIN_TYPE(thistype)->data_location @@ -1265,6 +1290,20 @@ extern void allocate_gnat_aux_type (stru
+#define TYPE_DATA_LOCATION_BATON(thistype) \ TYPE_DATA_LOCATION (thistype)->data.const_val
+ TYPE_DATA_LOCATION (thistype)->data.baton #define TYPE_DATA_LOCATION_KIND(thistype) \
+#define TYPE_DATA_LOCATION_ADDR(thistype) \ TYPE_DATA_LOCATION (thistype)->kind
+ TYPE_DATA_LOCATION (thistype)->data.const_val
+#define TYPE_DATA_LOCATION_KIND(thistype) \
+ TYPE_DATA_LOCATION (thistype)->kind
+#define TYPE_ALLOCATED_PROP(thistype) TYPE_MAIN_TYPE(thistype)->allocated +#define TYPE_ALLOCATED_PROP(thistype) TYPE_MAIN_TYPE(thistype)->allocated
+#define TYPE_ASSOCIATED_PROP(thistype) TYPE_MAIN_TYPE(thistype)->associated +#define TYPE_ASSOCIATED_PROP(thistype) TYPE_MAIN_TYPE(thistype)->associated
+ +
@ -1018,9 +985,9 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.h
+ && TYPE_ASSOCIATED_PROP (t)->kind == PROP_CONST \ + && TYPE_ASSOCIATED_PROP (t)->kind == PROP_CONST \
+ && !TYPE_ASSOCIATED_PROP (t)->data.const_val) + && !TYPE_ASSOCIATED_PROP (t)->data.const_val)
/* Attribute accessors for the type data location. */ /* Attribute accessors for dynamic properties. */
#define TYPE_DATA_LOCATION(thistype) \ #define TYPE_DYN_PROP_LIST(thistype) \
@@ -1215,6 +1264,9 @@ extern void allocate_gnat_aux_type (stru @@ -1283,6 +1322,9 @@ extern void allocate_gnat_aux_type (stru
TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
#define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \ #define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \
TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
@ -1030,7 +997,7 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.h
#define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \ #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \
(TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype)))) (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype))))
@@ -1685,6 +1737,7 @@ extern struct type *create_array_type_wi @@ -1764,6 +1806,7 @@ extern struct type *create_array_type_wi
extern struct type *create_range_type (struct type *, struct type *, extern struct type *create_range_type (struct type *, struct type *,
const struct dynamic_prop *, const struct dynamic_prop *,
@ -1038,10 +1005,10 @@ Index: gdb-7.8.90.20150126/gdb/gdbtypes.h
const struct dynamic_prop *); const struct dynamic_prop *);
extern struct type *create_array_type (struct type *, struct type *, extern struct type *create_array_type (struct type *, struct type *,
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp 2015-01-26 07:47:42.405829908 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp 2015-05-29 08:27:06.266740292 +0200
@@ -0,0 +1,65 @@ @@ -0,0 +1,65 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -1108,10 +1075,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
+gdb_continue_to_breakpoint "vla2-deallocated" +gdb_continue_to_breakpoint "vla2-deallocated"
+gdb_test "print l" " = \\.FALSE\\." "print vla2 deallocated" +gdb_test "print l" " = \\.FALSE\\." "print vla2 deallocated"
+gdb_test "print vla2" " = <not allocated>" "print deallocated vla2" +gdb_test "print vla2" " = <not allocated>" "print deallocated vla2"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-datatypes.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.exp 2015-01-26 07:47:42.405829908 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-datatypes.exp 2015-05-29 08:27:06.266740292 +0200
@@ -0,0 +1,82 @@ @@ -0,0 +1,82 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -1195,10 +1162,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.exp
+ "print logicalvla(5,5,5) (2nd)" + "print logicalvla(5,5,5) (2nd)"
+gdb_test "print charactervla(5,5,5)" " = 'X'" \ +gdb_test "print charactervla(5,5,5)" " = 'X'" \
+ "print charactervla(5,5,5) (2nd)" + "print charactervla(5,5,5) (2nd)"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.f90 Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-datatypes.f90
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.f90 2015-01-26 07:47:42.405829908 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-datatypes.f90 2015-05-29 08:27:06.266740292 +0200
@@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
+! Copyright 2014 Free Software Foundation, Inc. +! Copyright 2014 Free Software Foundation, Inc.
+! +!
@ -1251,10 +1218,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.f90
+ ! dummy statement for bp + ! dummy statement for bp
+ l = .FALSE. ! vlas-modified + l = .FALSE. ! vlas-modified
+end program vla_primitives +end program vla_primitives
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-func.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.exp 2015-01-26 07:47:42.406829913 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-func.exp 2015-05-29 08:27:06.266740292 +0200
@@ -0,0 +1,61 @@ @@ -0,0 +1,61 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -1317,10 +1284,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.exp
+ "print vla3 (after func2)" + "print vla3 (after func2)"
+gdb_test "ptype vla3" "type = integer\\\(kind=4\\\) \\\(10\\\)" \ +gdb_test "ptype vla3" "type = integer\\\(kind=4\\\) \\\(10\\\)" \
+ "ptype vla3 (after func2)" + "ptype vla3 (after func2)"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.f90 Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-func.f90
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.f90 2015-01-26 07:47:42.406829913 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-func.f90 2015-05-29 08:27:06.267740298 +0200
@@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
+! Copyright 2014 Free Software Foundation, Inc. +! Copyright 2014 Free Software Foundation, Inc.
+! +!
@ -1393,10 +1360,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.f90
+ +
+ ret = .TRUE. ! func2-returned + ret = .TRUE. ! func2-returned
+end program vla_func +end program vla_func
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-history.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-history.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-history.exp 2015-01-26 07:47:42.406829913 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-history.exp 2015-05-29 08:27:06.267740298 +0200
@@ -0,0 +1,62 @@ @@ -0,0 +1,62 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -1460,10 +1427,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-history.exp
+# Try to access history values for vla values. +# Try to access history values for vla values.
+gdb_test "print \$9" " = 1311" "print \$9" +gdb_test "print \$9" " = 1311" "print \$9"
+gdb_test "print \$10" " = 1001" "print \$10" +gdb_test "print \$10" " = 1001" "print \$10"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp 2015-01-26 07:47:42.406829913 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp 2015-05-29 08:27:06.267740298 +0200
@@ -0,0 +1,87 @@ @@ -0,0 +1,87 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -1552,10 +1519,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
+ "ptype array1(100) (arbitrary length)" + "ptype array1(100) (arbitrary length)"
+gdb_test "ptype array2(4,100)" "type = integer\\\(kind=4\\\)" \ +gdb_test "ptype array2(4,100)" "type = integer\\\(kind=4\\\)" \
+ "ptype array2(4,100) (arbitrary length)" + "ptype array2(4,100) (arbitrary length)"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-ptype.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype.exp 2015-01-26 07:47:42.406829913 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-ptype.exp 2015-05-29 08:27:06.267740298 +0200
@@ -0,0 +1,96 @@ @@ -0,0 +1,96 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -1653,10 +1620,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype.exp
+gdb_test "ptype vla2(5, 45, 20)" \ +gdb_test "ptype vla2(5, 45, 20)" \
+ "no such vector element because not allocated" \ + "no such vector element because not allocated" \
+ "ptype vla2(5, 45, 20) not allocated" + "ptype vla2(5, 45, 20) not allocated"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sizeof.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-sizeof.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sizeof.exp 2015-01-26 07:47:42.406829913 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-sizeof.exp 2015-05-29 08:27:06.267740298 +0200
@@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -1704,10 +1671,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sizeof.exp
+gdb_breakpoint [gdb_get_line_number "pvla-associated"] +gdb_breakpoint [gdb_get_line_number "pvla-associated"]
+gdb_continue_to_breakpoint "pvla-associated" +gdb_continue_to_breakpoint "pvla-associated"
+gdb_test "print sizeof(pvla)" " = 4000" "print sizeof associated pvla" +gdb_test "print sizeof(pvla)" " = 4000" "print sizeof associated pvla"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-stride.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.exp 2015-01-26 07:47:42.407829917 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-stride.exp 2015-05-29 08:27:06.267740298 +0200
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -1753,10 +1720,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.exp
+gdb_continue_to_breakpoint "single-element" +gdb_continue_to_breakpoint "single-element"
+gdb_test "print pvla" " = \\\(5\\\)" "print single-element" +gdb_test "print pvla" " = \\\(5\\\)" "print single-element"
+gdb_test "print pvla(1)" " = 5" "print one single-element" +gdb_test "print pvla(1)" " = 5" "print one single-element"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.f90 Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-stride.f90
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.f90 2015-01-26 07:47:42.407829917 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-stride.f90 2015-05-29 08:27:06.268740305 +0200
@@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
+! Copyright 2014 Free Software Foundation, Inc. +! Copyright 2014 Free Software Foundation, Inc.
+! +!
@ -1788,10 +1755,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.f90
+ +
+ pvla => null() ! single-element + pvla => null() ! single-element
+end program vla_stride +end program vla_stride
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-01-26 07:47:42.407829917 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-05-29 08:27:06.268740305 +0200
@@ -0,0 +1,104 @@ @@ -0,0 +1,104 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -1897,10 +1864,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.exp
+ "whatis var_char_p after associated" + "whatis var_char_p after associated"
+gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \ +gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \
+ "ptype var_char_p after associated" + "ptype var_char_p after associated"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.f90 Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.f90
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.f90 2015-01-26 07:47:42.407829917 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.f90 2015-05-31 15:25:01.305615755 +0200
@@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
+! Copyright 2014 Free Software Foundation, Inc. +! Copyright 2014 Free Software Foundation, Inc.
+! +!
@ -1942,10 +1909,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.f90
+ var_char_p => null() + var_char_p => null()
+ l = associated(var_char_p) ! var_char_p-not-associated + l = associated(var_char_p) ! var_char_p-not-associated
+end program vla_strings +end program vla_strings
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sub.f90 Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-sub.f90
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sub.f90 2015-01-26 07:47:42.407829917 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-sub.f90 2015-05-29 08:27:06.268740305 +0200
@@ -0,0 +1,82 @@ @@ -0,0 +1,82 @@
+! Copyright 2014 Free Software Foundation, Inc. +! Copyright 2014 Free Software Foundation, Inc.
+! +!
@ -2029,10 +1996,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sub.f90
+ +
+ call bar(sub_arr3, sub_arr1) + call bar(sub_arr3, sub_arr1)
+end program vla_sub +end program vla_sub
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp 2015-01-26 07:47:42.407829917 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp 2015-05-29 08:27:06.268740305 +0200
@@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -2069,10 +2036,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
+gdb_test "p array1(100)" " = 100" "print arbitary array1(100)" +gdb_test "p array1(100)" " = 100" "print arbitary array1(100)"
+gdb_test "p array2(4,10)" " = 1" "print arbitary array2(4,10)" +gdb_test "p array2(4,10)" " = 1" "print arbitary array2(4,10)"
+gdb_test "p array2(4,100)" " = 1" "print arbitary array2(4,100)" +gdb_test "p array2(4,100)" " = 1" "print arbitary array2(4,100)"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp 2015-01-26 07:47:42.407829917 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp 2015-05-29 08:27:06.268740305 +0200
@@ -0,0 +1,49 @@ @@ -0,0 +1,49 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -2123,10 +2090,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
+gdb_test "p sub_arr2(1, 1, 1)" " = 30" "sub_arr2(1, 1, 1) after finish" +gdb_test "p sub_arr2(1, 1, 1)" " = 30" "sub_arr2(1, 1, 1) after finish"
+gdb_test "p sub_arr2(2, 1, 1)" " = 20" "sub_arr2(2, 1, 1) after finish" +gdb_test "p sub_arr2(2, 1, 1)" " = 20" "sub_arr2(2, 1, 1) after finish"
+ +
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub.exp 2015-01-26 07:47:42.408829922 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub.exp 2015-05-29 08:27:06.269740311 +0200
@@ -0,0 +1,90 @@ @@ -0,0 +1,90 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -2218,10 +2185,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub.exp
+ "set array(2,2,2) to 20 in subroutine (passed vla)" + "set array(2,2,2) to 20 in subroutine (passed vla)"
+gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \ +gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \
+ "print array2 in foo after it was mofified in debugger (passed vla)" + "print array2 in foo after it was mofified in debugger (passed vla)"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value.exp 2015-01-26 07:47:42.408829922 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value.exp 2015-05-29 08:27:06.269740311 +0200
@@ -0,0 +1,148 @@ @@ -0,0 +1,148 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
@ -2371,10 +2338,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value.exp
+gdb_continue_to_breakpoint "pvla-deassociated" +gdb_continue_to_breakpoint "pvla-deassociated"
+gdb_test "print \$mypvar(1,3,8)" " = 1001" \ +gdb_test "print \$mypvar(1,3,8)" " = 1001" \
+ "print \$mypvar(1,3,8) after deallocated" + "print \$mypvar(1,3,8) after deallocated"
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla.f90 Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla.f90
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla.f90 2015-01-26 07:47:42.408829922 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla.f90 2015-05-29 08:27:06.269740311 +0200
@@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
+! Copyright 2014 Free Software Foundation, Inc. +! Copyright 2014 Free Software Foundation, Inc.
+! +!
@ -2432,11 +2399,11 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla.f90
+ allocate (vla3 (2,2)) ! vla2-deallocated + allocate (vla3 (2,2)) ! vla2-deallocated
+ vla3(:,:) = 13 + vla3(:,:) = 13
+end program vla +end program vla
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/mi-vla-fortran.exp Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/mi-vla-fortran.exp 2015-01-26 07:47:42.408829922 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.mi/mi-vla-fortran.exp 2015-05-29 11:13:53.951656591 +0200
@@ -0,0 +1,182 @@ @@ -0,0 +1,181 @@
+# Copyright 2014 Free Software Foundation, Inc. +# Copyright 2014 Free Software Foundation, Inc.
+ +
+# This program is free software; you can redistribute it and/or modify +# This program is free software; you can redistribute it and/or modify
@ -2507,8 +2474,7 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
+mi_run_cmd +mi_run_cmd
+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \ +mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
+ { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno" + { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
+mi_gdb_test "510-data-evaluate-expression vla1" \ +# Content of 'vla1' is uninitialized here.
+ "510\\^done,value=\"\\(0, 0, 0, 0, 0\\)\"" "evaluate allocated vla"
+ +
+mi_create_varobj_checked vla1_allocated vla1 "real\\\(kind=4\\\) \\\(5\\\)" \ +mi_create_varobj_checked vla1_allocated vla1 "real\\\(kind=4\\\) \\\(5\\\)" \
+ "create local variable vla1_allocated" + "create local variable vla1_allocated"
@ -2619,10 +2585,10 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
+ +
+mi_gdb_exit +mi_gdb_exit
+return 0 +return 0
Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/vla.f90 Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.mi/vla.f90
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/vla.f90 2015-01-26 07:47:42.409829926 +0100 +++ gdb-7.9.50.20150520/gdb/testsuite/gdb.mi/vla.f90 2015-05-29 08:27:06.270740317 +0200
@@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
+! Copyright 2014 Free Software Foundation, Inc. +! Copyright 2014 Free Software Foundation, Inc.
+! +!
@ -2666,11 +2632,11 @@ Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/vla.f90
+ pvla2 => null() + pvla2 => null()
+ l = associated(pvla2) ! pvla2-set-to-null + l = associated(pvla2) ! pvla2-set-to-null
+end program vla +end program vla
Index: gdb-7.8.90.20150126/gdb/typeprint.c Index: gdb-7.9.50.20150520/gdb/typeprint.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/typeprint.c 2015-01-26 07:47:25.856758418 +0100 --- gdb-7.9.50.20150520.orig/gdb/typeprint.c 2015-05-29 08:27:02.688717523 +0200
+++ gdb-7.8.90.20150126/gdb/typeprint.c 2015-01-26 07:47:42.409829926 +0100 +++ gdb-7.9.50.20150520/gdb/typeprint.c 2015-05-29 08:27:06.270740317 +0200
@@ -456,6 +456,13 @@ whatis_exp (char *exp, int show) @@ -458,6 +458,13 @@ whatis_exp (char *exp, int show)
type = value_type (val); type = value_type (val);
@ -2684,10 +2650,10 @@ Index: gdb-7.8.90.20150126/gdb/typeprint.c
get_user_print_options (&opts); get_user_print_options (&opts);
if (opts.objectprint) if (opts.objectprint)
{ {
Index: gdb-7.8.90.20150126/gdb/valarith.c Index: gdb-7.9.50.20150520/gdb/valarith.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/valarith.c 2015-01-26 07:47:25.857758422 +0100 --- gdb-7.9.50.20150520.orig/gdb/valarith.c 2015-05-29 08:27:02.689717530 +0200
+++ gdb-7.8.90.20150126/gdb/valarith.c 2015-01-26 07:47:42.409829926 +0100 +++ gdb-7.9.50.20150520/gdb/valarith.c 2015-05-29 08:27:06.271740324 +0200
@@ -193,12 +193,31 @@ value_subscripted_rvalue (struct value * @@ -193,12 +193,31 @@ value_subscripted_rvalue (struct value *
struct type *array_type = check_typedef (value_type (array)); struct type *array_type = check_typedef (value_type (array));
struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type)); struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
@ -2722,10 +2688,10 @@ Index: gdb-7.8.90.20150126/gdb/valarith.c
if (VALUE_LVAL (array) == lval_memory && value_lazy (array)) if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
v = allocate_value_lazy (elt_type); v = allocate_value_lazy (elt_type);
Index: gdb-7.8.90.20150126/gdb/valprint.c Index: gdb-7.9.50.20150520/gdb/valprint.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/valprint.c 2015-01-26 07:47:25.858758427 +0100 --- gdb-7.9.50.20150520.orig/gdb/valprint.c 2015-05-29 08:27:02.690717536 +0200
+++ gdb-7.8.90.20150126/gdb/valprint.c 2015-01-26 07:47:42.410829930 +0100 +++ gdb-7.9.50.20150520/gdb/valprint.c 2015-05-29 08:27:06.271740324 +0200
@@ -303,6 +303,18 @@ valprint_check_validity (struct ui_file @@ -303,6 +303,18 @@ valprint_check_validity (struct ui_file
{ {
CHECK_TYPEDEF (type); CHECK_TYPEDEF (type);
@ -2764,7 +2730,7 @@ Index: gdb-7.8.90.20150126/gdb/valprint.c
/* A generic val_print that is suitable for use by language /* A generic val_print that is suitable for use by language
implementations of the la_val_print method. This function can implementations of the la_val_print method. This function can
handle most type codes, though not all, notably exception handle most type codes, though not all, notably exception
@@ -800,12 +824,16 @@ static int @@ -802,12 +826,16 @@ static int
value_check_printable (struct value *val, struct ui_file *stream, value_check_printable (struct value *val, struct ui_file *stream,
const struct value_print_options *options) const struct value_print_options *options)
{ {
@ -2781,7 +2747,7 @@ Index: gdb-7.8.90.20150126/gdb/valprint.c
if (value_entirely_optimized_out (val)) if (value_entirely_optimized_out (val))
{ {
if (options->summary && !val_print_scalar_type_p (value_type (val))) if (options->summary && !val_print_scalar_type_p (value_type (val)))
@@ -831,6 +859,18 @@ value_check_printable (struct value *val @@ -833,6 +861,18 @@ value_check_printable (struct value *val
return 0; return 0;
} }
@ -2800,23 +2766,23 @@ Index: gdb-7.8.90.20150126/gdb/valprint.c
return 1; return 1;
} }
Index: gdb-7.8.90.20150126/gdb/valprint.h Index: gdb-7.9.50.20150520/gdb/valprint.h
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/valprint.h 2015-01-26 07:47:25.859758431 +0100 --- gdb-7.9.50.20150520.orig/gdb/valprint.h 2015-05-29 08:27:02.691717543 +0200
+++ gdb-7.8.90.20150126/gdb/valprint.h 2015-01-26 07:47:42.410829930 +0100 +++ gdb-7.9.50.20150520/gdb/valprint.h 2015-05-29 08:27:06.272740330 +0200
@@ -217,4 +217,8 @@ extern void output_command_const (const @@ -232,4 +232,8 @@ extern void print_command_parse_format (
struct format_data *fmtp);
extern int val_print_scalar_type_p (struct type *type); extern void print_value (struct value *val, const struct format_data *fmtp);
+extern void val_print_not_allocated (struct ui_file *stream); +extern void val_print_not_allocated (struct ui_file *stream);
+ +
+extern void val_print_not_associated (struct ui_file *stream); +extern void val_print_not_associated (struct ui_file *stream);
+ +
#endif #endif
Index: gdb-7.8.90.20150126/gdb/value.c Index: gdb-7.9.50.20150520/gdb/value.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/value.c 2015-01-26 07:47:25.860758435 +0100 --- gdb-7.9.50.20150520.orig/gdb/value.c 2015-05-29 08:27:02.693717555 +0200
+++ gdb-7.8.90.20150126/gdb/value.c 2015-01-26 07:47:42.411829935 +0100 +++ gdb-7.9.50.20150520/gdb/value.c 2015-05-29 08:27:06.273740337 +0200
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
#include "tracepoint.h" #include "tracepoint.h"
#include "cp-abi.h" #include "cp-abi.h"
@ -2825,7 +2791,7 @@ Index: gdb-7.8.90.20150126/gdb/value.c
/* Prototypes for exported functions. */ /* Prototypes for exported functions. */
@@ -1755,6 +1756,25 @@ set_value_component_location (struct val @@ -1776,6 +1777,25 @@ set_value_component_location (struct val
if (funcs->copy_closure) if (funcs->copy_closure)
component->location.computed.closure = funcs->copy_closure (whole); component->location.computed.closure = funcs->copy_closure (whole);
} }
@ -2851,7 +2817,7 @@ Index: gdb-7.8.90.20150126/gdb/value.c
} }
@@ -3041,13 +3061,22 @@ value_primitive_field (struct value *arg @@ -3080,13 +3100,22 @@ value_primitive_field (struct value *arg
v = allocate_value_lazy (type); v = allocate_value_lazy (type);
else else
{ {
@ -2880,7 +2846,7 @@ Index: gdb-7.8.90.20150126/gdb/value.c
} }
set_value_component_location (v, arg1); set_value_component_location (v, arg1);
VALUE_REGNUM (v) = VALUE_REGNUM (arg1); VALUE_REGNUM (v) = VALUE_REGNUM (arg1);
@@ -3635,7 +3664,8 @@ readjust_indirect_value_type (struct val @@ -3674,7 +3703,8 @@ readjust_indirect_value_type (struct val
struct value *original_value) struct value *original_value)
{ {
/* Re-adjust type. */ /* Re-adjust type. */
@ -2890,7 +2856,7 @@ Index: gdb-7.8.90.20150126/gdb/value.c
/* Add embedding info. */ /* Add embedding info. */
set_value_enclosing_type (value, enc_type); set_value_enclosing_type (value, enc_type);
@@ -3652,6 +3682,12 @@ coerce_ref (struct value *arg) @@ -3691,6 +3721,12 @@ coerce_ref (struct value *arg)
struct value *retval; struct value *retval;
struct type *enc_type; struct type *enc_type;
@ -2903,7 +2869,7 @@ Index: gdb-7.8.90.20150126/gdb/value.c
retval = coerce_ref_if_computed (arg); retval = coerce_ref_if_computed (arg);
if (retval) if (retval)
return retval; return retval;
@@ -3786,8 +3822,14 @@ value_fetch_lazy (struct value *val) @@ -3825,8 +3861,14 @@ value_fetch_lazy (struct value *val)
} }
else if (VALUE_LVAL (val) == lval_memory) else if (VALUE_LVAL (val) == lval_memory)
{ {
@ -2919,11 +2885,11 @@ Index: gdb-7.8.90.20150126/gdb/value.c
if (TYPE_LENGTH (type)) if (TYPE_LENGTH (type))
read_value_memory (val, 0, value_stack (val), read_value_memory (val, 0, value_stack (val),
Index: gdb-7.8.90.20150126/gdb/dwarf2loc.c Index: gdb-7.9.50.20150520/gdb/dwarf2loc.c
=================================================================== ===================================================================
--- gdb-7.8.90.20150126.orig/gdb/dwarf2loc.c 2015-01-26 07:47:25.862758444 +0100 --- gdb-7.9.50.20150520.orig/gdb/dwarf2loc.c 2015-05-29 08:27:02.694717562 +0200
+++ gdb-7.8.90.20150126/gdb/dwarf2loc.c 2015-01-26 07:47:42.412829939 +0100 +++ gdb-7.9.50.20150520/gdb/dwarf2loc.c 2015-05-29 08:27:06.274740343 +0200
@@ -2293,6 +2293,11 @@ dwarf2_evaluate_loc_desc_full (struct ty @@ -2294,6 +2294,11 @@ dwarf2_evaluate_loc_desc_full (struct ty
int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0); int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0);
do_cleanups (value_chain); do_cleanups (value_chain);
@ -2935,7 +2901,7 @@ Index: gdb-7.8.90.20150126/gdb/dwarf2loc.c
retval = value_at_lazy (type, address + byte_offset); retval = value_at_lazy (type, address + byte_offset);
if (in_stack_memory) if (in_stack_memory)
set_value_stack (retval, 1); set_value_stack (retval, 1);
@@ -2552,6 +2557,19 @@ dwarf2_compile_property_to_c (struct ui_ @@ -2577,6 +2582,19 @@ dwarf2_compile_property_to_c (struct ui_
data, data + size, per_cu); data, data + size, per_cu);
} }

View File

@ -18,15 +18,15 @@ Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages
Name: %{?scl_prefix}gdb Name: %{?scl_prefix}gdb
# Freeze it when GDB gets branched # Freeze it when GDB gets branched
%global snapsrc 20140611 %global snapsrc 20150531
# See timestamp of source gnulib installed into gdb/gnulib/ . # See timestamp of source gnulib installed into gdb/gnulib/ .
%global snapgnulib 20121213 %global snapgnulib 20121213
%global tarname gdb-%{version} %global tarname gdb-%{version}
Version: 7.9.1 Version: 7.9.50.%{snapsrc}
# The release always contains a leading reserved number, start it at 1. # 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. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 14%{?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 and GFDL License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
Group: Development/Debuggers Group: Development/Debuggers
@ -120,9 +120,6 @@ Patch105: gdb-6.3-ppc64syscall-20040622.patch
#=maybepush: Write new testcase. #=maybepush: Write new testcase.
Patch111: gdb-6.3-ppc64displaysymbol-20041124.patch Patch111: gdb-6.3-ppc64displaysymbol-20041124.patch
# Fix upstream `set scheduler-locking step' vs. upstream PPC atomic seqs.
#=push+work: It is a bit difficult patch, a part is ppc specific.
Patch112: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
# Make upstream `set scheduler-locking step' as default. # Make upstream `set scheduler-locking step' as default.
#=push+work: How much is scheduler-locking relevant after non-stop? #=push+work: How much is scheduler-locking relevant after non-stop?
Patch260: gdb-6.6-scheduler_locking-step-is-default.patch Patch260: gdb-6.6-scheduler_locking-step-is-default.patch
@ -181,11 +178,6 @@ Patch194: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
#=fedoratest+work: One should recheck if it is really fixed upstream. #=fedoratest+work: One should recheck if it is really fixed upstream.
Patch196: gdb-6.5-sharedlibrary-path.patch Patch196: gdb-6.5-sharedlibrary-path.patch
# Suggest fixing your target architecture for gdbserver(1) (BZ 190810).
# FIXME: It could be autodetected.
#=push+work: There are more such error cases that can happen.
Patch199: gdb-6.5-bz190810-gdbserver-arch-advice.patch
# Testcase for deadlocking on last address space byte; for corrupted backtraces. # Testcase for deadlocking on last address space byte; for corrupted backtraces.
#=fedoratest #=fedoratest
Patch211: gdb-6.5-last-address-space-byte-test.patch Patch211: gdb-6.5-last-address-space-byte-test.patch
@ -224,7 +216,7 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
# Backported fixups post the source tarball. # Backported fixups post the source tarball.
#Xdrop: Just backports. #Xdrop: Just backports.
Patch232: gdb-upstream.patch #Patch232: gdb-upstream.patch
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
#=fedoratest+ppc #=fedoratest+ppc
@ -355,11 +347,6 @@ Patch348: gdb-6.8-bz466901-backtrace-full-prelinked.patch
#=push+work #=push+work
Patch349: gdb-archer.patch Patch349: gdb-archer.patch
# Fix parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457187).
# - Turn on 64-bit BFD support, globally enable AC_SYS_LARGEFILE.
#=fedoratest
Patch360: gdb-6.8-bz457187-largefile-test.patch
# New test for step-resume breakpoint placed in multiple threads at once. # New test for step-resume breakpoint placed in multiple threads at once.
#=fedoratest #=fedoratest
Patch381: gdb-simultaneous-step-resume-breakpoint-test.patch Patch381: gdb-simultaneous-step-resume-breakpoint-test.patch
@ -501,9 +488,6 @@ Patch818: gdb-rhbz795424-bitpos-lazyvalue.patch
#=fedoratest #=fedoratest
Patch832: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch Patch832: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
# Fix crash on 'enable count' (Simon Marchi, BZ 993118).
Patch843: gdb-enable-count-crash.patch
# [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon). # [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
Patch848: gdb-dts-rhel6-python-compat.patch Patch848: gdb-dts-rhel6-python-compat.patch
@ -529,15 +513,6 @@ Patch927: gdb-python-gil.patch
# Fix jit-reader.h for multi-lib. # Fix jit-reader.h for multi-lib.
Patch978: gdb-jit-reader-multilib.patch Patch978: gdb-jit-reader-multilib.patch
# Temporarily disable dg-extract-results.py to fix gdb.sum sorting.
Patch982: gdb-no-dg-extract-results-py.patch
# Fix Python 3 build error on 32-bit hosts.
Patch984: gdb-python3-py_hash_t-32bit.patch
# Fix Python 3 testsuite regressions.
Patch985: gdb-python3-testsuite.patch
%if 0%{!?rhel:1} || 0%{?rhel} > 6 %if 0%{!?rhel:1} || 0%{?rhel} > 6
# RL_STATE_FEDORA_GDB would not be found for: # RL_STATE_FEDORA_GDB would not be found for:
# Patch642: gdb-readline62-ask-more-rh.patch # Patch642: gdb-readline62-ask-more-rh.patch
@ -715,7 +690,7 @@ find -name "*.info*"|xargs rm -f
# Match the Fedora's version info. # Match the Fedora's version info.
%patch2 -p1 %patch2 -p1
%patch232 -p1 #patch232 -p1
%patch349 -p1 %patch349 -p1
%patch888 -p1 %patch888 -p1
%patch983 -p1 %patch983 -p1
@ -725,7 +700,6 @@ find -name "*.info*"|xargs rm -f
%patch105 -p1 %patch105 -p1
%patch111 -p1 %patch111 -p1
%patch112 -p1
%patch118 -p1 %patch118 -p1
%patch122 -p1 %patch122 -p1
%patch125 -p1 %patch125 -p1
@ -738,7 +712,6 @@ find -name "*.info*"|xargs rm -f
%patch188 -p1 %patch188 -p1
%patch194 -p1 %patch194 -p1
%patch196 -p1 %patch196 -p1
%patch199 -p1
%patch208 -p1 %patch208 -p1
%patch211 -p1 %patch211 -p1
%patch213 -p1 %patch213 -p1
@ -775,7 +748,6 @@ find -name "*.info*"|xargs rm -f
%patch330 -p1 %patch330 -p1
%patch343 -p1 %patch343 -p1
%patch348 -p1 %patch348 -p1
%patch360 -p1
%patch381 -p1 %patch381 -p1
%patch382 -p1 %patch382 -p1
%patch391 -p1 %patch391 -p1
@ -815,7 +787,6 @@ find -name "*.info*"|xargs rm -f
%patch817 -p1 %patch817 -p1
%patch818 -p1 %patch818 -p1
%patch832 -p1 %patch832 -p1
%patch843 -p1
%patch852 -p1 %patch852 -p1
%patch863 -p1 %patch863 -p1
%patch887 -p1 %patch887 -p1
@ -823,9 +794,6 @@ find -name "*.info*"|xargs rm -f
%patch925 -p1 %patch925 -p1
%patch927 -p1 %patch927 -p1
%patch978 -p1 %patch978 -p1
%patch982 -p1
%patch984 -p1
%patch985 -p1
%patch848 -p1 %patch848 -p1
%if 0%{!?el6:1} %if 0%{!?el6:1}
@ -877,6 +845,8 @@ rm -rf readline/*
mv -f readline-doc readline/doc mv -f readline-doc readline/doc
%endif # 0%{!?rhel:1} || 0%{?rhel} > 6 %endif # 0%{!?rhel:1} || 0%{?rhel} > 6
rm -rf zlib
%build %build
rm -rf %{buildroot} rm -rf %{buildroot}
@ -956,6 +926,7 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \
%else %else
--disable-inprocess-agent \ --disable-inprocess-agent \
%endif %endif
--with-system-zlib \
--with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ --with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
--with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ --with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
%ifarch sparc sparcv9 %ifarch sparc sparcv9
@ -1026,8 +997,6 @@ cd %{gdb_build}
make %{?_smp_mflags} \ make %{?_smp_mflags} \
-C gdb/doc {gdb,annotate}{.info,/index.html,.pdf} MAKEHTMLFLAGS=--no-split MAKEINFOFLAGS=--no-split -C gdb/doc {gdb,annotate}{.info,/index.html,.pdf} MAKEHTMLFLAGS=--no-split MAKEINFOFLAGS=--no-split
grep '#define HAVE_ZLIB_H 1' gdb/config.h
# Copy the <sourcetree>/gdb/NEWS file to the directory above it. # Copy the <sourcetree>/gdb/NEWS file to the directory above it.
cp $RPM_BUILD_DIR/%{gdb_src}/gdb/NEWS $RPM_BUILD_DIR/%{gdb_src} cp $RPM_BUILD_DIR/%{gdb_src}/gdb/NEWS $RPM_BUILD_DIR/%{gdb_src}
@ -1326,6 +1295,9 @@ then
fi fi
%changelog %changelog
* Sun May 31 2015 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.9.50.20150531-1.fc23
- Rebase to FSF GDB 7.9.50.20150531 (pre-7.10 trunk snapshot).
* Fri May 15 2015 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.9.1-14.fc22 * Fri May 15 2015 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.9.1-14.fc22
- Fix ignored Requires for gdb-doc (RH BZ 1221814). - Fix ignored Requires for gdb-doc (RH BZ 1221814).

View File

@ -1,2 +1,2 @@
4981307aa9619bbec5b73261e4e41c8d gdb-libstdc++-v3-python-r155978.tar.bz2 4981307aa9619bbec5b73261e4e41c8d gdb-libstdc++-v3-python-r155978.tar.bz2
35374c77a70884eb430c97061053a36e gdb-7.9.1.tar.xz 394dfbd87607c75e5c61f3e28105be54 gdb-7.9.50.20150531.tar.xz