diff --git a/gdb-6.3-bz231832-obstack-2gb.patch b/gdb-6.3-bz231832-obstack-2gb.patch index 75687db..71e6356 100644 --- a/gdb-6.3-bz231832-obstack-2gb.patch +++ b/gdb-6.3-bz231832-obstack-2gb.patch @@ -1,29 +1,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832 -Index: gdb-7.5.50.20130118/gdb/symmisc.c +Index: gdb-7.8.50.20141228/include/obstack.h =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/symmisc.c 2013-01-18 23:54:57.478974289 +0100 -+++ gdb-7.5.50.20130118/gdb/symmisc.c 2013-01-18 23:55:41.650930254 +0100 -@@ -148,10 +148,10 @@ print_objfile_statistics (void) - if (OBJSTAT (objfile, sz_strtab) > 0) - printf_filtered (_(" Space used by a.out string tables: %d\n"), - OBJSTAT (objfile, sz_strtab)); -- printf_filtered (_(" Total memory used for objfile obstack: %d\n"), -- obstack_memory_used (&objfile->objfile_obstack)); -- printf_filtered (_(" Total memory used for BFD obstack: %d\n"), -- obstack_memory_used (&objfile->per_bfd->storage_obstack)); -+ printf_filtered (_(" Total memory used for objfile obstack: %ld\n"), -+ (long) obstack_memory_used (&objfile->objfile_obstack)); -+ printf_filtered (_(" Total memory used for BFD obstack: %ld\n"), -+ (long) obstack_memory_used (&objfile->per_bfd->storage_obstack)); - printf_filtered (_(" Total memory used for psymbol cache: %d\n"), - bcache_memory_used (psymbol_bcache_get_bcache - (objfile->psymbol_cache))); -Index: gdb-7.5.50.20130118/include/obstack.h -=================================================================== ---- gdb-7.5.50.20130118.orig/include/obstack.h 2013-01-18 23:54:57.478974289 +0100 -+++ gdb-7.5.50.20130118/include/obstack.h 2013-01-18 23:55:10.256999188 +0100 +--- gdb-7.8.50.20141228.orig/include/obstack.h 2015-01-01 17:02:53.254820447 +0100 ++++ gdb-7.8.50.20141228/include/obstack.h 2015-01-01 17:02:53.880820084 +0100 @@ -188,31 +188,31 @@ struct obstack /* control current objec /* Declare the external functions we use; they are in obstack.c. */ @@ -129,10 +110,10 @@ Index: gdb-7.5.50.20130118/include/obstack.h if (__o->chunk_limit - __o->next_free < __len) \ _obstack_newchunk (__o, __len); \ obstack_blank_fast (__o, __len); \ -Index: gdb-7.5.50.20130118/libiberty/obstack.c +Index: gdb-7.8.50.20141228/libiberty/obstack.c =================================================================== ---- gdb-7.5.50.20130118.orig/libiberty/obstack.c 2013-01-18 23:54:57.478974289 +0100 -+++ gdb-7.5.50.20130118/libiberty/obstack.c 2013-01-18 23:55:10.256999188 +0100 +--- gdb-7.8.50.20141228.orig/libiberty/obstack.c 2015-01-01 17:02:53.254820447 +0100 ++++ gdb-7.8.50.20141228/libiberty/obstack.c 2015-01-01 17:02:53.880820084 +0100 @@ -44,9 +44,11 @@ #if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 #include diff --git a/gdb-6.3-readnever-20050907.patch b/gdb-6.3-readnever-20050907.patch index db05337..08c6c43 100644 --- a/gdb-6.3-readnever-20050907.patch +++ b/gdb-6.3-readnever-20050907.patch @@ -11,11 +11,11 @@ * gdb.texinfo (File Options): Document --readnever. -Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo +Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.6.90.20140127.orig/gdb/doc/gdb.texinfo 2014-01-27 22:42:53.150573603 +0100 -+++ gdb-7.6.90.20140127/gdb/doc/gdb.texinfo 2014-01-27 22:42:56.694576319 +0100 -@@ -1031,6 +1031,12 @@ Read each symbol file's entire symbol ta +--- gdb-7.8.50.20141228.orig/gdb/doc/gdb.texinfo 2015-01-01 17:01:08.308881292 +0100 ++++ gdb-7.8.50.20141228/gdb/doc/gdb.texinfo 2015-01-01 17:01:10.302880126 +0100 +@@ -1032,6 +1032,12 @@ Read each symbol file's entire symbol ta the default, which is to read it incrementally as it is needed. This makes startup slower, but makes future operations faster. @@ -28,11 +28,11 @@ Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo @end table @node Mode Options -Index: gdb-7.6.90.20140127/gdb/main.c +Index: gdb-7.8.50.20141228/gdb/main.c =================================================================== ---- gdb-7.6.90.20140127.orig/gdb/main.c 2014-01-27 22:42:53.153573606 +0100 -+++ gdb-7.6.90.20140127/gdb/main.c 2014-01-27 22:42:56.695576319 +0100 -@@ -473,6 +473,7 @@ captured_main (void *data) +--- gdb-7.8.50.20141228.orig/gdb/main.c 2015-01-01 17:01:08.312881290 +0100 ++++ gdb-7.8.50.20141228/gdb/main.c 2015-01-01 17:01:10.303880125 +0100 +@@ -590,6 +590,7 @@ captured_main (void *data) {"xdb", no_argument, &xdb_commands, 1}, {"dbx", no_argument, &dbx_commands, 1}, {"readnow", no_argument, &readnow_symbol_files, 1}, @@ -40,7 +40,7 @@ Index: gdb-7.6.90.20140127/gdb/main.c {"r", no_argument, &readnow_symbol_files, 1}, {"quiet", no_argument, &quiet, 1}, {"q", no_argument, &quiet, 1}, -@@ -1164,6 +1165,7 @@ Selection of debuggee and its files:\n\n +@@ -1245,6 +1246,7 @@ Selection of debuggee and its files:\n\n --se=FILE Use FILE as symbol file and executable file.\n\ --symbols=SYMFILE Read symbols from SYMFILE.\n\ --readnow Fully read symbol files on first access.\n\ @@ -48,11 +48,11 @@ Index: gdb-7.6.90.20140127/gdb/main.c --write Set writing into executable and core files.\n\n\ "), stream); fputs_unfiltered (_("\ -Index: gdb-7.6.90.20140127/gdb/symfile.c +Index: gdb-7.8.50.20141228/gdb/symfile.c =================================================================== ---- gdb-7.6.90.20140127.orig/gdb/symfile.c 2014-01-27 22:42:53.154573607 +0100 -+++ gdb-7.6.90.20140127/gdb/symfile.c 2014-01-27 22:42:56.696576320 +0100 -@@ -82,6 +82,7 @@ static void clear_symtab_users_cleanup ( +--- gdb-7.8.50.20141228.orig/gdb/symfile.c 2015-01-01 17:01:08.313881289 +0100 ++++ gdb-7.8.50.20141228/gdb/symfile.c 2015-01-01 17:01:10.304880125 +0100 +@@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup ( /* Global variables owned by this file. */ int readnow_symbol_files; /* Read full symbols immediately. */ @@ -60,19 +60,19 @@ Index: gdb-7.6.90.20140127/gdb/symfile.c /* Functions this file defines. */ -Index: gdb-7.6.90.20140127/gdb/dwarf2read.c +Index: gdb-7.8.50.20141228/gdb/dwarf2read.c =================================================================== ---- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-01-27 22:42:56.700576323 +0100 -+++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-01-27 22:44:21.915641560 +0100 -@@ -70,6 +70,7 @@ +--- gdb-7.8.50.20141228.orig/gdb/dwarf2read.c 2015-01-01 17:01:08.319881285 +0100 ++++ gdb-7.8.50.20141228/gdb/dwarf2read.c 2015-01-01 17:01:26.888870511 +0100 +@@ -69,6 +69,7 @@ #include "source.h" #include "filestuff.h" #include "build-id.h" +#include "top.h" #include - #include -@@ -1975,7 +1976,8 @@ dwarf2_has_info (struct objfile *objfile + #include +@@ -1989,7 +1990,8 @@ dwarf2_has_info (struct objfile *objfile (void *) names); dwarf2_per_objfile->objfile = objfile; } @@ -82,11 +82,11 @@ Index: gdb-7.6.90.20140127/gdb/dwarf2read.c && dwarf2_per_objfile->info.s.asection != NULL && !dwarf2_per_objfile->abbrev.is_virtual && dwarf2_per_objfile->abbrev.s.asection != NULL); -Index: gdb-7.6.90.20140127/gdb/top.h +Index: gdb-7.8.50.20141228/gdb/top.h =================================================================== ---- gdb-7.6.90.20140127.orig/gdb/top.h 2014-01-27 22:42:53.159573610 +0100 -+++ gdb-7.6.90.20140127/gdb/top.h 2014-01-27 22:42:56.701576324 +0100 -@@ -59,6 +59,7 @@ extern void set_prompt (const char *s); +--- gdb-7.8.50.20141228.orig/gdb/top.h 2015-01-01 17:01:08.320881284 +0100 ++++ gdb-7.8.50.20141228/gdb/top.h 2015-01-01 17:01:10.310880121 +0100 +@@ -67,6 +67,7 @@ extern void set_prompt (const char *s); /* From random places. */ extern int readnow_symbol_files; diff --git a/gdb-6.3-test-pie-20050107.patch b/gdb-6.3-test-pie-20050107.patch index 8f3d392..05f7753 100644 --- a/gdb-6.3-test-pie-20050107.patch +++ b/gdb-6.3-test-pie-20050107.patch @@ -1,8 +1,8 @@ -Index: gdb-7.7.50.20140609/gdb/testsuite/configure.ac +Index: gdb-7.8.50.20141228/gdb/testsuite/configure.ac =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/testsuite/configure.ac 2014-06-13 20:05:33.058506817 +0200 -+++ gdb-7.7.50.20140609/gdb/testsuite/configure.ac 2014-06-13 20:05:59.991532595 +0200 -@@ -97,6 +97,6 @@ AC_OUTPUT([Makefile \ +--- gdb-7.8.50.20141228.orig/gdb/testsuite/configure.ac 2015-01-01 17:00:26.123908948 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/configure.ac 2015-01-01 17:00:43.168897773 +0100 +@@ -106,6 +106,6 @@ AC_OUTPUT([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 \ @@ -10,20 +10,20 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/configure.ac + 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]) -Index: gdb-7.7.50.20140609/gdb/testsuite/configure +Index: gdb-7.8.50.20141228/gdb/testsuite/configure =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/testsuite/configure 2014-06-13 20:05:29.956503899 +0200 -+++ gdb-7.7.50.20140609/gdb/testsuite/configure 2014-06-13 20:06:24.492555709 +0200 -@@ -3448,7 +3448,7 @@ done +--- gdb-7.8.50.20141228.orig/gdb/testsuite/configure 2015-01-01 17:00:26.124908947 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/configure 2015-01-01 17:00:59.467887088 +0100 +@@ -3458,7 +3458,7 @@ if test "${build}" = "${host}" -a "${hos + fi - --ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.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.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.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.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" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure -@@ -4179,6 +4179,7 @@ do +@@ -4190,6 +4190,7 @@ do "gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;; "gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;; "gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;; @@ -31,10 +31,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/configure "gdb.perf/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.perf/Makefile" ;; "gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;; "gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;; -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.c +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.c 2014-06-13 20:05:33.060506819 +0200 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.c 2015-01-01 17:00:43.169897773 +0100 @@ -0,0 +1,20 @@ +/* This program is intended to be started outside of gdb, and then + attached to by gdb. Thus, it simply spins in a loop. The loop @@ -56,10 +56,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.c + } + return 0; +} -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach2.c +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach2.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach2.c 2014-06-13 20:05:33.060506819 +0200 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach2.c 2015-01-01 17:00:43.170897772 +0100 @@ -0,0 +1,24 @@ +/* This program is intended to be started outside of gdb, and then + attached to by gdb. Thus, it simply spins in a loop. The loop @@ -85,10 +85,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach2.c + } + return (0); +} -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.c +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.c 2014-06-13 20:05:33.061506820 +0200 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.c 2015-01-01 17:00:43.170897772 +0100 @@ -0,0 +1,146 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -236,10 +236,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.c + } + return 0; +} -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break1.c +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break1.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break1.c 2014-06-13 20:05:33.061506820 +0200 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break1.c 2015-01-01 17:00:43.170897772 +0100 @@ -0,0 +1,44 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -285,10 +285,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break1.c +void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */ +void marker4 (d) long d; {} /* set breakpoint 13 here */ +#endif -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/coremaker.c +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/coremaker.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/coremaker.c 2014-06-13 20:05:33.061506820 +0200 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/coremaker.c 2015-01-01 17:00:43.170897772 +0100 @@ -0,0 +1,142 @@ +/* Copyright 1992, 1993, 1994, 1995, 1996, 1999 + Free Software Foundation, Inc. @@ -432,10 +432,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/coremaker.c + return 0; +} + -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.exp 2014-06-13 20:05:33.061506820 +0200 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.exp 2015-01-01 17:00:43.171897771 +0100 @@ -0,0 +1,417 @@ +# Copyright 1997, 1999, 2002 Free Software Foundation, Inc. + @@ -854,10 +854,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.exp +do_call_attach_tests + +return 0 -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.exp 2014-06-13 20:05:33.062506821 +0200 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.exp 2015-01-01 17:00:43.172897771 +0100 @@ -0,0 +1,962 @@ +# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2002, 2003, 2004 @@ -1821,10 +1821,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.exp + send_gdb "set args main\n" + gdb_expect -re ".*$gdb_prompt $" {} +} -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/corefile.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/corefile.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/corefile.exp 2014-06-13 20:05:33.063506822 +0200 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/corefile.exp 2015-01-01 17:00:43.172897771 +0100 @@ -0,0 +1,233 @@ +# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Free Software Foundation, Inc. @@ -2059,10 +2059,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/corefile.exp +gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)" + +gdb_test "core" "No core file now." -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/Makefile.in +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/Makefile.in =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/Makefile.in 2014-06-13 20:05:33.063506822 +0200 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/Makefile.in 2015-01-01 17:00:43.172897771 +0100 @@ -0,0 +1,19 @@ +VPATH = @srcdir@ +srcdir = @srcdir@ diff --git a/gdb-6.5-BEA-testsuite.patch b/gdb-6.5-BEA-testsuite.patch index b2b4277..3d205cd 100644 --- a/gdb-6.5-BEA-testsuite.patch +++ b/gdb-6.5-BEA-testsuite.patch @@ -474,7 +474,7 @@ Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh + local FAILURES=0 + + mustNotHave '??' || ((FAILURES++)) -+ mustHaveCorrectAmount 12 threadcrash.c: || ((FAILURES++)) ++ mustHaveCorrectAmount 11 threadcrash.c: || ((FAILURES++)) + + mustHaveSevenThreads || ((FAILURES++)) + mustHaveSequence sleep "makeSyscall (ignored=" || ((FAILURES++)) diff --git a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch index 00ea55c..2f352da 100644 --- a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +++ b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch @@ -22,6 +22,8 @@ for the most common under-ggdb3 compiled programs. Original patch hooked into target_translate_tls_address. But its inferior call invalidates `struct frame *' in the callers - RH BZ 690908. +https://bugzilla.redhat.com/show_bug.cgi?id=1166549 + 2007-11-03 Jan Kratochvil @@ -32,23 +34,25 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug: <81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location <81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location -Index: gdb-7.6.50.20130731-cvs/gdb/printcmd.c +Index: gdb-7.8.1/gdb/printcmd.c =================================================================== ---- gdb-7.6.50.20130731-cvs.orig/gdb/printcmd.c 2013-08-02 16:21:13.665758324 +0200 -+++ gdb-7.6.50.20130731-cvs/gdb/printcmd.c 2013-08-02 16:22:24.367853322 +0200 -@@ -982,6 +982,8 @@ print_command_1 (const char *exp, int vo +--- gdb-7.8.1.orig/gdb/printcmd.c 2014-11-21 19:05:44.699959209 +0100 ++++ gdb-7.8.1/gdb/printcmd.c 2014-11-21 19:05:44.868959291 +0100 +@@ -980,6 +980,10 @@ print_command_1 (const char *exp, int vo if (exp && *exp) { -+ if (strcmp (exp, "errno") == 0) -+ exp = "*((int *(*) (void)) __errno_location) ()"; ++ /* '*((int *(*) (void)) __errno_location) ()' is incompatible with ++ function descriptors. */ ++ if (target_has_execution && strcmp (exp, "errno") == 0) ++ exp = "*(*(int *(*)(void)) __errno_location) ()"; expr = parse_expression (exp); make_cleanup (free_current_contents, &expr); val = evaluate_expression (expr); -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.c +Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2013-08-02 16:21:13.665758324 +0200 ++++ gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2014-11-21 19:05:44.869959291 +0100 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -78,10 +82,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.c + + return 0; /* breakpoint */ +} -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.exp +Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2013-08-02 16:21:13.665758324 +0200 ++++ gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2014-11-21 19:05:44.869959291 +0100 @@ -0,0 +1,60 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -143,3 +147,112 @@ Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.exp + +# TODO: Test the error on resolving ERRNO with only libc loaded. +# Just how to find the current libc filename? +Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.c 2014-11-21 19:05:44.869959291 +0100 +@@ -0,0 +1,28 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2005, 2007 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++ ++ Please email any bugs, comments, and/or additions to this file to: ++ bug-gdb@prep.ai.mit.edu */ ++ ++#include ++ ++int main() ++{ ++ errno = 42; ++ ++ return 0; /* breakpoint */ ++} +Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp 2014-11-21 19:13:01.553171326 +0100 +@@ -0,0 +1,71 @@ ++# Copyright 2007 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++set testfile dw2-errno2 ++set srcfile ${testfile}.c ++set binfile ${objdir}/${subdir}/${testfile} ++ ++proc prep { message {do_xfail 0} } { with_test_prefix $message { ++ global srcdir subdir binfile variant ++ gdb_exit ++ gdb_start ++ gdb_reinitialize_dir $srcdir/$subdir ++ gdb_load ${binfile}${variant} ++ ++ runto_main ++ ++ gdb_breakpoint [gdb_get_line_number "breakpoint"] ++ gdb_continue_to_breakpoint "breakpoint" ++ ++ gdb_test "gcore ${binfile}${variant}.core" "\r\nSaved corefile .*" "gcore $variant" ++ ++ gdb_test "print errno" ".* = 42" ++ ++ gdb_test "kill" ".*" "kill" {Kill the program being debugged\? \(y or n\) } "y" ++ gdb_test "core-file ${binfile}${variant}.core" "\r\nCore was generated by .*" "core-file" ++ if $do_xfail { ++ setup_xfail "*-*-*" ++ } ++ gdb_test "print errno" ".* = 42" "print errno for core" ++}} ++ ++set variant g2thrN ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } { ++ untested "Couldn't compile test program" ++ return -1 ++} ++prep "macros=N threads=N" 1 ++ ++set variant g3thrN ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } { ++ untested "Couldn't compile test program" ++ return -1 ++} ++prep "macros=Y threads=N" 1 ++ ++set variant g2thrY ++if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } { ++ return -1 ++} ++prep "macros=N threads=Y" ++ ++set variant g3thrY ++if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } { ++ return -1 ++} ++prep "macros=Y threads=Y" 1 ++ ++# TODO: Test the error on resolving ERRNO with only libc loaded. ++# Just how to find the current libc filename? diff --git a/gdb-6.5-bz216711-clone-is-outermost.patch b/gdb-6.5-bz216711-clone-is-outermost.patch index 592c4e5..c9604d1 100644 --- a/gdb-6.5-bz216711-clone-is-outermost.patch +++ b/gdb-6.5-bz216711-clone-is-outermost.patch @@ -23,11 +23,11 @@ instead. Port to GDB-6.7. -Index: gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c +Index: gdb-7.8.50.20141228/gdb/amd64-linux-tdep.c =================================================================== ---- gdb-7.6.90.20140127.orig/gdb/amd64-linux-tdep.c 2014-02-04 23:40:06.263483469 +0100 -+++ gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c 2014-02-04 23:47:18.438009290 +0100 -@@ -289,6 +289,80 @@ amd64_linux_register_reggroup_p (struct +--- gdb-7.8.50.20141228.orig/gdb/amd64-linux-tdep.c 2015-01-01 17:01:51.506856241 +0100 ++++ gdb-7.8.50.20141228/gdb/amd64-linux-tdep.c 2015-01-01 17:01:54.769854349 +0100 +@@ -290,6 +290,80 @@ amd64_linux_register_reggroup_p (struct /* Set the program counter for process PTID to PC. */ @@ -108,7 +108,7 @@ Index: gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c static void amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc) { -@@ -1607,6 +1681,8 @@ amd64_linux_init_abi_common(struct gdbar +@@ -1657,6 +1731,8 @@ amd64_linux_init_abi_common(struct gdbar tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET; @@ -117,11 +117,11 @@ Index: gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c /* Add the %orig_rax register used for syscall restarting. */ set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc); -Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c +Index: gdb-7.8.50.20141228/gdb/amd64-tdep.c =================================================================== ---- gdb-7.6.90.20140127.orig/gdb/amd64-tdep.c 2014-02-04 23:40:06.265483471 +0100 -+++ gdb-7.6.90.20140127/gdb/amd64-tdep.c 2014-02-04 23:45:40.846891653 +0100 -@@ -2359,6 +2359,7 @@ amd64_frame_unwind_stop_reason (struct f +--- gdb-7.8.50.20141228.orig/gdb/amd64-tdep.c 2015-01-01 17:01:51.507856240 +0100 ++++ gdb-7.8.50.20141228/gdb/amd64-tdep.c 2015-01-01 17:01:54.770854349 +0100 +@@ -2492,6 +2492,7 @@ amd64_frame_unwind_stop_reason (struct f { struct amd64_frame_cache *cache = amd64_frame_cache (this_frame, this_cache); @@ -129,7 +129,7 @@ Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c if (!cache->base_p) return UNWIND_UNAVAILABLE; -@@ -2367,6 +2368,10 @@ amd64_frame_unwind_stop_reason (struct f +@@ -2500,6 +2501,10 @@ amd64_frame_unwind_stop_reason (struct f if (cache->base == 0) return UNWIND_OUTERMOST; @@ -140,7 +140,7 @@ Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c return UNWIND_NO_REASON; } -@@ -2498,6 +2503,7 @@ amd64_sigtramp_frame_this_id (struct fra +@@ -2631,6 +2636,7 @@ amd64_sigtramp_frame_this_id (struct fra { struct amd64_frame_cache *cache = amd64_sigtramp_frame_cache (this_frame, this_cache); @@ -148,7 +148,7 @@ Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c if (!cache->base_p) (*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame)); -@@ -2506,6 +2512,11 @@ amd64_sigtramp_frame_this_id (struct fra +@@ -2639,6 +2645,11 @@ amd64_sigtramp_frame_this_id (struct fra /* This marks the outermost frame. */ return; } @@ -160,11 +160,11 @@ Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c else (*this_id) = frame_id_build (cache->base + 16, get_frame_pc (this_frame)); } -Index: gdb-7.6.90.20140127/gdb/i386-tdep.c +Index: gdb-7.8.50.20141228/gdb/i386-tdep.c =================================================================== ---- gdb-7.6.90.20140127.orig/gdb/i386-tdep.c 2014-02-04 23:40:06.267483473 +0100 -+++ gdb-7.6.90.20140127/gdb/i386-tdep.c 2014-02-04 23:43:33.048734974 +0100 -@@ -7830,6 +7830,9 @@ i386_gdbarch_init (struct gdbarch_info i +--- gdb-7.8.50.20141228.orig/gdb/i386-tdep.c 2015-01-01 17:01:51.509856239 +0100 ++++ gdb-7.8.50.20141228/gdb/i386-tdep.c 2015-01-01 17:01:54.772854348 +0100 +@@ -8286,6 +8286,9 @@ i386_gdbarch_init (struct gdbarch_info i tdep->xsave_xcr0_offset = -1; @@ -174,175 +174,24 @@ Index: gdb-7.6.90.20140127/gdb/i386-tdep.c tdep->record_regmap = i386_record_regmap; set_gdbarch_long_long_align_bit (gdbarch, 32); -Index: gdb-7.6.90.20140127/gdb/i386-tdep.h +Index: gdb-7.8.50.20141228/gdb/i386-tdep.h =================================================================== ---- gdb-7.6.90.20140127.orig/gdb/i386-tdep.h 2014-02-04 23:40:06.268483475 +0100 -+++ gdb-7.6.90.20140127/gdb/i386-tdep.h 2014-02-04 23:43:33.048734974 +0100 -@@ -192,6 +192,9 @@ struct gdbarch_tdep - int (*i386_sysenter_record) (struct regcache *regcache); - /* Parse syscall args. */ - int (*i386_syscall_record) (struct regcache *regcache); +--- gdb-7.8.50.20141228.orig/gdb/i386-tdep.h 2015-01-01 17:01:54.772854348 +0100 ++++ gdb-7.8.50.20141228/gdb/i386-tdep.h 2015-01-01 17:02:15.826842143 +0100 +@@ -240,6 +240,9 @@ struct gdbarch_tdep + + /* Regsets. */ + const struct regset *fpregset; + + /* Detect OS dependent outermost frames; such as `clone'. */ + int (*outermost_frame_p) (struct frame_info *this_frame); }; /* Floating-point registers. */ -Index: gdb-7.6.90.20140127/gdb/ia64-tdep.c -=================================================================== ---- gdb-7.6.90.20140127.orig/gdb/ia64-tdep.c 2014-02-04 23:40:06.270483477 +0100 -+++ gdb-7.6.90.20140127/gdb/ia64-tdep.c 2014-02-04 23:43:33.049734975 +0100 -@@ -2176,6 +2176,138 @@ static const struct frame_unwind ia64_fr - default_frame_sniffer - }; - -+/* Detect the outermost frame; during unwind of -+ #6 0x2000000000347100 in __clone2 () from /lib/libc.so.6.1 -+ avoid the additional bogus frame -+ #7 0x0000000000000000 in ?? () */ -+ -+static char linux_clone2_code[] = -+{ -+/* libc/sysdeps/unix/sysv/linux/ia64/clone2.S */ -+ 0x09, 0x00, 0x20, 0x12, 0x90, 0x11, 0x00, 0x40, -+ 0x28, 0x20, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00, -+/* st4 [r9]=r8 */ -+/* st4 [r10]=r8 */ -+/* ;; */ -+/* #endif */ -+ 0x02, 0x50, 0x21, 0x40, 0x18, 0x14, 0x90, 0x02, -+ 0x90, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00, -+/* 1: ld8 out1=[in0],8 |* Retrieve code pointer. *| */ -+/* mov out0=in4 |* Pass proper argument to fn *| */ -+/* ;; */ -+ 0x11, 0x08, 0x00, 0x40, 0x18, 0x10, 0x60, 0x50, -+ 0x05, 0x80, 0x03, 0x00, 0x68, 0x00, 0x80, 0x12, -+/* ld8 gp=[in0] |* Load function gp. *| */ -+/* mov b6=out1 */ -+/* br.call.dptk.many rp=b6 |* Call fn(arg) in the child *| */ -+/* ;; */ -+ 0x10, 0x48, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00, -+ 0xa0, 0x00, 0x42, 0x00, 0x98, 0xdf, 0xf7, 0x5b, -+/* mov out0=r8 |* Argument to _exit *| */ -+/* mov gp=loc0 */ -+/* .globl HIDDEN_JUMPTARGET(_exit) */ -+/* br.call.dpnt.many rp=HIDDEN_JUMPTARGET(_exit) */ -+/* |* call _exit with result from fn. *| */ -+ 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -+ 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x84, 0x00 -+/* ret |* Not reached. *| */ -+}; -+ -+#define LINUX_CLONE_PRE_SLOTS 3 /* Number of slots before PC. */ -+#define LINUX_CLONE_LEN (sizeof linux_clone2_code) -+ -+static int -+ia64_linux_clone2_running (struct frame_info *this_frame) -+{ -+ CORE_ADDR pc = get_frame_pc (this_frame); -+ char buf[LINUX_CLONE_LEN]; -+ struct minimal_symbol *minsym; -+ long long instr; -+ -+ if (!safe_frame_unwind_memory (this_frame, pc - LINUX_CLONE_PRE_SLOTS * 16, -+ buf, LINUX_CLONE_LEN)) -+ return 0; -+ -+ if (memcmp (buf, linux_clone2_code, LINUX_CLONE_PRE_SLOTS * 16) != 0) -+ return 0; -+ -+ /* Adjust the expected "_exit" address. */ -+ minsym = lookup_minimal_symbol_text ("_exit", NULL); -+ if (minsym == NULL) -+ return 0; -+ -+ instr = slotN_contents (&linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16], 2); -+ instr &= ~(((1L << 20) - 1) << 13); -+ /* Address is relative to the jump instruction slot, not the next one. */ -+ instr |= (((SYMBOL_VALUE_ADDRESS (minsym) - (pc & ~0xfL)) >> 4) -+ & ((1L << 20) - 1)) << 13; -+ replace_slotN_contents (&linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16], instr, -+ 2); -+ -+ if (memcmp (&buf[LINUX_CLONE_PRE_SLOTS * 16], -+ &linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16], -+ LINUX_CLONE_LEN - (LINUX_CLONE_PRE_SLOTS * 16)) != 0) -+ return 0; -+ -+ return 1; -+} -+ -+static int -+ia64_outermost_frame (struct frame_info *this_frame) -+{ -+ CORE_ADDR pc = get_frame_pc (this_frame); -+ char *name; -+ -+ find_pc_partial_function (pc, &name, NULL, NULL); -+ -+ /* If we have NAME, we can optimize the search. -+ `clone' NAME still needs to have the code checked as its name may be -+ present in the user code. -+ `__clone' NAME should not be present in the user code but in the initial -+ parts of the `__clone' implementation the unwind still makes sense. -+ More detailed unwinding decision would be too much sensitive to possible -+ subtle changes in specific glibc revisions. */ -+ if (name == NULL || strcmp (name, "clone2") == 0 -+ || strcmp ("__clone2", name) == 0) -+ return (ia64_linux_clone2_running (this_frame) != 0); -+ -+ return 0; -+} -+ -+static void -+ia64_clone2_frame_this_id (struct frame_info *this_frame, void **this_cache, -+ struct frame_id *this_id) -+{ -+ /* Leave the default outermost frame at *THIS_ID. */ -+} -+ -+static struct value * -+ia64_clone2_frame_prev_register (struct frame_info *this_frame, -+ void **this_cache, int regnum) -+{ -+ return frame_unwind_got_register (this_frame, regnum, regnum); -+} -+ -+static int -+ia64_clone2_frame_sniffer (const struct frame_unwind *self, -+ struct frame_info *this_frame, -+ void **this_prologue_cache) -+{ -+ if (ia64_outermost_frame (this_frame)) -+ return 1; -+ -+ return 0; -+} -+ -+static const struct frame_unwind ia64_clone2_frame_unwind = -+{ -+ NORMAL_FRAME, -+ &ia64_clone2_frame_this_id, -+ &ia64_clone2_frame_prev_register, -+ NULL, -+ &ia64_clone2_frame_sniffer -+}; -+ - /* Signal trampolines. */ - - static void -@@ -4023,6 +4155,7 @@ ia64_gdbarch_init (struct gdbarch_info i - set_gdbarch_dummy_id (gdbarch, ia64_dummy_id); - - set_gdbarch_unwind_pc (gdbarch, ia64_unwind_pc); -+ frame_unwind_append_unwinder (gdbarch, &ia64_clone2_frame_unwind); - #ifdef HAVE_LIBUNWIND_IA64_H - frame_unwind_append_unwinder (gdbarch, - &ia64_libunwind_sigtramp_frame_unwind); -Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.c +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.c 2014-02-04 23:43:33.050734976 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.c 2015-01-01 17:01:54.773854347 +0100 @@ -0,0 +1,39 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -383,10 +232,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.c + for (;;) + pause(); +} -Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2014-02-04 23:43:33.050734976 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2015-01-01 17:01:54.774854346 +0100 @@ -0,0 +1,61 @@ +# Copyright 2006 Free Software Foundation, Inc. + diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch index 3ad5e62..0e6dcf4 100644 --- a/gdb-6.6-buildid-locate-core-as-arg.patch +++ b/gdb-6.6-buildid-locate-core-as-arg.patch @@ -58,24 +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 user did "gdb core". -Index: gdb-7.7.50.20140609/gdb/exceptions.h +Index: gdb-7.8.50.20141228/gdb/exec.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/exceptions.h 2014-06-13 20:26:46.988804553 +0200 -+++ gdb-7.7.50.20140609/gdb/exceptions.h 2014-06-13 20:27:01.930820057 +0200 -@@ -100,6 +100,9 @@ enum errors { - /* Requested feature, method, mechanism, etc. is not supported. */ - NOT_SUPPORTED_ERROR, - -+ /* Attempt to load a core file as executable. */ -+ IS_CORE_ERROR, -+ - /* Add more errors here. */ - NR_ERRORS - }; -Index: gdb-7.7.50.20140609/gdb/exec.c -=================================================================== ---- gdb-7.7.50.20140609.orig/gdb/exec.c 2014-06-13 20:26:44.831802315 +0200 -+++ gdb-7.7.50.20140609/gdb/exec.c 2014-06-13 20:27:17.282836454 +0200 +--- gdb-7.8.50.20141228.orig/gdb/exec.c 2015-01-03 23:18:38.097427908 +0100 ++++ gdb-7.8.50.20141228/gdb/exec.c 2015-01-03 23:19:02.448556391 +0100 @@ -35,6 +35,7 @@ #include "progspace.h" #include "gdb_bfd.h" @@ -84,7 +70,7 @@ Index: gdb-7.7.50.20140609/gdb/exec.c #include #include "readline/readline.h" -@@ -231,12 +232,27 @@ exec_file_attach (char *filename, int fr +@@ -222,12 +223,27 @@ exec_file_attach (const char *filename, if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) { @@ -115,11 +101,11 @@ Index: gdb-7.7.50.20140609/gdb/exec.c } if (build_section_table (exec_bfd, §ions, §ions_end)) -Index: gdb-7.7.50.20140609/gdb/main.c +Index: gdb-7.8.50.20141228/gdb/main.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/main.c 2014-06-13 20:26:44.831802315 +0200 -+++ gdb-7.7.50.20140609/gdb/main.c 2014-06-13 20:26:46.990804555 +0200 -@@ -341,6 +341,36 @@ typedef struct cmdarg { +--- gdb-7.8.50.20141228.orig/gdb/main.c 2015-01-03 23:18:38.098427913 +0100 ++++ gdb-7.8.50.20141228/gdb/main.c 2015-01-03 23:22:10.157546792 +0100 +@@ -426,6 +426,36 @@ typedef struct cmdarg { /* Define type VEC (cmdarg_s). */ DEF_VEC_O (cmdarg_s); @@ -128,7 +114,7 @@ Index: gdb-7.7.50.20140609/gdb/main.c + core_file_command failed to find a matching executable. */ + +static void -+exec_or_core_file_attach (char *filename, int from_tty) ++exec_or_core_file_attach (const char *filename, int from_tty) +{ + volatile struct gdb_exception e; + @@ -142,7 +128,7 @@ Index: gdb-7.7.50.20140609/gdb/main.c + { + if (e.error == IS_CORE_ERROR) + { -+ core_file_command (filename, from_tty); ++ core_file_command ((char *) filename, from_tty); + + /* Iff the core file found its executable suppress the error message + from exec_file_attach. */ @@ -156,7 +142,7 @@ Index: gdb-7.7.50.20140609/gdb/main.c static int captured_main (void *data) { -@@ -854,6 +884,8 @@ captured_main (void *data) +@@ -910,6 +940,8 @@ captured_main (void *data) { symarg = argv[optind]; execarg = argv[optind]; @@ -165,11 +151,11 @@ Index: gdb-7.7.50.20140609/gdb/main.c optind++; } -@@ -1017,11 +1049,25 @@ captured_main (void *data) +@@ -1069,11 +1101,26 @@ captured_main (void *data) && symarg != NULL && strcmp (execarg, symarg) == 0) { -+ catch_command_errors_ftype *func; ++ catch_command_errors_const_ftype *func; + + /* Call exec_or_core_file_attach only if the file was specified as + a command line argument (and not an a command line option). */ @@ -184,13 +170,28 @@ Index: gdb-7.7.50.20140609/gdb/main.c /* The exec file and the symbol-file are the same. If we can't open it, better only print one error message. - catch_command_errors returns non-zero on success! */ -- if (catch_command_errors (exec_file_attach, execarg, -- !batch_flag, RETURN_MASK_ALL)) +- if (catch_command_errors_const (exec_file_attach, execarg, +- !batch_flag, RETURN_MASK_ALL)) + catch_command_errors returns non-zero on success! + Do not load EXECARG as a symbol file if it has been already processed + as a core file. */ -+ if (catch_command_errors (func, execarg, !batch_flag, RETURN_MASK_ALL) ++ if (catch_command_errors_const (func, execarg, !batch_flag, ++ RETURN_MASK_ALL) + && core_bfd == NULL) catch_command_errors_const (symbol_file_add_main, symarg, !batch_flag, RETURN_MASK_ALL); } +Index: gdb-7.8.50.20141228/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.8.50.20141228/gdb/common/common-exceptions.h 2015-01-03 23:19:02.449556396 +0100 +@@ -99,6 +99,9 @@ enum errors { + /* Requested feature, method, mechanism, etc. is not supported. */ + NOT_SUPPORTED_ERROR, + ++ /* Attempt to load a core file as executable. */ ++ IS_CORE_ERROR, ++ + /* Add more errors here. */ + NR_ERRORS + }; diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index f43fbbf..544ed4d 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -1,8 +1,8 @@ -Index: gdb-7.7.50.20140609/gdb/event-top.c +Index: gdb-7.8.50.20141228/gdb/event-top.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/event-top.c 2014-06-13 20:10:19.632787642 +0200 -+++ gdb-7.7.50.20140609/gdb/event-top.c 2014-06-13 20:11:49.605878557 +0200 -@@ -38,6 +38,7 @@ +--- gdb-7.8.50.20141228.orig/gdb/event-top.c 2015-01-01 17:12:24.881489087 +0100 ++++ gdb-7.8.50.20141228/gdb/event-top.c 2015-01-01 17:12:28.821486803 +0100 +@@ -37,6 +37,7 @@ #include "gdbcmd.h" /* for dont_repeat() */ #include "annotate.h" #include "maint.h" @@ -10,7 +10,7 @@ Index: gdb-7.7.50.20140609/gdb/event-top.c /* readline include files. */ #include "readline/readline.h" -@@ -176,6 +177,8 @@ rl_callback_read_char_wrapper (gdb_clien +@@ -180,6 +181,8 @@ rl_callback_read_char_wrapper (gdb_clien void cli_command_loop (void *data) { @@ -19,7 +19,7 @@ Index: gdb-7.7.50.20140609/gdb/event-top.c display_gdb_prompt (0); /* Now it's time to start the event loop. */ -@@ -243,6 +246,8 @@ display_gdb_prompt (char *new_prompt) +@@ -298,6 +301,8 @@ display_gdb_prompt (const char *new_prom /* Reset the nesting depth used when trace-commands is set. */ reset_command_nest_depth (); @@ -28,11 +28,11 @@ Index: gdb-7.7.50.20140609/gdb/event-top.c old_chain = make_cleanup (free_current_contents, &actual_gdb_prompt); /* Do not call the python hook on an explicit prompt change as -Index: gdb-7.7.50.20140609/gdb/symfile.h +Index: gdb-7.8.50.20141228/gdb/symfile.h =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/symfile.h 2014-06-13 20:10:19.633787643 +0200 -+++ gdb-7.7.50.20140609/gdb/symfile.h 2014-06-13 20:10:31.066799158 +0200 -@@ -573,6 +573,8 @@ void map_symbol_filenames (symbol_filena +--- gdb-7.8.50.20141228.orig/gdb/symfile.h 2015-01-01 17:12:24.881489087 +0100 ++++ gdb-7.8.50.20141228/gdb/symfile.h 2015-01-01 17:12:28.822486802 +0100 +@@ -577,6 +577,8 @@ void map_symbol_filenames (symbol_filena /* build-id support. */ extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr); extern void debug_print_missing (const char *binary, const char *debug); @@ -41,11 +41,11 @@ Index: gdb-7.7.50.20140609/gdb/symfile.h /* From dwarf2read.c */ -Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/gdb.exp 2014-06-13 20:10:19.634787644 +0200 -+++ gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp 2014-06-13 20:10:31.067799159 +0200 -@@ -1492,7 +1492,7 @@ proc default_gdb_start { } { +--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/gdb.exp 2015-01-01 17:12:24.883489085 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp 2015-01-01 17:12:28.823486801 +0100 +@@ -1522,7 +1522,7 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } } @@ -54,11 +54,11 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp send_gdb "set build-id-verbose 0\n" gdb_expect 10 { -re "$gdb_prompt $" { -Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:10:19.635787645 +0200 -+++ gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:10:31.068799160 +0200 -@@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } { +--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/mi-support.exp 2015-01-01 17:12:24.884489085 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp 2015-01-01 17:12:28.823486801 +0100 +@@ -214,7 +214,7 @@ proc default_mi_gdb_start { args } { warning "Couldn't set the width to 0." } } @@ -67,22 +67,22 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp send_gdb "190-gdb-set build-id-verbose 0\n" gdb_expect 10 { -re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" { -Index: gdb-7.7.50.20140609/gdb/tui/tui-interp.c +Index: gdb-7.8.50.20141228/gdb/tui/tui-interp.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/tui/tui-interp.c 2014-06-13 20:10:31.068799160 +0200 -+++ gdb-7.7.50.20140609/gdb/tui/tui-interp.c 2014-06-13 20:10:47.806816542 +0200 -@@ -32,6 +32,7 @@ - #include "exceptions.h" +--- gdb-7.8.50.20141228.orig/gdb/tui/tui-interp.c 2015-01-01 17:12:28.824486801 +0100 ++++ gdb-7.8.50.20141228/gdb/tui/tui-interp.c 2015-01-01 17:12:43.240478444 +0100 +@@ -31,6 +31,7 @@ + #include "tui/tui-io.h" #include "infrun.h" #include "observer.h" +#include "symfile.h" static struct ui_out *tui_ui_out (struct interp *self); -Index: gdb-7.7.50.20140609/gdb/aclocal.m4 +Index: gdb-7.8.50.20141228/gdb/aclocal.m4 =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/aclocal.m4 2014-06-13 20:10:19.636787646 +0200 -+++ gdb-7.7.50.20140609/gdb/aclocal.m4 2014-06-13 20:10:31.069799161 +0200 +--- gdb-7.8.50.20141228.orig/gdb/aclocal.m4 2015-01-01 17:12:24.885489084 +0100 ++++ gdb-7.8.50.20141228/gdb/aclocal.m4 2015-01-01 17:12:28.824486801 +0100 @@ -11,6 +11,221 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @@ -305,10 +305,10 @@ Index: gdb-7.7.50.20140609/gdb/aclocal.m4 # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -Index: gdb-7.7.50.20140609/gdb/config.in +Index: gdb-7.8.50.20141228/gdb/config.in =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/config.in 2014-06-13 20:10:19.637787647 +0200 -+++ gdb-7.7.50.20140609/gdb/config.in 2014-06-13 20:10:31.069799161 +0200 +--- gdb-7.8.50.20141228.orig/gdb/config.in 2015-01-01 17:12:24.885489084 +0100 ++++ gdb-7.8.50.20141228/gdb/config.in 2015-01-01 17:12:28.824486801 +0100 @@ -33,6 +33,9 @@ /* Define to BFD's default target vector. */ #undef DEFAULT_BFD_VEC @@ -319,7 +319,7 @@ Index: gdb-7.7.50.20140609/gdb/config.in /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS -@@ -210,6 +213,9 @@ +@@ -207,6 +210,9 @@ /* Define if Python 2.7 is being used. */ #undef HAVE_LIBPYTHON2_7 @@ -329,11 +329,11 @@ Index: gdb-7.7.50.20140609/gdb/config.in /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -Index: gdb-7.7.50.20140609/gdb/configure +Index: gdb-7.8.50.20141228/gdb/configure =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/configure 2014-06-13 20:10:19.642787652 +0200 -+++ gdb-7.7.50.20140609/gdb/configure 2014-06-13 20:10:31.073799165 +0200 -@@ -692,6 +692,11 @@ PKGVERSION +--- gdb-7.8.50.20141228.orig/gdb/configure 2015-01-01 17:12:24.891489081 +0100 ++++ gdb-7.8.50.20141228/gdb/configure 2015-01-01 17:12:28.828486798 +0100 +@@ -698,6 +698,11 @@ PKGVERSION HAVE_NATIVE_GCORE_TARGET TARGET_OBS subdirs @@ -345,7 +345,7 @@ Index: gdb-7.7.50.20140609/gdb/configure GDB_DATADIR DEBUGDIR MAKEINFO_EXTRA_FLAGS -@@ -795,6 +800,7 @@ with_gdb_datadir +@@ -801,6 +806,7 @@ with_gdb_datadir with_relocated_sources with_auto_load_dir with_auto_load_safe_path @@ -353,7 +353,7 @@ Index: gdb-7.7.50.20140609/gdb/configure enable_targets enable_64_bit_bfd enable_gdbcli -@@ -846,6 +852,11 @@ CPPFLAGS +@@ -852,6 +858,11 @@ CPPFLAGS CPP MAKEINFO MAKEINFOFLAGS @@ -365,7 +365,7 @@ Index: gdb-7.7.50.20140609/gdb/configure YACC YFLAGS XMKMF' -@@ -1516,6 +1527,8 @@ Optional Packages: +@@ -1522,6 +1533,8 @@ Optional Packages: [--with-auto-load-dir] --without-auto-load-safe-path do not restrict auto-loaded files locations @@ -374,7 +374,7 @@ Index: gdb-7.7.50.20140609/gdb/configure --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets --with-curses use the curses library instead of the termcap library -@@ -1565,6 +1578,13 @@ Some influential environment variables: +@@ -1571,6 +1584,13 @@ Some influential environment variables: MAKEINFO Parent configure detects if it is of sufficient version. MAKEINFOFLAGS Parameters for MAKEINFO. @@ -388,7 +388,7 @@ Index: gdb-7.7.50.20140609/gdb/configure YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. -@@ -5160,6 +5180,491 @@ _ACEOF +@@ -5267,6 +5287,491 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 $as_echo "$with_auto_load_safe_path" >&6; } @@ -880,11 +880,11 @@ Index: gdb-7.7.50.20140609/gdb/configure subdirs="$subdirs testsuite" -Index: gdb-7.7.50.20140609/gdb/configure.ac +Index: gdb-7.8.50.20141228/gdb/configure.ac =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/configure.ac 2014-06-13 20:10:19.643787653 +0200 -+++ gdb-7.7.50.20140609/gdb/configure.ac 2014-06-13 20:10:31.074799166 +0200 -@@ -165,6 +165,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap +--- gdb-7.8.50.20141228.orig/gdb/configure.ac 2015-01-01 17:12:24.893489079 +0100 ++++ gdb-7.8.50.20141228/gdb/configure.ac 2015-01-01 17:12:28.829486798 +0100 +@@ -172,6 +172,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap [Directories safe to hold auto-loaded files.]) AC_MSG_RESULT([$with_auto_load_safe_path]) @@ -1084,11 +1084,11 @@ Index: gdb-7.7.50.20140609/gdb/configure.ac AC_CONFIG_SUBDIRS(testsuite) # Check whether to support alternative target configurations -Index: gdb-7.7.50.20140609/gdb/corelow.c +Index: gdb-7.8.50.20141228/gdb/corelow.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/corelow.c 2014-06-13 20:10:19.644787654 +0200 -+++ gdb-7.7.50.20140609/gdb/corelow.c 2014-06-13 20:10:31.074799166 +0200 -@@ -316,7 +316,7 @@ build_id_locate_exec (int from_tty) +--- gdb-7.8.50.20141228.orig/gdb/corelow.c 2015-01-01 17:12:24.894489079 +0100 ++++ gdb-7.8.50.20141228/gdb/corelow.c 2015-01-01 17:12:28.829486798 +0100 +@@ -310,7 +310,7 @@ build_id_locate_exec (int from_tty) symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; } else @@ -1097,11 +1097,11 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c do_cleanups (back_to); -Index: gdb-7.7.50.20140609/gdb/build-id.c +Index: gdb-7.8.50.20141228/gdb/build-id.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/build-id.c 2014-06-13 20:10:19.644787654 +0200 -+++ gdb-7.7.50.20140609/gdb/build-id.c 2014-06-13 20:10:31.075799167 +0200 -@@ -32,6 +32,7 @@ +--- gdb-7.8.50.20141228.orig/gdb/build-id.c 2015-01-01 17:12:24.894489079 +0100 ++++ gdb-7.8.50.20141228/gdb/build-id.c 2015-01-01 17:12:28.830486797 +0100 +@@ -31,6 +31,7 @@ #include "gdbcmd.h" #include "observer.h" #include @@ -1109,7 +1109,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c #define BUILD_ID_VERBOSE_NONE 0 #define BUILD_ID_VERBOSE_FILENAMES 1 -@@ -666,8 +667,360 @@ build_id_to_filename (const struct elf_b +@@ -664,8 +665,360 @@ build_id_to_filename (const struct elf_b return result; } @@ -1471,7 +1471,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c avoidance. */ struct missing_filepair -@@ -721,11 +1074,17 @@ missing_filepair_change (void) +@@ -719,11 +1072,17 @@ missing_filepair_change (void) /* All their memory came just from missing_filepair_OBSTACK. */ missing_filepair_hash = NULL; } @@ -1489,7 +1489,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c missing_filepair_change (); } -@@ -792,14 +1151,34 @@ debug_print_missing (const char *binary, +@@ -790,14 +1149,34 @@ debug_print_missing (const char *binary, *slot = missing_filepair; diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index 95cfd56..f4df312 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -1,8 +1,8 @@ -Index: gdb-7.7.50.20140609/gdb/corelow.c +Index: gdb-7.8.50.20141228/gdb/corelow.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/corelow.c 2014-06-13 20:09:37.369745221 +0200 -+++ gdb-7.7.50.20140609/gdb/corelow.c 2014-06-13 20:09:42.407750265 +0200 -@@ -49,6 +49,10 @@ +--- gdb-7.8.50.20141228.orig/gdb/corelow.c 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/corelow.c 2015-01-03 23:12:08.691349454 +0100 +@@ -45,6 +45,10 @@ #include "gdb_bfd.h" #include "completer.h" #include "filestuff.h" @@ -13,7 +13,7 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c #ifndef O_LARGEFILE #define O_LARGEFILE 0 -@@ -272,6 +276,53 @@ add_to_thread_list (bfd *abfd, asection +@@ -266,6 +270,53 @@ add_to_thread_list (bfd *abfd, asection inferior_ptid = ptid; /* Yes, make it current. */ } @@ -67,7 +67,7 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c /* This routine opens and sets up the core file bfd. */ static void -@@ -410,6 +461,14 @@ core_open (char *filename, int from_tty) +@@ -405,6 +456,14 @@ core_open (const char *arg, int from_tty switch_to_thread (thread->ptid); } @@ -82,7 +82,7 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c post_create_inferior (&core_ops, from_tty); /* Now go through the target stack looking for threads since there -@@ -1029,4 +1088,11 @@ _initialize_corelow (void) +@@ -1035,4 +1094,11 @@ _initialize_corelow (void) init_core_ops (); add_target_with_completer (&core_ops, filename_completer); @@ -94,11 +94,11 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c + NULL, NULL, NULL, + &setlist, &showlist); } -Index: gdb-7.7.50.20140609/gdb/doc/gdb.texinfo +Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/doc/gdb.texinfo 2014-06-13 20:09:37.380745232 +0200 -+++ gdb-7.7.50.20140609/gdb/doc/gdb.texinfo 2014-06-13 20:09:42.417750275 +0200 -@@ -17547,6 +17547,27 @@ information files. +--- gdb-7.8.50.20141228.orig/gdb/doc/gdb.texinfo 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/doc/gdb.texinfo 2015-01-03 23:12:08.701349509 +0100 +@@ -17930,6 +17930,27 @@ information files. @end table @@ -126,19 +126,19 @@ Index: gdb-7.7.50.20140609/gdb/doc/gdb.texinfo @cindex @code{.gnu_debuglink} sections @cindex debug link sections A debug link is a special section of the executable file named -Index: gdb-7.7.50.20140609/gdb/solib-svr4.c +Index: gdb-7.8.50.20141228/gdb/solib-svr4.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/solib-svr4.c 2014-06-13 20:09:37.382745234 +0200 -+++ gdb-7.7.50.20140609/gdb/solib-svr4.c 2014-06-13 20:09:42.418750276 +0200 -@@ -48,6 +48,7 @@ - #include "exceptions.h" +--- gdb-7.8.50.20141228.orig/gdb/solib-svr4.c 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/solib-svr4.c 2015-01-03 23:12:08.702349514 +0100 +@@ -45,6 +45,7 @@ + #include "auxv.h" #include "gdb_bfd.h" #include "probe.h" +#include "build-id.h" static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static int svr4_have_link_map_offsets (void); -@@ -1369,9 +1370,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD +@@ -1366,9 +1367,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD continue; } @@ -194,11 +194,11 @@ Index: gdb-7.7.50.20140609/gdb/solib-svr4.c xfree (buffer); /* If this entry has no name, or its name matches the name -Index: gdb-7.7.50.20140609/gdb/elfread.c +Index: gdb-7.8.50.20141228/gdb/elfread.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/elfread.c 2014-06-13 20:09:37.383745235 +0200 -+++ gdb-7.7.50.20140609/gdb/elfread.c 2014-06-13 20:09:42.418750276 +0200 -@@ -1335,9 +1335,10 @@ elf_symfile_read (struct objfile *objfil +--- gdb-7.8.50.20141228.orig/gdb/elfread.c 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/elfread.c 2015-01-03 23:12:08.703349519 +0100 +@@ -1339,9 +1339,10 @@ elf_symfile_read (struct objfile *objfil && objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile_backlink == NULL) { @@ -211,7 +211,7 @@ Index: gdb-7.7.50.20140609/gdb/elfread.c if (debugfile == NULL) debugfile = find_separate_debug_file_by_debuglink (objfile); -@@ -1351,6 +1352,12 @@ elf_symfile_read (struct objfile *objfil +@@ -1355,6 +1356,12 @@ elf_symfile_read (struct objfile *objfil symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile); do_cleanups (cleanup); } @@ -224,11 +224,11 @@ Index: gdb-7.7.50.20140609/gdb/elfread.c } } -Index: gdb-7.7.50.20140609/gdb/symfile.h +Index: gdb-7.8.50.20141228/gdb/symfile.h =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/symfile.h 2014-06-13 20:09:42.419750277 +0200 -+++ gdb-7.7.50.20140609/gdb/symfile.h 2014-06-13 20:10:04.478772510 +0200 -@@ -570,6 +570,10 @@ void expand_symtabs_matching (expand_sym +--- gdb-7.8.50.20141228.orig/gdb/symfile.h 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/symfile.h 2015-01-03 23:12:08.703349519 +0100 +@@ -574,6 +574,10 @@ void expand_symtabs_matching (expand_sym void map_symbol_filenames (symbol_filename_ftype *fun, void *data, int need_fullname); @@ -239,11 +239,11 @@ Index: gdb-7.7.50.20140609/gdb/symfile.h /* From dwarf2read.c */ /* Names for a dwarf2 debugging section. The field NORMAL is the normal -Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/gdb.exp 2014-06-13 20:09:37.384745236 +0200 -+++ gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp 2014-06-13 20:09:42.420750278 +0200 -@@ -1492,6 +1492,16 @@ proc default_gdb_start { } { +--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/gdb.exp 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp 2015-01-03 23:12:08.704349525 +0100 +@@ -1522,6 +1522,16 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } } @@ -260,11 +260,11 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp return 0 } -Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:09:37.385745237 +0200 -+++ gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:09:42.421750279 +0200 -@@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } { +--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/mi-support.exp 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp 2015-01-03 23:12:08.705349530 +0100 +@@ -214,6 +214,16 @@ proc default_mi_gdb_start { args } { warning "Couldn't set the width to 0." } } @@ -281,11 +281,11 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp # If allowing the inferior to have its own PTY then assign the inferior # its own terminal device here. if { $separate_inferior_pty } { -Index: gdb-7.7.50.20140609/gdb/objfiles.h +Index: gdb-7.8.50.20141228/gdb/objfiles.h =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/objfiles.h 2014-06-13 20:09:37.385745237 +0200 -+++ gdb-7.7.50.20140609/gdb/objfiles.h 2014-06-13 20:09:42.421750279 +0200 -@@ -464,6 +464,10 @@ struct objfile +--- gdb-7.8.50.20141228.orig/gdb/objfiles.h 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/objfiles.h 2015-01-03 23:12:08.705349530 +0100 +@@ -459,6 +459,10 @@ struct objfile #define OBJF_NOT_FILENAME (1 << 6) @@ -296,10 +296,10 @@ Index: gdb-7.7.50.20140609/gdb/objfiles.h /* Declarations for functions defined in objfiles.c */ extern struct objfile *allocate_objfile (bfd *, const char *name, int); -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.base/corefile.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/testsuite/gdb.base/corefile.exp 2014-06-13 20:09:37.385745237 +0200 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.base/corefile.exp 2014-06-13 20:09:42.421750279 +0200 +--- gdb-7.8.50.20141228.orig/gdb/testsuite/gdb.base/corefile.exp 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp 2015-01-03 23:12:08.705349530 +0100 @@ -293,3 +293,33 @@ gdb_test_multiple "core-file $corefile" pass $test } @@ -334,11 +334,11 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.base/corefile.exp + gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*" + pass $wholetest +} -Index: gdb-7.7.50.20140609/gdb/build-id.c +Index: gdb-7.8.50.20141228/gdb/build-id.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/build-id.c 2014-06-13 20:09:37.386745238 +0200 -+++ gdb-7.7.50.20140609/gdb/build-id.c 2014-06-13 20:09:42.422750280 +0200 -@@ -27,11 +27,65 @@ +--- gdb-7.8.50.20141228.orig/gdb/build-id.c 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/build-id.c 2015-01-03 23:12:40.792523085 +0100 +@@ -26,11 +26,64 @@ #include "symfile.h" #include "objfiles.h" #include "filenames.h" @@ -359,11 +359,11 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c + fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"), + value); +} -+ + +-/* See build-id.h. */ +/* Locate NT_GNU_BUILD_ID and return its matching debug filename. + FIXME: NOTE decoding should be unified with the BFD core notes decoding. */ - --/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */ ++ +static struct elf_build_id * +build_id_buf_get (bfd *templ, gdb_byte *buf, bfd_size_type size) +{ @@ -389,24 +389,23 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c + retval = xmalloc (sizeof *retval - 1 + size); + retval->size = size; + memcpy (retval->data, data, size); -+ + + return retval; + } + p = descdata + BFD_ALIGN (descsz, 4); + } + return NULL; +} - -+/* Separate debuginfo files have corrupted PHDR but SHDR is correct there. -+ Locate NT_GNU_BUILD_ID from ABFD and return its content. */ ++ ++/* See build-id.h. */ + - static const struct elf_build_id * + const struct elf_build_id * -build_id_bfd_get (bfd *abfd) +build_id_bfd_shdr_get (bfd *abfd) { if (!bfd_check_format (abfd, bfd_object) || bfd_get_flavour (abfd) != bfd_target_elf_flavour -@@ -45,6 +99,348 @@ build_id_bfd_get (bfd *abfd) +@@ -44,6 +97,348 @@ build_id_bfd_get (bfd *abfd) return elf_tdata (abfd)->build_id; } @@ -755,7 +754,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c /* See build-id.h. */ int -@@ -53,7 +449,7 @@ build_id_verify (bfd *abfd, size_t check +@@ -52,7 +447,7 @@ build_id_verify (bfd *abfd, size_t check const struct elf_build_id *found; int retval = 0; @@ -764,7 +763,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c if (found == NULL) warning (_("File \"%s\" has no build-id, file skipped"), -@@ -68,20 +464,56 @@ build_id_verify (bfd *abfd, size_t check +@@ -67,20 +462,56 @@ build_id_verify (bfd *abfd, size_t check return retval; } @@ -825,7 +824,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will cause "/.build-id/..." lookups. */ -@@ -94,8 +526,11 @@ build_id_to_debug_bfd (size_t build_id_l +@@ -93,8 +524,11 @@ build_id_to_debug_bfd (size_t build_id_l size_t debugdir_len = strlen (debugdir); const gdb_byte *data = build_id; size_t size = build_id_len; @@ -838,7 +837,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c memcpy (link, debugdir, debugdir_len); s = &link[debugdir_len]; -@@ -109,44 +544,282 @@ build_id_to_debug_bfd (size_t build_id_l +@@ -108,44 +542,282 @@ build_id_to_debug_bfd (size_t build_id_l *s++ = '/'; while (size-- > 0) s += sprintf (s, "%02x", (unsigned) *data++); @@ -909,7 +908,9 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c + xfree (filename); + filename = NULL; + } -+ + +- gdb_bfd_unref (abfd); +- abfd = NULL; + if (filename != NULL) + { + /* LINK_ALL is not used below in this non-NULL FILENAME case. */ @@ -935,9 +936,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c + /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with + its possible use as an argument for installation command. */ + link_all[len_orig] = ' '; - -- gdb_bfd_unref (abfd); -- abfd = NULL; ++ + strcpy (&link_all[len_orig + 1], link0_resolved); + xfree (link0_resolved); + } @@ -1138,7 +1137,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c /* Prevent looping on a stripped .debug file. */ if (abfd != NULL && filename_cmp (bfd_get_filename (abfd), -@@ -166,3 +839,21 @@ find_separate_debug_file_by_buildid (str +@@ -165,3 +837,21 @@ find_separate_debug_file_by_buildid (str } return NULL; } @@ -1160,11 +1159,24 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c + + observer_attach_executable_changed (debug_print_executable_changed); +} -Index: gdb-7.7.50.20140609/gdb/build-id.h +Index: gdb-7.8.50.20141228/gdb/build-id.h =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/build-id.h 2014-06-13 20:09:37.386745238 +0200 -+++ gdb-7.7.50.20140609/gdb/build-id.h 2014-06-13 20:09:42.422750280 +0200 -@@ -32,13 +32,18 @@ extern int build_id_verify (bfd *abfd, +--- gdb-7.8.50.20141228.orig/gdb/build-id.h 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/build-id.h 2015-01-03 23:12:08.706349536 +0100 +@@ -20,9 +20,10 @@ + #ifndef BUILD_ID_H + #define BUILD_ID_H + +-/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */ ++/* Separate debuginfo files have corrupted PHDR but SHDR is correct there. ++ Locate NT_GNU_BUILD_ID from ABFD and return its content. */ + +-extern const struct elf_build_id *build_id_bfd_get (bfd *abfd); ++extern const struct elf_build_id *build_id_bfd_shdr_get (bfd *abfd); + + /* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value. + Otherwise, issue a warning and return false. */ +@@ -36,13 +37,18 @@ extern int build_id_verify (bfd *abfd, the caller. */ extern bfd *build_id_to_debug_bfd (size_t build_id_len, @@ -1185,11 +1197,11 @@ Index: gdb-7.7.50.20140609/gdb/build-id.h + char **build_id_filename_return); #endif /* BUILD_ID_H */ -Index: gdb-7.7.50.20140609/gdb/dwarf2read.c +Index: gdb-7.8.50.20141228/gdb/dwarf2read.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/dwarf2read.c 2014-06-13 20:09:37.389745241 +0200 -+++ gdb-7.7.50.20140609/gdb/dwarf2read.c 2014-06-13 20:09:42.425750283 +0200 -@@ -2446,7 +2446,7 @@ dwarf2_get_dwz_file (void) +--- gdb-7.8.50.20141228.orig/gdb/dwarf2read.c 2015-01-03 23:11:54.018270090 +0100 ++++ gdb-7.8.50.20141228/gdb/dwarf2read.c 2015-01-03 23:12:08.711349563 +0100 +@@ -2443,7 +2443,7 @@ dwarf2_get_dwz_file (void) } if (dwz_bfd == NULL) @@ -1198,3 +1210,25 @@ Index: gdb-7.7.50.20140609/gdb/dwarf2read.c if (dwz_bfd == NULL) error (_("could not find '.gnu_debugaltlink' file for %s"), +Index: gdb-7.8.50.20141228/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.8.50.20141228/gdb/python/py-objfile.c 2015-01-03 23:12:08.712349568 +0100 +@@ -118,7 +118,7 @@ objfpy_get_build_id (PyObject *self, voi + + TRY_CATCH (except, RETURN_MASK_ALL) + { +- build_id = build_id_bfd_get (objfile->obfd); ++ build_id = build_id_bfd_shdr_get (objfile->obfd); + } + GDB_PY_HANDLE_EXCEPTION (except); + +@@ -467,7 +467,7 @@ objfpy_lookup_objfile_by_build_id (const + /* Don't return separate debug files. */ + if (objfile->separate_debug_objfile_backlink != NULL) + continue; +- obfd_build_id = build_id_bfd_get (objfile->obfd); ++ obfd_build_id = build_id_bfd_shdr_get (objfile->obfd); + if (obfd_build_id == NULL) + continue; + if (objfpy_build_id_matches (obfd_build_id, build_id)) diff --git a/gdb-6.6-bz235197-fork-detach-info.patch b/gdb-6.6-bz235197-fork-detach-info.patch index bcde268..4704d23 100644 --- a/gdb-6.6-bz235197-fork-detach-info.patch +++ b/gdb-6.6-bz235197-fork-detach-info.patch @@ -3,23 +3,10 @@ Port to GDB-6.8pre. Remove the `[' character from the GDB-6.8 default message. -Index: gdb-7.6.90.20140127/gdb/linux-nat.c -=================================================================== ---- gdb-7.6.90.20140127.orig/gdb/linux-nat.c 2014-02-04 23:47:39.275034491 +0100 -+++ gdb-7.6.90.20140127/gdb/linux-nat.c 2014-02-04 23:48:11.943074132 +0100 -@@ -426,7 +426,7 @@ holding the child stopped. Try \"set de - remove_breakpoints_pid (ptid_get_pid (inferior_ptid)); - } - -- if (info_verbose || debug_linux_nat) -+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_linux_nat) - { - target_terminal_ours (); - fprintf_filtered (gdb_stdlog, -Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.c +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.c 2014-02-04 23:47:39.275034491 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.c 2015-01-06 19:31:40.703988534 +0100 @@ -0,0 +1,57 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -78,10 +65,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.c + } + return 0; +} -Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.exp 2014-02-04 23:47:39.276034493 +0100 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.exp 2015-01-06 19:31:40.704988538 +0100 @@ -0,0 +1,36 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -119,3 +106,16 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.exp +gdb_test "" \ + "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \ + "Info message caught" +Index: gdb-7.8.50.20141228/gdb/infrun.c +=================================================================== +--- gdb-7.8.50.20141228.orig/gdb/infrun.c 2015-01-06 19:31:40.262986644 +0100 ++++ gdb-7.8.50.20141228/gdb/infrun.c 2015-01-06 19:43:54.865219096 +0100 +@@ -456,7 +456,7 @@ holding the child stopped. Try \"set de + remove_breakpoints_pid (ptid_get_pid (inferior_ptid)); + } + +- if (info_verbose || debug_infrun) ++ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_infrun) + { + target_terminal_ours_for_output (); + fprintf_filtered (gdb_stdlog, diff --git a/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch b/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch index 1b51ec2..ba70201 100644 --- a/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch +++ b/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch @@ -21,11 +21,11 @@ Port to GDB-6.8pre. -Index: gdb-7.7.90.20140613/gdb/infrun.c +Index: gdb-7.8.90.20150125/gdb/infrun.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/infrun.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/infrun.c 2014-06-13 21:36:43.637294782 +0200 -@@ -84,7 +84,7 @@ static int follow_fork (void); +--- 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); @@ -34,17 +34,16 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c static void xdb_handle_command (char *args, int from_tty); -@@ -1742,7 +1742,8 @@ user_visible_resume_ptid (int step) +@@ -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 || singlestep_breakpoints_inserted_p))) -+ && (step == RESUME_STEP_USER -+ || singlestep_breakpoints_inserted_p))) +- || (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; -@@ -1760,7 +1761,7 @@ user_visible_resume_ptid (int step) +@@ -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 @@ -53,7 +52,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c { struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0); struct regcache *regcache = get_current_regcache (); -@@ -1800,9 +1801,13 @@ resume (int step, enum gdb_signal sig) +@@ -2064,9 +2064,13 @@ resume (int step, enum gdb_signal sig) if (debug_infrun) fprintf_unfiltered (gdb_stdlog, @@ -69,7 +68,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c tp->control.trap_expected, target_pid_to_str (inferior_ptid), paddress (gdbarch, pc)); -@@ -2188,6 +2193,7 @@ proceed (CORE_ADDR addr, enum gdb_signal +@@ -2543,6 +2547,7 @@ proceed (CORE_ADDR addr, enum gdb_signal struct thread_info *tp; CORE_ADDR pc; struct address_space *aspace; @@ -77,7 +76,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c /* If we're stopped at a fork/vfork, follow the branch set by the "set follow-fork-mode" command; otherwise, we'll just proceed -@@ -2230,13 +2236,19 @@ proceed (CORE_ADDR addr, enum gdb_signal +@@ -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. */ @@ -97,7 +96,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c } else { -@@ -2288,6 +2300,7 @@ proceed (CORE_ADDR addr, enum gdb_signal +@@ -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; @@ -105,9 +104,9 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c } } -@@ -2375,9 +2388,13 @@ proceed (CORE_ADDR addr, enum gdb_signal - /* Reset to normal state. */ - init_infwait_state (); +@@ -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; @@ -121,7 +120,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c /* Wait for it to stop (if not standalone) and in any case decode why it stopped, and act accordingly. */ -@@ -5359,13 +5376,16 @@ switch_back_to_stepped_thread (struct ex +@@ -5684,14 +5700,16 @@ switch_back_to_stepped_thread (struct ex /* Is thread TP in the middle of single-stepping? */ @@ -133,6 +132,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c + 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; @@ -142,11 +142,11 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c } /* Inferior has stepped into a subroutine call with source code that -Index: gdb-7.7.90.20140613/gdb/linux-nat.c +Index: gdb-7.8.90.20150125/gdb/linux-nat.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/linux-nat.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/linux-nat.c 2014-06-13 21:31:19.449949814 +0200 -@@ -2709,7 +2709,11 @@ static int +--- 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 @@ -159,10 +159,10 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c return 1; else return 0; -Index: gdb-7.7.90.20140613/gdb/linux-nat.h +Index: gdb-7.8.90.20150125/gdb/linux-nat.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/linux-nat.h 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/linux-nat.h 2014-06-13 21:31:19.449949814 +0200 +--- 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 . */ @@ -171,22 +171,22 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.h #include -@@ -59,8 +60,8 @@ struct lwp_info - /* If non-zero, a pending wait status. */ - int status; +@@ -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; - /* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data - watchpoint trap. */ -Index: gdb-7.7.90.20140613/gdb/infrun.h + /* 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.7.90.20140613.orig/gdb/infrun.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/infrun.h 2014-06-13 21:31:19.449949814 +0200 -@@ -89,7 +89,14 @@ extern void proceed (CORE_ADDR, enum gdb +--- 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. */ @@ -200,12 +200,12 @@ Index: gdb-7.7.90.20140613/gdb/infrun.h + }; +extern void resume (enum resume_step, enum gdb_signal); - extern ptid_t user_visible_resume_ptid (int step); - -diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp -index 2a30604..ee1fd11 100644 ---- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp -+++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp + /* 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 \ diff --git a/gdb-6.8-attach-signalled-detach-stopped.patch b/gdb-6.8-attach-signalled-detach-stopped.patch index cde9e45..e33715f 100644 --- a/gdb-6.8-attach-signalled-detach-stopped.patch +++ b/gdb-6.8-attach-signalled-detach-stopped.patch @@ -1,8 +1,8 @@ -Index: gdb-7.7.90.20140613/gdb/linux-nat.c +Index: gdb-7.8.90.20150125/gdb/linux-nat.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/linux-nat.c 2014-06-13 23:03:34.364177614 +0200 -+++ gdb-7.7.90.20140613/gdb/linux-nat.c 2014-06-13 23:05:07.749279122 +0200 -@@ -178,6 +178,9 @@ blocked. */ +--- gdb-7.8.90.20150125.orig/gdb/linux-nat.c 2015-01-25 08:42:49.381408899 +0100 ++++ gdb-7.8.90.20150125/gdb/linux-nat.c 2015-01-25 08:43:16.378525322 +0100 +@@ -174,6 +174,9 @@ blocked. */ static struct target_ops *linux_ops; static struct target_ops linux_ops_saved; @@ -12,23 +12,7 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c /* The method to call, if any, when a new thread is attached. */ static void (*linux_nat_new_thread) (struct lwp_info *); -@@ -683,7 +686,14 @@ holding the child stopped. Try \"set de - parent_inf->waiting_for_vfork_done = 0; - } - else if (detach_fork) -- target_detach (NULL, 0); -+ { -+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly. -+ In this point of code it cannot be 1 as we would not get FORK -+ executed without CONTINUE first which resets PID_WAS_STOPPED. -+ We would have to first TARGET_STOP and WAITPID it as with running -+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */ -+ target_detach (NULL, 0); -+ } - - /* Note that the detach above makes PARENT_INF dangling. */ - -@@ -1107,6 +1117,7 @@ linux_nat_post_attach_wait (ptid_t ptid, +@@ -924,6 +927,7 @@ linux_nat_post_attach_wait (ptid_t ptid, if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, "LNPAW: Attaching to a stopped process\n"); @@ -36,7 +20,7 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c /* The process is definitely stopped. It is in a job control stop, unless the kernel predates the TASK_STOPPED / -@@ -1529,6 +1540,9 @@ get_pending_status (struct lwp_info *lp, +@@ -1424,6 +1428,9 @@ get_pending_status (struct lwp_info *lp, gdb_signal_to_string (signo)); } @@ -46,7 +30,7 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c return 0; } -@@ -1642,6 +1656,8 @@ linux_nat_detach (struct target_ops *ops +@@ -1537,6 +1544,8 @@ linux_nat_detach (struct target_ops *ops } else linux_ops->to_detach (ops, args, from_tty); @@ -54,8 +38,8 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c + pid_was_stopped = 0; } - /* Resume LP. */ -@@ -1824,6 +1840,14 @@ linux_nat_resume (struct target_ops *ops + /* Resume execution of the inferior process. If STEP is nonzero, +@@ -1741,6 +1750,14 @@ linux_nat_resume (struct target_ops *ops return; } @@ -70,7 +54,7 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c if (resume_many) iterate_over_lwps (ptid, linux_nat_resume_callback, lp); -@@ -3870,6 +3894,8 @@ linux_nat_mourn_inferior (struct target_ +@@ -3723,6 +3740,8 @@ linux_nat_mourn_inferior (struct target_ /* Let the arch-specific native code know this process is gone. */ linux_nat_forget_process (pid); @@ -79,10 +63,10 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c } /* Convert a native/host siginfo object, into/from the siginfo in the -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.threads/attach-stopped.exp +Index: gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/attach-stopped.exp =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2014-06-13 23:03:34.365177615 +0200 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.threads/attach-stopped.exp 2014-06-13 23:03:37.162180660 +0200 +--- gdb-7.8.90.20150125.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-01-25 08:42:49.382408903 +0100 ++++ gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-01-25 08:43:16.379525327 +0100 @@ -61,7 +61,65 @@ proc corefunc { threadtype } { gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} @@ -150,3 +134,19 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.threads/attach-stopped.exp set test "$threadtype: attach2 to stopped, after setting file" gdb_test_multiple "attach $testpid" "$test" { +Index: gdb-7.8.90.20150125/gdb/infrun.c +=================================================================== +--- gdb-7.8.90.20150125.orig/gdb/infrun.c 2015-01-25 08:42:49.385408916 +0100 ++++ gdb-7.8.90.20150125/gdb/infrun.c 2015-01-25 08:43:16.381525335 +0100 +@@ -600,6 +600,11 @@ holding the child stopped. Try \"set de + child_pid); + } + ++ /* We should check PID_WAS_STOPPED and detach it stopped accordingly. ++ In this point of code it cannot be 1 as we would not get FORK ++ executed without CONTINUE first which resets PID_WAS_STOPPED. ++ We would have to first TARGET_STOP and WAITPID it as with running ++ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */ + target_detach (NULL, 0); + } + diff --git a/gdb-7.8.1.tar.gz b/gdb-7.8.1.tar.gz deleted file mode 100644 index 49d8a52..0000000 --- a/gdb-7.8.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7a923d876ecfa1cec4c1c79c014c9d8e58783a25855a95cf260275f61990647 -size 32926653 diff --git a/gdb-7.9.tar.xz b/gdb-7.9.tar.xz new file mode 100644 index 0000000..4745cdc --- /dev/null +++ b/gdb-7.9.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b315651a16528f7af8c7d8284699fb0c965df316cc7339bb0b7bae335848392 +size 17859428 diff --git a/gdb-archer.patch b/gdb-archer.patch index 1798458..613a917 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -2,38 +2,65 @@ http://sourceware.org/gdb/wiki/ProjectArcher http://sourceware.org/gdb/wiki/ArcherBranchManagement GIT snapshot: -commit b88230edf4e2da948d633c283ba0893bf22bd7ae +commit d1a09bf2f8e7e3f752a1bbeba135bc080bf0c865 tromey/python -Amended for GDB 7.8.1 - Chris Horler - -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/data-directory/Makefile.in gdb-7.8.1/gdb/data-directory/Makefile.in ---- gdb-7.8.1.orig/gdb/data-directory/Makefile.in 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/data-directory/Makefile.in 2014-12-14 20:15:43.028846584 +0000 -@@ -65,6 +65,8 @@ +diff --git a/README.archer b/README.archer +new file mode 100644 +index 0000000..173b8ea +--- /dev/null ++++ b/README.archer +@@ -0,0 +1,2 @@ ++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. +diff --git a/gdb/Makefile.in b/gdb/Makefile.in +index be69b6f..a4483e4 100644 +--- a/gdb/Makefile.in ++++ b/gdb/Makefile.in +@@ -1515,6 +1515,12 @@ stamp-h: $(srcdir)/config.in config.status + CONFIG_LINKS= \ + $(SHELL) config.status + ++.gdbinit: $(srcdir)/gdbinit.in config.status ++ CONFIG_FILES=".gdbinit:gdbinit.in" \ ++ CONFIG_COMMANDS= \ ++ CONFIG_HEADERS= \ ++ $(SHELL) config.status ++ + config.status: $(srcdir)/configure configure.tgt configure.host ../bfd/development.sh + $(SHELL) config.status --recheck + +diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in +index 00c70bb..f93ffdd 100644 +--- a/gdb/data-directory/Makefile.in ++++ b/gdb/data-directory/Makefile.in +@@ -64,7 +64,10 @@ PYTHON_FILE_LIST = \ + gdb/printing.py \ gdb/prompt.py \ gdb/xmethod.py \ ++ gdb/types.py \ gdb/command/__init__.py \ + gdb/command/ignore_errors.py \ + gdb/command/pahole.py \ gdb/command/xmethods.py \ gdb/command/frame_filters.py \ gdb/command/type_printers.py \ -@@ -73,6 +75,8 @@ - gdb/command/explore.py \ +@@ -74,6 +77,8 @@ PYTHON_FILE_LIST = \ gdb/function/__init__.py \ + gdb/function/caller_is.py \ gdb/function/strfns.py \ + gdb/function/caller_is.py \ + gdb/function/in_scope.py \ gdb/printer/__init__.py \ gdb/printer/bound_registers.py -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/doc/gdb.texinfo gdb-7.8.1/gdb/doc/gdb.texinfo ---- gdb-7.8.1.orig/gdb/doc/gdb.texinfo 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/doc/gdb.texinfo 2014-12-14 20:13:31.604314553 +0000 -@@ -1225,6 +1225,16 @@ +diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo +index e086c33..5dfeb1d 100644 +--- a/gdb/doc/gdb.texinfo ++++ b/gdb/doc/gdb.texinfo +@@ -1225,6 +1225,16 @@ for remote debugging. Run using @var{device} for your program's standard input and output. @c FIXME: kingdon thinks there is more to -tty. Investigate. @@ -50,10 +77,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/doc/gdb.texinfo gdb-7.8.1/gdb/doc/gdb.t @c resolve the situation of these eventually @item -tui @cindex @code{--tui} -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/doc/python.texi gdb-7.8.1/gdb/doc/python.texi ---- gdb-7.8.1.orig/gdb/doc/python.texi 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/doc/python.texi 2014-12-14 20:13:31.609314573 +0000 -@@ -88,8 +88,6 @@ +diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi +index 234ce5c..e940125 100644 +--- a/gdb/doc/python.texi ++++ b/gdb/doc/python.texi +@@ -88,8 +88,6 @@ containing @code{end}. For example: @smallexample (@value{GDBP}) python @@ -62,9 +90,10 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/doc/python.texi gdb-7.8.1/gdb/doc/pytho >print 23 >end 23 -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdb-gdb.gdb.in gdb-7.8.1/gdb/gdb-gdb.gdb.in ---- gdb-7.8.1.orig/gdb/gdb-gdb.gdb.in 2014-06-11 17:34:41.000000000 +0100 -+++ gdb-7.8.1/gdb/gdb-gdb.gdb.in 2014-12-14 20:13:31.610314577 +0000 +diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in +index 05a38b2..9801fdf 100644 +--- a/gdb/gdb-gdb.gdb.in ++++ b/gdb/gdb-gdb.gdb.in @@ -1,5 +1,15 @@ echo Setting up the environment for debugging gdb.\n @@ -81,10 +110,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdb-gdb.gdb.in gdb-7.8.1/gdb/gdb-gdb.gd if !$gdb_init_done set variable $gdb_init_done = 1 -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c ---- gdb-7.8.1.orig/gdb/main.c 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/main.c 2014-12-14 20:13:31.612314585 +0000 -@@ -37,6 +37,7 @@ +diff --git a/gdb/main.c b/gdb/main.c +index accd927..ed211f6 100644 +--- a/gdb/main.c ++++ b/gdb/main.c +@@ -33,6 +33,7 @@ #include "interps.h" #include "main.h" @@ -92,7 +122,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c #include "source.h" #include "cli/cli-cmds.h" #include "objfiles.h" -@@ -426,6 +427,8 @@ +@@ -444,6 +445,8 @@ captured_main (void *data) char *cdarg = NULL; char *ttyarg = NULL; @@ -101,7 +131,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c /* These are static so that we can take their address in an initializer. */ static int print_help; -@@ -633,10 +636,14 @@ +@@ -649,10 +652,14 @@ captured_main (void *data) {"args", no_argument, &set_args, 1}, {"l", required_argument, 0, 'l'}, {"return-child-result", no_argument, &return_child_result, 1}, @@ -117,7 +147,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c { int option_index; -@@ -654,6 +661,9 @@ +@@ -670,6 +677,9 @@ captured_main (void *data) case 0: /* Long option that just sets a flag. */ break; @@ -127,7 +157,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c case OPT_SE: symarg = optarg; execarg = optarg; -@@ -858,7 +868,31 @@ +@@ -851,7 +861,31 @@ captured_main (void *data) /* Now that gdb_init has created the initial inferior, we're in position to set args for that inferior. */ @@ -160,7 +190,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c { /* The remaining options are the command-line options for the inferior. The first one is the sym/exec file, and the rest -@@ -1144,7 +1178,8 @@ +@@ -1129,7 +1163,8 @@ captured_main (void *data) /* Read in the old history after all the command files have been read. */ @@ -170,7 +200,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c if (batch_flag) { -@@ -1155,13 +1190,25 @@ +@@ -1140,13 +1175,25 @@ captured_main (void *data) /* Show time and/or space usage. */ do_cleanups (pre_stat_chain); @@ -202,7 +232,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c } /* No exit -- exit is through quit_command. */ } -@@ -1195,6 +1242,12 @@ +@@ -1180,6 +1227,12 @@ print_gdb_help (struct ui_file *stream) fputs_unfiltered (_("\ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\ @@ -215,7 +245,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c gdb [options] --args executable-file [inferior-arguments ...]\n\n\ "), stream); fputs_unfiltered (_("\ -@@ -1240,6 +1293,13 @@ +@@ -1225,6 +1278,13 @@ Output and user interface control:\n\n\ fputs_unfiltered (_("\ --dbx DBX compatibility mode.\n\ --xdb XDB compatibility mode.\n\ @@ -229,25 +259,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c -q, --quiet, --silent\n\ Do not print version number on startup.\n\n\ "), stream); -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/Makefile.in gdb-7.8.1/gdb/Makefile.in ---- gdb-7.8.1.orig/gdb/Makefile.in 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/Makefile.in 2014-12-14 20:13:31.583314468 +0000 -@@ -1476,6 +1476,12 @@ - CONFIG_LINKS= \ - $(SHELL) config.status - -+.gdbinit: $(srcdir)/gdbinit.in config.status -+ CONFIG_FILES=".gdbinit:gdbinit.in" \ -+ CONFIG_COMMANDS= \ -+ CONFIG_HEADERS= \ -+ $(SHELL) config.status -+ - config.status: $(srcdir)/configure configure.tgt configure.host ../bfd/development.sh - $(SHELL) config.status --recheck - -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/ignore_errors.py gdb-7.8.1/gdb/python/lib/gdb/command/ignore_errors.py ---- gdb-7.8.1.orig/gdb/python/lib/gdb/command/ignore_errors.py 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-7.8.1/gdb/python/lib/gdb/command/ignore_errors.py 2014-12-14 20:13:31.613314589 +0000 +diff --git a/gdb/python/lib/gdb/command/ignore_errors.py b/gdb/python/lib/gdb/command/ignore_errors.py +new file mode 100644 +index 0000000..6fa48ff +--- /dev/null ++++ b/gdb/python/lib/gdb/command/ignore_errors.py @@ -0,0 +1,37 @@ +# Ignore errors in user commands. + @@ -286,9 +302,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/ignore_errors.py + pass + +IgnoreErrorsCommand () -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py gdb-7.8.1/gdb/python/lib/gdb/command/pahole.py ---- gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-7.8.1/gdb/python/lib/gdb/command/pahole.py 2014-12-14 20:13:31.613314589 +0000 +diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py +new file mode 100644 +index 0000000..dee04f5 +--- /dev/null ++++ b/gdb/python/lib/gdb/command/pahole.py @@ -0,0 +1,81 @@ +# pahole command for gdb + @@ -321,7 +339,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py gdb-7. + def maybe_print_hole(self, bitpos, field_bitpos): + if bitpos != field_bitpos: + hole = field_bitpos - bitpos -+ print ' /* XXX %d bit hole, try to pack */' % hole ++ print (' /* XXX %d bit hole, try to pack */' % hole) + + def pahole (self, type, level, name): + if name is None: @@ -329,7 +347,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py gdb-7. + tag = type.tag + if tag is None: + tag = '' -+ print '%sstruct %s {' % (' ' * (2 * level), tag) ++ print ('%sstruct %s {' % (' ' * (2 * level), tag)) + bitpos = 0 + for field in type.fields (): + # Skip static fields. @@ -347,95 +365,35 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py gdb-7. + fieldsize = 8 * ftype.sizeof + + # TARGET_CHAR_BIT -+ print ' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), ++ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8))) + bitpos = bitpos + fieldsize + + if ftype.code == gdb.TYPE_CODE_STRUCT: + self.pahole (ftype, level + 1, field.name) + else: -+ print ' ' * (2 + 2 * level), -+ print '%s %s' % (str (ftype), field.name) ++ print (' ' * (2 + 2 * level)) ++ print ('%s %s' % (str (ftype), field.name)) + + if level == 0: + self.maybe_print_hole(bitpos, 8 * type.sizeof) + -+ print ' ' * (14 + 2 * level), -+ print '} %s' % name ++ print (' ' * (14 + 2 * level)) ++ print ('} %s' % name) + + def invoke (self, arg, from_tty): + type = gdb.lookup_type (arg) + type = type.strip_typedefs () + if type.code != gdb.TYPE_CODE_STRUCT: -+ raise TypeError, '%s is not a struct type' % arg -+ print ' ' * 14, ++ raise (TypeError, '%s is not a struct type' % arg) ++ print (' ' * 14) + self.pahole (type, 0, '') + +Pahole() -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/function/caller_is.py gdb-7.8.1/gdb/python/lib/gdb/function/caller_is.py ---- gdb-7.8.1.orig/gdb/python/lib/gdb/function/caller_is.py 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-7.8.1/gdb/python/lib/gdb/function/caller_is.py 2014-12-14 20:13:31.614314594 +0000 -@@ -0,0 +1,58 @@ -+# Caller-is functions. -+ -+# Copyright (C) 2008 Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+import gdb -+import re -+ -+class CallerIs (gdb.Function): -+ """Return True if the calling function's name is equal to a string. -+This function takes one or two arguments. -+The first argument is the name of a function; if the calling function's -+name is equal to this argument, this function returns True. -+The optional second argument tells this function how many stack frames -+to traverse to find the calling function. The default is 1.""" -+ -+ def __init__ (self): -+ super (CallerIs, self).__init__ ("caller_is") -+ -+ def invoke (self, name, nframes = 1): -+ frame = gdb.selected_frame () -+ while nframes > 0: -+ frame = frame.older () -+ nframes = nframes - 1 -+ return frame.name () == name.string () -+ -+class CallerMatches (gdb.Function): -+ """Return True if the calling function's name matches a string. -+This function takes one or two arguments. -+The first argument is a regular expression; if the calling function's -+name is matched by this argument, this function returns True. -+The optional second argument tells this function how many stack frames -+to traverse to find the calling function. The default is 1.""" -+ -+ def __init__ (self): -+ super (CallerMatches, self).__init__ ("caller_matches") -+ -+ def invoke (self, name, nframes = 1): -+ frame = gdb.selected_frame () -+ while nframes > 0: -+ frame = frame.older () -+ nframes = nframes - 1 -+ return re.match (name.string (), frame.name ()) is not None -+ -+CallerIs() -+CallerMatches() -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/function/in_scope.py gdb-7.8.1/gdb/python/lib/gdb/function/in_scope.py ---- gdb-7.8.1.orig/gdb/python/lib/gdb/function/in_scope.py 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-7.8.1/gdb/python/lib/gdb/function/in_scope.py 2014-12-14 20:13:31.614314594 +0000 +diff --git a/gdb/python/lib/gdb/function/in_scope.py b/gdb/python/lib/gdb/function/in_scope.py +new file mode 100644 +index 0000000..8742680 +--- /dev/null ++++ b/gdb/python/lib/gdb/function/in_scope.py @@ -0,0 +1,47 @@ +# In-scope function. + @@ -461,33 +419,34 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/function/in_scope.py gdb +Takes one argument for each variable name to be checked.""" + + def __init__ (self): -+ super (InScope, self).__init__ ("in_scope") ++ super (InScope, self).__init__ ("in_scope") + + def invoke (self, *vars): + if len (vars) == 0: -+ raise TypeError, "in_scope takes at least one argument" ++ raise (TypeError, "in_scope takes at least one argument") + + # gdb.Value isn't hashable so it can't be put in a map. -+ # Convert to string first. -+ wanted = set (map (lambda x: x.string (), vars)) -+ found = set () -+ block = gdb.selected_frame ().block () -+ while block: -+ for sym in block: -+ if (sym.is_argument or sym.is_constant -+ or sym.is_function or sym.is_variable): -+ if sym.name in wanted: -+ found.add (sym.name) ++ # Convert to string first. ++ wanted = set (map (lambda x: x.string (), vars)) ++ found = set () ++ block = gdb.selected_frame ().block () ++ while block: ++ for sym in block: ++ if (sym.is_argument or sym.is_constant ++ or sym.is_function or sym.is_variable): ++ if sym.name in wanted: ++ found.add (sym.name) + -+ block = block.superblock ++ block = block.superblock + -+ return wanted == found ++ return wanted == found + +InScope () -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c gdb-7.8.1/gdb/python/python.c ---- gdb-7.8.1.orig/gdb/python/python.c 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/python/python.c 2014-12-14 20:13:31.615314598 +0000 -@@ -95,6 +95,8 @@ +diff --git a/gdb/python/python.c b/gdb/python/python.c +index b1d8283..54a2d9b 100644 +--- a/gdb/python/python.c ++++ b/gdb/python/python.c +@@ -93,6 +93,8 @@ const struct extension_language_defn extension_language_python = #include "linespec.h" #include "source.h" #include "version.h" @@ -496,7 +455,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c gdb-7.8.1/gdb/python/py #include "target.h" #include "gdbthread.h" #include "interps.h" -@@ -1222,6 +1224,56 @@ +@@ -1220,6 +1222,83 @@ gdbpy_print_stack (void) /* Return the current Progspace. There always is one. */ @@ -536,7 +495,34 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c gdb-7.8.1/gdb/python/py + ensure_python_env (get_current_arch (), current_language); + + running_python_script = 1; ++ ++#if PYTHON_ABI_VERSION < 3 + PySys_SetArgv (argc - 1, argv + 1); ++#else ++ { ++ wchar_t **wargv = alloca (sizeof (*wargv) * (argc + 1)); ++ int i; ++ ++ for (i = 1; i < argc; i++) ++ { ++ size_t len = mbstowcs (NULL, argv[i], 0); ++ size_t len2; ++ ++ if (len == (size_t) -1) ++ { ++ fprintf (stderr, "Invalid multibyte argument #%d \"%s\"\n", ++ i, argv[i]); ++ exit (1); ++ } ++ wargv[i] = alloca (sizeof (**wargv) * (len + 1)); ++ len2 = mbstowcs (wargv[i], argv[i], len + 1); ++ assert (len2 == len); ++ } ++ wargv[argc] = NULL; ++ PySys_SetArgv (argc - 1, wargv + 1); ++ } ++#endif ++ + input = fopen (argv[0], "r"); + if (! input) + { @@ -553,7 +539,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c gdb-7.8.1/gdb/python/py static PyObject * gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2) -@@ -1910,6 +1962,8 @@ +@@ -1913,6 +1992,8 @@ static PyMethodDef GdbMethods[] = Evaluate command, a string, as a gdb CLI command. Optionally returns\n\ a Python String containing the output of the command if to_string is\n\ set to True." }, @@ -562,9 +548,10 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c gdb-7.8.1/gdb/python/py { "parameter", gdbpy_parameter, METH_VARARGS, "Return a gdb parameter's value" }, -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.h gdb-7.8.1/gdb/python/python.h ---- gdb-7.8.1.orig/gdb/python/python.h 2014-06-11 17:34:41.000000000 +0100 -+++ gdb-7.8.1/gdb/python/python.h 2014-12-14 20:13:31.616314602 +0000 +diff --git a/gdb/python/python.h b/gdb/python/python.h +index 9e99992..c776e59 100644 +--- a/gdb/python/python.h ++++ b/gdb/python/python.h @@ -25,4 +25,6 @@ /* This is all that python exports to gdb. */ extern const struct extension_language_defn extension_language_python; @@ -572,10 +559,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.h gdb-7.8.1/gdb/python/py +extern void run_python_script (int argc, char **argv); + #endif /* GDB_PYTHON_H */ -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.gdb/selftest.exp gdb-7.8.1/gdb/testsuite/gdb.gdb/selftest.exp ---- gdb-7.8.1.orig/gdb/testsuite/gdb.gdb/selftest.exp 2014-12-14 20:10:20.896545646 +0000 -+++ gdb-7.8.1/gdb/testsuite/gdb.gdb/selftest.exp 2014-12-14 20:13:31.616314602 +0000 -@@ -92,6 +92,10 @@ +diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp +index 0b11e12..e35e829 100644 +--- a/gdb/testsuite/gdb.gdb/selftest.exp ++++ b/gdb/testsuite/gdb.gdb/selftest.exp +@@ -92,6 +92,10 @@ proc do_steps_and_nexts {} { set description "step over cmdarg_vec initialization" set command "step" } @@ -586,19 +574,24 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.gdb/selftest.exp gdb-7.8. -re ".*pre_stat_chain = make_command_stats_cleanup.*$gdb_prompt $" { set description "next over make_command_stats_cleanup and everything it calls" set command "next" -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-frame.exp gdb-7.8.1/gdb/testsuite/gdb.python/py-frame.exp ---- gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-frame.exp 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/testsuite/gdb.python/py-frame.exp 2014-12-14 20:13:31.617314606 +0000 -@@ -94,3 +94,5 @@ - gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.read_var - success" +diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp +index e47f340..a7e0a52 100644 +--- a/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 gdb_test "python print ('result = %s' % (gdb.selected_frame () == f1))" " = True" "test gdb.selected_frame" -+ + +gdb_test "python print ('result = %s' % (f0.block ()))" "" "test Frame.block" -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-value.exp gdb-7.8.1/gdb/testsuite/gdb.python/py-value.exp ---- gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-value.exp 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/testsuite/gdb.python/py-value.exp 2014-12-14 20:13:31.618314610 +0000 -@@ -385,6 +385,15 @@ ++ + # Can read SP register. + gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \ + " = True" \ +diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp +index f081ff0..58cce09 100644 +--- a/gdb/testsuite/gdb.python/py-value.exp ++++ b/gdb/testsuite/gdb.python/py-value.exp +@@ -388,6 +388,15 @@ proc test_value_after_death {} { "print value's type" } @@ -608,13 +601,13 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-value.exp gdb-7 +proc test_cast_regression {} { + gdb_test "python v = gdb.Value(5)" "" "create value for cast test" + gdb_test "python v = v.cast(v.type)" "" "cast value for cast test" -+ gdb_test "python print v" "5" "print value for cast test" ++ gdb_test "python print(v)" "5" "print value for cast test" +} + # Regression test for invalid subscript operations. The bug was that # the type of the value was not being checked before allowing a # subscript operation to proceed. -@@ -514,6 +523,7 @@ +@@ -517,6 +526,7 @@ test_value_in_inferior test_inferior_function_call test_lazy_strings test_value_after_death @@ -622,9 +615,3 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-value.exp gdb-7 # Test either C or C++ values. -diff -Nur -x '*.orig' gdb-7.8.1.orig/README.archer gdb-7.8.1/README.archer ---- gdb-7.8.1.orig/README.archer 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-7.8.1/README.archer 2014-12-14 20:13:31.581314460 +0000 -@@ -0,0 +1,2 @@ -+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. diff --git a/gdb-async-stopped-on-pid-arg-1of2.patch b/gdb-async-stopped-on-pid-arg-1of2.patch deleted file mode 100644 index 09784e2..0000000 --- a/gdb-async-stopped-on-pid-arg-1of2.patch +++ /dev/null @@ -1,127 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2014-09/msg00102.html -Subject: Re: Regression: GDB stopped on run with attached process (PR 17347) [Re: [pushed+7.8] Re: [PATCH] Fix "attach" command vs user input race - -On 09/03/2014 08:58 AM, Jan Kratochvil wrote: - -> https://sourceware.org/bugzilla/show_bug.cgi?id=17347 - -Thanks Jan. - -Here's a fix, test included. Comments? - -Thanks, -Pedro Alves - --------------------------- -[PATCH] gdb/17347 - Regression: GDB stopped on run with attached process - -Doing: - - gdb --pid=PID -ex run - -Results in GDB getting a SIGTTIN, and thus ending stopped. That's -usually indicative of a missing target_terminal_ours call. - -E.g., from the PR: - - $ sleep 1h & p=$!; sleep 0.1; gdb -batch sleep $p -ex run - [1] 28263 - [1] Killed sleep 1h - - [2]+ Stopped gdb -batch sleep $p -ex run - -The workaround is doing: - - gdb -ex "attach $PID" -ex "run" - -instead of - - gdb [-p] $PID -ex "run" - -With the former, gdb waits for the attach command to complete before -moving on to the "run" command, because the interpreter is in sync -mode at this point, within execute_command. But for the latter, -attach_command is called directly from captured_main, and thus misses -that waiting. IOW, "run" is running before the attach continuation -has run, before the program stops and attach completes. The broken -terminal settings are just one symptom of that. Any command that -queries or requires input results in the same. - -The fix is to wait in catch_command_errors (which is specific to -main.c nowadays), just like we wait in execute_command. - -gdb/ChangeLog: -2014-09-03 Pedro Alves - - PR gdb/17347 - * main.c: Include "infrun.h". - (catch_command_errors, catch_command_errors_const): Wait for the - foreground command to complete. - * top.c (maybe_wait_sync_command_done): New function, factored out - from ... - (maybe_wait_sync_command_done): ... here. - * top.h (maybe_wait_sync_command_done): New declaration. - -gdb/testsuite/ChangeLog: -2014-09-03 Pedro Alves - - PR gdb/17347 - * gdb.base/attach.exp (spawn_test_prog): New, factored out from - ... - (do_attach_tests, do_call_attach_tests, do_command_attach_tests): - ... here. - (gdb_spawn_with_cmdline_opts): New procedure. - (test_command_line_attach_run): New procedure. - (top level): Call it. ---- - gdb/main.c | 9 +++ - gdb/testsuite/gdb.base/attach.exp | 118 ++++++++++++++++++++++++++------------ - gdb/top.c | 26 +++++---- - gdb/top.h | 8 +++ - 4 files changed, 114 insertions(+), 47 deletions(-) - - -Amended for GDB 7.8.1 - Chris Horler - -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp ---- gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp 2014-12-14 20:58:52.761567480 +0000 -@@ -58,6 +58,37 @@ - return -1 - } - -+# Start the program running and then wait for a bit, to be sure that -+# it can be attached to. Return the process's PID. -+ -+proc spawn_test_prog { executable } { -+ set testpid [eval exec $executable &] -+ exec sleep 2 -+ if { [istarget "*-*-cygwin*"] } { -+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be -+ # different due to the way fork/exec works. -+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ] -+ } -+ -+ return $testpid -+} -+ -+# Spawn GDB with CMDLINE_FLAGS appended to the GDBFLAGS global. -+ -+proc gdb_spawn_with_cmdline_opts { cmdline_flags } { -+ global GDBFLAGS -+ -+ set saved_gdbflags $GDBFLAGS -+ -+ append GDBFLAGS $cmdline_flags -+ -+ set res [gdb_spawn] -+ -+ set GDBFLAGS $saved_gdbflags -+ -+ return $res -+} -+ - proc do_attach_tests {} { - global gdb_prompt - global binfile - diff --git a/gdb-async-stopped-on-pid-arg-testsuite.patch b/gdb-async-stopped-on-pid-arg-testsuite.patch deleted file mode 100644 index 07041d5..0000000 --- a/gdb-async-stopped-on-pid-arg-testsuite.patch +++ /dev/null @@ -1,87 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2014-09/msg00381.html -Subject: [testsuite patch] runaway attach processes [Re: Regression: GDB stopped on run with attached process (PR 17347)] - - ---RnlQjJ0d97Da+TV1 -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline - -On Thu, 11 Sep 2014 14:35:53 +0200, Pedro Alves wrote: -> Thanks, pushed to both master and 7.8. - -I have started seeing occasional runaway 'attach' processes these days. -I cannot be certain it is really caused by this patch, for example -grep 'FAIL.*cmdline attach run' does not show anything in my logs. - -But as I remember this 'attach' runaway process always happened in GDB (but -I do not remember it in the past months) I think it would be most safe to just -solve it forever by [attached]. - - -Jan - ---RnlQjJ0d97Da+TV1 -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline; filename=1 - -gdb/testsuite/ -2014-09-12 Jan Kratochvil - - * gdb.base/attach.c: Include unistd.h. - (main): Call alarm. Add label postloop. - * gdb.base/attach.exp (do_attach_tests): Use gdb_get_line_number, - gdb_breakpoint, gdb_continue_to_breakpoint. - (test_command_line_attach_run): Kill ${testpid} in one exit path. - - -Amended for GDB 7.8.1 - Chris Horler - -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.c gdb-7.8.1/gdb/testsuite/gdb.base/attach.c ---- gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.c 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/testsuite/gdb.base/attach.c 2014-12-14 21:19:46.689476557 +0000 -@@ -5,6 +5,7 @@ - exit unless/until gdb sets the variable to non-zero.) - */ - #include -+#include - - int should_exit = 0; - -@@ -12,9 +13,11 @@ - { - int local_i = 0; - -+ alarm (60); -+ - while (! should_exit) - { - local_i++; - } -- return 0; -+ return 0; /* postloop */ - } -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp ---- gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp 2014-12-14 21:20:42.810658051 +0000 -+++ gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp 2014-12-14 21:22:53.479082555 +0000 -@@ -287,11 +287,8 @@ - - # Verify that the modification really happened. - -- gdb_test "tbreak 19" "Temporary breakpoint .*at.*$srcfile, line 19.*" \ -- "after attach2, set tbreak postloop" -- -- gdb_test "continue" "main.*at.*$srcfile:19.*" \ -- "after attach2, reach tbreak postloop" -+ gdb_breakpoint [gdb_get_line_number "postloop"] temporary -+ gdb_continue_to_breakpoint "postloop" ".* postloop .*" - - # Allow the test process to exit, to cleanup after ourselves. - -@@ -449,6 +446,7 @@ - "-iex \"set height 0\" -iex \"set width 0\" --pid=$testpid -ex \"start\""] - if { $res != 0} { - fail $test -+ remote_exec build "kill -9 ${testpid}" - return $res - } - gdb_test_multiple "" $test { diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index 4e387f0..cdd3c5f 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -37,13 +37,11 @@ gdb/gdbserver/ (linux_create_inferior, linux_tracefork_child): Call it instead of direct ptrace. - -Amended for GDB 7.8.1 - Chris Horler - -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.c gdb-7.8.1/gdb/common/linux-ptrace.c ---- gdb-7.8.1.orig/gdb/common/linux-ptrace.c 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/common/linux-ptrace.c 2014-12-14 20:47:29.326550209 +0000 -@@ -32,6 +32,10 @@ +Index: gdb-7.8.90.20150125/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.8.90.20150125/gdb/nat/linux-ptrace.c 2015-01-25 08:38:43.157347627 +0100 +@@ -25,6 +25,10 @@ #include @@ -54,7 +52,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.c gdb-7.8.1/gdb/com /* Stores the currently supported ptrace options. A value of -1 means we did not check for features yet. A value of 0 means there are no supported features. */ -@@ -56,6 +60,8 @@ +@@ -53,6 +57,8 @@ linux_ptrace_attach_fail_reason (pid_t p buffer_xml_printf (buffer, _("process %d is a zombie " "- the process has already terminated"), (int) pid); @@ -62,12 +60,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.c gdb-7.8.1/gdb/com + linux_ptrace_create_warnings (buffer); } - #if defined __i386__ || defined __x86_64__ -@@ -551,3 +557,19 @@ - + /* See linux-ptrace.h. */ +@@ -595,6 +601,22 @@ linux_ptrace_init_warnings (void) linux_ptrace_test_ret_to_nx (); } -+ + +/* Print all possible reasons we could fail to create a traced process. */ + +void @@ -83,21 +80,169 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.c gdb-7.8.1/gdb/com + "(gdb) shell sudo setsebool deny_ptrace=0")); +#endif /* HAVE_LIBSELINUX */ +} -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.h gdb-7.8.1/gdb/common/linux-ptrace.h ---- gdb-7.8.1.orig/gdb/common/linux-ptrace.h 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/common/linux-ptrace.h 2014-12-14 20:47:29.330550222 +0000 -@@ -85,6 +85,7 @@ ++ + /* Set additional ptrace flags to use. Some such flags may be checked + by the implementation above. This function must be called before + any other function in this file; otherwise the flags may not take +Index: gdb-7.8.90.20150125/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.8.90.20150125/gdb/nat/linux-ptrace.h 2015-01-25 08:38:16.565233009 +0100 +@@ -98,6 +98,7 @@ extern void linux_ptrace_attach_fail_rea + extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err); - extern void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer); extern void linux_ptrace_init_warnings (void); +extern void linux_ptrace_create_warnings (struct buffer *buffer); - extern void linux_enable_event_reporting (pid_t pid); + extern void linux_enable_event_reporting (pid_t pid, int attached); extern void linux_disable_event_reporting (pid_t pid); extern int linux_supports_tracefork (void); -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/config.in gdb-7.8.1/gdb/config.in ---- gdb-7.8.1.orig/gdb/config.in 2014-12-14 20:44:21.913980816 +0000 -+++ gdb-7.8.1/gdb/config.in 2014-12-14 20:49:09.158856507 +0000 -@@ -216,6 +216,9 @@ +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.8.90.20150125/gdb/configure.ac 2015-01-25 08:37:02.801915075 +0100 +@@ -2117,6 +2117,10 @@ case $host_os in + esac + AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) + ++dnl Check security_get_boolean_active availability. ++AC_CHECK_HEADERS(selinux/selinux.h) ++AC_CHECK_LIB(selinux, security_get_boolean_active) ++ + dnl Handle optional features that can be enabled. + + # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, +Index: gdb-7.8.90.20150125/gdb/gdbserver/configure.ac +=================================================================== +--- gdb-7.8.90.20150125.orig/gdb/gdbserver/configure.ac 2015-01-25 08:36:55.712884520 +0100 ++++ gdb-7.8.90.20150125/gdb/gdbserver/configure.ac 2015-01-25 08:37:02.801915075 +0100 +@@ -461,6 +461,10 @@ if $want_ipa ; then + fi + fi + ++dnl Check security_get_boolean_active availability. ++AC_CHECK_HEADERS(selinux/selinux.h) ++AC_CHECK_LIB(selinux, security_get_boolean_active) ++ + AC_SUBST(GDBSERVER_DEPFILES) + AC_SUBST(GDBSERVER_LIBS) + AC_SUBST(srv_xmlbuiltin) +Index: gdb-7.8.90.20150125/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.8.90.20150125/gdb/gdbserver/linux-low.c 2015-01-25 08:37:02.803915084 +0100 +@@ -591,6 +591,29 @@ add_lwp (ptid_t ptid) + return lwp; + } + ++/* Execute PTRACE_TRACEME with error checking. */ ++ ++static void ++linux_traceme (const char *program) ++{ ++ int save_errno; ++ struct buffer buffer; ++ ++ errno = 0; ++ if (ptrace (PTRACE_TRACEME, 0, ++ (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) == 0) ++ return; ++ ++ save_errno = errno; ++ buffer_init (&buffer); ++ linux_ptrace_create_warnings (&buffer); ++ buffer_grow_str0 (&buffer, ""); ++ fprintf (stderr, _("%sCannot trace created process %s: %s.\n"), ++ buffer_finish (&buffer), program, strerror (save_errno)); ++ fflush (stderr); ++ _exit (0177); ++} ++ + /* Start an inferior process and returns its pid. + ALLARGS is a vector of program-name and args. */ + +@@ -632,7 +655,7 @@ linux_create_inferior (char *program, ch + if (pid == 0) + { + close_most_fds (); +- ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0); ++ linux_traceme (program); + + #ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */ + signal (__SIGRTMIN + 1, SIG_DFL); +Index: gdb-7.8.90.20150125/gdb/inf-ptrace.c +=================================================================== +--- gdb-7.8.90.20150125.orig/gdb/inf-ptrace.c 2015-01-25 08:36:55.715884533 +0100 ++++ gdb-7.8.90.20150125/gdb/inf-ptrace.c 2015-01-25 08:37:02.803915084 +0100 +@@ -67,7 +67,15 @@ static void + inf_ptrace_me (void) + { + /* "Trace me, Dr. Memory!" */ ++ errno = 0; + ptrace (PT_TRACE_ME, 0, (PTRACE_TYPE_ARG3)0, 0); ++ if (errno != 0) ++ { ++ fprintf_unfiltered (gdb_stderr, _("Cannot create process: %s\n"), ++ safe_strerror (errno)); ++ gdb_flush (gdb_stderr); ++ _exit (0177); ++ } + } + + /* Start a new inferior Unix child process. EXEC_FILE is the file to +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:55.717884541 +0100 ++++ gdb-7.8.90.20150125/gdb/linux-nat.c 2015-01-25 08:37:52.054127362 +0100 +@@ -1109,6 +1109,7 @@ linux_nat_create_inferior (struct target + #ifdef HAVE_PERSONALITY + int personality_orig = 0, personality_set = 0; + #endif /* HAVE_PERSONALITY */ ++ volatile struct gdb_exception ex; + + /* The fork_child mechanism is synchronous and calls target_wait, so + we have to mask the async mode. */ +@@ -1133,7 +1134,10 @@ linux_nat_create_inferior (struct target + /* Make sure we report all signals during startup. */ + linux_nat_pass_signals (ops, 0, NULL); + +- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty); ++ TRY_CATCH (ex, RETURN_MASK_ERROR) ++ { ++ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty); ++ } + + #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; ++ char *message, *buffer_s; ++ ++ message = xstrdup (ex.message); ++ make_cleanup (xfree, message); ++ ++ buffer_init (&buffer); ++ linux_ptrace_create_warnings (&buffer); ++ ++ buffer_grow_str0 (&buffer, ""); ++ buffer_s = buffer_finish (&buffer); ++ make_cleanup (xfree, buffer_s); ++ ++ throw_error (ex.error, "%s%s", buffer_s, message); ++ } + } + + /* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not +Index: gdb-7.8.90.20150125/gdb/config.in +=================================================================== +--- gdb-7.8.90.20150125.orig/gdb/config.in 2015-01-25 08:36:55.718884546 +0100 ++++ gdb-7.8.90.20150125/gdb/config.in 2015-01-25 08:37:02.805915092 +0100 +@@ -213,6 +213,9 @@ /* Define if librpm library is being used. */ #undef HAVE_LIBRPM @@ -107,7 +252,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/config.in gdb-7.8.1/gdb/config.in /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -@@ -351,6 +354,9 @@ +@@ -342,6 +345,9 @@ /* Define to 1 if you have the `scm_new_smob' function. */ #undef HAVE_SCM_NEW_SMOB @@ -117,10 +262,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/config.in gdb-7.8.1/gdb/config.in /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/configure gdb-7.8.1/gdb/configure ---- gdb-7.8.1.orig/gdb/configure 2014-12-14 20:44:21.925980853 +0000 -+++ gdb-7.8.1/gdb/configure 2014-12-14 20:47:29.364550326 +0000 -@@ -13400,6 +13400,64 @@ +Index: gdb-7.8.90.20150125/gdb/configure +=================================================================== +--- gdb-7.8.90.20150125.orig/gdb/configure 2015-01-25 08:36:55.722884563 +0100 ++++ gdb-7.8.90.20150125/gdb/configure 2015-01-25 08:37:02.809915110 +0100 +@@ -13270,6 +13270,64 @@ cat >>confdefs.h <<_ACEOF _ACEOF @@ -185,24 +331,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/configure gdb-7.8.1/gdb/configure # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, # except that the argument to --with-sysroot is optional. -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/configure.ac gdb-7.8.1/gdb/configure.ac ---- gdb-7.8.1.orig/gdb/configure.ac 2014-12-14 20:44:21.933980877 +0000 -+++ gdb-7.8.1/gdb/configure.ac 2014-12-14 20:47:29.334550234 +0000 -@@ -2161,6 +2161,10 @@ - esac - AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) - -+dnl Check security_get_boolean_active availability. -+AC_CHECK_HEADERS(selinux/selinux.h) -+AC_CHECK_LIB(selinux, security_get_boolean_active) -+ - dnl Handle optional features that can be enabled. - - # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/config.in gdb-7.8.1/gdb/gdbserver/config.in ---- gdb-7.8.1.orig/gdb/gdbserver/config.in 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/gdbserver/config.in 2014-12-14 20:47:29.366550332 +0000 -@@ -81,6 +81,9 @@ +Index: gdb-7.8.90.20150125/gdb/gdbserver/config.in +=================================================================== +--- gdb-7.8.90.20150125.orig/gdb/gdbserver/config.in 2015-01-25 08:36:55.724884572 +0100 ++++ gdb-7.8.90.20150125/gdb/gdbserver/config.in 2015-01-25 08:37:02.809915110 +0100 +@@ -75,6 +75,9 @@ /* Define to 1 if you have the `mcheck' library (-lmcheck). */ #undef HAVE_LIBMCHECK @@ -212,9 +345,9 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/config.in gdb-7.8.1/gdb/gdbse /* Define if the target supports branch tracing. */ #undef HAVE_LINUX_BTRACE -@@ -154,6 +157,9 @@ - /* Define to 1 if you have the `readlink' function. */ - #undef HAVE_READLINK +@@ -142,6 +145,9 @@ + /* Define to 1 if you have the `pwrite' function. */ + #undef HAVE_PWRITE +/* Define to 1 if you have the header file. */ +#undef HAVE_SELINUX_SELINUX_H @@ -222,10 +355,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/config.in gdb-7.8.1/gdb/gdbse /* Define to 1 if you have the header file. */ #undef HAVE_SGTTY_H -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/configure gdb-7.8.1/gdb/gdbserver/configure ---- gdb-7.8.1.orig/gdb/gdbserver/configure 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/gdbserver/configure 2014-12-14 20:47:29.370550344 +0000 -@@ -6170,6 +6170,64 @@ +Index: gdb-7.8.90.20150125/gdb/gdbserver/configure +=================================================================== +--- gdb-7.8.90.20150125.orig/gdb/gdbserver/configure 2015-01-25 08:36:55.726884580 +0100 ++++ gdb-7.8.90.20150125/gdb/gdbserver/configure 2015-01-25 08:37:02.811915118 +0100 +@@ -6199,6 +6199,64 @@ if $want_ipa ; then fi fi @@ -290,126 +424,3 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/configure gdb-7.8.1/gdb/gdbse -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/configure.ac gdb-7.8.1/gdb/gdbserver/configure.ac ---- gdb-7.8.1.orig/gdb/gdbserver/configure.ac 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/gdbserver/configure.ac 2014-12-14 20:47:29.337550243 +0000 -@@ -454,6 +454,10 @@ - fi - fi - -+dnl Check security_get_boolean_active availability. -+AC_CHECK_HEADERS(selinux/selinux.h) -+AC_CHECK_LIB(selinux, security_get_boolean_active) -+ - AC_SUBST(GDBSERVER_DEPFILES) - AC_SUBST(GDBSERVER_LIBS) - AC_SUBST(srv_xmlbuiltin) -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/linux-low.c gdb-7.8.1/gdb/gdbserver/linux-low.c ---- gdb-7.8.1.orig/gdb/gdbserver/linux-low.c 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/gdbserver/linux-low.c 2014-12-14 20:47:29.341550255 +0000 -@@ -541,6 +541,29 @@ - return lwp; - } - -+/* Execute PTRACE_TRACEME with error checking. */ -+ -+static void -+linux_traceme (const char *program) -+{ -+ int save_errno; -+ struct buffer buffer; -+ -+ errno = 0; -+ if (ptrace (PTRACE_TRACEME, 0, -+ (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) == 0) -+ return; -+ -+ save_errno = errno; -+ buffer_init (&buffer); -+ linux_ptrace_create_warnings (&buffer); -+ buffer_grow_str0 (&buffer, ""); -+ fprintf (stderr, _("%sCannot trace created process %s: %s.\n"), -+ buffer_finish (&buffer), program, strerror (save_errno)); -+ fflush (stderr); -+ _exit (0177); -+} -+ - /* Start an inferior process and returns its pid. - ALLARGS is a vector of program-name and args. */ - -@@ -582,7 +605,7 @@ - if (pid == 0) - { - close_most_fds (); -- ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0); -+ linux_traceme (program); - - #ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */ - signal (__SIGRTMIN + 1, SIG_DFL); -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/inf-ptrace.c gdb-7.8.1/gdb/inf-ptrace.c ---- gdb-7.8.1.orig/gdb/inf-ptrace.c 2014-10-29 19:45:50.000000000 +0000 -+++ gdb-7.8.1/gdb/inf-ptrace.c 2014-12-14 20:47:29.345550267 +0000 -@@ -105,7 +105,15 @@ - inf_ptrace_me (void) - { - /* "Trace me, Dr. Memory!" */ -+ errno = 0; - ptrace (PT_TRACE_ME, 0, (PTRACE_TYPE_ARG3)0, 0); -+ if (errno != 0) -+ { -+ fprintf_unfiltered (gdb_stderr, _("Cannot create process: %s\n"), -+ safe_strerror (errno)); -+ gdb_flush (gdb_stderr); -+ _exit (0177); -+ } - } - - /* Start a new inferior Unix child process. EXEC_FILE is the file to -diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/linux-nat.c gdb-7.8.1/gdb/linux-nat.c ---- gdb-7.8.1.orig/gdb/linux-nat.c 2014-12-14 20:44:21.800980475 +0000 -+++ gdb-7.8.1/gdb/linux-nat.c 2014-12-14 20:47:29.348550277 +0000 -@@ -1291,6 +1291,7 @@ - #ifdef HAVE_PERSONALITY - int personality_orig = 0, personality_set = 0; - #endif /* HAVE_PERSONALITY */ -+ volatile struct gdb_exception ex; - - /* The fork_child mechanism is synchronous and calls target_wait, so - we have to mask the async mode. */ -@@ -1315,7 +1316,10 @@ - /* Make sure we report all signals during startup. */ - linux_nat_pass_signals (ops, 0, NULL); - -- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty); -+ TRY_CATCH (ex, RETURN_MASK_ERROR) -+ { -+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty); -+ } - - #ifdef HAVE_PERSONALITY - if (personality_set) -@@ -1327,6 +1331,24 @@ - safe_strerror (errno)); - } - #endif /* HAVE_PERSONALITY */ -+ -+ if (ex.reason < 0) -+ { -+ struct buffer buffer; -+ char *message, *buffer_s; -+ -+ message = xstrdup (ex.message); -+ make_cleanup (xfree, message); -+ -+ buffer_init (&buffer); -+ linux_ptrace_create_warnings (&buffer); -+ -+ buffer_grow_str0 (&buffer, ""); -+ buffer_s = buffer_finish (&buffer); -+ make_cleanup (xfree, buffer_s); -+ -+ throw_error (ex.error, "%s%s", buffer_s, message); -+ } - } - - static void diff --git a/gdb-btrobust.patch b/gdb-btrobust.patch index dd05018..32c3d4c 100644 --- a/gdb-btrobust.patch +++ b/gdb-btrobust.patch @@ -3,9 +3,11 @@ printed, but a default backtrace will occur in this case. -- ---- gdb-7.7.90.20140613/gdb/python/py-framefilter.c-orig 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/python/py-framefilter.c 2014-06-27 17:20:00.945271945 +0200 -@@ -1475,6 +1475,7 @@ gdbpy_apply_frame_filter (const struct e +Index: gdb-7.8.90.20150214/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.8.90.20150214/gdb/python/py-framefilter.c 2015-02-14 17:36:15.737953789 +0100 +@@ -1506,6 +1506,7 @@ gdbpy_apply_frame_filter (const struct e volatile struct gdb_exception except; PyObject *item; htab_t levels_printed; @@ -13,7 +15,7 @@ printed, but a default backtrace will occur in this case. if (!gdb_python_initialized) return EXT_LANG_BT_NO_FILTERS; -@@ -1494,24 +1495,7 @@ gdbpy_apply_frame_filter (const struct e +@@ -1525,24 +1526,7 @@ gdbpy_apply_frame_filter (const struct e iterable = bootstrap_python_frame_filters (frame, frame_low, frame_high); if (iterable == NULL) @@ -39,10 +41,11 @@ printed, but a default backtrace will occur in this case. /* If iterable is None, then there are no frame filters registered. If this is the case, defer to default GDB printing routines in MI -@@ -1540,15 +1524,39 @@ gdbpy_apply_frame_filter (const struct e +@@ -1573,15 +1557,40 @@ gdbpy_apply_frame_filter (const struct e + error and continue with other frames. */ + if (success == EXT_LANG_BT_ERROR) gdbpy_print_stack (); - - Py_DECREF (item); ++ + count_printed++; } diff --git a/gdb-bz541866-rwatch-before-run.patch b/gdb-bz541866-rwatch-before-run.patch index 72378cb..d8dc9bd 100644 --- a/gdb-bz541866-rwatch-before-run.patch +++ b/gdb-bz541866-rwatch-before-run.patch @@ -1,8 +1,8 @@ -Index: gdb-7.7.50.20140609/gdb/config/i386/linux64.mh +Index: gdb-7.8.50.20141228/gdb/config/i386/linux64.mh =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/config/i386/linux64.mh 2014-06-13 20:25:37.356732335 +0200 -+++ gdb-7.7.50.20140609/gdb/config/i386/linux64.mh 2014-06-13 20:26:07.984764098 +0200 -@@ -5,7 +5,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \ +--- gdb-7.8.50.20141228.orig/gdb/config/i386/linux64.mh 2015-01-01 17:12:53.965472227 +0100 ++++ gdb-7.8.50.20141228/gdb/config/i386/linux64.mh 2015-01-01 17:12:55.367471414 +0100 +@@ -6,7 +6,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-waitpid.o @@ -11,22 +11,22 @@ Index: gdb-7.7.50.20140609/gdb/config/i386/linux64.mh NAT_CDEPS = $(srcdir)/proc-service.list # The dynamically loaded libthread_db needs access to symbols in the -Index: gdb-7.7.50.20140609/gdb/config/i386/linux.mh +Index: gdb-7.8.50.20141228/gdb/config/i386/linux.mh =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/config/i386/linux.mh 2014-06-13 20:25:37.356732335 +0200 -+++ gdb-7.7.50.20140609/gdb/config/i386/linux.mh 2014-06-13 20:26:07.984764098 +0200 +--- gdb-7.8.50.20141228.orig/gdb/config/i386/linux.mh 2015-01-01 17:12:55.367471414 +0100 ++++ gdb-7.8.50.20141228/gdb/config/i386/linux.mh 2015-01-01 17:13:07.568464342 +0100 @@ -1,6 +1,6 @@ # Host: Intel 386 running GNU/Linux. -NAT_FILE= config/nm-linux.h +NAT_FILE= nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o \ - i386-nat.o i386-linux-nat.o \ + x86-nat.o x86-dregs.o i386-linux-nat.o x86-linux-nat.o \ proc-service.o linux-thread-db.o \ -Index: gdb-7.7.50.20140609/gdb/config/i386/nm-linux.h +Index: gdb-7.8.50.20141228/gdb/config/i386/nm-linux.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/config/i386/nm-linux.h 2014-06-13 20:26:07.984764098 +0200 ++++ gdb-7.8.50.20141228/gdb/config/i386/nm-linux.h 2015-01-01 17:12:55.368471414 +0100 @@ -0,0 +1,28 @@ +/* Native support for GNU/Linux i386. + @@ -56,10 +56,10 @@ Index: gdb-7.7.50.20140609/gdb/config/i386/nm-linux.h +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 + +#endif /* NM_LINUX64_H */ -Index: gdb-7.7.50.20140609/gdb/config/i386/nm-linux64.h +Index: gdb-7.8.50.20141228/gdb/config/i386/nm-linux64.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/config/i386/nm-linux64.h 2014-06-13 20:26:07.984764098 +0200 ++++ gdb-7.8.50.20141228/gdb/config/i386/nm-linux64.h 2015-01-01 17:12:55.368471414 +0100 @@ -0,0 +1,28 @@ +/* Native support for GNU/Linux amd64. + @@ -89,11 +89,11 @@ Index: gdb-7.7.50.20140609/gdb/config/i386/nm-linux64.h +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 + +#endif /* NM_LINUX64_H */ -Index: gdb-7.7.50.20140609/gdb/target.h +Index: gdb-7.8.50.20141228/gdb/target.h =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/target.h 2014-06-13 20:26:07.985764099 +0200 -+++ gdb-7.7.50.20140609/gdb/target.h 2014-06-13 20:26:34.915792095 +0200 -@@ -1728,9 +1728,11 @@ extern char *target_thread_name (struct +--- gdb-7.8.50.20141228.orig/gdb/target.h 2015-01-01 17:12:53.967472226 +0100 ++++ gdb-7.8.50.20141228/gdb/target.h 2015-01-01 17:12:55.368471414 +0100 +@@ -1754,9 +1754,11 @@ extern char *target_thread_name (struct bp_hardware_breakpoint. CNT is the number of such watchpoints used so far (including this one?). OTHERTYPE is who knows what... */ @@ -105,10 +105,10 @@ Index: gdb-7.7.50.20140609/gdb/target.h /* Returns the number of debug registers needed to watch the given memory region, or zero if not supported. */ -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2014-06-13 20:26:07.986764101 +0200 ++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2015-01-01 17:12:55.369471413 +0100 @@ -0,0 +1,40 @@ +# Copyright 2009, 2010 Free Software Foundation, Inc. + diff --git a/gdb-dts-rhel6-python-compat.patch b/gdb-dts-rhel6-python-compat.patch index 1cdb3f1..ea72be0 100644 --- a/gdb-dts-rhel6-python-compat.patch +++ b/gdb-dts-rhel6-python-compat.patch @@ -1,10 +1,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1020004 -Index: gdb-7.7.90.20140613/gdb/data-directory/Makefile.in +Index: gdb-7.8.50.20141228/gdb/data-directory/Makefile.in =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/data-directory/Makefile.in 2014-06-13 23:02:37.597115787 +0200 -+++ gdb-7.7.90.20140613/gdb/data-directory/Makefile.in 2014-06-13 23:03:21.285163909 +0200 -@@ -60,6 +60,8 @@ PYTHON_FILES = \ +--- gdb-7.8.50.20141228.orig/gdb/data-directory/Makefile.in 2015-01-05 22:51:10.707756810 +0100 ++++ gdb-7.8.50.20141228/gdb/data-directory/Makefile.in 2015-01-05 22:51:48.608923139 +0100 +@@ -60,6 +60,8 @@ PYTHON_FILE_LIST = \ gdb/frames.py \ gdb/FrameIterator.py \ gdb/FrameDecorator.py \ @@ -13,18 +13,18 @@ Index: gdb-7.7.90.20140613/gdb/data-directory/Makefile.in gdb/types.py \ gdb/printing.py \ gdb/prompt.py \ -@@ -74,6 +76,7 @@ PYTHON_FILES = \ +@@ -74,6 +76,7 @@ PYTHON_FILE_LIST = \ gdb/command/pretty_printers.py \ gdb/command/prompt.py \ gdb/command/explore.py \ + gdb/command/backtrace.py \ gdb/function/__init__.py \ - gdb/function/strfns.py \ gdb/function/caller_is.py \ -Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/FrameWrapper.py + gdb/function/strfns.py \ +Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/FrameWrapper.py =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/python/lib/gdb/FrameWrapper.py 2014-06-13 23:02:37.598115788 +0200 ++++ gdb-7.8.50.20141228/gdb/python/lib/gdb/FrameWrapper.py 2015-01-05 22:51:24.706818245 +0100 @@ -0,0 +1,122 @@ +# Wrapper API for frames. + @@ -148,10 +148,10 @@ Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/FrameWrapper.py + + def __getattr__ (self, name): + return getattr (self.frame, name) -Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/backtrace.py +Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/backtrace.py =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/python/lib/gdb/backtrace.py 2014-06-13 23:02:37.598115788 +0200 ++++ gdb-7.8.50.20141228/gdb/python/lib/gdb/backtrace.py 2015-01-05 22:51:24.706818245 +0100 @@ -0,0 +1,42 @@ +# Filtering backtrace. + @@ -195,10 +195,10 @@ Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/backtrace.py + return iter + return old_frame_filter (iter) + -Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/command/backtrace.py +Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/command/backtrace.py =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/python/lib/gdb/command/backtrace.py 2014-06-13 23:02:37.598115788 +0200 ++++ gdb-7.8.50.20141228/gdb/python/lib/gdb/command/backtrace.py 2015-01-05 22:51:24.707818249 +0100 @@ -0,0 +1,106 @@ +# New backtrace command. + diff --git a/gdb-enable-count-crash.patch b/gdb-enable-count-crash.patch index e6ab3b6..6b8fa07 100644 --- a/gdb-enable-count-crash.patch +++ b/gdb-enable-count-crash.patch @@ -37,20 +37,20 @@ gdb/testsuite/ChangeLog: gdb/testsuite/gdb.base/ena-dis-br.exp | 8 ++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) -diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c -index ccd05d9..5a0c5ab 100644 ---- a/gdb/breakpoint.c -+++ b/gdb/breakpoint.c -@@ -14389,7 +14389,7 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *, +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); -@@ -14713,7 +14713,12 @@ do_map_enable_count_breakpoint (struct breakpoint *bpt, void *countptr) +@@ -15186,7 +15186,12 @@ do_map_enable_count_breakpoint (struct b static void enable_count_command (char *args, int from_tty) { @@ -61,17 +61,17 @@ index ccd05d9..5a0c5ab 100644 + error_no_arg (_("hit count")); + + count = get_number (&args); - + map_breakpoint_numbers (args, do_map_enable_count_breakpoint, &count); } -diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp -index b08b709..82aef64 100644 ---- a/gdb/testsuite/gdb.base/ena-dis-br.exp -+++ b/gdb/testsuite/gdb.base/ena-dis-br.exp -@@ -173,6 +173,14 @@ set bp [break_at $bp_location7 "line $bp_location7"] - - set bp2 [break_at marker1 " line ($bp_location15|$bp_location16)"] - +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" @@ -81,6 +81,5 @@ index b08b709..82aef64 100644 + "enable count missing last argument" + gdb_test_no_output "enable count 2 $bp" "disable break with count" - + gdb_test "continue" \ - diff --git a/gdb-jit-reader-multilib.patch b/gdb-jit-reader-multilib.patch new file mode 100644 index 0000000..4a212f6 --- /dev/null +++ b/gdb-jit-reader-multilib.patch @@ -0,0 +1,40 @@ +diff --git a/gdb/configure b/gdb/configure +index 7ff74ba..00a5b5b 100755 +--- a/gdb/configure ++++ b/gdb/configure +@@ -7382,10 +7382,12 @@ _ACEOF + + + +-if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then +- TARGET_PTR="unsigned long" +-elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then ++# Try to keep TARGET_PTR the same across archs so that jit-reader.h file ++# content is the same for multilib distributions. ++if test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then + TARGET_PTR="unsigned long long" ++elif test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then ++ TARGET_PTR="unsigned long" + elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then + TARGET_PTR="unsigned __int128" + else +diff --git a/gdb/configure.ac b/gdb/configure.ac +index ec776d7..c02ace9 100644 +--- a/gdb/configure.ac ++++ b/gdb/configure.ac +@@ -648,10 +648,12 @@ AC_CHECK_SIZEOF(unsigned long long) + AC_CHECK_SIZEOF(unsigned long) + AC_CHECK_SIZEOF(unsigned __int128) + +-if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then +- TARGET_PTR="unsigned long" +-elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then ++# Try to keep TARGET_PTR the same across archs so that jit-reader.h file ++# content is the same for multilib distributions. ++if test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then + TARGET_PTR="unsigned long long" ++elif test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then ++ TARGET_PTR="unsigned long" + elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then + TARGET_PTR="unsigned __int128" + else diff --git a/gdb-no-dg-extract-results-py.patch b/gdb-no-dg-extract-results-py.patch new file mode 100644 index 0000000..7da1c1d --- /dev/null +++ b/gdb-no-dg-extract-results-py.patch @@ -0,0 +1,589 @@ +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 . +- 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() diff --git a/gdb-python-completer-1of2.patch b/gdb-python-completer-1of2.patch deleted file mode 100644 index f274ca4..0000000 --- a/gdb-python-completer-1of2.patch +++ /dev/null @@ -1,747 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2014-07/msg00002.html -Subject: Re: [PATCH] PR python/16699: GDB Python command completion with overriden complete vs. completer class -https://bugzilla.redhat.com/show_bug.cgi?id=1075199 - -On Wednesday, May 21 2014, Doug Evans wrote: - -> Sergio Durigan Junior writes: ->> [...] ->> Thanks. WDYT of the following patch? -> -> Hi. -> -> fwiw it's too bad the ability to plug in different completers isn't more, -> I dunno, parameterized (couldn't pick a better term, apologies - -> I thought of "object oriented" but that carries its own baggage). -> Performing completion obviously involves specifying more than a just -> single function (witness the comparison of the completer with specific -> functions). - -Thanks for the reply, and sorry for the long delay in answering. - -> Plus it's more than specifying brkchars. -> Witness code like this: -> -> /* Many commands which want to complete on -> file names accept several file names, as -> in "run foo bar >>baz". So we don't want -> to complete the entire text after the -> command, just the last word. To this -> end, we need to find the beginning of the -> file name by starting at `word' and going -> backwards. */ -> for (p = word; -> p > tmp_command -> && strchr (gdb_completer_file_name_break_characters, p[-1]) == NULL; -> p--) -> ; -> -> IWBN if a "completer" object described how to do all these three things. -> Then the special case code for filename_completer (and location_completer) -> in completer.c could disappear. But maybe that's a patch for another day. - -While I agree with you that the completion mechanism could be better (I -myself had a lot of trouble with it), I unfortunately don't have enough -time to tackle this problem now. So yeah, I think it will be a patch -for another day... - -> Regarding the hack of using a static local to pass data from -> handle_brkchars to handle_completion, I know it's a hacky pragmatic -> choice. To get the reference counting right the code assumes that -> if the handle_brkchars phase is done then the handle_completion -> phase will be done too, right? - -Yeah. This is true for the current code (well, except maybe for the -case you describe below...). - -> I wonder if a SIGINT could sneak in -> there between the two passes (either today or tomorrow). -> Maybe the code in cmdpy_completer_helper for handle_brkchars_p could -> first check whether resultobj is already non-NULL, and decrement its -> reference count before setting it to NULL? - -Yes, done (I think). Thanks for raising this issue. - -> And cmdpy_completer_helper -> could be defined to return a borrowed reference to resultobj? -> Dunno, just thinking out loud. - -Done, I guess. - -> Something puzzles me though: If it's ok to cache the completion result from the -> handle_brkchars pass to the handle_completion pass, why have two passes? -> It feels like there must be a case where this caching of the result -> in a static local from one pass to the next won't work. - -I'm not sure I follow. - -It's OK to cache the result because handle_brkchars and -handle_completion work on the same set of data. In fact, we wouldn't -need to have two passes here; my previous patch didn't have two passes, -and worked fine. I just implemented it this way because Tom (correctly) -raised the point that the completion itself might be time-consuming, and -thus we could reuse its result in the two phases. - -> Another question: -> I noticed complete_command doesn't do this two-phase dance -> of handle_brkchars followed by handle_completions. Should it? -> It just goes straight to handle_completions. - -I don't think it should, because for complete_command (and -complete_filename et al) the handle_brkchars is already defined -internally by GDB. See: - - ... - /* Choose the default set of word break characters to break - completions. If we later find out that we are doing completions - on command strings (as opposed to strings supplied by the - individual command completer functions, which can be any string) - then we will switch to the special word break set for command - strings, which leaves out the '-' character used in some - commands. */ - rl_completer_word_break_characters = - current_language->la_word_break_characters(); - ... - - /* It is a normal command; what comes after it is - completed by the command's completer function. */ - if (c->completer == filename_completer) - { - /* Many commands which want to complete on - file names accept several file names, as - in "run foo bar >>baz". So we don't want - to complete the entire text after the - command, just the last word. To this - end, we need to find the beginning of the - file name by starting at `word' and going - backwards. */ - for (p = word; - p > tmp_command - && strchr (gdb_completer_file_name_break_characters, p[-1]) == NULL; - p--) - ; - rl_completer_word_break_characters = - gdb_completer_file_name_break_characters; - } - else if (c->completer == location_completer) - { - /* Commands which complete on locations want to - see the entire argument. */ - for (p = word; - p > tmp_command - && p[-1] != ' ' && p[-1] != '\t'; - p--) - ; - } - if (reason == handle_brkchars - && c->completer_handle_brkchars != NULL) - (*c->completer_handle_brkchars) (c, p, word); - if (reason != handle_brkchars && c->completer != NULL) - list = (*c->completer) (c, p, word); - - -The complete_command function will only be called by the last "if" -clause, when reason != handle_brkchars. Otherwise, -complete_line_internal will just deal with handle_brkchars. And for -complete_command, the right value for rl_completer_word_break_characters -is what is attributed at the beginning of the function. - -My patch implements this "two-phase" dance for Python because in this -specific case (i.e., a completion method defined in the Python script) -there is no way to know the value of handle_brkchars before we actually -do the completion itself. - -In fact, my patch could probably be "simplified" and be made to call -cmdpy_completer directly (without any cmdpy_completer_handle_brkchars), -assuming that this function took care of filling handle_brkchars -correctly. What I mean is: when dealing with the handle_brkchars case, -the completer command can do anything it wants. - -> [Maybe that explains the difference from using TAB. Dunno off hand.] -> It seems like complete_command is trying to hand-code its own -> handle_brkchars handling: -> -> static void -> complete_command (char *arg, int from_tty) -> { -> int argpoint; -> char *point, *arg_prefix; -> VEC (char_ptr) *completions; -> -> dont_repeat (); -> -> if (arg == NULL) -> arg = ""; -> argpoint = strlen (arg); -> -> /* complete_line assumes that its first argument is somewhere -> within, and except for filenames at the beginning of, the word to -> be completed. The following crude imitation of readline's -> word-breaking tries to accomodate this. */ -> point = arg + argpoint; -> while (point > arg) -> { -> if (strchr (rl_completer_word_break_characters, point[-1]) != 0) -> break; -> point--; -> } -> -> arg_prefix = alloca (point - arg + 1); -> memcpy (arg_prefix, arg, point - arg); -> arg_prefix[point - arg] = 0; -> -> completions = complete_line (point, arg, argpoint); -> -> ... -> } - -Yes, it seems so, but I did not check further. - -> TAB and the complete command should work identically of course, -> but for your testcase, maybe you should test both just to verify -> both work reasonably well (even if not identically). -> Given that complete_command doesn't do the two phase dance, -> does it work with your patch? -> Maybe it does, but IWBN to confirm that. - -The 'complete' command does not work as it should with my patch: - - (gdb) complete completefileinit /hom - completefileinit /home - (gdb) complete completefilemethod /hom - completefilemethod /home - -But then, it also does not work without my patch either: - - (gdb) complete file /hom - file /home - -So I am not extending the testcase for now, because this bug needs to be -fixed first (and it is unrelated to the patch I am proposing). - -WDYT of this version? - -Thanks, - --- -Sergio -GPG key ID: 65FC5E36 -Please send encrypted e-mail if possible -http://blog.sergiodj.net/ - -gdb/ -2014-06-30 Sergio Durigan Junior - - PR python/16699 - * cli/cli-decode.c (set_cmd_completer_handle_brkchars): New - function. - (add_cmd): Set "completer_handle_brkchars" to NULL. - * cli/cli-decode.h (struct cmd_list_element) - : New field. - * command.h (completer_ftype_void): New typedef. - (set_cmd_completer_handle_brkchars): New prototype. - * completer.c (set_gdb_completion_word_break_characters): New - function. - (complete_line_internal): Call "completer_handle_brkchars" - callback from command. - * completer.h: Include "command.h". - (set_gdb_completion_word_break_characters): New prototype. - * python/py-cmd.c (cmdpy_completer_helper): New function. - (cmdpy_completer_handle_brkchars): New function. - (cmdpy_completer): Adjust to use cmdpy_completer_helper. - (cmdpy_init): Set completer_handle_brkchars to - cmdpy_completer_handle_brkchars. - -gdb/testsuite/ -2014-06-30 Sergio Durigan Junior - - PR python/16699 - * gdb.python/py-completion.exp: New file. - * gdb.python/py-completion.py: Likewise. - - -Index: gdb-7.7.90.20140627/gdb/cli/cli-decode.c -=================================================================== ---- gdb-7.7.90.20140627.orig/gdb/cli/cli-decode.c 2014-07-07 20:53:52.635106914 +0200 -+++ gdb-7.7.90.20140627/gdb/cli/cli-decode.c 2014-07-07 20:53:55.429110207 +0200 -@@ -164,6 +164,15 @@ set_cmd_completer (struct cmd_list_eleme - cmd->completer = completer; /* Ok. */ - } - -+/* See definition in commands.h. */ -+ -+void -+set_cmd_completer_handle_brkchars (struct cmd_list_element *cmd, -+ completer_ftype_void *completer_handle_brkchars) -+{ -+ cmd->completer_handle_brkchars = completer_handle_brkchars; -+} -+ - /* Add element named NAME. - Space for NAME and DOC must be allocated by the caller. - CLASS is the top level category into which commands are broken down -@@ -239,6 +248,7 @@ add_cmd (const char *name, enum command_ - c->prefix = NULL; - c->abbrev_flag = 0; - set_cmd_completer (c, make_symbol_completion_list_fn); -+ c->completer_handle_brkchars = NULL; - c->destroyer = NULL; - c->type = not_set_cmd; - c->var = NULL; -Index: gdb-7.7.90.20140627/gdb/cli/cli-decode.h -=================================================================== ---- gdb-7.7.90.20140627.orig/gdb/cli/cli-decode.h 2014-07-07 20:53:52.636106915 +0200 -+++ gdb-7.7.90.20140627/gdb/cli/cli-decode.h 2014-07-07 20:53:55.429110207 +0200 -@@ -176,6 +176,15 @@ struct cmd_list_element - "baz/foo", return "baz/foobar". */ - completer_ftype *completer; - -+ /* Handle the word break characters for this completer. Usually -+ this function need not be defined, but for some types of -+ completers (e.g., Python completers declared as methods inside -+ a class) the word break chars may need to be redefined -+ depending on the completer type (e.g., for filename -+ completers). */ -+ -+ completer_ftype_void *completer_handle_brkchars; -+ - /* Destruction routine for this command. If non-NULL, this is - called when this command instance is destroyed. This may be - used to finalize the CONTEXT field, if needed. */ -Index: gdb-7.7.90.20140627/gdb/command.h -=================================================================== ---- gdb-7.7.90.20140627.orig/gdb/command.h 2014-07-07 20:53:52.636106915 +0200 -+++ gdb-7.7.90.20140627/gdb/command.h 2014-07-07 20:53:55.430110208 +0200 -@@ -158,8 +158,16 @@ extern void set_cmd_sfunc (struct cmd_li - typedef VEC (char_ptr) *completer_ftype (struct cmd_list_element *, - const char *, const char *); - -+typedef void completer_ftype_void (struct cmd_list_element *, -+ const char *, const char *); -+ - extern void set_cmd_completer (struct cmd_list_element *, completer_ftype *); - -+/* Set the completer_handle_brkchars callback. */ -+ -+extern void set_cmd_completer_handle_brkchars (struct cmd_list_element *, -+ completer_ftype_void *); -+ - /* HACK: cagney/2002-02-23: Code, mostly in tracepoints.c, grubs - around in cmd objects to test the value of the commands sfunc(). */ - extern int cmd_cfunc_eq (struct cmd_list_element *cmd, -Index: gdb-7.7.90.20140627/gdb/completer.c -=================================================================== ---- gdb-7.7.90.20140627.orig/gdb/completer.c 2014-07-07 20:53:52.637106916 +0200 -+++ gdb-7.7.90.20140627/gdb/completer.c 2014-07-07 20:53:55.430110208 +0200 -@@ -450,6 +450,21 @@ expression_completer (struct cmd_list_el - return location_completer (ignore, p, word); - } - -+/* See definition in completer.h. */ -+ -+void -+set_gdb_completion_word_break_characters (completer_ftype *fn) -+{ -+ /* So far we are only interested in differentiating filename -+ completers from everything else. */ -+ if (fn == filename_completer) -+ rl_completer_word_break_characters -+ = gdb_completer_file_name_break_characters; -+ else -+ rl_completer_word_break_characters -+ = gdb_completer_command_word_break_characters; -+} -+ - /* Here are some useful test cases for completion. FIXME: These - should be put in the test suite. They should be tested with both - M-? and TAB. -@@ -678,6 +693,9 @@ complete_line_internal (const char *text - p--) - ; - } -+ if (reason == handle_brkchars -+ && c->completer_handle_brkchars != NULL) -+ (*c->completer_handle_brkchars) (c, p, word); - if (reason != handle_brkchars && c->completer != NULL) - list = (*c->completer) (c, p, word); - } -@@ -751,6 +769,9 @@ complete_line_internal (const char *text - p--) - ; - } -+ if (reason == handle_brkchars -+ && c->completer_handle_brkchars != NULL) -+ (*c->completer_handle_brkchars) (c, p, word); - if (reason != handle_brkchars && c->completer != NULL) - list = (*c->completer) (c, p, word); - } -Index: gdb-7.7.90.20140627/gdb/completer.h -=================================================================== ---- gdb-7.7.90.20140627.orig/gdb/completer.h 2014-07-07 20:53:52.637106916 +0200 -+++ gdb-7.7.90.20140627/gdb/completer.h 2014-07-07 20:54:13.297131831 +0200 -@@ -18,6 +18,7 @@ - #define COMPLETER_H 1 - - #include "gdb_vecs.h" -+#include "command.h" - - extern VEC (char_ptr) *complete_line (const char *text, - char *line_buffer, -@@ -48,6 +49,13 @@ extern char *get_gdb_completer_quote_cha - - extern char *gdb_completion_word_break_characters (void); - -+/* Set the word break characters array to the corresponding set of -+ chars, based on FN. This function is useful for cases when the -+ completer doesn't know the type of the completion until some -+ calculation is done (e.g., for Python functions). */ -+ -+extern void set_gdb_completion_word_break_characters (completer_ftype *fn); -+ - /* Exported to linespec.c */ - - extern const char *skip_quoted_chars (const char *, const char *, -Index: gdb-7.7.90.20140627/gdb/python/py-cmd.c -=================================================================== ---- gdb-7.7.90.20140627.orig/gdb/python/py-cmd.c 2014-07-07 20:53:52.637106916 +0200 -+++ gdb-7.7.90.20140627/gdb/python/py-cmd.c 2014-07-07 20:53:55.431110209 +0200 -@@ -208,45 +208,155 @@ cmdpy_function (struct cmd_list_element - do_cleanups (cleanup); - } - -+/* Helper function for the Python command completers (both "pure" -+ completer and brkchar handler). This function takes COMMAND, TEXT -+ and WORD and tries to call the Python method for completion with -+ these arguments. It also takes HANDLE_BRKCHARS_P, an argument to -+ identify whether it is being called from the brkchar handler or -+ from the "pure" completer. In the first case, it effectively calls -+ the Python method for completion, and records the PyObject in a -+ static variable (used as a "cache"). In the second case, it just -+ returns that variable, without actually calling the Python method -+ again. This saves us one Python method call. -+ -+ It is important to mention that this function is built on the -+ assumption that the calls to cmdpy_completer_handle_brkchars and -+ cmdpy_completer will be subsequent with nothing intervening. This -+ is true for our completer mechanism. -+ -+ This function returns the PyObject representing the Python method -+ call. */ -+ -+static PyObject * -+cmdpy_completer_helper (struct cmd_list_element *command, -+ const char *text, const char *word, -+ int handle_brkchars_p) -+{ -+ cmdpy_object *obj = (cmdpy_object *) get_cmd_context (command); -+ PyObject *textobj, *wordobj; -+ /* This static variable will server as a "cache" for us, in order to -+ store the PyObject that results from calling the Python -+ function. */ -+ static PyObject *resultobj = NULL; -+ -+ if (handle_brkchars_p) -+ { -+ /* If we were called to handle brkchars, it means this is the -+ first function call of two that will happen in a row. -+ Therefore, we need to call the completer ourselves, and cache -+ the return value in the static variable RESULTOBJ. Then, in -+ the second call, we can just use the value of RESULTOBJ to do -+ our job. */ -+ if (resultobj != NULL) -+ Py_DECREF (resultobj); -+ -+ resultobj = NULL; -+ if (!obj) -+ error (_("Invalid invocation of Python command object.")); -+ if (!PyObject_HasAttr ((PyObject *) obj, complete_cst)) -+ { -+ /* If there is no complete method, don't error. */ -+ return NULL; -+ } -+ -+ textobj = PyUnicode_Decode (text, strlen (text), host_charset (), NULL); -+ if (!textobj) -+ error (_("Could not convert argument to Python string.")); -+ wordobj = PyUnicode_Decode (word, sizeof (word), host_charset (), NULL); -+ if (!wordobj) -+ { -+ Py_DECREF (textobj); -+ error (_("Could not convert argument to Python string.")); -+ } -+ -+ resultobj = PyObject_CallMethodObjArgs ((PyObject *) obj, complete_cst, -+ textobj, wordobj, NULL); -+ Py_DECREF (textobj); -+ Py_DECREF (wordobj); -+ if (!resultobj) -+ { -+ /* Just swallow errors here. */ -+ PyErr_Clear (); -+ } -+ -+ Py_XINCREF (resultobj); -+ } -+ -+ return resultobj; -+} -+ -+/* Python function called to determine the break characters of a -+ certain completer. We are only interested in knowing if the -+ completer registered by the user will return one of the integer -+ codes (see COMPLETER_* symbols). */ -+ -+static void -+cmdpy_completer_handle_brkchars (struct cmd_list_element *command, -+ const char *text, const char *word) -+{ -+ PyObject *resultobj = NULL; -+ struct cleanup *cleanup; -+ -+ cleanup = ensure_python_env (get_current_arch (), current_language); -+ -+ /* Calling our helper to obtain the PyObject of the Python -+ function. */ -+ resultobj = cmdpy_completer_helper (command, text, word, 1); -+ -+ /* Check if there was an error. */ -+ if (resultobj == NULL) -+ goto done; -+ -+ if (PyInt_Check (resultobj)) -+ { -+ /* User code may also return one of the completion constants, -+ thus requesting that sort of completion. We are only -+ interested in this kind of return. */ -+ long value; -+ -+ if (!gdb_py_int_as_long (resultobj, &value)) -+ { -+ /* Ignore. */ -+ PyErr_Clear (); -+ } -+ else if (value >= 0 && value < (long) N_COMPLETERS) -+ { -+ /* This is the core of this function. Depending on which -+ completer type the Python function returns, we have to -+ adjust the break characters accordingly. */ -+ set_gdb_completion_word_break_characters -+ (completers[value].completer); -+ } -+ } -+ -+ done: -+ -+ /* We do not call Py_XDECREF here because RESULTOBJ will be used in -+ the subsequent call to cmdpy_completer function. */ -+ do_cleanups (cleanup); -+} -+ - /* Called by gdb for command completion. */ - - static VEC (char_ptr) * - cmdpy_completer (struct cmd_list_element *command, - const char *text, const char *word) - { -- cmdpy_object *obj = (cmdpy_object *) get_cmd_context (command); -- PyObject *textobj, *wordobj, *resultobj = NULL; -+ PyObject *resultobj = NULL; - VEC (char_ptr) *result = NULL; - struct cleanup *cleanup; - - cleanup = ensure_python_env (get_current_arch (), current_language); - -- if (! obj) -- error (_("Invalid invocation of Python command object.")); -- if (! PyObject_HasAttr ((PyObject *) obj, complete_cst)) -- { -- /* If there is no complete method, don't error -- instead, just -- say that there are no completions. */ -- goto done; -- } -- -- textobj = PyUnicode_Decode (text, strlen (text), host_charset (), NULL); -- if (! textobj) -- error (_("Could not convert argument to Python string.")); -- wordobj = PyUnicode_Decode (word, strlen (word), host_charset (), NULL); -- if (! wordobj) -- error (_("Could not convert argument to Python string.")); -- -- resultobj = PyObject_CallMethodObjArgs ((PyObject *) obj, complete_cst, -- textobj, wordobj, NULL); -- Py_DECREF (textobj); -- Py_DECREF (wordobj); -- if (! resultobj) -- { -- /* Just swallow errors here. */ -- PyErr_Clear (); -- goto done; -- } -+ /* Calling our helper to obtain the PyObject of the Python -+ function. */ -+ resultobj = cmdpy_completer_helper (command, text, word, 0); -+ -+ /* If the result object of calling the Python function is NULL, it -+ means that there was an error. In this case, just give up and -+ return NULL. */ -+ if (resultobj == NULL) -+ goto done; - - result = NULL; - if (PyInt_Check (resultobj)) -@@ -302,7 +412,6 @@ cmdpy_completer (struct cmd_list_element - - done: - -- Py_XDECREF (resultobj); - do_cleanups (cleanup); - - return result; -@@ -548,6 +657,9 @@ cmdpy_init (PyObject *self, PyObject *ar - set_cmd_context (cmd, self); - set_cmd_completer (cmd, ((completetype == -1) ? cmdpy_completer - : completers[completetype].completer)); -+ if (completetype == -1) -+ set_cmd_completer_handle_brkchars (cmd, -+ cmdpy_completer_handle_brkchars); - } - if (except.reason < 0) - { -Index: gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.exp 2014-07-07 20:53:55.431110209 +0200 -@@ -0,0 +1,70 @@ -+# Copyright (C) 2014 Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+set testfile "py-completion" -+ -+load_lib gdb-python.exp -+ -+gdb_exit -+gdb_start -+ -+# Skip all tests if Python scripting is not enabled. -+if { [skip_python_tests] } { continue } -+ -+gdb_test_no_output "source ${srcdir}/${subdir}/${testfile}.py" -+ -+# Create a temporary directory -+set testdir "${objdir}/${subdir}/py-completion-testdir/" -+set testdir_regex [string_to_regexp $testdir] -+set testdir_complete "${objdir}/${subdir}/py-completion-test" -+file mkdir $testdir -+ -+# This one should always pass. -+send_gdb "completefileinit ${testdir_complete}\t" -+gdb_test_multiple "" "completefileinit completion" { -+ -re "^completefileinit ${testdir_regex}$" { -+ pass "completefileinit completion" -+ } -+} -+ -+# Just discarding whatever we typed. -+send_gdb "\n" -+gdb_test "print" ".*" -+ -+# This is the problematic one. -+send_gdb "completefilemethod ${testdir_complete}\t" -+gdb_test_multiple "" "completefilemethod completion" { -+ -re "^completefilemethod ${testdir_regex} $" { -+ fail "completefilemethod completion (completed filename as wrong command arg)" -+ } -+ -re "^completefilemethod ${testdir_regex}$" { -+ pass "completefilemethod completion" -+ } -+} -+ -+# Discarding again -+send_gdb "\n" -+gdb_test "print" ".*" -+ -+# Another problematic -+send_gdb "completefilecommandcond ${objdir}/${subdir}/py-completion-t\t" -+gdb_test_multiple "" "completefilecommandcond completion" { -+ -re "^completefilecommandcond ${testdir}$" { -+ fail "completefilecommandcond completion (completed filename instead of command)" -+ } -+ -re "^completefilecommandcond ${objdir}/${subdir}/py-completion-t$" { -+ pass "completefilecommandcond completion" -+ } -+} -Index: gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.py -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.py 2014-07-07 20:53:55.431110209 +0200 -@@ -0,0 +1,58 @@ -+# Copyright (C) 2014 Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+# This testcase tests PR python/16699 -+ -+import gdb -+ -+class CompleteFileInit(gdb.Command): -+ def __init__(self): -+ gdb.Command.__init__(self,'completefileinit',gdb.COMMAND_USER,gdb.COMPLETE_FILENAME) -+ -+ def invoke(self,argument,from_tty): -+ raise gdb.GdbError('not implemented') -+ -+class CompleteFileMethod(gdb.Command): -+ def __init__(self): -+ gdb.Command.__init__(self,'completefilemethod',gdb.COMMAND_USER) -+ -+ def invoke(self,argument,from_tty): -+ raise gdb.GdbError('not implemented') -+ -+ def complete(self,text,word): -+ return gdb.COMPLETE_FILENAME -+ -+class CompleteFileCommandCond(gdb.Command): -+ def __init__(self): -+ gdb.Command.__init__(self,'completefilecommandcond',gdb.COMMAND_USER) -+ -+ def invoke(self,argument,from_tty): -+ raise gdb.GdbError('not implemented') -+ -+ def complete(self,text,word): -+ # This is a test made to know if the command -+ # completion still works fine. When the user asks to -+ # complete something like "completefilecommandcond -+ # /path/to/py-completion-t", it should not complete to -+ # "/path/to/py-completion-test/", but instead just -+ # wait for input. -+ if "py-completion-t" in text: -+ return gdb.COMPLETE_COMMAND -+ else: -+ return gdb.COMPLETE_FILENAME -+ -+CompleteFileInit() -+CompleteFileMethod() -+CompleteFileCommandCond() diff --git a/gdb-python-completer-2of2.patch b/gdb-python-completer-2of2.patch deleted file mode 100644 index aa29a4e..0000000 --- a/gdb-python-completer-2of2.patch +++ /dev/null @@ -1,72 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2014-07/msg00154.html -Subject: Re: [PATCH] PR python/16699: GDB Python command completion with overriden complete vs. completer class - - ---pWyiEgJYm5f9v55/ -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline - -On Tue, 08 Jul 2014 17:32:21 +0200, Jan Kratochvil wrote: -> - -re "^completefilecommandcond ${objdir}/${subdir}/py-completion-t$" { -> + -re "^completefilecommandcond ${completion_regex}$" { - -There was a racy bug here - and even in the former test - here should be: - + -re "^completefilecommandcond ${completion_regex}\007$" { - -Updated fix attached. - - -Jan - ---pWyiEgJYm5f9v55/ -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline; filename="py-completion-race2.patch" - ---- ./gdb/testsuite/gdb.python/py-completion.exp-orig 2014-07-07 21:32:17.891045058 +0200 -+++ ./gdb/testsuite/gdb.python/py-completion.exp 2014-07-08 20:14:57.189791928 +0200 -@@ -26,9 +26,9 @@ if { [skip_python_tests] } { continue } - gdb_test_no_output "source ${srcdir}/${subdir}/${testfile}.py" - - # Create a temporary directory --set testdir "${objdir}/${subdir}/py-completion-testdir/" -+set testdir "[standard_output_file "py-completion-testdir"]/" - set testdir_regex [string_to_regexp $testdir] --set testdir_complete "${objdir}/${subdir}/py-completion-test" -+set testdir_complete [standard_output_file "py-completion-test"] - file mkdir $testdir - - # This one should always pass. -@@ -40,8 +40,7 @@ gdb_test_multiple "" "completefileinit c - } - - # Just discarding whatever we typed. --send_gdb "\n" --gdb_test "print" ".*" -+gdb_test " " ".*" "discard #1" - - # This is the problematic one. - send_gdb "completefilemethod ${testdir_complete}\t" -@@ -55,16 +54,16 @@ gdb_test_multiple "" "completefilemethod - } - - # Discarding again --send_gdb "\n" --gdb_test "print" ".*" -+gdb_test " " ".*" "discard #2" - - # Another problematic --send_gdb "completefilecommandcond ${objdir}/${subdir}/py-completion-t\t" -+set completion_regex "[string_to_regexp [standard_output_file "py-completion-t"]]" -+send_gdb "completefilecommandcond [standard_output_file "py-completion-t\t"]" - gdb_test_multiple "" "completefilecommandcond completion" { - -re "^completefilecommandcond ${testdir}$" { - fail "completefilecommandcond completion (completed filename instead of command)" - } -- -re "^completefilecommandcond ${objdir}/${subdir}/py-completion-t$" { -+ -re "^completefilecommandcond ${completion_regex}\007$" { - pass "completefilecommandcond completion" - } - } - ---pWyiEgJYm5f9v55/-- - diff --git a/gdb-python-gil.patch b/gdb-python-gil.patch new file mode 100644 index 0000000..ad0436a --- /dev/null +++ b/gdb-python-gil.patch @@ -0,0 +1,224 @@ +diff -dup -ruNp gdb-7.8-orig/gdb/doc/python.texi gdb-7.8/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 +@@ -228,6 +228,14 @@ returned as a string. The default is @c + return value is @code{None}. If @var{to_string} is @code{True}, the + @value{GDBN} virtual terminal will be temporarily set to unlimited width + and height, and its pagination will be disabled; @pxref{Screen Size}. ++ ++The @var{release_gil} flag specifies whether @value{GDBN} ought to ++release the Python GIL before executing the command. This is useful ++in multi-threaded Python programs where by default the Python ++interpreter will acquire the GIL and lock other threads from ++executing. After the command has completed executing in @value{GDBN} ++the Python GIL is reacquired. This flag must be a boolean value. If ++omitted, it defaults to @code{False}. + @end defun + + @findex gdb.breakpoints +diff -dup -ruNp gdb-7.8-orig/gdb/python/python-internal.h gdb-7.8/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 +@@ -143,6 +143,8 @@ typedef int Py_ssize_t; + #define PyGILState_Release(ARG) ((void)(ARG)) + #define PyEval_InitThreads() + #define PyThreadState_Swap(ARG) ((void)(ARG)) ++#define PyEval_SaveThread() ((void)(ARG)) ++#define PyEval_RestoreThread(ARG) ((void)(ARG)) + #define PyEval_ReleaseLock() + #endif + +diff -dup -ruNp gdb-7.8-orig/gdb/python/python.c gdb-7.8/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 +@@ -620,14 +620,19 @@ execute_gdb_command (PyObject *self, PyO + { + const char *arg; + PyObject *from_tty_obj = NULL, *to_string_obj = NULL; +- int from_tty, to_string; ++ PyObject *release_gil_obj = NULL; ++ 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", ++ "release_gil", NULL }; + char *result = NULL; ++ /* Initialize it just to avoid a GCC false warning. */ ++ PyThreadState *state = NULL; + +- if (! PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!", keywords, &arg, ++ if (! PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!O!", keywords, &arg, + &PyBool_Type, &from_tty_obj, +- &PyBool_Type, &to_string_obj)) ++ &PyBool_Type, &to_string_obj, ++ &PyBool_Type, &release_gil_obj)) + return NULL; + + from_tty = 0; +@@ -648,12 +652,28 @@ execute_gdb_command (PyObject *self, PyO + to_string = cmp; + } + ++ release_gil = 0; ++ if (release_gil_obj) ++ { ++ int cmp = PyObject_IsTrue (release_gil_obj); ++ if (cmp < 0) ++ return NULL; ++ release_gil = cmp; ++ } ++ + TRY_CATCH (except, RETURN_MASK_ALL) + { + /* Copy the argument text in case the command modifies it. */ + char *copy = xstrdup (arg); + struct cleanup *cleanup = make_cleanup (xfree, copy); + ++ /* In the case of long running GDB commands, allow the user to ++ release the Python GIL acquired by Python. Restore the GIL ++ after the command has completed before handing back to ++ Python. */ ++ if (release_gil) ++ state = PyEval_SaveThread(); ++ + make_cleanup_restore_integer (&interpreter_async); + interpreter_async = 0; + +@@ -666,9 +686,21 @@ execute_gdb_command (PyObject *self, PyO + execute_command (copy, from_tty); + } + ++ /* Reacquire the GIL if it was released earlier. */ ++ if (release_gil) ++ PyEval_RestoreThread (state); ++ + do_cleanups (cleanup); + } +- GDB_PY_HANDLE_EXCEPTION (except); ++ if (except.reason < 0) ++ { ++ /* Reacquire the GIL if it was released earlier. */ ++ if (release_gil) ++ PyEval_RestoreThread (state); ++ ++ gdbpy_convert_exception (except); ++ return NULL; ++ } + + /* Do any commands attached to breakpoint we stopped at. */ + 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 +--- gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.c 1970-01-01 01:00:00.000000000 +0100 ++++ gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.c 2014-08-13 22:33:05.052648912 +0200 +@@ -0,0 +1,12 @@ ++#include ++ ++int ++main (void) ++{ ++ int i; ++ for (i = 0; i < 10; i++) ++ { ++ sleep (1); /* break-here */ ++ 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 +--- 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 +@@ -0,0 +1,69 @@ ++# Copyright (C) 2014 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++standard_testfile .c .py ++set executable $testfile ++ ++if { [prepare_for_testing $testfile.exp $executable $srcfile] } { ++ return -1 ++} ++ ++# Skip all tests if Python scripting is not enabled. ++if { [skip_python_tests] } { continue } ++ ++if ![runto_main] { ++ return -1 ++} ++ ++gdb_breakpoint $srcfile:[gdb_get_line_number "break-here"] temporary ++gdb_continue_to_breakpoint "break-here" ".* break-here .*" ++ ++set test "response" ++set timeout 60 ++set sleeping_last -1 ++set hello_last 0 ++set minimal 5 ++gdb_test_multiple "python execfile('$srcdir/$subdir/$srcfile2')" $test { ++ -re "Error: unable to start thread\r\n" { ++ fail $test ++ # Not $gdb_prompt-synced! ++ } ++ -re "Sleeping (\[0-9\]+)\r\n" { ++ set n $expect_out(1,string) ++ if { $sleeping_last + 1 != $n } { ++ fail $test ++ } else { ++ set sleeping_last $n ++ if { $sleeping_last >= $minimal && $hello_last >= $minimal } { ++ pass $test ++ } else { ++ exp_continue ++ } ++ } ++ } ++ -re "Hello \\( (\[0-9\]+) \\)\r\n" { ++ set n $expect_out(1,string) ++ if { $hello_last + 1 != $n } { ++ fail $test ++ } else { ++ set hello_last $n ++ if { $sleeping_last >= $minimal && $hello_last >= $minimal } { ++ pass $test ++ } else { ++ exp_continue ++ } ++ } ++ } ++} +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 +--- 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 +@@ -0,0 +1,22 @@ ++import thread ++import time ++import gdb ++ ++# Define a function for the thread ++def print_thread_hello(): ++ count = 0 ++ while count < 10: ++ time.sleep(1) ++ count += 1 ++ print "Hello (", count, ")" ++ ++# Create a threads a continue ++try: ++ thread.start_new_thread( print_thread_hello, ()) ++ gdb.execute ("continue", release_gil=True) ++ ++except: ++ print "Error: unable to start thread" ++ ++while 1: ++ pass diff --git a/gdb-python3-py_hash_t-32bit.patch b/gdb-python3-py_hash_t-32bit.patch new file mode 100644 index 0000000..cde6650 --- /dev/null +++ b/gdb-python3-py_hash_t-32bit.patch @@ -0,0 +1,175 @@ +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 + + * 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 ++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 ], ++ [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 diff --git a/gdb-python3-testsuite.patch b/gdb-python3-testsuite.patch new file mode 100644 index 0000000..3cb0635 --- /dev/null +++ b/gdb-python3-testsuite.patch @@ -0,0 +1,56 @@ +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 + + 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" { + diff --git a/gdb-readline-6.3.5.patch b/gdb-readline-6.3.5.patch deleted file mode 100644 index 0f987cd..0000000 --- a/gdb-readline-6.3.5.patch +++ /dev/null @@ -1,90 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2014-06/msg00737.html -Subject: [patch] Fix --with-system-readline with readline-6.3 patch 5 - - ---BXVAT5kNtrzKuDFl -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline - -Hi, - -I have filed now: - --with-system-readline uses bundled readline include files - https://sourceware.org/bugzilla/show_bug.cgi?id=17077 - -To see any effect of the patch below you have to do: - rm -rf readline -Otherwise readline include files get used the bundled ones from GDB which are -currently 6.2 while system readline may be 6.3 already. - -You also have to use system readline-6.3 including its upstream patch: - [Bug-readline] Readline-6.3 Official Patch 5 - http://lists.gnu.org/archive/html/bug-readline/2014-04/msg00018.html - Message-ID: <140415125618.AA57598.SM@caleb.ins.cwru.edu> - -In short it happens on Fedora Rawhide since: - readline-6.3-1.fc21 - https://koji.fedoraproject.org/koji/buildinfo?buildID=538941 - -The error is: - https://kojipkgs.fedoraproject.org//work/tasks/9890/7059890/build.log - ../../gdb/tui/tui-io.c:132:1: error: 'Function' is deprecated [-Werror=deprecated-declarations] - static Function *tui_old_rl_getc_function; - ^ - ../../gdb/tui/tui-io.c:133:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations] - static VFunction *tui_old_rl_redisplay_function; - ^ - ../../gdb/tui/tui-io.c:134:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations] - static VFunction *tui_old_rl_prep_terminal; - ^ - ../../gdb/tui/tui-io.c:135:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations] - static VFunction *tui_old_rl_deprep_terminal; - ^ - -It is since bash change: -lib/readline/rltypedefs.h - - remove old Function/VFunction/CPFunction/CPPFunction typedefs as - suggested by Tom Tromey - -The new typedefs used below are present in readline/rltypedefs.h since: - git://git.savannah.gnu.org/bash.git - commit 28ef6c316f1aff914bb95ac09787a3c83c1815fd - Date: Fri Apr 6 19:14:31 2001 +0000 - - -Jan - ---BXVAT5kNtrzKuDFl -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline; filename="tuireadline.patch" - -gdb/ -2014-06-20 Jan Kratochvil - - Fix --with-system-readline with readline-6.3 patch 5. - * tui/tui-io.c (tui_old_rl_getc_function, tui_old_rl_redisplay_function) - (tui_old_rl_prep_terminal, tui_old_rl_deprep_terminal): Use rl_*_t - types. - -diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c -index 761d203..dcccb08 100644 ---- a/gdb/tui/tui-io.c -+++ b/gdb/tui/tui-io.c -@@ -129,10 +129,10 @@ static struct ui_file *tui_old_stderr; - struct ui_out *tui_old_uiout; - - /* Readline previous hooks. */ --static Function *tui_old_rl_getc_function; --static VFunction *tui_old_rl_redisplay_function; --static VFunction *tui_old_rl_prep_terminal; --static VFunction *tui_old_rl_deprep_terminal; -+static rl_getc_func_t *tui_old_rl_getc_function; -+static rl_voidfunc_t *tui_old_rl_redisplay_function; -+static rl_vintfunc_t *tui_old_rl_prep_terminal; -+static rl_voidfunc_t *tui_old_rl_deprep_terminal; - static int tui_old_rl_echoing_p; - - /* Readline output stream. - ---BXVAT5kNtrzKuDFl-- - diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch index 0897484..b02b07f 100644 --- a/gdb-rhbz795424-bitpos-20of25.patch +++ b/gdb-rhbz795424-bitpos-20of25.patch @@ -463,11 +463,11 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-main.patch -Index: gdb-7.7.90.20140613/gdb/ada-lang.c +Index: gdb-7.8.90.20150202/gdb/ada-lang.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/ada-lang.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/ada-lang.c 2014-06-24 16:07:27.245986875 +0200 -@@ -78,7 +78,7 @@ static struct type *desc_bounds_type (st +--- gdb-7.8.90.20150202.orig/gdb/ada-lang.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/ada-lang.c 2015-02-11 16:01:59.586966229 +0100 +@@ -74,7 +74,7 @@ static struct type *desc_bounds_type (st static struct value *desc_bounds (struct value *); @@ -476,7 +476,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c static int fat_pntr_bounds_bitsize (struct type *); -@@ -86,13 +86,13 @@ static struct type *desc_data_target_typ +@@ -82,13 +82,13 @@ static struct type *desc_data_target_typ static struct value *desc_data (struct value *); @@ -492,7 +492,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c static int desc_bound_bitsize (struct type *, int, int); -@@ -172,7 +172,7 @@ static struct type *static_unwrap_type ( +@@ -168,7 +168,7 @@ static struct type *static_unwrap_type ( static struct value *unwrap_value (struct value *); @@ -501,7 +501,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c static struct type *decode_constrained_packed_array_type (struct type *); -@@ -187,7 +187,8 @@ static int ada_is_unconstrained_packed_a +@@ -183,7 +183,8 @@ static int ada_is_unconstrained_packed_a static struct value *value_subscript_packed (struct value *, int, struct value **); @@ -511,7 +511,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c static struct value *coerce_unspec_val_to_type (struct value *, struct type *); -@@ -215,14 +216,14 @@ static struct value *value_val_atr (stru +@@ -211,14 +212,14 @@ static struct value *value_val_atr (stru static struct symbol *standard_lookup (const char *, const struct block *, domain_enum); @@ -530,16 +530,16 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c static struct value *ada_to_fixed_value_create (struct type *, CORE_ADDR, struct value *); -@@ -238,7 +239,7 @@ static void ada_language_arch_info (stru - - static void check_size (const struct type *); +@@ -232,7 +233,7 @@ static int ada_is_direct_array_type (str + static void ada_language_arch_info (struct gdbarch *, + struct language_arch_info *); -static struct value *ada_index_struct_field (int, struct value *, int, +static struct value *ada_index_struct_field (LONGEST, struct value *, LONGEST, struct type *); static struct value *assign_aggregate (struct value *, struct value *, -@@ -694,7 +695,7 @@ coerce_unspec_val_to_type (struct value +@@ -695,7 +696,7 @@ coerce_unspec_val_to_type (struct value } static const gdb_byte * @@ -548,7 +548,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c { if (valaddr == NULL) return NULL; -@@ -703,7 +704,7 @@ cond_offset_host (const gdb_byte *valadd +@@ -704,7 +705,7 @@ cond_offset_host (const gdb_byte *valadd } static CORE_ADDR @@ -557,7 +557,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c { if (address == 0) return 0; -@@ -1711,7 +1712,7 @@ desc_bounds (struct value *arr) +@@ -1712,7 +1713,7 @@ desc_bounds (struct value *arr) /* If TYPE is the type of an array-descriptor (fat pointer), the bit position of the field containing the address of the bounds data. */ @@ -566,7 +566,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c fat_pntr_bounds_bitpos (struct type *type) { return TYPE_FIELD_BITPOS (desc_base_type (type), 1); -@@ -1777,7 +1778,7 @@ desc_data (struct value *arr) +@@ -1778,7 +1779,7 @@ desc_data (struct value *arr) /* If TYPE is the type of an array-descriptor (fat pointer), the bit position of the field containing the address of the data. */ @@ -575,7 +575,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c fat_pntr_data_bitpos (struct type *type) { return TYPE_FIELD_BITPOS (desc_base_type (type), 0); -@@ -1812,7 +1813,7 @@ desc_one_bound (struct value *bounds, in +@@ -1813,7 +1814,7 @@ desc_one_bound (struct value *bounds, in of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper bound, if WHICH is 1. The first bound is I=1. */ @@ -584,7 +584,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c desc_bound_bitpos (struct type *type, int i, int which) { return TYPE_FIELD_BITPOS (desc_base_type (type), 2 * i + which - 2); -@@ -2002,7 +2003,7 @@ ada_type_of_array (struct value *arr, in +@@ -2003,7 +2004,7 @@ ada_type_of_array (struct value *arr, in zero, and does not need to be recomputed. */ if (lo < hi) { @@ -593,8 +593,8 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c (hi - lo + 1) * TYPE_FIELD_BITSIZE (elt_type, 0); TYPE_LENGTH (array_type) = (array_bitsize + 7) / 8; -@@ -2154,7 +2155,7 @@ decode_packed_array_bitsize (struct type - in bits. */ +@@ -2163,7 +2164,7 @@ decode_packed_array_bitsize (struct type + the length is arbitrary. */ static struct type * -constrained_packed_array_type (struct type *type, long *elt_bits) @@ -602,7 +602,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c { struct type *new_elt_type; struct type *new_type; -@@ -2206,7 +2207,7 @@ decode_constrained_packed_array_type (st +@@ -2217,7 +2218,7 @@ decode_constrained_packed_array_type (st char *name; const char *tail; struct type *shadow_type; @@ -611,7 +611,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c if (!raw_name) raw_name = ada_type_name (desc_base_type (type)); -@@ -2277,7 +2278,8 @@ decode_constrained_packed_array (struct +@@ -2288,7 +2289,8 @@ decode_constrained_packed_array (struct array with no wrapper. In order to interpret the value through the (left-justified) packed array type we just built, we must first left-justify it. */ @@ -621,7 +621,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c ULONGEST mod; mod = ada_modulus (value_type (arr)) - 1; -@@ -2378,15 +2380,16 @@ has_negatives (struct type *type) +@@ -2389,15 +2391,16 @@ has_negatives (struct type *type) struct value * ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, @@ -644,7 +644,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c byte of source that are unused */ accumSize; /* Number of meaningful bits in accum */ unsigned char *bytes; /* First byte containing data to unpack */ -@@ -2420,7 +2423,7 @@ ada_value_primitive_packed_val (struct v +@@ -2431,7 +2434,7 @@ ada_value_primitive_packed_val (struct v if (obj != NULL) { @@ -653,7 +653,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c set_value_component_location (v, obj); set_value_bitpos (v, bit_offset + value_bitpos (obj)); -@@ -2536,7 +2539,7 @@ ada_value_primitive_packed_val (struct v +@@ -2547,7 +2550,7 @@ ada_value_primitive_packed_val (struct v not overlap. */ static void move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source, @@ -662,7 +662,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c { unsigned int accum, mask; int accum_bits, chunk_size; -@@ -2626,7 +2629,7 @@ ada_value_assign (struct value *toval, s +@@ -2637,7 +2640,7 @@ ada_value_assign (struct value *toval, s { int len = (value_bitpos (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; @@ -671,7 +671,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c gdb_byte *buffer = alloca (len); struct value *val; CORE_ADDR to_addr = value_address (toval); -@@ -2671,7 +2674,7 @@ value_assign_to_component (struct value +@@ -2682,7 +2685,7 @@ value_assign_to_component (struct value (LONGEST) (value_address (component) - value_address (container)); int bit_offset_in_container = value_bitpos (component) - value_bitpos (container); @@ -680,7 +680,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c val = value_cast (value_type (component), val); -@@ -4196,7 +4199,7 @@ ensure_lval (struct value *val) +@@ -4219,7 +4222,7 @@ ensure_lval (struct value *val) if (VALUE_LVAL (val) == not_lval || VALUE_LVAL (val) == lval_internalvar) { @@ -689,7 +689,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c const CORE_ADDR addr = value_as_long (value_allocate_space_in_inferior (len)); -@@ -4270,7 +4273,7 @@ static CORE_ADDR +@@ -4293,7 +4296,7 @@ static CORE_ADDR value_pointer (struct value *value, struct type *type) { struct gdbarch *gdbarch = get_type_arch (type); @@ -698,7 +698,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c gdb_byte *buf = alloca (len); CORE_ADDR addr; -@@ -6374,7 +6377,7 @@ value_tag_from_contents_and_address (str +@@ -6436,7 +6439,7 @@ value_tag_from_contents_and_address (str const gdb_byte *valaddr, CORE_ADDR address) { @@ -707,7 +707,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c struct type *tag_type; if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, -@@ -6839,7 +6842,7 @@ ada_in_variant (LONGEST val, struct type +@@ -6901,7 +6904,7 @@ ada_in_variant (LONGEST val, struct type only in that it can handle packed values of arbitrary type. */ static struct value * @@ -716,7 +716,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c struct type *arg_type) { struct type *type; -@@ -6851,7 +6854,7 @@ ada_value_primitive_field (struct value +@@ -6913,7 +6916,7 @@ ada_value_primitive_field (struct value if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) { @@ -725,7 +725,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); return ada_value_primitive_packed_val (arg1, value_contents (arg1), -@@ -6878,9 +6881,9 @@ ada_value_primitive_field (struct value +@@ -6940,9 +6943,9 @@ ada_value_primitive_field (struct value Returns 1 if found, 0 otherwise. */ static int @@ -737,7 +737,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c int *index_p) { int i; -@@ -6898,8 +6901,8 @@ find_struct_field (const char *name, str +@@ -6960,8 +6963,8 @@ find_struct_field (const char *name, str for (i = 0; i < TYPE_NFIELDS (type); i += 1) { @@ -748,7 +748,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c const char *t_field_name = TYPE_FIELD_NAME (type, i); if (t_field_name == NULL) -@@ -6969,7 +6972,7 @@ num_visible_fields (struct type *type) +@@ -7031,7 +7034,7 @@ num_visible_fields (struct type *type) Searches recursively through wrapper fields (e.g., '_parent'). */ static struct value * @@ -757,7 +757,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c struct type *type) { int i; -@@ -7002,7 +7005,7 @@ ada_search_struct_field (char *name, str +@@ -7064,7 +7067,7 @@ ada_search_struct_field (char *name, str int j; struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -766,7 +766,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) { -@@ -7020,8 +7023,8 @@ ada_search_struct_field (char *name, str +@@ -7082,8 +7085,8 @@ ada_search_struct_field (char *name, str return NULL; } @@ -777,7 +777,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c /* Return field #INDEX in ARG, where the index is that returned by -@@ -7030,7 +7033,7 @@ static struct value *ada_index_struct_fi +@@ -7092,7 +7095,7 @@ static struct value *ada_index_struct_fi * If found, return value, else return NULL. */ static struct value * @@ -786,7 +786,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c struct type *type) { return ada_index_struct_field_1 (&index, arg, offset, type); -@@ -7042,7 +7045,7 @@ ada_index_struct_field (int index, struc +@@ -7104,7 +7107,7 @@ ada_index_struct_field (int index, struc * *INDEX_P. */ static struct value * @@ -795,7 +795,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c struct type *type) { int i; -@@ -7132,7 +7135,8 @@ ada_value_struct_elt (struct value *arg, +@@ -7194,7 +7197,8 @@ ada_value_struct_elt (struct value *arg, v = ada_search_struct_field (name, arg, 0, t); else { @@ -805,7 +805,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c struct type *field_type; CORE_ADDR address; -@@ -7449,8 +7453,8 @@ ada_coerce_ref (struct value *val0) +@@ -7511,8 +7515,8 @@ ada_coerce_ref (struct value *val0) /* Return OFF rounded upward if necessary to a multiple of ALIGNMENT (a power of 2). */ @@ -816,7 +816,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c { return (off + alignment - 1) & ~(alignment - 1); } -@@ -7832,10 +7836,9 @@ ada_template_to_fixed_record_type_1 (str +@@ -7894,10 +7898,9 @@ ada_template_to_fixed_record_type_1 (str struct value *mark = value_mark (); struct value *dval; struct type *rtype; @@ -829,7 +829,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c int f; /* Compute the number of fields in this record type that are going -@@ -7913,7 +7916,7 @@ ada_template_to_fixed_record_type_1 (str +@@ -7975,7 +7978,7 @@ ada_template_to_fixed_record_type_1 (str that follow this one. */ if (ada_is_aligner_type (field_type)) { @@ -838,7 +838,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c field_valaddr = cond_offset_host (field_valaddr, field_offset); field_address = cond_offset_target (field_address, field_offset); -@@ -8049,11 +8052,11 @@ ada_template_to_fixed_record_type_1 (str +@@ -8111,11 +8114,11 @@ ada_template_to_fixed_record_type_1 (str if (TYPE_LENGTH (type) <= 0) { if (TYPE_NAME (rtype)) @@ -854,7 +854,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c } else { -@@ -8393,7 +8396,8 @@ to_fixed_array_type (struct type *type0, +@@ -8539,7 +8542,8 @@ to_fixed_array_type (struct type *type0, type was a regular (non-packed) array type. As a result, the bitsize of the array elements needs to be set again, and the array length needs to be recomputed based on that bitsize. */ @@ -864,11 +864,11 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.c int elt_bitsize = TYPE_FIELD_BITSIZE (type0, 0); TYPE_FIELD_BITSIZE (result, 0) = TYPE_FIELD_BITSIZE (type0, 0); -Index: gdb-7.7.90.20140613/gdb/ada-lang.h +Index: gdb-7.8.90.20150202/gdb/ada-lang.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/ada-lang.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/ada-lang.h 2014-06-24 16:07:27.245986875 +0200 -@@ -181,7 +181,7 @@ extern void ada_print_type (struct type +--- gdb-7.8.90.20150202.orig/gdb/ada-lang.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/ada-lang.h 2015-02-11 16:01:59.586966229 +0100 +@@ -179,7 +179,7 @@ extern void ada_print_type (struct type extern void ada_print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream); @@ -877,7 +877,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -@@ -196,7 +196,7 @@ extern void ada_emit_char (int, struct t +@@ -194,7 +194,7 @@ extern void ada_emit_char (int, struct t extern void ada_printchar (int, struct type *, struct ui_file *); extern void ada_printstr (struct ui_file *, struct type *, const gdb_byte *, @@ -886,7 +886,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.h const struct value_print_options *); struct value *ada_convert_actual (struct value *actual, -@@ -267,7 +267,7 @@ extern int ada_is_constrained_packed_arr +@@ -265,7 +265,7 @@ extern int ada_is_constrained_packed_arr extern struct value *ada_value_primitive_packed_val (struct value *, const gdb_byte *, @@ -895,11 +895,11 @@ Index: gdb-7.7.90.20140613/gdb/ada-lang.h struct type *); extern struct type *ada_coerce_to_simple_array_type (struct type *); -Index: gdb-7.7.90.20140613/gdb/ada-typeprint.c +Index: gdb-7.8.90.20150202/gdb/ada-typeprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/ada-typeprint.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/ada-typeprint.c 2014-06-24 16:07:27.245986875 +0200 -@@ -865,8 +865,8 @@ ada_print_type (struct type *type0, cons +--- gdb-7.8.90.20150202.orig/gdb/ada-typeprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/ada-typeprint.c 2015-02-11 16:01:59.587966234 +0100 +@@ -883,8 +883,8 @@ ada_print_type (struct type *type0, cons const char *name = ada_type_name (type); if (!ada_is_range_type_name (name)) @@ -910,7 +910,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-typeprint.c else { fprintf_filtered (stream, "range "); -@@ -887,7 +887,8 @@ ada_print_type (struct type *type0, cons +@@ -905,7 +905,8 @@ ada_print_type (struct type *type0, cons } break; case TYPE_CODE_FLT: @@ -920,11 +920,11 @@ Index: gdb-7.7.90.20140613/gdb/ada-typeprint.c break; case TYPE_CODE_ENUM: if (show < 0) -Index: gdb-7.7.90.20140613/gdb/ada-valprint.c +Index: gdb-7.8.90.20150202/gdb/ada-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/ada-valprint.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/ada-valprint.c 2014-06-24 16:07:27.246986876 +0200 -@@ -35,11 +35,11 @@ +--- gdb-7.8.90.20150202.orig/gdb/ada-valprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/ada-valprint.c 2015-02-11 16:01:59.587966234 +0100 +@@ -33,11 +33,11 @@ #include "objfiles.h" static int print_field_values (struct type *, const gdb_byte *, @@ -938,7 +938,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c const struct language_defn *); -@@ -131,7 +131,7 @@ val_print_packed_array_elements (struct +@@ -129,7 +129,7 @@ val_print_packed_array_elements (struct unsigned int things_printed = 0; unsigned len; struct type *elttype, *index_type; @@ -947,7 +947,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0); struct value *mark = value_mark (); LONGEST low = 0; -@@ -280,7 +280,7 @@ ada_emit_char (int c, struct type *type, +@@ -278,7 +278,7 @@ ada_emit_char (int c, struct type *type, of a character. */ static int @@ -956,7 +956,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c enum bfd_endian byte_order) { if (type_len == 1) -@@ -442,11 +442,11 @@ ada_print_scalar (struct type *type, LON +@@ -440,11 +440,11 @@ ada_print_scalar (struct type *type, LON static void printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, @@ -970,7 +970,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; -@@ -461,9 +461,9 @@ printstr (struct ui_file *stream, struct +@@ -459,9 +459,9 @@ printstr (struct ui_file *stream, struct { /* Position of the character we are examining to see whether it is repeated. */ @@ -982,7 +982,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c QUIT; -@@ -494,7 +494,8 @@ printstr (struct ui_file *stream, struct +@@ -492,7 +492,8 @@ printstr (struct ui_file *stream, struct ada_emit_char (char_at (string, i, type_len, byte_order), elttype, stream, '\'', type_len); fputs_filtered ("'", stream); @@ -992,7 +992,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -@@ -522,7 +523,7 @@ printstr (struct ui_file *stream, struct +@@ -520,7 +521,7 @@ printstr (struct ui_file *stream, struct void ada_printstr (struct ui_file *stream, struct type *type, @@ -1001,7 +1001,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -532,12 +533,12 @@ ada_printstr (struct ui_file *stream, st +@@ -530,12 +531,12 @@ ada_printstr (struct ui_file *stream, st static int print_variant_part (struct type *type, int field_num, @@ -1016,7 +1016,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c const struct language_defn *language) { struct type *var_type = TYPE_FIELD_TYPE (type, field_num); -@@ -573,11 +574,11 @@ print_variant_part (struct type *type, i +@@ -571,11 +572,11 @@ print_variant_part (struct type *type, i static int print_field_values (struct type *type, const gdb_byte *valaddr, @@ -1030,7 +1030,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c const struct language_defn *language) { int i, len; -@@ -644,7 +645,7 @@ print_field_values (struct type *type, c +@@ -642,7 +643,7 @@ print_field_values (struct type *type, c } else { @@ -1039,7 +1039,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c int bit_size = TYPE_FIELD_BITSIZE (type, i); struct value_print_options opts; -@@ -690,8 +691,8 @@ ada_val_print_string (struct type *type, +@@ -688,8 +689,8 @@ ada_val_print_string (struct type *type, { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); struct type *elttype = TYPE_TARGET_TYPE (type); @@ -1050,7 +1050,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c /* We know that ELTTYPE cannot possibly be null, because we assume that we're called only when TYPE is a string-like type. -@@ -710,7 +711,7 @@ ada_val_print_string (struct type *type, +@@ -708,7 +709,7 @@ ada_val_print_string (struct type *type, elements up to it. */ if (options->stop_print_at_null) { @@ -1059,7 +1059,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c /* Look for a NULL char. */ for (temp_len = 0; -@@ -1069,7 +1070,7 @@ ada_val_print_ref (struct type *type, co +@@ -1073,7 +1074,7 @@ ada_val_print_ref (struct type *type, co static void ada_val_print_1 (struct type *type, const gdb_byte *valaddr, @@ -1068,7 +1068,7 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, -@@ -1150,7 +1151,7 @@ ada_val_print_1 (struct type *type, cons +@@ -1154,7 +1155,7 @@ ada_val_print_1 (struct type *type, cons void ada_val_print (struct type *type, const gdb_byte *valaddr, @@ -1077,11 +1077,11 @@ Index: gdb-7.7.90.20140613/gdb/ada-valprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.7.90.20140613/gdb/annotate.c +Index: gdb-7.8.90.20150202/gdb/annotate.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/annotate.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/annotate.c 2014-06-24 16:07:27.246986876 +0200 -@@ -524,21 +524,21 @@ annotate_frame_end (void) +--- gdb-7.8.90.20150202.orig/gdb/annotate.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/annotate.c 2015-02-11 16:01:59.588966239 +0100 +@@ -542,21 +542,21 @@ annotate_frame_end (void) } void @@ -1107,10 +1107,10 @@ Index: gdb-7.7.90.20140613/gdb/annotate.c } void -Index: gdb-7.7.90.20140613/gdb/annotate.h +Index: gdb-7.8.90.20150202/gdb/annotate.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/annotate.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/annotate.h 2014-06-24 16:07:27.246986876 +0200 +--- gdb-7.8.90.20150202.orig/gdb/annotate.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/annotate.h 2015-02-11 16:01:59.588966239 +0100 @@ -92,8 +92,8 @@ extern void annotate_frame_source_end (v extern void annotate_frame_where (void); extern void annotate_frame_end (void); @@ -1122,11 +1122,11 @@ Index: gdb-7.7.90.20140613/gdb/annotate.h extern void annotate_elt_rep_end (void); extern void annotate_elt (void); extern void annotate_array_section_end (void); -Index: gdb-7.7.90.20140613/gdb/arm-linux-nat.c +Index: gdb-7.8.90.20150202/gdb/arm-linux-nat.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/arm-linux-nat.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/arm-linux-nat.c 2014-06-24 16:07:27.246986876 +0200 -@@ -1187,7 +1187,7 @@ arm_linux_remove_hw_breakpoint (struct t +--- gdb-7.8.90.20150202.orig/gdb/arm-linux-nat.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/arm-linux-nat.c 2015-02-11 16:01:59.588966239 +0100 +@@ -1186,7 +1186,7 @@ arm_linux_remove_hw_breakpoint (struct t ADDR? */ static int arm_linux_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -1135,11 +1135,11 @@ Index: gdb-7.7.90.20140613/gdb/arm-linux-nat.c { const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap (); CORE_ADDR max_wp_length, aligned_addr; -Index: gdb-7.7.90.20140613/gdb/ax-gdb.c +Index: gdb-7.8.90.20150202/gdb/ax-gdb.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/ax-gdb.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/ax-gdb.c 2014-06-24 16:07:27.247986877 +0200 -@@ -83,12 +83,12 @@ static void gen_traced_pop (struct gdbar +--- gdb-7.8.90.20150202.orig/gdb/ax-gdb.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/ax-gdb.c 2015-02-11 16:01:59.589966244 +0100 +@@ -82,12 +82,12 @@ static void gen_traced_pop (struct gdbar static void gen_sign_extend (struct agent_expr *, struct type *); static void gen_extend (struct agent_expr *, struct type *); static void gen_fetch (struct agent_expr *, struct type *); @@ -1154,7 +1154,7 @@ Index: gdb-7.7.90.20140613/gdb/ax-gdb.c static void gen_sym_offset (struct agent_expr *, struct symbol *); static void gen_var_ref (struct gdbarch *, struct agent_expr *ax, struct axs_value *value, struct symbol *var); -@@ -136,15 +136,16 @@ static void gen_deref (struct agent_expr +@@ -135,15 +135,16 @@ static void gen_deref (struct agent_expr static void gen_address_of (struct agent_expr *, struct axs_value *); static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1174,7 +1174,7 @@ Index: gdb-7.7.90.20140613/gdb/ax-gdb.c struct type *type); static void gen_struct_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, -@@ -539,7 +540,7 @@ gen_fetch (struct agent_expr *ax, struct +@@ -538,7 +539,7 @@ gen_fetch (struct agent_expr *ax, struct right shift it by -DISTANCE bits if DISTANCE < 0. This generates unsigned (logical) right shifts. */ static void @@ -1183,7 +1183,7 @@ Index: gdb-7.7.90.20140613/gdb/ax-gdb.c { if (distance > 0) { -@@ -593,7 +594,7 @@ gen_frame_locals_address (struct gdbarch +@@ -592,7 +593,7 @@ gen_frame_locals_address (struct gdbarch programming in ML, it would be clearer why these are the same thing. */ static void @@ -1192,7 +1192,7 @@ Index: gdb-7.7.90.20140613/gdb/ax-gdb.c { /* It would suffice to simply push the offset and add it, but this makes it easier to read positive and negative offsets in the -@@ -1249,7 +1250,7 @@ gen_address_of (struct agent_expr *ax, s +@@ -1248,7 +1249,7 @@ gen_address_of (struct agent_expr *ax, s static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, struct type *type, @@ -1201,7 +1201,7 @@ Index: gdb-7.7.90.20140613/gdb/ax-gdb.c { /* Note that ops[i] fetches 8 << i bits. */ static enum agent_op ops[] -@@ -1284,13 +1285,13 @@ gen_bitfield_ref (struct expression *exp +@@ -1283,13 +1284,13 @@ gen_bitfield_ref (struct expression *exp /* The first and one-after-last bits in the field, but rounded down and up to byte boundaries. */ @@ -1220,7 +1220,7 @@ Index: gdb-7.7.90.20140613/gdb/ax-gdb.c /* The index in ops of the opcode we're considering. */ int op; -@@ -1409,7 +1410,7 @@ gen_bitfield_ref (struct expression *exp +@@ -1408,7 +1409,7 @@ gen_bitfield_ref (struct expression *exp static void gen_primitive_field (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1229,7 +1229,7 @@ Index: gdb-7.7.90.20140613/gdb/ax-gdb.c { /* Is this a bitfield? */ if (TYPE_FIELD_PACKED (type, fieldno)) -@@ -1434,7 +1435,7 @@ gen_primitive_field (struct expression * +@@ -1433,7 +1434,7 @@ gen_primitive_field (struct expression * static int gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1238,11 +1238,11 @@ Index: gdb-7.7.90.20140613/gdb/ax-gdb.c { int i, rslt; int nbases = TYPE_N_BASECLASSES (type); -Index: gdb-7.7.90.20140613/gdb/ax-general.c +Index: gdb-7.8.90.20150202/gdb/ax-general.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/ax-general.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/ax-general.c 2014-06-24 16:07:27.247986877 +0200 -@@ -195,7 +195,7 @@ ax_zero_ext (struct agent_expr *x, int n +--- gdb-7.8.90.20150202.orig/gdb/ax-general.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/ax-general.c 2015-02-11 16:01:59.589966244 +0100 +@@ -193,7 +193,7 @@ ax_zero_ext (struct agent_expr *x, int n /* Append a trace_quick instruction to EXPR, to record N bytes. */ void @@ -1251,10 +1251,10 @@ Index: gdb-7.7.90.20140613/gdb/ax-general.c { /* N must fit in a byte. */ if (n < 0 || n > 255) -Index: gdb-7.7.90.20140613/gdb/ax.h +Index: gdb-7.8.90.20150202/gdb/ax.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/ax.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/ax.h 2014-06-24 16:07:27.247986877 +0200 +--- gdb-7.8.90.20150202.orig/gdb/ax.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/ax.h 2015-02-11 16:01:59.590966249 +0100 @@ -207,7 +207,7 @@ extern void ax_ext (struct agent_expr *E extern void ax_zero_ext (struct agent_expr *EXPR, int N); @@ -1264,11 +1264,23 @@ Index: gdb-7.7.90.20140613/gdb/ax.h /* Append a goto op to EXPR. OP is the actual op (must be aop_goto or aop_if_goto). We assume we don't know the target offset yet, -Index: gdb-7.7.90.20140613/gdb/breakpoint.c +Index: gdb-7.8.90.20150202/gdb/breakpoint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/breakpoint.c 2014-06-24 16:07:27.070986681 +0200 -+++ gdb-7.7.90.20140613/gdb/breakpoint.c 2014-06-24 16:07:27.249986879 +0200 -@@ -6930,7 +6930,7 @@ breakpoint_address_match (struct address +--- gdb-7.8.90.20150202.orig/gdb/breakpoint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/breakpoint.c 2015-02-11 16:01:59.593966264 +0100 +@@ -2191,9 +2191,9 @@ should_be_inserted (struct bp_location * + { + fprintf_unfiltered (gdb_stdlog, + "infrun: stepping past non-steppable watchpoint. " +- "skipping watchpoint at %s:%d\n", ++ "skipping watchpoint at %s:%s\n", + paddress (bl->gdbarch, bl->address), +- bl->length); ++ plongest (bl->length)); + } + return 0; + } +@@ -6976,7 +6976,7 @@ breakpoint_address_match (struct address static int breakpoint_address_match_range (struct address_space *aspace1, CORE_ADDR addr1, @@ -1277,7 +1289,7 @@ Index: gdb-7.7.90.20140613/gdb/breakpoint.c CORE_ADDR addr2) { return ((gdbarch_has_global_breakpoints (target_gdbarch ()) -@@ -11542,7 +11542,7 @@ can_use_hardware_watchpoint (struct valu +@@ -11700,7 +11700,7 @@ can_use_hardware_watchpoint (struct valu && TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) { CORE_ADDR vaddr = value_address (v); @@ -1286,11 +1298,11 @@ Index: gdb-7.7.90.20140613/gdb/breakpoint.c int num_regs; len = (target_exact_watchpoints -Index: gdb-7.7.90.20140613/gdb/breakpoint.h +Index: gdb-7.8.90.20150202/gdb/breakpoint.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/breakpoint.h 2014-06-24 16:07:27.036986643 +0200 -+++ gdb-7.7.90.20140613/gdb/breakpoint.h 2014-06-24 16:07:27.250986881 +0200 -@@ -244,7 +244,7 @@ struct bp_target_info +--- gdb-7.8.90.20150202.orig/gdb/breakpoint.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/breakpoint.h 2015-02-11 16:01:59.594966269 +0100 +@@ -236,7 +236,7 @@ struct bp_target_info /* If this is a ranged breakpoint, then this field contains the length of the range that will be watched for execution. */ @@ -1299,7 +1311,7 @@ Index: gdb-7.7.90.20140613/gdb/breakpoint.h /* If the breakpoint lives in memory and reading that memory would give back the breakpoint, instead of the original contents, then -@@ -413,7 +413,7 @@ struct bp_location +@@ -412,7 +412,7 @@ struct bp_location /* For hardware watchpoints, the size of the memory region being watched. For hardware ranged breakpoints, the size of the breakpoint range. */ @@ -1308,11 +1320,11 @@ Index: gdb-7.7.90.20140613/gdb/breakpoint.h /* Type of hardware watchpoint. */ enum target_hw_bp_type watchpoint_type; -Index: gdb-7.7.90.20140613/gdb/c-lang.c +Index: gdb-7.8.90.20150202/gdb/c-lang.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/c-lang.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/c-lang.c 2014-06-24 16:07:27.250986881 +0200 -@@ -190,7 +190,7 @@ c_printchar (int c, struct type *type, s +--- gdb-7.8.90.20150202.orig/gdb/c-lang.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/c-lang.c 2015-02-11 16:01:59.594966269 +0100 +@@ -187,7 +187,7 @@ c_printchar (int c, struct type *type, s void c_printstr (struct ui_file *stream, struct type *type, @@ -1321,7 +1333,7 @@ Index: gdb-7.7.90.20140613/gdb/c-lang.c const char *user_encoding, int force_ellipses, const struct value_print_options *options) { -@@ -679,7 +679,7 @@ evaluate_subexp_c (struct type *expect_t +@@ -676,7 +676,7 @@ evaluate_subexp_c (struct type *expect_t } else { @@ -1330,7 +1342,7 @@ Index: gdb-7.7.90.20140613/gdb/c-lang.c /* Write the terminating character. */ for (i = 0; i < TYPE_LENGTH (type); ++i) -@@ -688,7 +688,7 @@ evaluate_subexp_c (struct type *expect_t +@@ -685,7 +685,7 @@ evaluate_subexp_c (struct type *expect_t if (satisfy_expected) { LONGEST low_bound, high_bound; @@ -1339,10 +1351,10 @@ Index: gdb-7.7.90.20140613/gdb/c-lang.c if (get_discrete_bounds (TYPE_INDEX_TYPE (expect_type), &low_bound, &high_bound) < 0) -Index: gdb-7.7.90.20140613/gdb/c-lang.h +Index: gdb-7.8.90.20150202/gdb/c-lang.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/c-lang.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/c-lang.h 2014-06-24 16:07:27.250986881 +0200 +--- gdb-7.8.90.20150202.orig/gdb/c-lang.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/c-lang.h 2015-02-11 16:01:59.595966274 +0100 @@ -74,7 +74,7 @@ extern void c_print_typedef (struct type struct ui_file *); @@ -1378,11 +1390,11 @@ Index: gdb-7.7.90.20140613/gdb/c-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *, -Index: gdb-7.7.90.20140613/gdb/c-valprint.c +Index: gdb-7.8.90.20150202/gdb/c-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/c-valprint.c 2014-06-24 16:07:26.285985810 +0200 -+++ gdb-7.7.90.20140613/gdb/c-valprint.c 2014-06-24 16:07:27.250986881 +0200 -@@ -133,7 +133,7 @@ static const struct generic_val_print_de +--- gdb-7.8.90.20150202.orig/gdb/c-valprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/c-valprint.c 2015-02-11 16:01:59.595966274 +0100 +@@ -132,7 +132,7 @@ static const struct generic_val_print_de void c_val_print (struct type *type, const gdb_byte *valaddr, @@ -1391,7 +1403,7 @@ Index: gdb-7.7.90.20140613/gdb/c-valprint.c struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options) -@@ -144,7 +144,7 @@ c_val_print (struct type *type, const gd +@@ -143,7 +143,7 @@ c_val_print (struct type *type, const gd unsigned len; struct type *elttype, *unresolved_elttype; struct type *unresolved_type = type; @@ -1400,7 +1412,7 @@ Index: gdb-7.7.90.20140613/gdb/c-valprint.c CORE_ADDR addr; CHECK_TYPEDEF (type); -@@ -380,9 +380,9 @@ c_val_print (struct type *type, const gd +@@ -379,9 +379,9 @@ c_val_print (struct type *type, const gd /* Print vtable entry - we only get here if NOT using -fvtable_thunks. (Otherwise, look under TYPE_CODE_PTR.) */ @@ -1413,7 +1425,7 @@ Index: gdb-7.7.90.20140613/gdb/c-valprint.c struct type *field_type = TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET); CORE_ADDR addr -@@ -461,7 +461,8 @@ c_value_print (struct value *val, struct +@@ -460,7 +460,8 @@ c_value_print (struct value *val, struct const struct value_print_options *options) { struct type *type, *real_type, *val_type; @@ -1423,11 +1435,11 @@ Index: gdb-7.7.90.20140613/gdb/c-valprint.c struct value_print_options opts = *options; opts.deref_ref = 1; -Index: gdb-7.7.90.20140613/gdb/cp-abi.c +Index: gdb-7.8.90.20150202/gdb/cp-abi.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/cp-abi.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/cp-abi.c 2014-06-24 16:07:27.250986881 +0200 -@@ -68,13 +68,13 @@ is_operator_name (const char *name) +--- gdb-7.8.90.20150202.orig/gdb/cp-abi.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/cp-abi.c 2015-02-11 16:01:59.595966274 +0100 +@@ -64,13 +64,13 @@ is_operator_name (const char *name) return (*current_cp_abi.is_operator_name) (name); } @@ -1444,7 +1456,7 @@ Index: gdb-7.7.90.20140613/gdb/cp-abi.c gdb_assert (current_cp_abi.baseclass_offset != NULL); -@@ -98,7 +98,7 @@ baseclass_offset (struct type *type, int +@@ -94,7 +94,7 @@ baseclass_offset (struct type *type, int struct value * value_virtual_fn_field (struct value **arg1p, struct fn_field *f, int j, @@ -1453,7 +1465,7 @@ Index: gdb-7.7.90.20140613/gdb/cp-abi.c { if ((current_cp_abi.virtual_fn_field) == NULL) return NULL; -@@ -108,7 +108,7 @@ value_virtual_fn_field (struct value **a +@@ -104,7 +104,7 @@ value_virtual_fn_field (struct value **a struct type * value_rtti_type (struct value *v, int *full, @@ -1462,10 +1474,10 @@ Index: gdb-7.7.90.20140613/gdb/cp-abi.c { struct type *ret = NULL; volatile struct gdb_exception e; -Index: gdb-7.7.90.20140613/gdb/cp-abi.h +Index: gdb-7.8.90.20150202/gdb/cp-abi.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/cp-abi.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/cp-abi.h 2014-06-24 16:07:27.251986882 +0200 +--- gdb-7.8.90.20150202.orig/gdb/cp-abi.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/cp-abi.h 2015-02-11 16:01:59.595966274 +0100 @@ -108,7 +108,7 @@ extern struct value *value_virtual_fn_fi struct fn_field *f, int j, @@ -1520,11 +1532,11 @@ Index: gdb-7.7.90.20140613/gdb/cp-abi.h void (*print_method_ptr) (const gdb_byte *contents, struct type *type, struct ui_file *stream); -Index: gdb-7.7.90.20140613/gdb/cp-valprint.c +Index: gdb-7.8.90.20150202/gdb/cp-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/cp-valprint.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/cp-valprint.c 2014-06-24 16:07:27.251986882 +0200 -@@ -82,7 +82,7 @@ static void cp_print_static_field (struc +--- gdb-7.8.90.20150202.orig/gdb/cp-valprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/cp-valprint.c 2015-02-11 16:01:59.596966279 +0100 +@@ -80,7 +80,7 @@ static void cp_print_static_field (struc const struct value_print_options *); static void cp_print_value (struct type *, struct type *, @@ -1533,7 +1545,7 @@ Index: gdb-7.7.90.20140613/gdb/cp-valprint.c CORE_ADDR, struct ui_file *, int, const struct value *, const struct value_print_options *, -@@ -156,7 +156,7 @@ cp_is_vtbl_member (struct type *type) +@@ -154,7 +154,7 @@ cp_is_vtbl_member (struct type *type) void cp_print_value_fields (struct type *type, struct type *real_type, @@ -1542,7 +1554,7 @@ Index: gdb-7.7.90.20140613/gdb/cp-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -339,7 +339,7 @@ cp_print_value_fields (struct type *type +@@ -331,7 +331,7 @@ cp_print_value_fields (struct type *type } else if (i == vptr_fieldno && type == vptr_basetype) { @@ -1551,7 +1563,7 @@ Index: gdb-7.7.90.20140613/gdb/cp-valprint.c struct type *i_type = TYPE_FIELD_TYPE (type, i); if (valprint_check_validity (stream, i_type, i_offset, val)) -@@ -422,7 +422,7 @@ cp_print_value_fields (struct type *type +@@ -414,7 +414,7 @@ cp_print_value_fields (struct type *type void cp_print_value_fields_rtti (struct type *type, @@ -1560,8 +1572,8 @@ Index: gdb-7.7.90.20140613/gdb/cp-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -438,7 +438,8 @@ cp_print_value_fields_rtti (struct type - TARGET_CHAR_BIT * TYPE_LENGTH (type))) +@@ -431,7 +431,8 @@ cp_print_value_fields_rtti (struct type + TARGET_CHAR_BIT * TYPE_LENGTH (type))) { struct value *value; - int full, top, using_enc; @@ -1570,7 +1582,7 @@ Index: gdb-7.7.90.20140613/gdb/cp-valprint.c /* Ugh, we have to convert back to a value here. */ value = value_from_contents_and_address (type, valaddr + offset, -@@ -463,7 +464,7 @@ cp_print_value_fields_rtti (struct type +@@ -456,7 +457,7 @@ cp_print_value_fields_rtti (struct type static void cp_print_value (struct type *type, struct type *real_type, @@ -1579,7 +1591,7 @@ Index: gdb-7.7.90.20140613/gdb/cp-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -473,7 +474,7 @@ cp_print_value (struct type *type, struc +@@ -466,7 +467,7 @@ cp_print_value (struct type *type, struc = (struct type **) obstack_next_free (&dont_print_vb_obstack); struct obstack tmp_obstack = dont_print_vb_obstack; int i, n_baseclasses = TYPE_N_BASECLASSES (type); @@ -1588,7 +1600,7 @@ Index: gdb-7.7.90.20140613/gdb/cp-valprint.c struct type *thistype; if (dont_print_vb == 0) -@@ -487,7 +488,7 @@ cp_print_value (struct type *type, struc +@@ -480,7 +481,7 @@ cp_print_value (struct type *type, struc for (i = 0; i < n_baseclasses; i++) { @@ -1597,11 +1609,11 @@ Index: gdb-7.7.90.20140613/gdb/cp-valprint.c int skip; struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); const char *basename = TYPE_NAME (baseclass); -Index: gdb-7.7.90.20140613/gdb/d-lang.h +Index: gdb-7.8.90.20150202/gdb/d-lang.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/d-lang.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/d-lang.h 2014-06-24 16:07:27.251986882 +0200 -@@ -69,7 +69,7 @@ extern const char *d_parse_symbol (struc +--- gdb-7.8.90.20150202.orig/gdb/d-lang.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/d-lang.h 2015-02-11 16:01:59.596966279 +0100 +@@ -71,7 +71,7 @@ extern const struct builtin_d_type *buil /* Defined in d-valprint.c */ extern void d_val_print (struct type *type, const gdb_byte *valaddr, @@ -1610,10 +1622,10 @@ Index: gdb-7.7.90.20140613/gdb/d-lang.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.7.90.20140613/gdb/d-valprint.c +Index: gdb-7.8.90.20150202/gdb/d-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/d-valprint.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/d-valprint.c 2014-06-24 16:07:27.251986882 +0200 +--- gdb-7.8.90.20150202.orig/gdb/d-valprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/d-valprint.c 2015-02-11 16:01:59.596966279 +0100 @@ -29,7 +29,7 @@ static int @@ -1623,7 +1635,7 @@ Index: gdb-7.7.90.20140613/gdb/d-valprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -@@ -72,9 +72,9 @@ dynamic_array_type (struct type *type, c +@@ -73,9 +73,9 @@ dynamic_array_type (struct type *type, c /* Implements the la_val_print routine for language D. */ void @@ -1636,11 +1648,11 @@ Index: gdb-7.7.90.20140613/gdb/d-valprint.c const struct value_print_options *options) { int ret; -Index: gdb-7.7.90.20140613/gdb/doublest.c +Index: gdb-7.8.90.20150202/gdb/doublest.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/doublest.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/doublest.c 2014-06-24 16:07:27.251986882 +0200 -@@ -767,7 +767,7 @@ floatformat_from_doublest (const struct +--- gdb-7.8.90.20150202.orig/gdb/doublest.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/doublest.c 2015-02-11 16:01:59.597966284 +0100 +@@ -765,7 +765,7 @@ floatformat_from_doublest (const struct but not passed on by GDB. This should be fixed. */ static const struct floatformat * @@ -1649,7 +1661,7 @@ Index: gdb-7.7.90.20140613/gdb/doublest.c { const struct floatformat *format; -@@ -795,8 +795,8 @@ floatformat_from_length (struct gdbarch +@@ -793,8 +793,8 @@ floatformat_from_length (struct gdbarch else format = NULL; if (format == NULL) @@ -1660,11 +1672,11 @@ Index: gdb-7.7.90.20140613/gdb/doublest.c return format; } -Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c +Index: gdb-7.8.90.20150202/gdb/dwarf2loc.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/dwarf2loc.c 2014-06-24 16:07:26.387985923 +0200 -+++ gdb-7.7.90.20140613/gdb/dwarf2loc.c 2014-06-24 16:07:27.252986883 +0200 -@@ -1572,19 +1572,19 @@ insert_bits (unsigned int datum, +--- gdb-7.8.90.20150202.orig/gdb/dwarf2loc.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/dwarf2loc.c 2015-02-11 16:01:59.598966289 +0100 +@@ -1557,19 +1557,19 @@ insert_bits (unsigned int datum, BITS_BIG_ENDIAN is taken directly from gdbarch. */ static void @@ -1690,7 +1702,7 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c dest_avail = 8 - dest_offset_bits % 8; -@@ -1622,13 +1622,13 @@ static void +@@ -1607,13 +1607,13 @@ static void read_pieced_value (struct value *v) { int i; @@ -1706,7 +1718,7 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c size_t buffer_size = 0; gdb_byte *buffer = NULL; struct cleanup *cleanup; -@@ -1655,8 +1655,8 @@ read_pieced_value (struct value *v) +@@ -1640,8 +1640,8 @@ read_pieced_value (struct value *v) for (i = 0; i < c->n_pieces && offset < type_len; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1717,7 +1729,7 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c const gdb_byte *intermediate_buffer; /* Compute size, source, and destination offsets for copying, in -@@ -1805,13 +1805,13 @@ static void +@@ -1790,13 +1790,13 @@ static void write_pieced_value (struct value *to, struct value *from) { int i; @@ -1733,7 +1745,7 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c size_t buffer_size = 0; gdb_byte *buffer = NULL; struct cleanup *cleanup; -@@ -1839,8 +1839,8 @@ write_pieced_value (struct value *to, st +@@ -1824,8 +1824,8 @@ write_pieced_value (struct value *to, st for (i = 0; i < c->n_pieces && offset < type_len; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1744,38 +1756,7 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c int need_bitwise; const gdb_byte *source_buffer; -@@ -1970,8 +1970,8 @@ write_pieced_value (struct value *to, st - implicit pointer. */ - - static int --check_pieced_value_bits (const struct value *value, int bit_offset, -- int bit_length, -+check_pieced_value_bits (const struct value *value, LONGEST bit_offset, -+ LONGEST bit_length, - enum dwarf_value_location check_for) - { - struct piece_closure *c -@@ -1987,7 +1987,7 @@ check_pieced_value_bits (const struct va - for (i = 0; i < c->n_pieces && bit_length > 0; i++) - { - struct dwarf_expr_piece *p = &c->pieces[i]; -- size_t this_size_bits = p->size; -+ ULONGEST this_size_bits = p->size; - - if (bit_offset > 0) - { -@@ -2025,8 +2025,8 @@ check_pieced_value_bits (const struct va - } - - static int --check_pieced_value_validity (const struct value *value, int bit_offset, -- int bit_length) -+check_pieced_value_validity (const struct value *value, LONGEST bit_offset, -+ LONGEST bit_length) - { - return check_pieced_value_bits (value, bit_offset, bit_length, - DWARF_VALUE_MEMORY); -@@ -2044,8 +2044,8 @@ check_pieced_value_invalid (const struct +@@ -1953,8 +1953,8 @@ write_pieced_value (struct value *to, st a synthetic pointer. */ static int @@ -1784,9 +1765,18 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c +check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset, + LONGEST bit_length) { - return check_pieced_value_bits (value, bit_offset, bit_length, - DWARF_VALUE_IMPLICIT_POINTER); -@@ -2070,9 +2070,10 @@ indirect_pieced_value (struct value *val + struct piece_closure *c + = (struct piece_closure *) value_computed_closure (value); +@@ -1967,7 +1967,7 @@ check_pieced_synthetic_pointer (const st + for (i = 0; i < c->n_pieces && bit_length > 0; i++) + { + struct dwarf_expr_piece *p = &c->pieces[i]; +- size_t this_size_bits = p->size; ++ ULONGEST this_size_bits = p->size; + + if (bit_offset > 0) + { +@@ -2009,9 +2009,10 @@ indirect_pieced_value (struct value *val struct type *type; struct frame_info *frame; struct dwarf2_locexpr_baton baton; @@ -1796,10 +1786,10 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c struct dwarf_expr_piece *piece = NULL; - LONGEST byte_offset; + LONGEST byte_offset, bit_offset; + enum bfd_endian byte_order; type = check_typedef (value_type (value)); - if (TYPE_CODE (type) != TYPE_CODE_PTR) -@@ -2086,7 +2087,7 @@ indirect_pieced_value (struct value *val +@@ -2026,7 +2027,7 @@ indirect_pieced_value (struct value *val for (i = 0; i < c->n_pieces && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1808,7 +1798,7 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2357,7 +2358,7 @@ dwarf2_evaluate_loc_desc_full (struct ty +@@ -2309,7 +2310,7 @@ dwarf2_evaluate_loc_desc_full (struct ty struct value *value = dwarf_expr_fetch (ctx, 0); gdb_byte *contents; const gdb_byte *val_bytes; @@ -1817,11 +1807,11 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c if (byte_offset + TYPE_LENGTH (type) > n) invalid_synthetic_pointer (); -Index: gdb-7.7.90.20140613/gdb/dwarf2read.c +Index: gdb-7.8.90.20150202/gdb/dwarf2read.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/dwarf2read.c 2014-06-24 16:07:27.219986846 +0200 -+++ gdb-7.7.90.20140613/gdb/dwarf2read.c 2014-06-24 16:07:27.255986886 +0200 -@@ -1889,12 +1889,12 @@ dwarf2_complex_location_expr_complaint ( +--- gdb-7.8.90.20150202.orig/gdb/dwarf2read.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/dwarf2read.c 2015-02-11 16:01:59.603966315 +0100 +@@ -1894,12 +1894,12 @@ dwarf2_complex_location_expr_complaint ( } static void @@ -1838,7 +1828,7 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2read.c } static void -@@ -12326,8 +12326,8 @@ dwarf2_add_field (struct field_info *fip +@@ -12483,8 +12483,8 @@ dwarf2_add_field (struct field_info *fip object, and then subtract off the number of bits of the field itself. The result is the bit offset of the LSB of the field. */ @@ -1849,11 +1839,11 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2read.c attr = dwarf2_attr (die, DW_AT_byte_size, cu); if (attr) -Index: gdb-7.7.90.20140613/gdb/eval.c +Index: gdb-7.8.90.20150202/gdb/eval.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/eval.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/eval.c 2014-06-24 16:07:27.256986887 +0200 -@@ -297,7 +297,8 @@ evaluate_struct_tuple (struct value *str +--- gdb-7.8.90.20150202.orig/gdb/eval.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/eval.c 2015-02-11 16:01:59.604966320 +0100 +@@ -314,7 +314,8 @@ evaluate_struct_tuple (struct value *str while (--nargs >= 0) { struct value *val = NULL; @@ -1863,7 +1853,7 @@ Index: gdb-7.7.90.20140613/gdb/eval.c bfd_byte *addr; fieldno++; -@@ -359,7 +360,7 @@ init_array_element (struct value *array, +@@ -375,7 +376,7 @@ init_array_element (struct value *array, enum noside noside, LONGEST low_bound, LONGEST high_bound) { LONGEST index; @@ -1905,7 +1895,7 @@ Index: gdb-7.7.90.20140613/gdb/eval.c LONGEST low_bound, high_bound, index; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -1903,7 +1904,8 @@ evaluate_subexp_standard (struct type *e +@@ -1887,7 +1888,8 @@ evaluate_subexp_standard (struct type *e { struct type *type = value_type (arg1); struct type *real_type; @@ -1915,11 +1905,11 @@ Index: gdb-7.7.90.20140613/gdb/eval.c struct value_print_options opts; get_user_print_options (&opts); -Index: gdb-7.7.90.20140613/gdb/f-lang.c +Index: gdb-7.8.90.20150202/gdb/f-lang.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/f-lang.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/f-lang.c 2014-06-24 16:07:27.256986887 +0200 -@@ -104,7 +104,7 @@ f_printchar (int c, struct type *type, s +--- gdb-7.8.90.20150202.orig/gdb/f-lang.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/f-lang.c 2015-02-11 16:01:59.604966320 +0100 +@@ -103,7 +103,7 @@ f_printchar (int c, struct type *type, s static void f_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, @@ -1928,10 +1918,10 @@ Index: gdb-7.7.90.20140613/gdb/f-lang.c const struct value_print_options *options) { const char *type_encoding = f_get_encoding (type); -Index: gdb-7.7.90.20140613/gdb/f-lang.h +Index: gdb-7.8.90.20150202/gdb/f-lang.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/f-lang.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/f-lang.h 2014-06-24 16:07:27.256986887 +0200 +--- gdb-7.8.90.20150202.orig/gdb/f-lang.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/f-lang.h 2015-02-11 16:01:59.604966320 +0100 @@ -30,7 +30,7 @@ extern void f_error (char *); /* Defined extern void f_print_type (struct type *, const char *, struct ui_file *, int, int, const struct type_print_options *); @@ -1941,11 +1931,11 @@ Index: gdb-7.7.90.20140613/gdb/f-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -Index: gdb-7.7.90.20140613/gdb/f-valprint.c +Index: gdb-7.8.90.20150202/gdb/f-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/f-valprint.c 2014-06-24 16:07:26.371985905 +0200 -+++ gdb-7.7.90.20140613/gdb/f-valprint.c 2014-06-24 16:07:27.256986887 +0200 -@@ -41,7 +41,7 @@ extern void _initialize_f_valprint (void +--- gdb-7.8.90.20150202.orig/gdb/f-valprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/f-valprint.c 2015-02-11 16:01:59.604966320 +0100 +@@ -38,7 +38,7 @@ extern void _initialize_f_valprint (void static void info_common_command (char *, int); static void f77_get_dynamic_length_of_aggregate (struct type *); @@ -1954,7 +1944,7 @@ Index: gdb-7.7.90.20140613/gdb/f-valprint.c /* Array which holds offsets to be applied to get a row's elements for a given array. Array also holds the size of each subarray. */ -@@ -76,8 +76,8 @@ f77_get_upperbound (struct type *type) +@@ -73,8 +73,8 @@ f77_get_upperbound (struct type *type) static void f77_get_dynamic_length_of_aggregate (struct type *type) { @@ -1965,7 +1955,7 @@ Index: gdb-7.7.90.20140613/gdb/f-valprint.c /* Recursively go all the way down into a possibly multi-dimensional F77 array and get the bounds. For simple arrays, this is pretty -@@ -109,7 +109,7 @@ f77_get_dynamic_length_of_aggregate (str +@@ -106,7 +106,7 @@ f77_get_dynamic_length_of_aggregate (str static void f77_print_array_1 (int nss, int ndimensions, struct type *type, const gdb_byte *valaddr, @@ -1974,7 +1964,7 @@ Index: gdb-7.7.90.20140613/gdb/f-valprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -118,7 +118,7 @@ f77_print_array_1 (int nss, int ndimensi +@@ -115,7 +115,7 @@ f77_print_array_1 (int nss, int ndimensi struct type *range_type = TYPE_INDEX_TYPE (check_typedef (type)); CORE_ADDR addr = address + embedded_offset; LONGEST lowerbound, upperbound; @@ -1983,7 +1973,7 @@ Index: gdb-7.7.90.20140613/gdb/f-valprint.c get_discrete_bounds (range_type, &lowerbound, &upperbound); -@@ -175,7 +175,7 @@ f77_print_array_1 (int nss, int ndimensi +@@ -178,7 +178,7 @@ f77_print_array_1 (int nss, int ndimensi static void f77_print_array (struct type *type, const gdb_byte *valaddr, @@ -1992,7 +1982,7 @@ Index: gdb-7.7.90.20140613/gdb/f-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -212,8 +212,9 @@ static const struct generic_val_print_de +@@ -215,8 +215,9 @@ static const struct generic_val_print_de function; they are identical. */ void @@ -2004,11 +1994,11 @@ Index: gdb-7.7.90.20140613/gdb/f-valprint.c const struct value *original_value, const struct value_print_options *options) { -Index: gdb-7.7.90.20140613/gdb/findvar.c +Index: gdb-7.8.90.20150202/gdb/findvar.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/findvar.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/findvar.c 2014-06-24 16:07:27.256986887 +0200 -@@ -628,7 +628,7 @@ struct value * +--- gdb-7.8.90.20150202.orig/gdb/findvar.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/findvar.c 2015-02-11 16:01:59.605966325 +0100 +@@ -626,7 +626,7 @@ struct value * default_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id) { @@ -2017,7 +2007,7 @@ Index: gdb-7.7.90.20140613/gdb/findvar.c struct value *value = allocate_value (type); VALUE_LVAL (value) = lval_register; -@@ -661,10 +661,10 @@ void +@@ -659,10 +659,10 @@ void read_frame_register_value (struct value *value, struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2031,20 +2021,20 @@ Index: gdb-7.7.90.20140613/gdb/findvar.c gdb_assert (VALUE_LVAL (value) == lval_register); -@@ -679,7 +679,7 @@ read_frame_register_value (struct value +@@ -677,7 +677,7 @@ read_frame_register_value (struct value while (len > 0) { struct value *regval = get_frame_register_value (frame, regnum); - int reg_len = TYPE_LENGTH (value_type (regval)) - reg_offset; + LONGEST reg_len = TYPE_LENGTH (value_type (regval)) - reg_offset; - if (value_optimized_out (regval)) - { -Index: gdb-7.7.90.20140613/gdb/frame.c + /* If the register length is larger than the number of bytes + remaining to copy, then only copy the appropriate bytes. */ +Index: gdb-7.8.90.20150202/gdb/frame.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/frame.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/frame.c 2014-06-24 16:07:27.257986888 +0200 -@@ -1272,7 +1272,7 @@ deprecated_frame_register_read (struct f +--- gdb-7.8.90.20150202.orig/gdb/frame.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/frame.c 2015-02-11 16:01:59.605966325 +0100 +@@ -1269,7 +1269,7 @@ deprecated_frame_register_read (struct f int get_frame_register_bytes (struct frame_info *frame, int regnum, @@ -2053,7 +2043,7 @@ Index: gdb-7.7.90.20140613/gdb/frame.c int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -1301,7 +1301,7 @@ get_frame_register_bytes (struct frame_i +@@ -1298,7 +1298,7 @@ get_frame_register_bytes (struct frame_i } if (len > maxsize) error (_("Bad debug information detected: " @@ -2062,10 +2052,10 @@ Index: gdb-7.7.90.20140613/gdb/frame.c /* Copy the data. */ while (len > 0) -Index: gdb-7.7.90.20140613/gdb/frame.h +Index: gdb-7.8.90.20150202/gdb/frame.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/frame.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/frame.h 2014-06-24 16:07:27.257986888 +0200 +--- gdb-7.8.90.20150202.orig/gdb/frame.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/frame.h 2015-02-11 16:01:59.606966330 +0100 @@ -583,7 +583,7 @@ extern void put_frame_register (struct f contents are optimized out or unavailable, set *OPTIMIZEDP, *UNAVAILABLEP accordingly. */ @@ -2075,11 +2065,11 @@ Index: gdb-7.7.90.20140613/gdb/frame.h gdb_byte *myaddr, int *optimizedp, int *unavailablep); -Index: gdb-7.7.90.20140613/gdb/gdbtypes.c +Index: gdb-7.8.90.20150202/gdb/gdbtypes.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/gdbtypes.c 2014-06-24 16:07:26.410985949 +0200 -+++ gdb-7.7.90.20140613/gdb/gdbtypes.c 2014-06-24 16:07:27.258986890 +0200 -@@ -2463,7 +2463,7 @@ allocate_gnat_aux_type (struct type *typ +--- gdb-7.8.90.20150202.orig/gdb/gdbtypes.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/gdbtypes.c 2015-02-11 16:01:59.607966335 +0100 +@@ -2478,7 +2478,7 @@ allocate_gnat_aux_type (struct type *typ least as long as OBJFILE. */ struct type * @@ -2088,7 +2078,7 @@ Index: gdb-7.7.90.20140613/gdb/gdbtypes.c const char *name, struct objfile *objfile) { struct type *type; -@@ -2694,8 +2694,8 @@ is_public_ancestor (struct type *base, s +@@ -2718,8 +2718,8 @@ is_public_ancestor (struct type *base, s static int is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -2099,7 +2089,7 @@ Index: gdb-7.7.90.20140613/gdb/gdbtypes.c CORE_ADDR address, struct value *val) { int i, count = 0; -@@ -2706,7 +2706,7 @@ is_unique_ancestor_worker (struct type * +@@ -2730,7 +2730,7 @@ is_unique_ancestor_worker (struct type * for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) { struct type *iter; @@ -2108,7 +2098,7 @@ Index: gdb-7.7.90.20140613/gdb/gdbtypes.c iter = check_typedef (TYPE_BASECLASS (dclass, i)); -@@ -2747,7 +2747,7 @@ is_unique_ancestor_worker (struct type * +@@ -2771,7 +2771,7 @@ is_unique_ancestor_worker (struct type * int is_unique_ancestor (struct type *base, struct value *val) { @@ -2117,7 +2107,7 @@ Index: gdb-7.7.90.20140613/gdb/gdbtypes.c return is_unique_ancestor_worker (base, value_type (val), &offset, value_contents_for_printing (val), -@@ -3891,7 +3891,7 @@ recursive_dump_type (struct type *type, +@@ -3916,7 +3916,7 @@ recursive_dump_type (struct type *type, break; } puts_filtered ("\n"); @@ -2126,7 +2116,7 @@ Index: gdb-7.7.90.20140613/gdb/gdbtypes.c if (TYPE_OBJFILE_OWNED (type)) { printfi_filtered (spaces, "objfile "); -@@ -4015,8 +4015,8 @@ recursive_dump_type (struct type *type, +@@ -4040,8 +4040,8 @@ recursive_dump_type (struct type *type, idx, plongest (TYPE_FIELD_ENUMVAL (type, idx))); else printfi_filtered (spaces + 2, @@ -2137,7 +2127,7 @@ Index: gdb-7.7.90.20140613/gdb/gdbtypes.c TYPE_FIELD_BITSIZE (type, idx)); gdb_print_host_address (TYPE_FIELD_TYPE (type, idx), gdb_stdout); printf_filtered (" name '%s' (", -@@ -4357,7 +4357,7 @@ copy_type (const struct type *type) +@@ -4398,7 +4398,7 @@ copy_type (const struct type *type) struct type * arch_type (struct gdbarch *gdbarch, @@ -2146,11 +2136,11 @@ Index: gdb-7.7.90.20140613/gdb/gdbtypes.c { struct type *type; -Index: gdb-7.7.90.20140613/gdb/gdbtypes.h +Index: gdb-7.8.90.20150202/gdb/gdbtypes.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/gdbtypes.h 2014-06-24 16:07:27.024986630 +0200 -+++ gdb-7.7.90.20140613/gdb/gdbtypes.h 2014-06-24 16:07:27.258986890 +0200 -@@ -608,7 +608,7 @@ struct main_type +--- gdb-7.8.90.20150202.orig/gdb/gdbtypes.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/gdbtypes.h 2015-02-11 16:01:59.608966340 +0100 +@@ -598,7 +598,7 @@ struct main_type gdbarch_bits_big_endian=0 targets, it is the bit offset to the LSB. */ @@ -2159,7 +2149,7 @@ Index: gdb-7.7.90.20140613/gdb/gdbtypes.h /* * Enum value. */ LONGEST enumval; -@@ -810,7 +810,7 @@ struct type +@@ -801,7 +801,7 @@ struct type HOST_CHAR_BIT. However, this would still fail to address machines based on a ternary or decimal representation. */ @@ -2168,7 +2158,7 @@ Index: gdb-7.7.90.20140613/gdb/gdbtypes.h /* * Core type, shared by a group of qualified types. */ -@@ -1640,11 +1640,12 @@ extern struct type *get_target_type (str +@@ -1641,11 +1641,12 @@ extern struct type *get_target_type (str /* * Helper function to construct objfile-owned types. */ @@ -2183,11 +2173,11 @@ Index: gdb-7.7.90.20140613/gdb/gdbtypes.h extern struct type *arch_integer_type (struct gdbarch *, int, int, char *); extern struct type *arch_character_type (struct gdbarch *, int, int, char *); extern struct type *arch_boolean_type (struct gdbarch *, int, int, char *); -Index: gdb-7.7.90.20140613/gdb/gnu-v2-abi.c +Index: gdb-7.8.90.20150202/gdb/gnu-v2-abi.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/gnu-v2-abi.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/gnu-v2-abi.c 2014-06-24 16:07:27.258986890 +0200 -@@ -85,7 +85,7 @@ gnuv2_is_operator_name (const char *name +--- gdb-7.8.90.20150202.orig/gdb/gnu-v2-abi.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/gnu-v2-abi.c 2015-02-11 16:01:59.608966340 +0100 +@@ -82,7 +82,7 @@ gnuv2_is_operator_name (const char *name TYPE is the type in which F is located. */ static struct value * gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j, @@ -2196,7 +2186,7 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v2-abi.c { struct value *arg1 = *arg1p; struct type *type1 = check_typedef (value_type (arg1)); -@@ -186,7 +186,8 @@ gnuv2_virtual_fn_field (struct value **a +@@ -183,7 +183,8 @@ gnuv2_virtual_fn_field (struct value **a static struct type * @@ -2206,7 +2196,7 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v2-abi.c { struct type *known_type; struct type *rtti_type; -@@ -341,9 +342,9 @@ vb_match (struct type *type, int index, +@@ -338,9 +339,9 @@ vb_match (struct type *type, int index, target). The result is the offset of the baseclass value relative to (the address of)(ARG) + OFFSET. */ @@ -2218,7 +2208,7 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v2-abi.c CORE_ADDR address, const struct value *val) { struct type *basetype = TYPE_BASECLASS (type, index); -@@ -361,8 +362,8 @@ gnuv2_baseclass_offset (struct type *typ +@@ -358,8 +359,8 @@ gnuv2_baseclass_offset (struct type *typ if (vb_match (type, i, basetype)) { struct type *field_type; @@ -2229,7 +2219,7 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v2-abi.c CORE_ADDR addr; field_type = check_typedef (TYPE_FIELD_TYPE (type, i)); -@@ -386,7 +387,7 @@ gnuv2_baseclass_offset (struct type *typ +@@ -383,7 +384,7 @@ gnuv2_baseclass_offset (struct type *typ /* Don't go through baseclass_offset, as that wraps exceptions, thus, inner exceptions would be wrapped more than once. */ @@ -2238,11 +2228,11 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v2-abi.c gnuv2_baseclass_offset (type, i, valaddr, embedded_offset, address, val); -Index: gdb-7.7.90.20140613/gdb/gnu-v3-abi.c +Index: gdb-7.8.90.20150202/gdb/gnu-v3-abi.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/gnu-v3-abi.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/gnu-v3-abi.c 2014-06-24 16:07:27.259986891 +0200 -@@ -112,7 +112,7 @@ build_gdb_vtable_type (struct gdbarch *a +--- gdb-7.8.90.20150202.orig/gdb/gnu-v3-abi.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/gnu-v3-abi.c 2015-02-11 16:01:59.608966340 +0100 +@@ -108,7 +108,7 @@ build_gdb_vtable_type (struct gdbarch *a { struct type *t; struct field *field_list, *field; @@ -2251,7 +2241,7 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v3-abi.c struct type *void_ptr_type = builtin_type (arch)->builtin_data_ptr; -@@ -188,7 +188,7 @@ vtable_ptrdiff_type (struct gdbarch *gdb +@@ -184,7 +184,7 @@ vtable_ptrdiff_type (struct gdbarch *gdb /* Return the offset from the start of the imaginary `struct gdb_gnu_v3_abi_vtable' object to the vtable's "address point" (i.e., where objects' virtual table pointers point). */ @@ -2260,7 +2250,7 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v3-abi.c vtable_address_point_offset (struct gdbarch *gdbarch) { struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data); -@@ -279,7 +279,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc +@@ -275,7 +275,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc static struct type * gnuv3_rtti_type (struct value *value, @@ -2269,7 +2259,7 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v3-abi.c { struct gdbarch *gdbarch; struct type *values_type = check_typedef (value_type (value)); -@@ -404,7 +404,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gd +@@ -400,7 +400,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gd static struct value * gnuv3_virtual_fn_field (struct value **value_p, struct fn_field *f, int j, @@ -2278,7 +2268,7 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v3-abi.c { struct type *values_type = check_typedef (value_type (*value_p)); struct gdbarch *gdbarch; -@@ -434,16 +434,16 @@ gnuv3_virtual_fn_field (struct value **v +@@ -430,16 +430,16 @@ gnuv3_virtual_fn_field (struct value **v -1 is returned on error. */ @@ -2298,7 +2288,7 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v3-abi.c /* Determine architecture. */ gdbarch = get_type_arch (type); -@@ -467,7 +467,7 @@ gnuv3_baseclass_offset (struct type *typ +@@ -463,7 +463,7 @@ gnuv3_baseclass_offset (struct type *typ cur_base_offset = cur_base_offset + vtable_address_point_offset (gdbarch); if ((- cur_base_offset) % TYPE_LENGTH (ptr_type) != 0) error (_("Misaligned vbase offset.")); @@ -2307,7 +2297,7 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v3-abi.c vtable = gnuv3_get_vtable (gdbarch, type, address + embedded_offset); gdb_assert (vtable != NULL); -@@ -511,7 +511,7 @@ gnuv3_find_method_in (struct type *domai +@@ -507,7 +507,7 @@ gnuv3_find_method_in (struct type *domai we're out of luck. */ for (i = 0; i < TYPE_N_BASECLASSES (domain); i++) { @@ -2316,10 +2306,10 @@ Index: gdb-7.7.90.20140613/gdb/gnu-v3-abi.c struct type *basetype; if (BASETYPE_VIA_VIRTUAL (domain, i)) -Index: gdb-7.7.90.20140613/gdb/go-lang.h +Index: gdb-7.8.90.20150202/gdb/go-lang.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/go-lang.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/go-lang.h 2014-06-24 16:07:27.259986891 +0200 +--- gdb-7.8.90.20150202.orig/gdb/go-lang.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/go-lang.h 2015-02-11 16:01:59.608966340 +0100 @@ -85,7 +85,7 @@ extern void go_print_type (struct type * /* Defined in go-valprint.c. */ @@ -2329,10 +2319,10 @@ Index: gdb-7.7.90.20140613/gdb/go-lang.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.7.90.20140613/gdb/go-valprint.c +Index: gdb-7.8.90.20150202/gdb/go-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/go-valprint.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/go-valprint.c 2014-06-24 16:07:27.259986891 +0200 +--- gdb-7.8.90.20150202.orig/gdb/go-valprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/go-valprint.c 2015-02-11 16:01:59.609966345 +0100 @@ -37,7 +37,7 @@ static void @@ -2355,44 +2345,11 @@ Index: gdb-7.7.90.20140613/gdb/go-valprint.c const struct value_print_options *options) { CHECK_TYPEDEF (type); -Index: gdb-7.7.90.20140613/gdb/i386-nat.c +Index: gdb-7.8.90.20150202/gdb/inf-ttrace.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/i386-nat.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/i386-nat.c 2014-06-24 16:07:27.259986891 +0200 -@@ -290,7 +290,7 @@ static int i386_remove_aligned_watchpoin - valid value, bombs through internal_error. */ - static int i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state, - i386_wp_op_t what, -- CORE_ADDR addr, int len, -+ CORE_ADDR addr, LONGEST len, - enum target_hw_bp_type type); - - /* Implementation. */ -@@ -501,8 +501,8 @@ i386_remove_aligned_watchpoint (struct i - - static int - i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state, -- i386_wp_op_t what, CORE_ADDR addr, int len, -- enum target_hw_bp_type type) -+ i386_wp_op_t what, CORE_ADDR addr, -+ LONGEST len, enum target_hw_bp_type type) - { - int retval = 0; - int max_wp_len = TARGET_HAS_DR_LEN_8 ? 8 : 4; -@@ -665,7 +665,7 @@ i386_remove_watchpoint (struct target_op - - static int - i386_region_ok_for_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) - { - struct i386_debug_reg_state *state - = i386_debug_reg_state (ptid_get_pid (inferior_ptid)); -Index: gdb-7.7.90.20140613/gdb/inf-ttrace.c -=================================================================== ---- gdb-7.7.90.20140613.orig/gdb/inf-ttrace.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/inf-ttrace.c 2014-06-24 16:07:27.259986891 +0200 -@@ -369,7 +369,7 @@ inf_ttrace_can_use_hw_breakpoint (struct +--- gdb-7.8.90.20150202.orig/gdb/inf-ttrace.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/inf-ttrace.c 2015-02-11 16:01:59.609966345 +0100 +@@ -366,7 +366,7 @@ inf_ttrace_can_use_hw_breakpoint (struct static int inf_ttrace_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -2401,10 +2358,10 @@ Index: gdb-7.7.90.20140613/gdb/inf-ttrace.c { return 1; } -Index: gdb-7.7.90.20140613/gdb/jv-lang.c +Index: gdb-7.8.90.20150202/gdb/jv-lang.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/jv-lang.c 2014-06-24 16:07:27.025986631 +0200 -+++ gdb-7.7.90.20140613/gdb/jv-lang.c 2014-06-24 16:07:27.260986892 +0200 +--- gdb-7.8.90.20150202.orig/gdb/jv-lang.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/jv-lang.c 2015-02-11 16:01:59.609966345 +0100 @@ -436,7 +436,7 @@ java_link_class_type (struct gdbarch *gd for (i = TYPE_N_BASECLASSES (type); i < nfields; i++) { @@ -2423,10 +2380,10 @@ Index: gdb-7.7.90.20140613/gdb/jv-lang.c const struct value_print_options *options) { const char *type_encoding = java_get_encoding (type); -Index: gdb-7.7.90.20140613/gdb/jv-lang.h +Index: gdb-7.8.90.20150202/gdb/jv-lang.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/jv-lang.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/jv-lang.h 2014-06-24 16:07:27.260986892 +0200 +--- gdb-7.8.90.20150202.orig/gdb/jv-lang.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/jv-lang.h 2015-02-11 16:01:59.610966350 +0100 @@ -43,8 +43,8 @@ struct builtin_java_type extern const struct builtin_java_type *builtin_java_type (struct gdbarch *); @@ -2438,11 +2395,11 @@ Index: gdb-7.7.90.20140613/gdb/jv-lang.h const struct value *, const struct value_print_options *); -Index: gdb-7.7.90.20140613/gdb/jv-valprint.c +Index: gdb-7.8.90.20150202/gdb/jv-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/jv-valprint.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/jv-valprint.c 2014-06-24 16:07:27.260986892 +0200 -@@ -267,7 +267,7 @@ java_value_print (struct value *val, str +--- gdb-7.8.90.20150202.orig/gdb/jv-valprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/jv-valprint.c 2015-02-11 16:01:59.610966350 +0100 +@@ -265,7 +265,7 @@ java_value_print (struct value *val, str static void java_print_value_fields (struct type *type, const gdb_byte *valaddr, @@ -2451,7 +2408,7 @@ Index: gdb-7.7.90.20140613/gdb/jv-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -460,7 +460,7 @@ java_print_value_fields (struct type *ty +@@ -453,7 +453,7 @@ java_print_value_fields (struct type *ty void java_val_print (struct type *type, const gdb_byte *valaddr, @@ -2460,11 +2417,11 @@ Index: gdb-7.7.90.20140613/gdb/jv-valprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.7.90.20140613/gdb/language.c +Index: gdb-7.8.90.20150202/gdb/language.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/language.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/language.c 2014-06-24 16:07:27.260986892 +0200 -@@ -722,7 +722,7 @@ unk_lang_printchar (int c, struct type * +--- gdb-7.8.90.20150202.orig/gdb/language.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/language.c 2015-02-11 16:01:59.610966350 +0100 +@@ -720,7 +720,7 @@ unk_lang_printchar (int c, struct type * static void unk_lang_printstr (struct ui_file *stream, struct type *type, @@ -2473,7 +2430,7 @@ Index: gdb-7.7.90.20140613/gdb/language.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -741,7 +741,7 @@ unk_lang_print_type (struct type *type, +@@ -739,7 +739,7 @@ unk_lang_print_type (struct type *type, static void unk_lang_val_print (struct type *type, const gdb_byte *valaddr, @@ -2482,11 +2439,11 @@ Index: gdb-7.7.90.20140613/gdb/language.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.7.90.20140613/gdb/language.h +Index: gdb-7.8.90.20150202/gdb/language.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/language.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/language.h 2014-06-24 16:07:27.260986892 +0200 -@@ -183,7 +183,7 @@ struct language_defn +--- gdb-7.8.90.20150202.orig/gdb/language.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/language.h 2015-02-11 16:01:59.611966355 +0100 +@@ -189,7 +189,7 @@ struct language_defn struct ui_file * stream); void (*la_printstr) (struct ui_file * stream, struct type *elttype, @@ -2495,7 +2452,7 @@ Index: gdb-7.7.90.20140613/gdb/language.h const char *encoding, int force_ellipses, const struct value_print_options *); -@@ -225,7 +225,7 @@ struct language_defn +@@ -231,7 +231,7 @@ struct language_defn void (*la_val_print) (struct type *type, const gdb_byte *contents, @@ -2504,10 +2461,10 @@ Index: gdb-7.7.90.20140613/gdb/language.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.7.90.20140613/gdb/m2-lang.c +Index: gdb-7.8.90.20150202/gdb/m2-lang.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/m2-lang.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/m2-lang.c 2014-06-24 16:07:27.261986893 +0200 +--- gdb-7.8.90.20150202.orig/gdb/m2-lang.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/m2-lang.c 2015-02-11 16:01:59.611966355 +0100 @@ -104,10 +104,10 @@ m2_printchar (int c, struct type *type, static void @@ -2542,10 +2499,10 @@ Index: gdb-7.7.90.20140613/gdb/m2-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.7.90.20140613/gdb/m2-lang.h +Index: gdb-7.8.90.20150202/gdb/m2-lang.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/m2-lang.h 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/m2-lang.h 2014-06-24 16:07:27.261986893 +0200 +--- gdb-7.8.90.20150202.orig/gdb/m2-lang.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/m2-lang.h 2015-02-11 16:01:59.611966355 +0100 @@ -34,7 +34,7 @@ extern void m2_print_typedef (struct typ extern int m2_is_long_set (struct type *type); extern int m2_is_unbounded_array (struct type *type); @@ -2555,11 +2512,11 @@ Index: gdb-7.7.90.20140613/gdb/m2-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -Index: gdb-7.7.90.20140613/gdb/m2-typeprint.c +Index: gdb-7.8.90.20150202/gdb/m2-typeprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/m2-typeprint.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/m2-typeprint.c 2014-06-24 16:07:27.261986893 +0200 -@@ -233,9 +233,12 @@ static void m2_array (struct type *type, +--- gdb-7.8.90.20150202.orig/gdb/m2-typeprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/m2-typeprint.c 2015-02-11 16:01:59.611966355 +0100 +@@ -230,9 +230,12 @@ static void m2_array (struct type *type, m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 1); } else @@ -2575,10 +2532,10 @@ Index: gdb-7.7.90.20140613/gdb/m2-typeprint.c } fprintf_filtered (stream, "] OF "); m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); -Index: gdb-7.7.90.20140613/gdb/m2-valprint.c +Index: gdb-7.8.90.20150202/gdb/m2-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/m2-valprint.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/m2-valprint.c 2014-06-24 16:07:27.261986893 +0200 +--- gdb-7.8.90.20150202.orig/gdb/m2-valprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/m2-valprint.c 2015-02-11 16:01:59.612966360 +0100 @@ -35,7 +35,7 @@ static int print_unpacked_pointer (struc struct ui_file *stream); static void @@ -2644,10 +2601,10 @@ Index: gdb-7.7.90.20140613/gdb/m2-valprint.c /* Look for a NULL char. */ for (temp_len = 0; -Index: gdb-7.7.90.20140613/gdb/memrange.c +Index: gdb-7.8.90.20150202/gdb/memrange.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/memrange.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/memrange.c 2014-06-24 16:07:27.261986893 +0200 +--- gdb-7.8.90.20150202.orig/gdb/memrange.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/memrange.c 2015-02-11 16:01:59.612966360 +0100 @@ -21,8 +21,8 @@ #include "memrange.h" @@ -2659,10 +2616,10 @@ Index: gdb-7.7.90.20140613/gdb/memrange.c { ULONGEST h, l; -Index: gdb-7.7.90.20140613/gdb/memrange.h +Index: gdb-7.8.90.20150202/gdb/memrange.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/memrange.h 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/memrange.h 2014-06-24 16:07:27.261986893 +0200 +--- gdb-7.8.90.20150202.orig/gdb/memrange.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/memrange.h 2015-02-11 16:01:59.612966360 +0100 @@ -30,7 +30,7 @@ struct mem_range CORE_ADDR start; @@ -2681,13 +2638,13 @@ Index: gdb-7.7.90.20140613/gdb/memrange.h +extern int mem_ranges_overlap (CORE_ADDR start1, LONGEST len1, + CORE_ADDR start2, LONGEST len2); - /* Sort ranges by start address, then coalesce contiguous or - overlapping ranges. */ -Index: gdb-7.7.90.20140613/gdb/mips-linux-nat.c + /* Returns true if ADDR is in RANGE. */ + +Index: gdb-7.8.90.20150202/gdb/mips-linux-nat.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/mips-linux-nat.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/mips-linux-nat.c 2014-06-24 16:07:27.262986894 +0200 -@@ -590,7 +590,7 @@ mips_linux_stopped_data_address (struct +--- gdb-7.8.90.20150202.orig/gdb/mips-linux-nat.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/mips-linux-nat.c 2015-02-11 16:01:59.612966360 +0100 +@@ -586,7 +586,7 @@ mips_linux_stopped_data_address (struct static int mips_linux_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -2696,11 +2653,11 @@ Index: gdb-7.7.90.20140613/gdb/mips-linux-nat.c { struct pt_watch_regs dummy_regs; int i; -Index: gdb-7.7.90.20140613/gdb/opencl-lang.c +Index: gdb-7.8.90.20150202/gdb/opencl-lang.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/opencl-lang.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/opencl-lang.c 2014-06-24 16:07:27.262986894 +0200 -@@ -80,11 +80,11 @@ builtin_opencl_type (struct gdbarch *gdb +--- gdb-7.8.90.20150202.orig/gdb/opencl-lang.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/opencl-lang.c 2015-02-11 16:01:59.613966365 +0100 +@@ -78,11 +78,11 @@ builtin_opencl_type (struct gdbarch *gdb static struct type * lookup_opencl_vector_type (struct gdbarch *gdbarch, enum type_code code, @@ -2714,7 +2671,7 @@ Index: gdb-7.7.90.20140613/gdb/opencl-lang.c struct type *type = NULL; struct type **types = builtin_opencl_type (gdbarch); -@@ -174,9 +174,9 @@ lval_func_read (struct value *v) +@@ -172,9 +172,9 @@ lval_func_read (struct value *v) struct lval_closure *c = (struct lval_closure *) value_computed_closure (v); struct type *type = check_typedef (value_type (v)); struct type *eltype = TYPE_TARGET_TYPE (check_typedef (value_type (c->val))); @@ -2727,7 +2684,7 @@ Index: gdb-7.7.90.20140613/gdb/opencl-lang.c LONGEST lowb = 0; LONGEST highb = 0; -@@ -203,9 +203,9 @@ lval_func_write (struct value *v, struct +@@ -201,9 +201,9 @@ lval_func_write (struct value *v, struct struct lval_closure *c = (struct lval_closure *) value_computed_closure (v); struct type *type = check_typedef (value_type (v)); struct type *eltype = TYPE_TARGET_TYPE (check_typedef (value_type (c->val))); @@ -2740,56 +2697,7 @@ Index: gdb-7.7.90.20140613/gdb/opencl-lang.c LONGEST lowb = 0; LONGEST highb = 0; -@@ -243,17 +243,18 @@ lval_func_write (struct value *v, struct - /* Return nonzero if all bits in V within OFFSET and LENGTH are valid. */ - - static int --lval_func_check_validity (const struct value *v, int offset, int length) -+lval_func_check_validity (const struct value *v, LONGEST offset, -+ LONGEST length) - { - struct lval_closure *c = (struct lval_closure *) value_computed_closure (v); -+ struct type *t = check_typedef (value_type (c->val)); - /* Size of the target type in bits. */ -- int elsize = -- TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8; -- int startrest = offset % elsize; -- int start = offset / elsize; -- int endrest = (offset + length) % elsize; -- int end = (offset + length) / elsize; -- int i; -+ LONGEST elsize = TYPE_LENGTH (TYPE_TARGET_TYPE (t)) * 8; -+ LONGEST startrest = offset % elsize; -+ LONGEST start = offset / elsize; -+ LONGEST endrest = (offset + length) % elsize; -+ LONGEST end = (offset + length) / elsize; -+ LONGEST i; - - if (endrest) - end++; -@@ -263,8 +264,8 @@ lval_func_check_validity (const struct v - - for (i = start; i < end; i++) - { -- int comp_offset = (i == start) ? startrest : 0; -- int comp_length = (i == end) ? endrest : elsize; -+ LONGEST comp_offset = (i == start) ? startrest : 0; -+ LONGEST comp_length = (i == end) ? endrest : elsize; - - if (!value_bits_valid (c->val, c->indices[i] * elsize + comp_offset, - comp_length)) -@@ -281,8 +282,8 @@ lval_func_check_any_valid (const struct - { - struct lval_closure *c = (struct lval_closure *) value_computed_closure (v); - /* Size of the target type in bits. */ -- int elsize = -- TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8; -+ LONGEST elsize = -+ TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8; - int i; - - for (i = 0; i < c->n; i++) -@@ -297,17 +298,17 @@ lval_func_check_any_valid (const struct +@@ -243,17 +243,17 @@ lval_func_write (struct value *v, struct static int lval_func_check_synthetic_pointer (const struct value *v, @@ -2799,14 +2707,13 @@ Index: gdb-7.7.90.20140613/gdb/opencl-lang.c struct lval_closure *c = (struct lval_closure *) value_computed_closure (v); /* Size of the target type in bits. */ - int elsize = -- TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8; ++ LONGEST elsize = + TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8; - int startrest = offset % elsize; - int start = offset / elsize; - int endrest = (offset + length) % elsize; - int end = (offset + length) / elsize; - int i; -+ LONGEST elsize = -+ TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8; + LONGEST startrest = offset % elsize; + LONGEST start = offset / elsize; + LONGEST endrest = (offset + length) % elsize; @@ -2815,7 +2722,7 @@ Index: gdb-7.7.90.20140613/gdb/opencl-lang.c if (endrest) end++; -@@ -317,8 +318,8 @@ lval_func_check_synthetic_pointer (const +@@ -263,8 +263,8 @@ lval_func_check_synthetic_pointer (const for (i = start; i < end; i++) { @@ -2826,11 +2733,11 @@ Index: gdb-7.7.90.20140613/gdb/opencl-lang.c if (!value_bits_synthetic_pointer (c->val, c->indices[i] * elsize + comp_offset, -Index: gdb-7.7.90.20140613/gdb/p-lang.c +Index: gdb-7.8.90.20150202/gdb/p-lang.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/p-lang.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/p-lang.c 2014-06-24 16:07:27.262986894 +0200 -@@ -96,8 +96,8 @@ pascal_main_name (void) +--- gdb-7.8.90.20150202.orig/gdb/p-lang.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/p-lang.c 2015-02-11 16:01:59.613966365 +0100 +@@ -95,8 +95,8 @@ pascal_main_name (void) are not multiple of TARGET_CHAR_BIT then the results are wrong but this does not happen for Free Pascal nor for GPC. */ int @@ -2841,7 +2748,7 @@ Index: gdb-7.7.90.20140613/gdb/p-lang.c struct type **char_type, const char **arrayname) { -@@ -217,12 +217,12 @@ pascal_printchar (int c, struct type *ty +@@ -216,12 +216,12 @@ pascal_printchar (int c, struct type *ty void pascal_printstr (struct ui_file *stream, struct type *type, @@ -2856,7 +2763,7 @@ Index: gdb-7.7.90.20140613/gdb/p-lang.c unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; -@@ -250,9 +250,9 @@ pascal_printstr (struct ui_file *stream, +@@ -249,9 +249,9 @@ pascal_printstr (struct ui_file *stream, { /* Position of the character we are examining to see whether it is repeated. */ @@ -2868,7 +2775,7 @@ Index: gdb-7.7.90.20140613/gdb/p-lang.c unsigned long int current_char; QUIT; -@@ -284,7 +284,7 @@ pascal_printstr (struct ui_file *stream, +@@ -283,7 +283,7 @@ pascal_printstr (struct ui_file *stream, in_quotes = 0; } pascal_printchar (current_char, type, stream); @@ -2877,10 +2784,10 @@ Index: gdb-7.7.90.20140613/gdb/p-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.7.90.20140613/gdb/p-lang.h +Index: gdb-7.8.90.20150202/gdb/p-lang.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/p-lang.h 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/p-lang.h 2014-06-24 16:07:27.262986894 +0200 +--- gdb-7.8.90.20150202.orig/gdb/p-lang.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/p-lang.h 2015-02-11 16:01:59.613966365 +0100 @@ -36,7 +36,7 @@ extern void pascal_print_type (struct ty extern void pascal_print_typedef (struct type *, struct symbol *, struct ui_file *); @@ -2915,11 +2822,11 @@ Index: gdb-7.7.90.20140613/gdb/p-lang.h CORE_ADDR, struct ui_file *, int, const struct value *, -Index: gdb-7.7.90.20140613/gdb/p-valprint.c +Index: gdb-7.8.90.20150202/gdb/p-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/p-valprint.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/p-valprint.c 2014-06-24 16:07:27.262986894 +0200 -@@ -58,7 +58,7 @@ static const struct generic_val_print_de +--- gdb-7.8.90.20150202.orig/gdb/p-valprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/p-valprint.c 2015-02-11 16:01:59.613966365 +0100 +@@ -57,7 +57,7 @@ static const struct generic_val_print_de void pascal_val_print (struct type *type, const gdb_byte *valaddr, @@ -2928,7 +2835,7 @@ Index: gdb-7.7.90.20140613/gdb/p-valprint.c struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options) -@@ -69,8 +69,8 @@ pascal_val_print (struct type *type, con +@@ -68,8 +68,8 @@ pascal_val_print (struct type *type, con unsigned len; LONGEST low_bound, high_bound; struct type *elttype; @@ -2939,7 +2846,7 @@ Index: gdb-7.7.90.20140613/gdb/p-valprint.c struct type *char_type; CORE_ADDR addr; int want_space = 0; -@@ -468,7 +468,7 @@ static void pascal_object_print_static_f +@@ -467,7 +467,7 @@ static void pascal_object_print_static_f const struct value_print_options *); static void pascal_object_print_value (struct type *, const gdb_byte *, @@ -2948,7 +2855,7 @@ Index: gdb-7.7.90.20140613/gdb/p-valprint.c CORE_ADDR, struct ui_file *, int, const struct value *, const struct value_print_options *, -@@ -527,7 +527,7 @@ pascal_object_is_vtbl_member (struct typ +@@ -526,7 +526,7 @@ pascal_object_is_vtbl_member (struct typ void pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr, @@ -2957,7 +2864,7 @@ Index: gdb-7.7.90.20140613/gdb/p-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -703,7 +703,7 @@ pascal_object_print_value_fields (struct +@@ -697,7 +697,7 @@ pascal_object_print_value_fields (struct static void pascal_object_print_value (struct type *type, const gdb_byte *valaddr, @@ -2966,7 +2873,7 @@ Index: gdb-7.7.90.20140613/gdb/p-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -726,11 +726,11 @@ pascal_object_print_value (struct type * +@@ -720,11 +720,11 @@ pascal_object_print_value (struct type * for (i = 0; i < n_baseclasses; i++) { @@ -2980,11 +2887,11 @@ Index: gdb-7.7.90.20140613/gdb/p-valprint.c volatile struct gdb_exception ex; int skip = 0; -Index: gdb-7.7.90.20140613/gdb/ppc-linux-nat.c +Index: gdb-7.8.90.20150202/gdb/ppc-linux-nat.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/ppc-linux-nat.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/ppc-linux-nat.c 2014-06-24 16:07:27.263986895 +0200 -@@ -1498,7 +1498,7 @@ ppc_linux_can_use_hw_breakpoint (struct +--- gdb-7.8.90.20150202.orig/gdb/ppc-linux-nat.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/ppc-linux-nat.c 2015-02-11 16:01:59.614966371 +0100 +@@ -1501,7 +1501,7 @@ ppc_linux_can_use_hw_breakpoint (struct static int ppc_linux_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -2993,11 +2900,11 @@ Index: gdb-7.7.90.20140613/gdb/ppc-linux-nat.c { /* Handle sub-8-byte quantities. */ if (len <= 0) -Index: gdb-7.7.90.20140613/gdb/printcmd.c +Index: gdb-7.8.90.20150202/gdb/printcmd.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/printcmd.c 2014-06-24 16:07:26.640986204 +0200 -+++ gdb-7.7.90.20140613/gdb/printcmd.c 2014-06-24 16:07:27.263986895 +0200 -@@ -288,7 +288,7 @@ print_formatted (struct value *val, int +--- gdb-7.8.90.20150202.orig/gdb/printcmd.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/printcmd.c 2015-02-11 16:01:59.615966375 +0100 +@@ -285,7 +285,7 @@ print_formatted (struct value *val, int struct ui_file *stream) { struct type *type = check_typedef (value_type (val)); @@ -3006,7 +2913,7 @@ Index: gdb-7.7.90.20140613/gdb/printcmd.c if (VALUE_LVAL (val) == lval_memory) next_address = value_address (val) + len; -@@ -366,7 +366,7 @@ print_scalar_formatted (const void *vala +@@ -363,7 +363,7 @@ print_scalar_formatted (const void *vala { struct gdbarch *gdbarch = get_type_arch (type); LONGEST val_long = 0; @@ -3015,11 +2922,11 @@ Index: gdb-7.7.90.20140613/gdb/printcmd.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); /* String printing should go through val_print_scalar_formatted. */ -Index: gdb-7.7.90.20140613/gdb/procfs.c +Index: gdb-7.8.90.20150202/gdb/procfs.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/procfs.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/procfs.c 2014-06-24 16:07:27.264986896 +0200 -@@ -4916,7 +4916,7 @@ procfs_remove_watchpoint (struct target_ +--- gdb-7.8.90.20150202.orig/gdb/procfs.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/procfs.c 2015-02-11 16:01:59.616966381 +0100 +@@ -4859,7 +4859,7 @@ procfs_remove_watchpoint (struct target_ static int procfs_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -3028,11 +2935,11 @@ Index: gdb-7.7.90.20140613/gdb/procfs.c { /* The man page for proc(4) on Solaris 2.6 and up says that the system can support "thousands" of hardware watchpoints, but gives -Index: gdb-7.7.90.20140613/gdb/python/py-prettyprint.c +Index: gdb-7.8.90.20150202/gdb/python/py-prettyprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/python/py-prettyprint.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/python/py-prettyprint.c 2014-06-24 16:07:27.264986896 +0200 -@@ -687,7 +687,7 @@ print_children (PyObject *printer, const +--- gdb-7.8.90.20150202.orig/gdb/python/py-prettyprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/python/py-prettyprint.c 2015-02-11 16:01:59.616966381 +0100 +@@ -686,7 +686,7 @@ print_children (PyObject *printer, const enum ext_lang_rc gdbpy_apply_val_pretty_printer (const struct extension_language_defn *extlang, struct type *type, const gdb_byte *valaddr, @@ -3041,11 +2948,11 @@ Index: gdb-7.7.90.20140613/gdb/python/py-prettyprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.7.90.20140613/gdb/regcache.c +Index: gdb-7.8.90.20150202/gdb/regcache.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/regcache.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/regcache.c 2014-06-24 16:07:27.264986896 +0200 -@@ -899,7 +899,7 @@ typedef void (regcache_write_ftype) (str +--- gdb-7.8.90.20150202.orig/gdb/regcache.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/regcache.c 2015-02-11 16:01:59.616966381 +0100 +@@ -941,7 +941,7 @@ typedef void (regcache_write_ftype) (str static enum register_status regcache_xfer_part (struct regcache *regcache, int regnum, @@ -3054,7 +2961,7 @@ Index: gdb-7.7.90.20140613/gdb/regcache.c enum register_status (*read) (struct regcache *regcache, int regnum, gdb_byte *buf), -@@ -943,7 +943,7 @@ regcache_xfer_part (struct regcache *reg +@@ -985,7 +985,7 @@ regcache_xfer_part (struct regcache *reg enum register_status regcache_raw_read_part (struct regcache *regcache, int regnum, @@ -3063,7 +2970,7 @@ Index: gdb-7.7.90.20140613/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -@@ -954,7 +954,7 @@ regcache_raw_read_part (struct regcache +@@ -996,7 +996,7 @@ regcache_raw_read_part (struct regcache void regcache_raw_write_part (struct regcache *regcache, int regnum, @@ -3072,7 +2979,7 @@ Index: gdb-7.7.90.20140613/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -@@ -965,7 +965,7 @@ regcache_raw_write_part (struct regcache +@@ -1007,7 +1007,7 @@ regcache_raw_write_part (struct regcache enum register_status regcache_cooked_read_part (struct regcache *regcache, int regnum, @@ -3081,7 +2988,7 @@ Index: gdb-7.7.90.20140613/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -@@ -976,7 +976,7 @@ regcache_cooked_read_part (struct regcac +@@ -1018,7 +1018,7 @@ regcache_cooked_read_part (struct regcac void regcache_cooked_write_part (struct regcache *regcache, int regnum, @@ -3090,11 +2997,11 @@ Index: gdb-7.7.90.20140613/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -Index: gdb-7.7.90.20140613/gdb/regcache.h +Index: gdb-7.8.90.20150202/gdb/regcache.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/regcache.h 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/regcache.h 2014-06-24 16:07:27.265986897 +0200 -@@ -89,9 +89,9 @@ extern void regcache_raw_write_unsigned +--- gdb-7.8.90.20150202.orig/gdb/regcache.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/regcache.h 2015-02-11 16:01:59.617966386 +0100 +@@ -92,9 +92,9 @@ extern void regcache_raw_write_unsigned extern enum register_status regcache_raw_read_part (struct regcache *regcache, int regnum, @@ -3106,7 +3013,7 @@ Index: gdb-7.7.90.20140613/gdb/regcache.h void regcache_invalidate (struct regcache *regcache, int regnum); -@@ -128,10 +128,11 @@ extern void regcache_cooked_write_unsign +@@ -131,10 +131,11 @@ extern void regcache_cooked_write_unsign write style operations. */ enum register_status regcache_cooked_read_part (struct regcache *regcache, @@ -3121,11 +3028,11 @@ Index: gdb-7.7.90.20140613/gdb/regcache.h /* Special routines to read/write the PC. */ -Index: gdb-7.7.90.20140613/gdb/remote.c +Index: gdb-7.8.90.20150202/gdb/remote.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/remote.c 2014-06-24 16:07:26.658986224 +0200 -+++ gdb-7.7.90.20140613/gdb/remote.c 2014-06-24 16:07:27.266986898 +0200 -@@ -8272,7 +8272,7 @@ int remote_hw_breakpoint_limit = -1; +--- gdb-7.8.90.20150202.orig/gdb/remote.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/remote.c 2015-02-11 16:01:59.619966396 +0100 +@@ -8371,7 +8371,7 @@ int remote_hw_breakpoint_limit = -1; static int remote_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -3134,24 +3041,24 @@ Index: gdb-7.7.90.20140613/gdb/remote.c { if (remote_hw_watchpoint_length_limit == 0) return 0; -Index: gdb-7.7.90.20140613/gdb/spu-multiarch.c +Index: gdb-7.8.90.20150202/gdb/spu-multiarch.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/spu-multiarch.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/spu-multiarch.c 2014-06-24 16:07:27.266986898 +0200 -@@ -119,7 +119,7 @@ spu_thread_architecture (struct target_o +--- gdb-7.8.90.20150202.orig/gdb/spu-multiarch.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/spu-multiarch.c 2015-02-11 16:01:59.619966396 +0100 +@@ -117,7 +117,7 @@ spu_thread_architecture (struct target_o /* Override the to_region_ok_for_hw_watchpoint routine. */ static int spu_region_ok_for_hw_watchpoint (struct target_ops *self, - CORE_ADDR addr, int len) + CORE_ADDR addr, LONGEST len) { - struct target_ops *ops_beneath = find_target_beneath (&spu_ops); - while (ops_beneath && !ops_beneath->to_region_ok_for_hw_watchpoint) -Index: gdb-7.7.90.20140613/gdb/stack.c + struct target_ops *ops_beneath = find_target_beneath (self); + +Index: gdb-7.8.90.20150202/gdb/stack.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/stack.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/stack.c 2014-06-24 16:07:27.267986900 +0200 -@@ -179,7 +179,7 @@ print_stack_frame (struct frame_info *fr +--- gdb-7.8.90.20150202.orig/gdb/stack.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/stack.c 2015-02-11 16:01:59.620966401 +0100 +@@ -175,7 +175,7 @@ print_stack_frame (struct frame_info *fr argument (not just the first nameless argument). */ static void @@ -3160,7 +3067,7 @@ Index: gdb-7.7.90.20140613/gdb/stack.c int first, struct ui_file *stream) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -525,7 +525,7 @@ print_frame_args (struct symbol *func, s +@@ -524,7 +524,7 @@ print_frame_args (struct symbol *func, s /* Offset of next stack argument beyond the one we have seen that is at the highest offset, or -1 if we haven't come to a stack argument yet. */ @@ -3169,7 +3076,7 @@ Index: gdb-7.7.90.20140613/gdb/stack.c /* Number of ints of arguments that we have printed so far. */ int args_printed = 0; struct cleanup *old_chain; -@@ -559,8 +559,8 @@ print_frame_args (struct symbol *func, s +@@ -558,8 +558,8 @@ print_frame_args (struct symbol *func, s case LOC_ARG: case LOC_REF_ARG: { @@ -3180,7 +3087,7 @@ Index: gdb-7.7.90.20140613/gdb/stack.c /* Compute address of next argument by adding the size of this argument and rounding to an int boundary. */ -@@ -695,7 +695,7 @@ print_frame_args (struct symbol *func, s +@@ -694,7 +694,7 @@ print_frame_args (struct symbol *func, s enough about the stack to find them. */ if (num != -1) { @@ -3189,11 +3096,11 @@ Index: gdb-7.7.90.20140613/gdb/stack.c if (highest_offset == -1) start = gdbarch_frame_args_skip (get_frame_arch (frame)); -Index: gdb-7.7.90.20140613/gdb/symmisc.c +Index: gdb-7.8.90.20150202/gdb/symmisc.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/symmisc.c 2014-06-24 16:07:26.747986322 +0200 -+++ gdb-7.7.90.20140613/gdb/symmisc.c 2014-06-24 16:07:27.267986900 +0200 -@@ -530,11 +530,11 @@ print_symbol (void *args) +--- gdb-7.8.90.20150202.orig/gdb/symmisc.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/symmisc.c 2015-02-11 16:01:59.620966401 +0100 +@@ -534,11 +534,11 @@ print_symbol (void *args) case LOC_CONST_BYTES: { @@ -3208,29 +3115,20 @@ Index: gdb-7.7.90.20140613/gdb/symmisc.c for (i = 0; i < TYPE_LENGTH (type); i++) fprintf_filtered (outfile, " %02x", (unsigned) SYMBOL_VALUE_BYTES (symbol)[i]); -Index: gdb-7.7.90.20140613/gdb/target.c +Index: gdb-7.8.90.20150202/gdb/target.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/target.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/target.c 2014-06-24 16:07:27.268986901 +0200 -@@ -55,7 +55,7 @@ static int default_watchpoint_addr_withi +--- gdb-7.8.90.20150202.orig/gdb/target.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/target.c 2015-02-11 16:01:59.621966406 +0100 +@@ -54,7 +54,7 @@ static int default_watchpoint_addr_withi CORE_ADDR, CORE_ADDR, int); static int default_region_ok_for_hw_watchpoint (struct target_ops *, - CORE_ADDR, int); + CORE_ADDR, LONGEST); - static void default_rcmd (struct target_ops *, char *, struct ui_file *); + static void default_rcmd (struct target_ops *, const char *, struct ui_file *); -@@ -153,7 +153,7 @@ static int debug_to_watchpoint_addr_with - CORE_ADDR, CORE_ADDR, int); - - static int debug_to_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR, int); -+ CORE_ADDR, LONGEST); - - static int debug_to_can_accel_watchpoint_condition (struct target_ops *self, - CORE_ADDR, int, int, -@@ -2951,7 +2951,7 @@ target_fileio_read_stralloc (const char +@@ -2975,7 +2975,7 @@ target_fileio_read_stralloc (const char static int default_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -3239,20 +3137,11 @@ Index: gdb-7.7.90.20140613/gdb/target.c { return (len <= gdbarch_ptr_bit (target_gdbarch ()) / TARGET_CHAR_BIT); } -@@ -3664,7 +3664,7 @@ debug_to_can_use_hw_breakpoint (struct t - - static int - debug_to_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) - { - CORE_ADDR retval; - -Index: gdb-7.7.90.20140613/gdb/target.h +Index: gdb-7.8.90.20150202/gdb/target.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/target.h 2014-06-24 16:07:27.060986670 +0200 -+++ gdb-7.7.90.20140613/gdb/target.h 2014-06-24 16:07:27.268986901 +0200 -@@ -475,7 +475,7 @@ struct target_ops +--- gdb-7.8.90.20150202.orig/gdb/target.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/target.h 2015-02-11 16:01:59.622966411 +0100 +@@ -489,7 +489,7 @@ struct target_ops /* Documentation of this routine is provided with the corresponding target_* macro. */ int (*to_region_ok_for_hw_watchpoint) (struct target_ops *, @@ -3261,11 +3150,11 @@ Index: gdb-7.7.90.20140613/gdb/target.h TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint); int (*to_can_accel_watchpoint_condition) (struct target_ops *, -Index: gdb-7.7.90.20140613/gdb/tracepoint.c +Index: gdb-7.8.90.20150202/gdb/tracepoint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/tracepoint.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/tracepoint.c 2014-06-24 16:07:27.269986902 +0200 -@@ -930,13 +930,13 @@ add_register (struct collection_list *co +--- gdb-7.8.90.20150202.orig/gdb/tracepoint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/tracepoint.c 2015-02-11 16:01:59.623966416 +0100 +@@ -928,13 +928,13 @@ add_register (struct collection_list *co static void add_memrange (struct collection_list *memranges, int type, bfd_signed_vma base, @@ -3281,7 +3170,7 @@ Index: gdb-7.7.90.20140613/gdb/tracepoint.c } /* type: memrange_absolute == memory, other n == basereg */ -@@ -966,7 +966,7 @@ collect_symbol (struct collection_list * +@@ -964,7 +964,7 @@ collect_symbol (struct collection_list * CORE_ADDR scope, int trace_string) { @@ -3290,7 +3179,7 @@ Index: gdb-7.7.90.20140613/gdb/tracepoint.c unsigned int reg; bfd_signed_vma offset; int treat_as_expr = 0; -@@ -990,8 +990,8 @@ collect_symbol (struct collection_list * +@@ -988,8 +988,8 @@ collect_symbol (struct collection_list * char tmp[40]; sprintf_vma (tmp, offset); @@ -3301,7 +3190,7 @@ Index: gdb-7.7.90.20140613/gdb/tracepoint.c tmp /* address */); } /* A struct may be a C++ class with static fields, go to general -@@ -1023,8 +1023,8 @@ collect_symbol (struct collection_list * +@@ -1021,8 +1021,8 @@ collect_symbol (struct collection_list * offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3312,7 +3201,7 @@ Index: gdb-7.7.90.20140613/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from frame ptr reg %d\n", reg); } -@@ -1035,8 +1035,8 @@ collect_symbol (struct collection_list * +@@ -1033,8 +1033,8 @@ collect_symbol (struct collection_list * offset = 0; if (info_verbose) { @@ -3323,7 +3212,7 @@ Index: gdb-7.7.90.20140613/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from reg %d\n", reg); } -@@ -1047,8 +1047,8 @@ collect_symbol (struct collection_list * +@@ -1045,8 +1045,8 @@ collect_symbol (struct collection_list * offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3358,11 +3247,11 @@ Index: gdb-7.7.90.20140613/gdb/tracepoint.c } if (BLOCK_FUNCTION (block)) break; -Index: gdb-7.7.90.20140613/gdb/typeprint.c +Index: gdb-7.8.90.20150202/gdb/typeprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/typeprint.c 2014-06-24 16:07:26.339985870 +0200 -+++ gdb-7.7.90.20140613/gdb/typeprint.c 2014-06-24 16:07:27.269986902 +0200 -@@ -405,7 +405,7 @@ whatis_exp (char *exp, int show) +--- gdb-7.8.90.20150202.orig/gdb/typeprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/typeprint.c 2015-02-11 16:01:59.623966416 +0100 +@@ -402,7 +402,7 @@ whatis_exp (char *exp, int show) struct type *real_type = NULL; struct type *type; int full = 0; @@ -3371,11 +3260,11 @@ Index: gdb-7.7.90.20140613/gdb/typeprint.c int using_enc = 0; struct value_print_options opts; struct type_print_options flags = default_ptype_flags; -Index: gdb-7.7.90.20140613/gdb/valarith.c +Index: gdb-7.8.90.20150202/gdb/valarith.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/valarith.c 2014-06-24 16:07:26.411985950 +0200 -+++ gdb-7.7.90.20140613/gdb/valarith.c 2014-06-24 16:07:27.269986902 +0200 -@@ -190,12 +190,13 @@ value_subscript (struct value *array, LO +--- gdb-7.8.90.20150202.orig/gdb/valarith.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/valarith.c 2015-02-11 16:01:59.623966416 +0100 +@@ -188,12 +188,13 @@ value_subscript (struct value *array, LO to doubles, but no longer does. */ struct value * @@ -3392,18 +3281,16 @@ Index: gdb-7.7.90.20140613/gdb/valarith.c LONGEST elt_stride = TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)); struct value *v; -@@ -204,7 +205,9 @@ value_subscripted_rvalue (struct value * +@@ -202,7 +203,7 @@ value_subscripted_rvalue (struct value * if (TYPE_NOT_ALLOCATED (array_type)) error (_("no such vector element because not allocated")); - elt_offs = longest_to_int (index - lowerbound); -+ if (index < lowerbound) -+ error (_("no such vector element")); + elt_offs = index - lowerbound; if (elt_stride > 0) elt_offs *= elt_stride; -@@ -662,7 +665,7 @@ value_concat (struct value *arg1, struct +@@ -663,7 +664,7 @@ value_concat (struct value *arg1, struct struct value *inval1; struct value *inval2; struct value *outval = NULL; @@ -3412,7 +3299,7 @@ Index: gdb-7.7.90.20140613/gdb/valarith.c int count, idx; char *ptr; char inchar; -@@ -1515,7 +1518,7 @@ value_binop (struct value *arg1, struct +@@ -1516,7 +1517,7 @@ value_binop (struct value *arg1, struct int value_logical_not (struct value *arg1) { @@ -3421,7 +3308,7 @@ Index: gdb-7.7.90.20140613/gdb/valarith.c const gdb_byte *p; struct type *type1; -@@ -1546,11 +1549,11 @@ value_logical_not (struct value *arg1) +@@ -1547,11 +1548,11 @@ value_logical_not (struct value *arg1) static int value_strcmp (struct value *arg1, struct value *arg2) { @@ -3436,11 +3323,11 @@ Index: gdb-7.7.90.20140613/gdb/valarith.c for (i = 0; i < len; i++) { -Index: gdb-7.7.90.20140613/gdb/valops.c +Index: gdb-7.8.90.20150202/gdb/valops.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/valops.c 2014-06-24 16:07:26.946986543 +0200 -+++ gdb-7.7.90.20140613/gdb/valops.c 2014-06-24 16:07:27.270986903 +0200 -@@ -51,11 +51,11 @@ static int typecmp (int staticp, int var +--- gdb-7.8.90.20150202.orig/gdb/valops.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/valops.c 2015-02-11 16:01:59.624966421 +0100 +@@ -47,11 +47,11 @@ static int typecmp (int staticp, int var struct field t1[], struct value *t2[]); static struct value *search_struct_field (const char *, struct value *, @@ -3454,7 +3341,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c static int find_oload_champ_namespace (struct value **, int, const char *, const char *, -@@ -83,7 +83,7 @@ oload_classification classify_oload_matc +@@ -79,7 +79,7 @@ oload_classification classify_oload_matc int, int); static struct value *value_struct_elt_for_reference (struct type *, @@ -3463,7 +3350,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c const char *, struct type *, int, enum noside); -@@ -100,9 +100,9 @@ static CORE_ADDR allocate_space_in_infer +@@ -96,9 +96,9 @@ static CORE_ADDR allocate_space_in_infer static struct value *cast_into_complex (struct type *, struct value *); static void find_method_list (struct value **, const char *, @@ -3475,7 +3362,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c void _initialize_valops (void); -@@ -187,7 +187,7 @@ find_function_in_inferior (const char *n +@@ -183,7 +183,7 @@ find_function_in_inferior (const char *n space. */ struct value * @@ -3484,7 +3371,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c { struct objfile *objf; struct value *val = find_function_in_inferior ("malloc", &objf); -@@ -260,7 +260,8 @@ value_cast_structs (struct type *type, s +@@ -256,7 +256,8 @@ value_cast_structs (struct type *type, s if (TYPE_NAME (t2) != NULL) { /* Try downcasting using the run-time type of the value. */ @@ -3494,7 +3381,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c struct type *real_type; real_type = value_rtti_type (v2, &full, &top, &using_enc); -@@ -400,12 +401,12 @@ value_cast (struct type *type, struct va +@@ -396,12 +397,12 @@ value_cast (struct type *type, struct va if (code1 == TYPE_CODE_ARRAY) { struct type *element_type = TYPE_TARGET_TYPE (type); @@ -3509,7 +3396,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c LONGEST low_bound, high_bound, new_length; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -639,7 +640,7 @@ value_reinterpret_cast (struct type *typ +@@ -635,7 +636,7 @@ value_reinterpret_cast (struct type *typ static int dynamic_cast_check_1 (struct type *desired_type, const gdb_byte *valaddr, @@ -3518,7 +3405,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c CORE_ADDR address, struct value *val, struct type *search_type, -@@ -651,8 +652,8 @@ dynamic_cast_check_1 (struct type *desir +@@ -647,8 +648,8 @@ dynamic_cast_check_1 (struct type *desir for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i) { @@ -3529,7 +3416,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c if (class_types_same_p (desired_type, TYPE_BASECLASS (search_type, i))) { -@@ -686,7 +687,7 @@ dynamic_cast_check_1 (struct type *desir +@@ -682,7 +683,7 @@ dynamic_cast_check_1 (struct type *desir static int dynamic_cast_check_2 (struct type *desired_type, const gdb_byte *valaddr, @@ -3538,7 +3425,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c CORE_ADDR address, struct value *val, struct type *search_type, -@@ -696,7 +697,7 @@ dynamic_cast_check_2 (struct type *desir +@@ -692,7 +693,7 @@ dynamic_cast_check_2 (struct type *desir for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i) { @@ -3547,7 +3434,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c if (! BASETYPE_VIA_PUBLIC (search_type, i)) continue; -@@ -727,7 +728,8 @@ dynamic_cast_check_2 (struct type *desir +@@ -723,7 +724,8 @@ dynamic_cast_check_2 (struct type *desir struct value * value_dynamic_cast (struct type *type, struct value *arg) { @@ -3557,7 +3444,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c struct type *resolved_type = check_typedef (type); struct type *arg_type = check_typedef (value_type (arg)); struct type *class_type, *rtti_type; -@@ -958,7 +960,7 @@ value_at_lazy (struct type *type, CORE_A +@@ -954,7 +956,7 @@ value_at_lazy (struct type *type, CORE_A } void @@ -3566,7 +3453,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length) { -@@ -1058,7 +1060,7 @@ value_assign (struct value *toval, struc +@@ -1054,7 +1056,7 @@ value_assign (struct value *toval, struc { const gdb_byte *dest_buffer; CORE_ADDR changed_addr; @@ -3575,16 +3462,16 @@ Index: gdb-7.7.90.20140613/gdb/valops.c gdb_byte buffer[sizeof (LONGEST)]; if (value_bitsize (toval)) -@@ -1137,7 +1139,7 @@ value_assign (struct value *toval, struc - if (value_bitsize (toval)) - { - struct value *parent = value_parent (toval); -- int offset = value_offset (parent) + value_offset (toval); -+ LONGEST offset = value_offset (parent) + value_offset (toval); - int changed_len; - gdb_byte buffer[sizeof (LONGEST)]; - int optim, unavail; -@@ -1605,7 +1607,7 @@ value_array (int lowbound, int highbound +@@ -1123,7 +1125,7 @@ value_assign (struct value *toval, struc + if (value_bitsize (toval)) + { + struct value *parent = value_parent (toval); +- int offset = value_offset (parent) + value_offset (toval); ++ LONGEST offset = value_offset (parent) + value_offset (toval); + int changed_len; + gdb_byte buffer[sizeof (LONGEST)]; + int optim, unavail; +@@ -1604,7 +1606,7 @@ value_array (int lowbound, int highbound { int nelem; int idx; @@ -3593,7 +3480,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c struct value *val; struct type *arraytype; -@@ -1780,7 +1782,7 @@ typecmp (int staticp, int varargs, int n +@@ -1779,7 +1781,7 @@ typecmp (int staticp, int varargs, int n static void update_search_result (struct value **result_ptr, struct value *v, @@ -3602,7 +3489,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c const char *name, struct type *type) { if (v != NULL) -@@ -1804,10 +1806,10 @@ update_search_result (struct value **res +@@ -1803,10 +1805,10 @@ update_search_result (struct value **res lookup is ambiguous. */ static void @@ -3615,7 +3502,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c struct type *outermost_type) { int i; -@@ -1856,7 +1858,7 @@ do_search_struct_field (const char *name +@@ -1853,7 +1855,7 @@ do_search_struct_field (const char *name . */ struct value *v = NULL; @@ -3624,7 +3511,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c /* This is pretty gross. In G++, the offset in an anonymous union is relative to the beginning of the -@@ -1895,7 +1897,7 @@ do_search_struct_field (const char *name +@@ -1892,7 +1894,7 @@ do_search_struct_field (const char *name && (strcmp_iw (name, TYPE_BASECLASS_NAME (type, i)) == 0)); @@ -3633,7 +3520,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -1968,11 +1970,11 @@ do_search_struct_field (const char *name +@@ -1965,11 +1967,11 @@ do_search_struct_field (const char *name fields, look for a baseclass named NAME. */ static struct value * @@ -3647,7 +3534,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c do_search_struct_field (name, arg1, offset, type, looking_for_baseclass, &result, &boffset, type); -@@ -1989,7 +1991,7 @@ search_struct_field (const char *name, s +@@ -1986,7 +1988,7 @@ search_struct_field (const char *name, s static struct value * search_struct_method (const char *name, struct value **arg1p, @@ -3656,7 +3543,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c int *static_memfuncp, struct type *type) { int i; -@@ -2053,8 +2055,8 @@ search_struct_method (const char *name, +@@ -2050,8 +2052,8 @@ search_struct_method (const char *name, for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--) { @@ -3667,7 +3554,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2289,10 +2291,10 @@ value_struct_elt_bitpos (struct value ** +@@ -2286,10 +2288,10 @@ value_struct_elt_bitpos (struct value ** static void find_method_list (struct value **argp, const char *method, @@ -3680,7 +3567,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c { int i; struct fn_field *f = NULL; -@@ -2349,7 +2351,7 @@ find_method_list (struct value **argp, c +@@ -2346,7 +2348,7 @@ find_method_list (struct value **argp, c extension methods. */ for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--) { @@ -3689,7 +3576,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2392,7 +2394,7 @@ value_find_oload_method_list (struct val +@@ -2389,7 +2391,7 @@ value_find_oload_method_list (struct val int offset, struct fn_field **fn_list, int *num_fns, VEC (xmethod_worker_ptr) **xm_worker_vec, @@ -3698,7 +3585,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c { struct type *t; -@@ -2496,7 +2498,7 @@ find_overload_match (struct value **args +@@ -2500,7 +2502,7 @@ find_overload_match (struct value **args /* Number of overloaded instances being considered. */ int num_fns = 0; struct type *basetype = NULL; @@ -3707,7 +3594,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL); -@@ -3307,7 +3309,7 @@ compare_parameters (struct type *t1, str +@@ -3315,7 +3317,7 @@ compare_parameters (struct type *t1, str the form "DOMAIN::NAME". */ static struct value * @@ -3716,7 +3603,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c struct type *curtype, const char *name, struct type *intype, int want_address, -@@ -3341,7 +3343,7 @@ value_struct_elt_for_reference (struct t +@@ -3349,7 +3351,7 @@ value_struct_elt_for_reference (struct t if (want_address) return value_from_longest (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain), @@ -3725,7 +3612,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c else if (noside != EVAL_NORMAL) return allocate_value (TYPE_FIELD_TYPE (t, i)); else -@@ -3509,7 +3511,7 @@ value_struct_elt_for_reference (struct t +@@ -3517,7 +3519,7 @@ value_struct_elt_for_reference (struct t for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--) { struct value *v; @@ -3734,7 +3621,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (t, i)) base_offset = 0; -@@ -3599,7 +3601,7 @@ value_maybe_namespace_elt (const struct +@@ -3598,7 +3600,7 @@ value_maybe_namespace_elt (const struct struct type * value_rtti_indirect_type (struct value *v, int *full, @@ -3743,7 +3630,7 @@ Index: gdb-7.7.90.20140613/gdb/valops.c { struct value *target; struct type *type, *real_type, *target_type; -@@ -3649,12 +3651,12 @@ value_rtti_indirect_type (struct value * +@@ -3648,12 +3650,12 @@ value_rtti_indirect_type (struct value * struct value * value_full_object (struct value *argp, struct type *rtype, @@ -3758,11 +3645,11 @@ Index: gdb-7.7.90.20140613/gdb/valops.c int using_enc = 0; struct value *new_val; -Index: gdb-7.7.90.20140613/gdb/valprint.c +Index: gdb-7.8.90.20150202/gdb/valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/valprint.c 2014-06-24 16:07:26.247985768 +0200 -+++ gdb-7.7.90.20140613/gdb/valprint.c 2014-06-24 16:07:27.270986903 +0200 -@@ -302,7 +302,7 @@ val_print_scalar_type_p (struct type *ty +--- gdb-7.8.90.20150202.orig/gdb/valprint.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/valprint.c 2015-02-11 16:01:59.625966426 +0100 +@@ -298,7 +298,7 @@ val_print_scalar_type_p (struct type *ty int valprint_check_validity (struct ui_file *stream, struct type *type, @@ -3771,7 +3658,7 @@ Index: gdb-7.7.90.20140613/gdb/valprint.c const struct value *val) { CHECK_TYPEDEF (type); -@@ -399,7 +399,7 @@ val_print_not_associated (struct ui_file +@@ -396,7 +396,7 @@ val_print_not_associated (struct ui_file void generic_val_print (struct type *type, const gdb_byte *valaddr, @@ -3780,7 +3667,7 @@ Index: gdb-7.7.90.20140613/gdb/valprint.c struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, -@@ -761,7 +761,7 @@ generic_val_print (struct type *type, co +@@ -758,7 +758,7 @@ generic_val_print (struct type *type, co RECURSE. */ void @@ -3789,7 +3676,7 @@ Index: gdb-7.7.90.20140613/gdb/valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -999,7 +999,7 @@ val_print_type_code_flags (struct type * +@@ -996,7 +996,7 @@ val_print_type_code_flags (struct type * void val_print_scalar_formatted (struct type *type, @@ -3798,7 +3685,7 @@ Index: gdb-7.7.90.20140613/gdb/valprint.c const struct value *val, const struct value_print_options *options, int size, -@@ -1540,7 +1540,7 @@ print_decimal_chars (struct ui_file *str +@@ -1538,7 +1538,7 @@ print_decimal_chars (struct ui_file *str void print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, @@ -3807,7 +3694,7 @@ Index: gdb-7.7.90.20140613/gdb/valprint.c { const gdb_byte *p; -@@ -1657,22 +1657,22 @@ maybe_print_array_index (struct type *in +@@ -1655,22 +1655,22 @@ maybe_print_array_index (struct type *in void val_print_array_elements (struct type *type, @@ -3836,7 +3723,7 @@ Index: gdb-7.7.90.20140613/gdb/valprint.c LONGEST low_bound, high_bound; elttype = TYPE_TARGET_TYPE (type); -@@ -1743,7 +1743,7 @@ val_print_array_elements (struct type *t +@@ -1741,7 +1741,7 @@ val_print_array_elements (struct type *t address, stream, recurse + 1, val, options, current_language); annotate_elt_rep (reps); @@ -3845,7 +3732,7 @@ Index: gdb-7.7.90.20140613/gdb/valprint.c annotate_elt_rep_end (); i = rep1 - 1; -@@ -2400,7 +2400,7 @@ print_converted_chars_to_obstack (struct +@@ -2397,7 +2397,7 @@ print_converted_chars_to_obstack (struct void generic_printstr (struct ui_file *stream, struct type *type, @@ -3854,10 +3741,10 @@ Index: gdb-7.7.90.20140613/gdb/valprint.c const char *encoding, int force_ellipses, int quote_char, int c_style_terminator, const struct value_print_options *options) -Index: gdb-7.7.90.20140613/gdb/valprint.h +Index: gdb-7.8.90.20150202/gdb/valprint.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/valprint.h 2014-06-24 16:07:26.247985768 +0200 -+++ gdb-7.7.90.20140613/gdb/valprint.h 2014-06-24 16:07:27.271986904 +0200 +--- gdb-7.8.90.20150202.orig/gdb/valprint.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/valprint.h 2015-02-11 16:01:59.625966426 +0100 @@ -115,11 +115,11 @@ extern void maybe_print_array_index (str struct ui_file *stream, const struct value_print_options *); @@ -3908,11 +3795,11 @@ Index: gdb-7.7.90.20140613/gdb/valprint.h const char *encoding, int force_ellipses, int quote_char, int c_style_terminator, const struct value_print_options *options); -Index: gdb-7.7.90.20140613/gdb/value.c +Index: gdb-7.8.90.20150202/gdb/value.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/value.c 2014-06-24 16:07:27.026986632 +0200 -+++ gdb-7.7.90.20140613/gdb/value.c 2014-06-24 16:07:27.271986904 +0200 -@@ -69,10 +69,10 @@ struct internal_function +--- gdb-7.8.90.20150202.orig/gdb/value.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/value.c 2015-02-11 16:01:59.626966431 +0100 +@@ -66,10 +66,10 @@ struct internal_function struct range { /* Lowest offset in the range. */ @@ -3925,7 +3812,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c }; typedef struct range range_s; -@@ -83,8 +83,8 @@ DEF_VEC_O(range_s); +@@ -80,8 +80,8 @@ DEF_VEC_O(range_s); [offset2, offset2+len2) overlap. */ static int @@ -3936,7 +3823,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c { ULONGEST h, l; -@@ -108,7 +108,7 @@ range_lessthan (const range_s *r1, const +@@ -105,7 +105,7 @@ range_lessthan (const range_s *r1, const OFFSET+LENGTH). */ static int @@ -3945,7 +3832,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c { range_s what; int i; -@@ -252,7 +252,7 @@ struct value +@@ -240,7 +240,7 @@ struct value lval == lval_register, this is a further offset from location.address within the registers structure. Note also the member embedded_offset below. */ @@ -3954,7 +3841,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c /* Only used for bitfields; number of bits contained in them. */ int bitsize; -@@ -322,8 +322,8 @@ struct value +@@ -310,8 +310,8 @@ struct value `type', and `embedded_offset' is zero, so everything works normally. */ struct type *enclosing_type; @@ -3965,7 +3852,16 @@ Index: gdb-7.7.90.20140613/gdb/value.c /* Values are stored in a chain, so that they can be deleted easily over calls to the inferior. Values assigned to internal -@@ -351,7 +351,8 @@ value_bits_available (const struct value +@@ -342,7 +342,7 @@ struct value + }; + + int +-value_bits_available (const struct value *value, int offset, int length) ++value_bits_available (const struct value *value, LONGEST offset, LONGEST length) + { + gdb_assert (!value->lazy); + +@@ -350,7 +350,8 @@ value_bits_available (const struct value } int @@ -3975,7 +3871,27 @@ Index: gdb-7.7.90.20140613/gdb/value.c { return value_bits_available (value, offset * TARGET_CHAR_BIT, -@@ -558,7 +559,8 @@ mark_value_bits_unavailable (struct valu +@@ -358,7 +359,8 @@ value_bytes_available (const struct valu + } + + int +-value_bits_any_optimized_out (const struct value *value, int bit_offset, int bit_length) ++value_bits_any_optimized_out (const struct value *value, LONGEST bit_offset, ++ LONGEST bit_length) + { + gdb_assert (!value->lazy); + +@@ -420,7 +422,8 @@ value_entirely_optimized_out (struct val + OFFSET bits, and extending for the next LENGTH bits. */ + + static void +-insert_into_bit_range_vector (VEC(range_s) **vectorp, int offset, int length) ++insert_into_bit_range_vector (VEC(range_s) **vectorp, LONGEST offset, ++ LONGEST length) + { + range_s newr; + int i; +@@ -591,7 +594,8 @@ mark_value_bits_unavailable (struct valu } void @@ -3985,7 +3901,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c { mark_value_bits_unavailable (value, offset * TARGET_CHAR_BIT, -@@ -572,7 +574,7 @@ mark_value_bytes_unavailable (struct val +@@ -605,7 +609,7 @@ mark_value_bytes_unavailable (struct val static int find_first_range_overlap (VEC(range_s) *ranges, int pos, @@ -3994,20 +3910,33 @@ Index: gdb-7.7.90.20140613/gdb/value.c { range_s *r; int i; -@@ -763,9 +765,9 @@ value_available_contents_bits_eq (const +@@ -801,9 +805,9 @@ find_first_range_overlap_and_match (stru + Return true if the available bits match. */ + + static int +-value_contents_bits_eq (const struct value *val1, int offset1, +- const struct value *val2, int offset2, +- int length) ++value_contents_bits_eq (const struct value *val1, LONGEST offset1, ++ const struct value *val2, LONGEST offset2, ++ LONGEST length) + { + /* Each array element corresponds to a ranges source (unavailable, + optimized out). '1' is for VAL1, '2' for VAL2. */ +@@ -863,9 +867,9 @@ value_contents_bits_eq (const struct val } int --value_available_contents_eq (const struct value *val1, int offset1, -- const struct value *val2, int offset2, -- int length) -+value_available_contents_eq (const struct value *val1, LONGEST offset1, -+ const struct value *val2, LONGEST offset2, -+ LONGEST length) +-value_contents_eq (const struct value *val1, int offset1, +- const struct value *val2, int offset2, +- int length) ++value_contents_eq (const struct value *val1, LONGEST offset1, ++ const struct value *val2, LONGEST offset2, ++ LONGEST length) { - return value_available_contents_bits_eq (val1, offset1 * TARGET_CHAR_BIT, - val2, offset2 * TARGET_CHAR_BIT, -@@ -930,13 +932,13 @@ deprecated_set_value_type (struct value + return value_contents_bits_eq (val1, offset1 * TARGET_CHAR_BIT, + val2, offset2 * TARGET_CHAR_BIT, +@@ -1029,13 +1033,13 @@ deprecated_set_value_type (struct value value->type = type; } @@ -4023,7 +3952,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c { value->offset = offset; } -@@ -1106,8 +1108,9 @@ value_contents_all (struct value *value) +@@ -1246,8 +1250,9 @@ value_ranges_copy_adjusted (struct value DST_OFFSET+LENGTH) range are wholly available. */ void @@ -4035,7 +3964,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c { range_s *r; int i; -@@ -1159,8 +1162,8 @@ value_contents_copy_raw (struct value *d +@@ -1293,8 +1298,8 @@ value_contents_copy_raw (struct value *d DST_OFFSET+LENGTH) range are wholly available. */ void @@ -4044,18 +3973,28 @@ Index: gdb-7.7.90.20140613/gdb/value.c +value_contents_copy (struct value *dst, ssize_t dst_offset, + struct value *src, ssize_t src_offset, ssize_t length) { - require_not_optimized_out (src); + if (src->lazy) + value_fetch_lazy (src); +@@ -1358,7 +1363,8 @@ value_optimized_out (struct value *value + the following LENGTH bytes. */ -@@ -1265,7 +1268,7 @@ value_entirely_optimized_out (const stru - } - - int --value_bits_valid (const struct value *value, int offset, int length) -+value_bits_valid (const struct value *value, LONGEST offset, LONGEST length) + void +-mark_value_bytes_optimized_out (struct value *value, int offset, int length) ++mark_value_bytes_optimized_out (struct value *value, LONGEST offset, ++ LONGEST length) { - if (!value->optimized_out) - return 1; -@@ -1278,7 +1281,7 @@ value_bits_valid (const struct value *va + mark_value_bits_optimized_out (value, + offset * TARGET_CHAR_BIT, +@@ -1368,14 +1374,15 @@ mark_value_bytes_optimized_out (struct v + /* See value.h. */ + + void +-mark_value_bits_optimized_out (struct value *value, int offset, int length) ++mark_value_bits_optimized_out (struct value *value, LONGEST offset, ++ LONGEST length) + { + insert_into_bit_range_vector (&value->optimized_out, offset, length); + } int value_bits_synthetic_pointer (const struct value *value, @@ -4064,7 +4003,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c { if (value->lval != lval_computed || !value->location.computed.funcs->check_synthetic_pointer) -@@ -1288,26 +1291,26 @@ value_bits_synthetic_pointer (const stru +@@ -1385,26 +1392,26 @@ value_bits_synthetic_pointer (const stru length); } @@ -4095,7 +4034,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c { value->pointed_to_offset = val; } -@@ -2154,7 +2157,7 @@ get_internalvar_function (struct interna +@@ -2263,7 +2270,7 @@ get_internalvar_function (struct interna } void @@ -4104,7 +4043,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c int bitsize, struct value *newval) { gdb_byte *addr; -@@ -2860,7 +2863,7 @@ set_value_enclosing_type (struct value * +@@ -2969,7 +2976,7 @@ set_value_enclosing_type (struct value * FIELDNO says which field. */ struct value * @@ -4113,16 +4052,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c int fieldno, struct type *arg_type) { struct value *v; -@@ -2888,7 +2891,7 @@ value_primitive_field (struct value *arg - bit. Assume that the address, offset, and embedded offset - are sufficiently aligned. */ - -- int bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno); -+ LONGEST bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno); - int container_bitsize = TYPE_LENGTH (type) * 8; - - if (arg1->optimized_out) -@@ -2915,7 +2918,7 @@ value_primitive_field (struct value *arg +@@ -3019,7 +3026,7 @@ value_primitive_field (struct value *arg /* This field is actually a base subobject, so preserve the entire object's contents for later references to virtual bases, etc. */ @@ -4131,7 +4061,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c /* Lazy register values with offsets are not supported. */ if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1)) -@@ -3014,7 +3017,7 @@ value_field (struct value *arg1, int fie +@@ -3105,7 +3112,7 @@ value_field (struct value *arg1, int fie struct value * value_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *type, @@ -4140,18 +4070,15 @@ Index: gdb-7.7.90.20140613/gdb/value.c { struct value *v; struct type *ftype = TYPE_FN_FIELD_TYPE (f, j); -@@ -3074,8 +3077,8 @@ value_fn_field (struct value **arg1p, st +@@ -3175,14 +3182,14 @@ value_fn_field (struct value **arg1p, st - static int - unpack_value_bits_as_long_1 (struct type *field_type, const gdb_byte *valaddr, -- int embedded_offset, int bitpos, int bitsize, -- const struct value *original_value, -+ LONGEST embedded_offset, LONGEST bitpos, -+ int bitsize, const struct value *original_value, - LONGEST *result) + static LONGEST + unpack_bits_as_long (struct type *field_type, const gdb_byte *valaddr, +- int bitpos, int bitsize) ++ LONGEST bitpos, int bitsize) { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (field_type)); -@@ -3083,7 +3086,7 @@ unpack_value_bits_as_long_1 (struct type + ULONGEST val; ULONGEST valmask; int lsbcount; int bytes_read; @@ -4160,29 +4087,7 @@ Index: gdb-7.7.90.20140613/gdb/value.c /* Read the minimum number of bytes required; there may not be enough bytes to read an entire ULONGEST. */ -@@ -3153,7 +3156,7 @@ unpack_value_bits_as_long_1 (struct type - - int - unpack_value_bits_as_long (struct type *field_type, const gdb_byte *valaddr, -- int embedded_offset, int bitpos, int bitsize, -+ LONGEST embedded_offset, int bitpos, int bitsize, - const struct value *original_value, - LONGEST *result) - { -@@ -3171,10 +3174,10 @@ unpack_value_bits_as_long (struct type * - - static int - unpack_value_field_as_long_1 (struct type *type, const gdb_byte *valaddr, -- int embedded_offset, int fieldno, -+ LONGEST embedded_offset, int fieldno, - const struct value *val, LONGEST *result) - { -- int bitpos = TYPE_FIELD_BITPOS (type, fieldno); -+ LONGEST bitpos = TYPE_FIELD_BITPOS (type, fieldno); - int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); - struct type *field_type = TYPE_FIELD_TYPE (type, fieldno); - -@@ -3190,7 +3193,7 @@ unpack_value_field_as_long_1 (struct typ +@@ -3231,7 +3238,7 @@ unpack_bits_as_long (struct type *field_ int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, @@ -4190,17 +4095,26 @@ Index: gdb-7.7.90.20140613/gdb/value.c + LONGEST embedded_offset, int fieldno, const struct value *val, LONGEST *result) { - gdb_assert (val != NULL); -@@ -3222,7 +3225,7 @@ unpack_field_as_long (struct type *type, + int bitpos = TYPE_FIELD_BITPOS (type, fieldno); +@@ -3275,7 +3282,7 @@ unpack_field_as_long (struct type *type, + void + unpack_value_bitfield (struct value *dest_val, + int bitpos, int bitsize, +- const gdb_byte *valaddr, int embedded_offset, ++ const gdb_byte *valaddr, LONGEST embedded_offset, + const struct value *val) + { + enum bfd_endian byte_order; +@@ -3313,7 +3320,7 @@ unpack_value_bitfield (struct value *des struct value * value_field_bitfield (struct type *type, int fieldno, const gdb_byte *valaddr, - int embedded_offset, const struct value *val) + LONGEST embedded_offset, const struct value *val) { - LONGEST l; - -@@ -3249,12 +3252,12 @@ value_field_bitfield (struct type *type, + int bitpos = TYPE_FIELD_BITPOS (type, fieldno); + int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); +@@ -3334,12 +3341,12 @@ value_field_bitfield (struct type *type, void modify_field (struct type *type, gdb_byte *addr, @@ -4215,11 +4129,11 @@ Index: gdb-7.7.90.20140613/gdb/value.c /* Normalize BITPOS. */ addr += bitpos / 8; -Index: gdb-7.7.90.20140613/gdb/value.h +Index: gdb-7.8.90.20150202/gdb/value.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/value.h 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/value.h 2014-06-24 16:07:27.272986905 +0200 -@@ -83,8 +83,8 @@ extern void set_value_parent (struct val +--- gdb-7.8.90.20150202.orig/gdb/value.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/value.h 2015-02-11 16:01:59.627966436 +0100 +@@ -131,8 +131,8 @@ extern void set_value_parent (struct val within the registers structure. Note also the member embedded_offset below. */ @@ -4230,7 +4144,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h /* The comment from "struct value" reads: ``Is it modifiable? Only relevant if lval != not_lval.''. Shouldn't the value instead be -@@ -153,10 +153,10 @@ extern struct type *value_actual_type (s +@@ -201,10 +201,10 @@ extern struct type *value_actual_type (s int resolve_simple_types, int *real_type_found); @@ -4245,17 +4159,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h /* For lval_computed values, this structure holds functions used to retrieve and set the value (or portions of the value). -@@ -184,7 +184,8 @@ struct lval_funcs - /* Check the validity of some bits in VALUE. This should return 1 - if all the bits starting at OFFSET and extending for LENGTH bits - are valid, or 0 if any bit is invalid. */ -- int (*check_validity) (const struct value *value, int offset, int length); -+ int (*check_validity) (const struct value *value, LONGEST offset, -+ LONGEST length); - - /* Return 1 if any bit in VALUE is valid, 0 if they are all invalid. */ - int (*check_any_valid) (const struct value *value); -@@ -202,7 +203,7 @@ struct lval_funcs +@@ -242,7 +242,7 @@ struct lval_funcs /* If non-NULL, this is used to determine whether the indicated bits of VALUE are a synthetic pointer. */ int (*check_synthetic_pointer) (const struct value *value, @@ -4264,7 +4168,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h /* Return a duplicate of VALUE's closure, for use in a new value. This may simply return the same closure, if VALUE's is -@@ -239,7 +240,7 @@ extern struct value *allocate_computed_v +@@ -279,7 +279,7 @@ extern struct value *allocate_computed_v Otherwise, return 1. */ extern int valprint_check_validity (struct ui_file *stream, struct type *type, @@ -4273,14 +4177,33 @@ Index: gdb-7.7.90.20140613/gdb/value.h const struct value *val); extern struct value *allocate_optimized_out_value (struct type *type); -@@ -421,13 +422,13 @@ extern struct value *coerce_array (struc - bits in the given range are valid, zero if any bit is invalid. */ +@@ -373,7 +373,8 @@ extern int value_optimized_out (struct v + otherwise. */ - extern int value_bits_valid (const struct value *value, -- int offset, int length); -+ LONGEST offset, LONGEST length); + extern int value_bits_any_optimized_out (const struct value *value, +- int bit_offset, int bit_length); ++ LONGEST bit_offset, ++ LONGEST bit_length); - /* Given a value, determine whether the bits starting at OFFSET and + /* Like value_optimized_out, but return true iff the whole value is + optimized out. */ +@@ -383,13 +384,13 @@ extern int value_entirely_optimized_out + LENGTH bytes as optimized out. */ + + extern void mark_value_bytes_optimized_out (struct value *value, +- int offset, int length); ++ LONGEST offset, LONGEST length); + + /* Mark VALUE's content bits starting at OFFSET and extending for + LENGTH bits as optimized out. */ + + extern void mark_value_bits_optimized_out (struct value *value, +- int offset, int length); ++ LONGEST offset, LONGEST length); + + /* Set or return field indicating whether a variable is initialized or + not, based on debugging information supplied by the compiler. +@@ -472,7 +473,7 @@ extern struct value *coerce_array (struc extending for LENGTH bits are a synthetic pointer. */ extern int value_bits_synthetic_pointer (const struct value *value, @@ -4289,7 +4212,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h /* Given a value, determine whether the contents bytes starting at OFFSET and extending for LENGTH bytes are available. This returns -@@ -435,7 +436,7 @@ extern int value_bits_synthetic_pointer +@@ -480,7 +481,7 @@ extern int value_bits_synthetic_pointer byte is unavailable. */ extern int value_bytes_available (const struct value *value, @@ -4298,7 +4221,16 @@ Index: gdb-7.7.90.20140613/gdb/value.h /* Given a value, determine whether the contents bits starting at OFFSET and extending for LENGTH bits are available. This returns -@@ -457,7 +458,7 @@ extern int value_entirely_unavailable (s +@@ -488,7 +489,7 @@ extern int value_bytes_available (const + bit is unavailable. */ + + extern int value_bits_available (const struct value *value, +- int offset, int length); ++ LONGEST offset, LONGEST length); + + /* Like value_bytes_available, but return false if any byte in the + whole object is unavailable. */ +@@ -502,7 +503,7 @@ extern int value_entirely_unavailable (s LENGTH bytes as unavailable. */ extern void mark_value_bytes_unavailable (struct value *value, @@ -4307,29 +4239,20 @@ Index: gdb-7.7.90.20140613/gdb/value.h /* Mark VALUE's content bits starting at OFFSET and extending for LENGTH bits as unavailable. */ -@@ -473,7 +474,7 @@ extern void mark_value_bits_unavailable - example, to compare a complete object value with itself, including - its enclosing type chunk, you'd do: +@@ -563,9 +564,9 @@ extern void mark_value_bits_unavailable + after the inferior is gone, it works with const values. Therefore, + this routine must not be called with lazy values. */ -- int len = TYPE_LENGTH (check_typedef (value_enclosing_type (val))); -+ ULONGEST len = TYPE_LENGTH (check_typedef (value_enclosing_type (val))); - value_available_contents (val, 0, val, 0, len); - - Returns true iff the set of available contents match. Unavailable -@@ -500,9 +501,9 @@ extern void mark_value_bits_unavailable - gone, it works with const values. Therefore, this routine must not - be called with lazy values. */ - --extern int value_available_contents_eq (const struct value *val1, int offset1, -- const struct value *val2, int offset2, -- int length); -+extern int value_available_contents_eq (const struct value *val1, LONGEST offset1, -+ const struct value *val2, LONGEST offset2, -+ LONGEST length); +-extern int value_contents_eq (const struct value *val1, int offset1, +- const struct value *val2, int offset2, +- int length); ++extern int value_contents_eq (const struct value *val1, LONGEST offset1, ++ const struct value *val2, LONGEST offset2, ++ LONGEST length); /* Read LENGTH bytes of memory starting at MEMADDR into BUFFER, which is (or will be copied to) VAL's contents buffer offset by -@@ -511,7 +512,7 @@ extern int value_available_contents_eq ( +@@ -574,7 +575,7 @@ extern int value_contents_eq (const stru memory is likewise unavailable. STACK indicates whether the memory is known to be stack memory. */ @@ -4338,16 +4261,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length); -@@ -545,7 +546,7 @@ extern CORE_ADDR unpack_pointer (struct - - extern int unpack_value_bits_as_long (struct type *field_type, - const gdb_byte *valaddr, -- int embedded_offset, int bitpos, -+ LONGEST embedded_offset, int bitpos, - int bitsize, - const struct value *original_value, - LONGEST *result); -@@ -554,12 +555,12 @@ extern LONGEST unpack_field_as_long (str +@@ -610,17 +611,18 @@ extern LONGEST unpack_field_as_long (str const gdb_byte *valaddr, int fieldno); extern int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, @@ -4355,6 +4269,13 @@ Index: gdb-7.7.90.20140613/gdb/value.h + LONGEST embedded_offset, int fieldno, const struct value *val, LONGEST *result); + extern void unpack_value_bitfield (struct value *dest_val, + int bitpos, int bitsize, +- const gdb_byte *valaddr, int embedded_offset, ++ const gdb_byte *valaddr, ++ LONGEST embedded_offset, + const struct value *val); + extern struct value *value_field_bitfield (struct type *type, int fieldno, const gdb_byte *valaddr, - int embedded_offset, @@ -4362,7 +4283,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h const struct value *val); extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num); -@@ -616,12 +617,12 @@ extern struct value *default_read_var_va +@@ -677,12 +679,12 @@ extern struct value *default_read_var_va extern struct value *allocate_value (struct type *type); extern struct value *allocate_value_lazy (struct type *type); @@ -4381,7 +4302,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h extern struct value *allocate_repeat_value (struct type *type, int count); -@@ -698,16 +699,16 @@ extern int find_overload_match (struct v +@@ -760,16 +762,16 @@ extern int find_overload_match (struct v extern struct value *value_field (struct value *arg1, int fieldno); @@ -4401,7 +4322,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h extern struct value *value_cast_pointers (struct type *, struct value *, int); -@@ -802,7 +803,7 @@ extern void set_internalvar_string (stru +@@ -864,7 +866,7 @@ extern void set_internalvar_string (stru extern void clear_internalvar (struct internalvar *var); extern void set_internalvar_component (struct internalvar *var, @@ -4410,7 +4331,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h int bitpos, int bitsize, struct value *newvalue); -@@ -883,7 +884,7 @@ extern struct value *value_x_unop (struc +@@ -945,7 +947,7 @@ extern struct value *value_x_unop (struc enum noside noside); extern struct value *value_fn_field (struct value **arg1p, struct fn_field *f, @@ -4419,7 +4340,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h extern int binop_types_user_defined_p (enum exp_opcode op, struct type *type1, -@@ -911,7 +912,8 @@ extern void release_value_or_incref (str +@@ -973,7 +975,8 @@ extern void release_value_or_incref (str extern int record_latest_value (struct value *val); extern void modify_field (struct type *type, gdb_byte *addr, @@ -4429,7 +4350,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h extern void type_print (struct type *type, const char *varstring, struct ui_file *stream, int show); -@@ -941,7 +943,7 @@ extern void value_print_array_elements ( +@@ -1003,7 +1006,7 @@ extern void value_print_array_elements ( extern struct value *value_release_to_mark (struct value *mark); extern void val_print (struct type *type, const gdb_byte *valaddr, @@ -4438,7 +4359,7 @@ Index: gdb-7.7.90.20140613/gdb/value.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -990,10 +992,11 @@ extern struct value *value_literal_compl +@@ -1054,10 +1057,11 @@ extern struct value *value_literal_compl extern struct value *find_function_in_inferior (const char *, struct objfile **); @@ -4452,11 +4373,11 @@ Index: gdb-7.7.90.20140613/gdb/value.h /* User function handler. */ -Index: gdb-7.7.90.20140613/gdb/s390-linux-nat.c +Index: gdb-7.8.90.20150202/gdb/s390-linux-nat.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/s390-linux-nat.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/s390-linux-nat.c 2014-06-24 16:07:27.272986905 +0200 -@@ -567,7 +567,7 @@ s390_can_use_hw_breakpoint (struct targe +--- gdb-7.8.90.20150202.orig/gdb/s390-linux-nat.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/s390-linux-nat.c 2015-02-11 16:01:59.627966436 +0100 +@@ -544,7 +544,7 @@ s390_can_use_hw_breakpoint (struct targe static int s390_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -4465,10 +4386,10 @@ Index: gdb-7.7.90.20140613/gdb/s390-linux-nat.c { return 1; } -Index: gdb-7.7.90.20140613/gdb/extension-priv.h +Index: gdb-7.8.90.20150202/gdb/extension-priv.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/extension-priv.h 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/extension-priv.h 2014-06-24 16:07:27.272986905 +0200 +--- gdb-7.8.90.20150202.orig/gdb/extension-priv.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/extension-priv.h 2015-02-11 16:01:59.627966436 +0100 @@ -175,7 +175,7 @@ struct extension_language_ops enum ext_lang_rc (*apply_val_pretty_printer) (const struct extension_language_defn *, @@ -4478,11 +4399,11 @@ Index: gdb-7.7.90.20140613/gdb/extension-priv.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, const struct language_defn *language); -Index: gdb-7.7.90.20140613/gdb/python/python-internal.h +Index: gdb-7.8.90.20150202/gdb/python/python-internal.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/python/python-internal.h 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/python/python-internal.h 2014-06-24 16:07:27.272986905 +0200 -@@ -317,7 +317,7 @@ extern int gdbpy_auto_load_enabled (cons +--- gdb-7.8.90.20150202.orig/gdb/python/python-internal.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/python/python-internal.h 2015-02-11 16:01:59.628966441 +0100 +@@ -313,7 +313,7 @@ extern int gdbpy_auto_load_enabled (cons extern enum ext_lang_rc gdbpy_apply_val_pretty_printer (const struct extension_language_defn *, struct type *type, const gdb_byte *valaddr, @@ -4491,11 +4412,11 @@ Index: gdb-7.7.90.20140613/gdb/python/python-internal.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.7.90.20140613/gdb/target-delegates.c +Index: gdb-7.8.90.20150202/gdb/target-delegates.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/target-delegates.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/target-delegates.c 2014-06-24 16:07:27.272986905 +0200 -@@ -268,7 +268,7 @@ delegate_watchpoint_addr_within_range (s +--- gdb-7.8.90.20150202.orig/gdb/target-delegates.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/target-delegates.c 2015-02-11 16:01:59.629966446 +0100 +@@ -634,14 +634,14 @@ debug_watchpoint_addr_within_range (stru } static int @@ -4504,11 +4425,28 @@ Index: gdb-7.7.90.20140613/gdb/target-delegates.c { self = self->beneath; return self->to_region_ok_for_hw_watchpoint (self, arg1, arg2); -Index: gdb-7.7.90.20140613/gdb/aarch64-linux-nat.c + } + + static int +-debug_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2) ++debug_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2) + { + int result; + fprintf_unfiltered (gdb_stdlog, "-> %s->to_region_ok_for_hw_watchpoint (...)\n", debug_target.to_shortname); +@@ -651,7 +651,7 @@ debug_region_ok_for_hw_watchpoint (struc + fputs_unfiltered (", ", gdb_stdlog); + target_debug_print_CORE_ADDR (arg1); + fputs_unfiltered (", ", gdb_stdlog); +- target_debug_print_int (arg2); ++ target_debug_print_LONGEST (arg2); + fputs_unfiltered (") = ", gdb_stdlog); + target_debug_print_int (result); + fputs_unfiltered ("\n", gdb_stdlog); +Index: gdb-7.8.90.20150202/gdb/aarch64-linux-nat.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/aarch64-linux-nat.c 2014-06-13 03:59:36.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/aarch64-linux-nat.c 2014-06-24 16:08:06.722030653 +0200 -@@ -1407,7 +1407,7 @@ aarch64_linux_remove_watchpoint (struct +--- gdb-7.8.90.20150202.orig/gdb/aarch64-linux-nat.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/aarch64-linux-nat.c 2015-02-11 16:01:59.629966446 +0100 +@@ -1389,7 +1389,7 @@ aarch64_linux_remove_watchpoint (struct static int aarch64_linux_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -4517,3 +4455,95 @@ Index: gdb-7.7.90.20140613/gdb/aarch64-linux-nat.c { CORE_ADDR aligned_addr; +Index: gdb-7.8.90.20150202/gdb/nat/x86-dregs.c +=================================================================== +--- gdb-7.8.90.20150202.orig/gdb/nat/x86-dregs.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/nat/x86-dregs.c 2015-02-11 16:01:59.629966446 +0100 +@@ -384,7 +384,7 @@ x86_remove_aligned_watchpoint (struct x8 + + static int + x86_handle_nonaligned_watchpoint (struct x86_debug_reg_state *state, +- x86_wp_op_t what, CORE_ADDR addr, int len, ++ x86_wp_op_t what, CORE_ADDR addr, LONGEST len, + enum target_hw_bp_type type) + { + int retval = 0; +@@ -552,7 +552,7 @@ x86_dr_remove_watchpoint (struct x86_deb + + int + x86_dr_region_ok_for_watchpoint (struct x86_debug_reg_state *state, +- CORE_ADDR addr, int len) ++ CORE_ADDR addr, LONGEST len) + { + int nregs; + +Index: gdb-7.8.90.20150202/gdb/compile/compile-c-support.c +=================================================================== +--- gdb-7.8.90.20150202.orig/gdb/compile/compile-c-support.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/compile/compile-c-support.c 2015-02-11 16:01:59.629966446 +0100 +@@ -277,11 +277,11 @@ generate_register_struct (struct ui_file + + default: + fprintf_unfiltered (stream, +- " unsigned char %s[%d]" ++ " unsigned char %s[%s]" + " __attribute__((__aligned__(" + "__BIGGEST_ALIGNMENT__)))", + regname, +- TYPE_LENGTH (regtype)); ++ pulongest (TYPE_LENGTH (regtype))); + } + fputs_unfiltered (";\n", stream); + +Index: gdb-7.8.90.20150202/gdb/nat/x86-dregs.h +=================================================================== +--- gdb-7.8.90.20150202.orig/gdb/nat/x86-dregs.h 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/nat/x86-dregs.h 2015-02-11 16:01:59.630966451 +0100 +@@ -112,7 +112,7 @@ extern int x86_dr_remove_watchpoint (str + /* Return non-zero if we can watch a memory region that starts at + address ADDR and whose length is LEN bytes. */ + extern int x86_dr_region_ok_for_watchpoint (struct x86_debug_reg_state *state, +- CORE_ADDR addr, int len); ++ CORE_ADDR addr, LONGEST len); + + /* If the inferior has some break/watchpoint that triggered, set the + address associated with that break/watchpoint and return true. +Index: gdb-7.8.90.20150202/gdb/x86-nat.c +=================================================================== +--- gdb-7.8.90.20150202.orig/gdb/x86-nat.c 2015-02-11 16:01:51.366924625 +0100 ++++ gdb-7.8.90.20150202/gdb/x86-nat.c 2015-02-11 16:01:59.630966451 +0100 +@@ -178,7 +178,7 @@ x86_remove_watchpoint (struct target_ops + + static int + x86_region_ok_for_watchpoint (struct target_ops *self, +- CORE_ADDR addr, int len) ++ CORE_ADDR addr, LONGEST len) + { + struct x86_debug_reg_state *state + = x86_debug_reg_state (ptid_get_pid (inferior_ptid)); +Index: gdb-7.8.90.20150202/gdb/guile/guile-internal.h +=================================================================== +--- gdb-7.8.90.20150202.orig/gdb/guile/guile-internal.h 2015-02-02 02:58:29.000000000 +0100 ++++ gdb-7.8.90.20150202/gdb/guile/guile-internal.h 2015-02-11 16:03:36.901445361 +0100 +@@ -559,7 +559,7 @@ extern void gdbscm_preserve_values + extern enum ext_lang_rc gdbscm_apply_val_pretty_printer + (const struct extension_language_defn *, + struct type *type, const gdb_byte *valaddr, +- int embedded_offset, CORE_ADDR address, ++ LONGEST embedded_offset, CORE_ADDR address, + struct ui_file *stream, int recurse, + const struct value *val, + const struct value_print_options *options, +Index: gdb-7.8.90.20150202/gdb/guile/scm-pretty-print.c +=================================================================== +--- gdb-7.8.90.20150202.orig/gdb/guile/scm-pretty-print.c 2015-02-02 02:58:29.000000000 +0100 ++++ gdb-7.8.90.20150202/gdb/guile/scm-pretty-print.c 2015-02-11 16:03:14.061335945 +0100 +@@ -955,7 +955,7 @@ ppscm_print_children (SCM printer, enum + enum ext_lang_rc + gdbscm_apply_val_pretty_printer (const struct extension_language_defn *extlang, + struct type *type, const gdb_byte *valaddr, +- int embedded_offset, CORE_ADDR address, ++ LONGEST embedded_offset, CORE_ADDR address, + struct ui_file *stream, int recurse, + const struct value *val, + const struct value_print_options *options, diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch index 984cbb3..05698f9 100644 --- a/gdb-rhbz795424-bitpos-22of25.patch +++ b/gdb-rhbz795424-bitpos-22of25.patch @@ -96,11 +96,11 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-wp.patch -Index: gdb-7.8/gdb/arm-linux-nat.c +Index: gdb-7.8.50.20141228/gdb/arm-linux-nat.c =================================================================== ---- gdb-7.8.orig/gdb/arm-linux-nat.c 2014-08-01 23:27:30.183773676 +0200 -+++ gdb-7.8/gdb/arm-linux-nat.c 2014-08-01 23:27:30.241773754 +0200 -@@ -1296,7 +1296,7 @@ arm_linux_stopped_by_watchpoint (struct +--- gdb-7.8.50.20141228.orig/gdb/arm-linux-nat.c 2015-01-05 22:10:30.170726774 +0100 ++++ gdb-7.8.50.20141228/gdb/arm-linux-nat.c 2015-01-05 22:10:35.571751324 +0100 +@@ -1295,7 +1295,7 @@ arm_linux_stopped_by_watchpoint (struct static int arm_linux_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -109,11 +109,11 @@ Index: gdb-7.8/gdb/arm-linux-nat.c { return start <= addr && start + length - 1 >= addr; } -Index: gdb-7.8/gdb/ppc-linux-nat.c +Index: gdb-7.8.50.20141228/gdb/ppc-linux-nat.c =================================================================== ---- gdb-7.8.orig/gdb/ppc-linux-nat.c 2014-08-01 23:27:30.202773701 +0200 -+++ gdb-7.8/gdb/ppc-linux-nat.c 2014-08-01 23:29:38.311944925 +0200 -@@ -1862,11 +1862,11 @@ can_use_watchpoint_cond_accel (void) +--- gdb-7.8.50.20141228.orig/gdb/ppc-linux-nat.c 2015-01-05 22:10:30.171726779 +0100 ++++ gdb-7.8.50.20141228/gdb/ppc-linux-nat.c 2015-01-05 22:10:35.572751329 +0100 +@@ -1860,11 +1860,11 @@ can_use_watchpoint_cond_accel (void) CONDITION_VALUE will hold the value which should be put in the DVC register. */ static void @@ -128,7 +128,7 @@ Index: gdb-7.8/gdb/ppc-linux-nat.c CORE_ADDR addr_end_data, addr_end_dvc; /* The DVC register compares bytes within fixed-length windows which -@@ -1953,7 +1953,7 @@ num_memory_accesses (struct value *v) +@@ -1951,7 +1951,7 @@ num_memory_accesses (struct value *v) of the constant. */ static int check_condition (CORE_ADDR watch_addr, struct expression *cond, @@ -137,7 +137,7 @@ Index: gdb-7.8/gdb/ppc-linux-nat.c { int pc = 1, num_accesses_left, num_accesses_right; struct value *left_val, *right_val, *left_chain, *right_chain; -@@ -2021,7 +2021,7 @@ check_condition (CORE_ADDR watch_addr, s +@@ -2019,7 +2019,7 @@ check_condition (CORE_ADDR watch_addr, s true. */ static int ppc_linux_can_accel_watchpoint_condition (struct target_ops *self, @@ -146,7 +146,7 @@ Index: gdb-7.8/gdb/ppc-linux-nat.c struct expression *cond) { CORE_ADDR data_value; -@@ -2038,7 +2038,7 @@ ppc_linux_can_accel_watchpoint_condition +@@ -2036,7 +2036,7 @@ ppc_linux_can_accel_watchpoint_condition static void create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr, @@ -155,7 +155,7 @@ Index: gdb-7.8/gdb/ppc-linux-nat.c int insert) { if (len == 1 -@@ -2304,7 +2304,7 @@ ppc_linux_stopped_by_watchpoint (struct +@@ -2302,7 +2302,7 @@ ppc_linux_stopped_by_watchpoint (struct static int ppc_linux_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -164,11 +164,11 @@ Index: gdb-7.8/gdb/ppc-linux-nat.c { int mask; -Index: gdb-7.8/gdb/procfs.c +Index: gdb-7.8.50.20141228/gdb/procfs.c =================================================================== ---- gdb-7.8.orig/gdb/procfs.c 2014-08-01 23:27:30.203773703 +0200 -+++ gdb-7.8/gdb/procfs.c 2014-08-01 23:27:30.243773756 +0200 -@@ -2429,7 +2429,7 @@ procfs_address_to_host_pointer (CORE_ADD +--- gdb-7.8.50.20141228.orig/gdb/procfs.c 2015-01-05 22:10:30.172726783 +0100 ++++ gdb-7.8.50.20141228/gdb/procfs.c 2015-01-05 22:10:35.573751333 +0100 +@@ -2426,7 +2426,7 @@ procfs_address_to_host_pointer (CORE_ADD #endif static int @@ -177,7 +177,7 @@ Index: gdb-7.8/gdb/procfs.c { #if !defined (PCWATCH) && !defined (PIOCSWATCH) /* If neither or these is defined, we can't support watchpoints. -@@ -4762,7 +4762,7 @@ procfs_pid_to_str (struct target_ops *op +@@ -4705,7 +4705,7 @@ procfs_pid_to_str (struct target_ops *op /* Insert a watchpoint. */ static int @@ -186,11 +186,11 @@ Index: gdb-7.8/gdb/procfs.c int after) { #ifndef AIX5 -Index: gdb-7.8/gdb/remote.c +Index: gdb-7.8.50.20141228/gdb/remote.c =================================================================== ---- gdb-7.8.orig/gdb/remote.c 2014-08-01 23:27:30.205773705 +0200 -+++ gdb-7.8/gdb/remote.c 2014-08-01 23:27:30.246773760 +0200 -@@ -8206,7 +8206,7 @@ remote_insert_watchpoint (struct target_ +--- gdb-7.8.50.20141228.orig/gdb/remote.c 2015-01-05 22:10:30.174726792 +0100 ++++ gdb-7.8.50.20141228/gdb/remote.c 2015-01-05 22:10:35.574751338 +0100 +@@ -8298,7 +8298,7 @@ remote_insert_watchpoint (struct target_ p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -199,7 +199,7 @@ Index: gdb-7.8/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -@@ -8226,7 +8226,7 @@ remote_insert_watchpoint (struct target_ +@@ -8318,7 +8318,7 @@ remote_insert_watchpoint (struct target_ static int remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -208,7 +208,7 @@ Index: gdb-7.8/gdb/remote.c { CORE_ADDR diff = remote_address_masked (addr - start); -@@ -8256,7 +8256,7 @@ remote_remove_watchpoint (struct target_ +@@ -8348,7 +8348,7 @@ remote_remove_watchpoint (struct target_ p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -217,11 +217,11 @@ Index: gdb-7.8/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -Index: gdb-7.8/gdb/target.c +Index: gdb-7.8.50.20141228/gdb/target.c =================================================================== ---- gdb-7.8.orig/gdb/target.c 2014-08-01 23:27:30.206773707 +0200 -+++ gdb-7.8/gdb/target.c 2014-08-01 23:29:38.314944857 +0200 -@@ -52,7 +52,7 @@ static void target_info (char *, int); +--- gdb-7.8.50.20141228.orig/gdb/target.c 2015-01-05 22:10:30.175726797 +0100 ++++ gdb-7.8.50.20141228/gdb/target.c 2015-01-05 22:10:35.575751342 +0100 +@@ -51,7 +51,7 @@ static void generic_tls_error (void) ATT static void default_terminal_info (struct target_ops *, const char *, int); static int default_watchpoint_addr_within_range (struct target_ops *, @@ -230,23 +230,7 @@ Index: gdb-7.8/gdb/target.c static int default_region_ok_for_hw_watchpoint (struct target_ops *, CORE_ADDR, LONGEST); -@@ -150,13 +150,13 @@ static int debug_to_remove_watchpoint (s - static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *); - - static int debug_to_watchpoint_addr_within_range (struct target_ops *, -- CORE_ADDR, CORE_ADDR, int); -+ CORE_ADDR, CORE_ADDR, LONGEST); - - static int debug_to_region_ok_for_hw_watchpoint (struct target_ops *self, - CORE_ADDR, LONGEST); - - static int debug_to_can_accel_watchpoint_condition (struct target_ops *self, -- CORE_ADDR, int, int, -+ CORE_ADDR, LONGEST, int, - struct expression *); - - static void debug_to_terminal_init (struct target_ops *self); -@@ -2960,7 +2960,7 @@ default_region_ok_for_hw_watchpoint (str +@@ -2983,7 +2983,7 @@ default_region_ok_for_hw_watchpoint (str static int default_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -255,52 +239,11 @@ Index: gdb-7.8/gdb/target.c { return addr >= start && addr < start + length; } -@@ -3681,7 +3681,7 @@ debug_to_region_ok_for_hw_watchpoint (st - - static int - debug_to_can_accel_watchpoint_condition (struct target_ops *self, -- CORE_ADDR addr, int len, int rw, -+ CORE_ADDR addr, LONGEST len, int rw, - struct expression *cond) - { - int retval; -@@ -3692,8 +3692,8 @@ debug_to_can_accel_watchpoint_condition - - fprintf_unfiltered (gdb_stdlog, - "target_can_accel_watchpoint_condition " -- "(%s, %d, %d, %s) = %ld\n", -- core_addr_to_string (addr), len, rw, -+ "(%s, %s, %d, %s) = %ld\n", -+ core_addr_to_string (addr), plongest (len), rw, - host_address_to_string (cond), (unsigned long) retval); - return retval; - } -@@ -3728,7 +3728,7 @@ debug_to_stopped_data_address (struct ta - static int - debug_to_watchpoint_addr_within_range (struct target_ops *target, - CORE_ADDR addr, -- CORE_ADDR start, int length) -+ CORE_ADDR start, LONGEST length) - { - int retval; - -@@ -3736,9 +3736,9 @@ debug_to_watchpoint_addr_within_range (s - start, length); - - fprintf_filtered (gdb_stdlog, -- "target_watchpoint_addr_within_range (%s, %s, %d) = %d\n", -+ "target_watchpoint_addr_within_range (%s, %s, %s) = %d\n", - core_addr_to_string (addr), core_addr_to_string (start), -- length, retval); -+ plongest (length), retval); - return retval; - } - -Index: gdb-7.8/gdb/target.h +Index: gdb-7.8.50.20141228/gdb/target.h =================================================================== ---- gdb-7.8.orig/gdb/target.h 2014-08-01 23:27:30.207773708 +0200 -+++ gdb-7.8/gdb/target.h 2014-08-01 23:29:38.315944839 +0200 -@@ -469,7 +469,7 @@ struct target_ops +--- gdb-7.8.50.20141228.orig/gdb/target.h 2015-01-05 22:10:30.176726802 +0100 ++++ gdb-7.8.50.20141228/gdb/target.h 2015-01-05 22:10:35.575751342 +0100 +@@ -483,7 +483,7 @@ struct target_ops int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *) TARGET_DEFAULT_RETURN (0); int (*to_watchpoint_addr_within_range) (struct target_ops *, @@ -309,7 +252,7 @@ Index: gdb-7.8/gdb/target.h TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range); /* Documentation of this routine is provided with the corresponding -@@ -479,7 +479,7 @@ struct target_ops +@@ -493,7 +493,7 @@ struct target_ops TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint); int (*to_can_accel_watchpoint_condition) (struct target_ops *, @@ -318,11 +261,11 @@ Index: gdb-7.8/gdb/target.h struct expression *) TARGET_DEFAULT_RETURN (0); int (*to_masked_watch_num_registers) (struct target_ops *, -Index: gdb-7.8/gdb/aarch64-linux-nat.c +Index: gdb-7.8.50.20141228/gdb/aarch64-linux-nat.c =================================================================== ---- gdb-7.8.orig/gdb/aarch64-linux-nat.c 2014-08-01 23:27:30.212773715 +0200 -+++ gdb-7.8/gdb/aarch64-linux-nat.c 2014-08-01 23:27:30.248773763 +0200 -@@ -428,14 +428,14 @@ aarch64_notify_debug_reg_change (const s +--- gdb-7.8.50.20141228.orig/gdb/aarch64-linux-nat.c 2015-01-05 22:10:30.176726802 +0100 ++++ gdb-7.8.50.20141228/gdb/aarch64-linux-nat.c 2015-01-05 22:10:35.575751342 +0100 +@@ -424,14 +424,14 @@ aarch64_notify_debug_reg_change (const s static void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, const char *func, CORE_ADDR addr, @@ -340,7 +283,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c type == hw_write ? "hw-write-watchpoint" : (type == hw_read ? "hw-read-watchpoint" : (type == hw_access ? "hw-access-watchpoint" -@@ -869,9 +869,10 @@ aarch64_linux_read_description (struct t +@@ -851,9 +851,10 @@ aarch64_linux_read_description (struct t gdbserver/linux-aarch64-low.c for more information. */ static void @@ -353,7 +296,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c { int aligned_len; unsigned int offset; -@@ -1038,7 +1039,7 @@ aarch64_point_encode_ctrl_reg (int type, +@@ -1020,7 +1021,7 @@ aarch64_point_encode_ctrl_reg (int type, Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise. */ static int @@ -362,7 +305,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c { unsigned int alignment = is_watchpoint ? AARCH64_HWP_ALIGNMENT : AARCH64_HBP_ALIGNMENT; -@@ -1290,7 +1291,7 @@ aarch64_handle_aligned_watchpoint (int t +@@ -1272,7 +1273,7 @@ aarch64_handle_aligned_watchpoint (int t Return 0 if succeed. */ static int @@ -371,7 +314,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c int is_insert) { struct aarch64_debug_reg_state *state -@@ -1315,8 +1316,8 @@ aarch64_handle_unaligned_watchpoint (int +@@ -1297,8 +1298,8 @@ aarch64_handle_unaligned_watchpoint (int fprintf_unfiltered (gdb_stdlog, "handle_unaligned_watchpoint: is_insert: %d\n" " aligned_addr: 0x%08lx, aligned_len: %d\n" @@ -382,7 +325,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c if (ret != 0) return ret; -@@ -1328,7 +1329,7 @@ aarch64_handle_unaligned_watchpoint (int +@@ -1310,7 +1311,7 @@ aarch64_handle_unaligned_watchpoint (int /* Implements insertion and removal of a single watchpoint. */ static int @@ -391,7 +334,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c { if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len)) return aarch64_handle_aligned_watchpoint (type, addr, len, is_insert); -@@ -1497,7 +1498,7 @@ aarch64_linux_stopped_by_watchpoint (str +@@ -1479,7 +1480,7 @@ aarch64_linux_stopped_by_watchpoint (str static int aarch64_linux_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -400,11 +343,11 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c { return start <= addr && start + length - 1 >= addr; } -Index: gdb-7.8/gdb/target-delegates.c +Index: gdb-7.8.50.20141228/gdb/target-delegates.c =================================================================== ---- gdb-7.8.orig/gdb/target-delegates.c 2014-08-01 23:27:30.212773715 +0200 -+++ gdb-7.8/gdb/target-delegates.c 2014-08-01 23:29:38.313944877 +0200 -@@ -261,7 +261,7 @@ tdefault_stopped_data_address (struct ta +--- gdb-7.8.50.20141228.orig/gdb/target-delegates.c 2015-01-05 22:10:30.177726806 +0100 ++++ gdb-7.8.50.20141228/gdb/target-delegates.c 2015-01-05 22:12:11.071185408 +0100 +@@ -607,14 +607,14 @@ debug_stopped_data_address (struct targe } static int @@ -413,7 +356,24 @@ Index: gdb-7.8/gdb/target-delegates.c { self = self->beneath; return self->to_watchpoint_addr_within_range (self, arg1, arg2, arg3); -@@ -275,14 +275,14 @@ delegate_region_ok_for_hw_watchpoint (st + } + + static int +-debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3) ++debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, LONGEST arg3) + { + int result; + fprintf_unfiltered (gdb_stdlog, "-> %s->to_watchpoint_addr_within_range (...)\n", debug_target.to_shortname); +@@ -626,7 +626,7 @@ debug_watchpoint_addr_within_range (stru + fputs_unfiltered (", ", gdb_stdlog); + target_debug_print_CORE_ADDR (arg2); + fputs_unfiltered (", ", gdb_stdlog); +- target_debug_print_int (arg3); ++ target_debug_print_LONGEST (arg3); + fputs_unfiltered (") = ", gdb_stdlog); + target_debug_print_int (result); + fputs_unfiltered ("\n", gdb_stdlog); +@@ -659,20 +659,20 @@ debug_region_ok_for_hw_watchpoint (struc } static int @@ -430,3 +390,19 @@ Index: gdb-7.8/gdb/target-delegates.c { return 0; } + + static int +-debug_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) ++debug_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4) + { + int result; + fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_accel_watchpoint_condition (...)\n", debug_target.to_shortname); +@@ -682,7 +682,7 @@ debug_can_accel_watchpoint_condition (st + fputs_unfiltered (", ", gdb_stdlog); + target_debug_print_CORE_ADDR (arg1); + fputs_unfiltered (", ", gdb_stdlog); +- target_debug_print_int (arg2); ++ target_debug_print_LONGEST (arg2); + fputs_unfiltered (", ", gdb_stdlog); + target_debug_print_int (arg3); + fputs_unfiltered (", ", gdb_stdlog); diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch index 0699f8b..24914e9 100644 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ b/gdb-rhbz795424-bitpos-23of25.patch @@ -137,11 +137,11 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-tdep.patch -Index: gdb-7.7.1/gdb/alpha-tdep.c +Index: gdb-7.8.50.20141228/gdb/alpha-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/alpha-tdep.c 2014-05-09 19:24:18.677252769 +0200 -+++ gdb-7.7.1/gdb/alpha-tdep.c 2014-05-09 20:02:09.620703767 +0200 -@@ -299,18 +299,18 @@ alpha_push_dummy_call (struct gdbarch *g +--- gdb-7.8.50.20141228.orig/gdb/alpha-tdep.c 2015-01-05 22:18:55.988023607 +0100 ++++ gdb-7.8.50.20141228/gdb/alpha-tdep.c 2015-01-05 22:19:08.086078440 +0100 +@@ -298,18 +298,18 @@ alpha_push_dummy_call (struct gdbarch *g { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -164,7 +164,7 @@ Index: gdb-7.7.1/gdb/alpha-tdep.c CORE_ADDR func_addr = find_function_addr (function, NULL); /* The ABI places the address of the called function in T12. */ -@@ -430,8 +430,8 @@ alpha_push_dummy_call (struct gdbarch *g +@@ -429,8 +429,8 @@ alpha_push_dummy_call (struct gdbarch *g for (i = nargs; m_arg--, --i >= 0;) { const gdb_byte *contents = m_arg->contents; @@ -175,7 +175,7 @@ Index: gdb-7.7.1/gdb/alpha-tdep.c /* Copy the bytes destined for registers into arg_reg_buffer. */ if (offset < sizeof(arg_reg_buffer)) -@@ -443,7 +443,7 @@ alpha_push_dummy_call (struct gdbarch *g +@@ -442,7 +442,7 @@ alpha_push_dummy_call (struct gdbarch *g } else { @@ -184,11 +184,11 @@ Index: gdb-7.7.1/gdb/alpha-tdep.c memcpy (arg_reg_buffer + offset, contents, tlen); offset += tlen; contents += tlen; -Index: gdb-7.7.1/gdb/amd64-tdep.c +Index: gdb-7.8.50.20141228/gdb/amd64-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/amd64-tdep.c 2014-05-09 19:24:18.678252770 +0200 -+++ gdb-7.7.1/gdb/amd64-tdep.c 2014-05-09 20:02:09.620703767 +0200 -@@ -633,7 +633,7 @@ amd64_return_value (struct gdbarch *gdba +--- gdb-7.8.50.20141228.orig/gdb/amd64-tdep.c 2015-01-05 22:18:55.989023612 +0100 ++++ gdb-7.8.50.20141228/gdb/amd64-tdep.c 2015-01-05 22:19:08.087078444 +0100 +@@ -700,7 +700,7 @@ amd64_return_value (struct gdbarch *gdba gdb_byte *readbuf, const gdb_byte *writebuf) { enum amd64_reg_class class[2]; @@ -197,7 +197,7 @@ Index: gdb-7.7.1/gdb/amd64-tdep.c static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM }; static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM }; int integer_reg = 0; -@@ -784,8 +784,8 @@ amd64_push_arguments (struct regcache *r +@@ -851,8 +851,8 @@ amd64_push_arguments (struct regcache *r }; struct value **stack_args = alloca (nargs * sizeof (struct value *)); int num_stack_args = 0; @@ -208,7 +208,7 @@ Index: gdb-7.7.1/gdb/amd64-tdep.c int integer_reg = 0; int sse_reg = 0; int i; -@@ -797,7 +797,7 @@ amd64_push_arguments (struct regcache *r +@@ -864,7 +864,7 @@ amd64_push_arguments (struct regcache *r for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -217,10 +217,10 @@ Index: gdb-7.7.1/gdb/amd64-tdep.c enum amd64_reg_class class[2]; int needed_integer_regs = 0; int needed_sse_regs = 0; -Index: gdb-7.7.1/gdb/amd64-windows-tdep.c +Index: gdb-7.8.50.20141228/gdb/amd64-windows-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/amd64-windows-tdep.c 2014-05-09 19:24:18.679252770 +0200 -+++ gdb-7.7.1/gdb/amd64-windows-tdep.c 2014-05-09 20:02:09.620703767 +0200 +--- gdb-7.8.50.20141228.orig/gdb/amd64-windows-tdep.c 2015-01-05 22:18:55.990023616 +0100 ++++ gdb-7.8.50.20141228/gdb/amd64-windows-tdep.c 2015-01-05 22:19:08.087078444 +0100 @@ -288,7 +288,7 @@ amd64_windows_return_value (struct gdbar struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) @@ -230,20 +230,20 @@ Index: gdb-7.7.1/gdb/amd64-windows-tdep.c int regnum = -1; /* See if our value is returned through a register. If it is, then -Index: gdb-7.7.1/gdb/arm-tdep.c +Index: gdb-7.8.50.20141228/gdb/arm-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/arm-tdep.c 2014-05-09 19:24:18.684252770 +0200 -+++ gdb-7.7.1/gdb/arm-tdep.c 2014-05-09 20:02:09.622703768 +0200 -@@ -3498,7 +3498,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc - array). Vectors and complex types are not currently supported, - matching the generic AAPCS support. */ +--- gdb-7.8.50.20141228.orig/gdb/arm-tdep.c 2015-01-05 22:18:55.995023639 +0100 ++++ gdb-7.8.50.20141228/gdb/arm-tdep.c 2015-01-05 22:19:08.089078453 +0100 +@@ -3524,7 +3524,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc + array). Vector types are not currently supported, matching the + generic AAPCS support. */ -static int +static LONGEST arm_vfp_cprc_sub_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type) { -@@ -3529,7 +3529,7 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3587,7 +3587,7 @@ arm_vfp_cprc_sub_candidate (struct type case TYPE_CODE_ARRAY: { @@ -252,7 +252,7 @@ Index: gdb-7.7.1/gdb/arm-tdep.c unsigned unitlen; count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type); if (count == -1) -@@ -3549,13 +3549,15 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3607,13 +3607,15 @@ arm_vfp_cprc_sub_candidate (struct type case TYPE_CODE_STRUCT: { @@ -271,7 +271,7 @@ Index: gdb-7.7.1/gdb/arm-tdep.c if (sub_count == -1) return -1; count += sub_count; -@@ -3575,13 +3577,15 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3633,13 +3635,15 @@ arm_vfp_cprc_sub_candidate (struct type case TYPE_CODE_UNION: { @@ -290,7 +290,7 @@ Index: gdb-7.7.1/gdb/arm-tdep.c if (sub_count == -1) return -1; count = (count > sub_count ? count : sub_count); -@@ -3617,7 +3621,7 @@ arm_vfp_call_candidate (struct type *t, +@@ -3675,7 +3679,7 @@ arm_vfp_call_candidate (struct type *t, int *count) { enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; @@ -299,7 +299,7 @@ Index: gdb-7.7.1/gdb/arm-tdep.c if (c <= 0 || c > 4) return 0; *base_type = b; -@@ -3698,7 +3702,7 @@ arm_push_dummy_call (struct gdbarch *gdb +@@ -3756,7 +3760,7 @@ arm_push_dummy_call (struct gdbarch *gdb for (argnum = 0; argnum < nargs; argnum++) { @@ -308,11 +308,11 @@ Index: gdb-7.7.1/gdb/arm-tdep.c struct type *arg_type; struct type *target_type; enum type_code typecode; -Index: gdb-7.7.1/gdb/avr-tdep.c +Index: gdb-7.8.50.20141228/gdb/avr-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/avr-tdep.c 2014-05-09 19:24:18.686252771 +0200 -+++ gdb-7.7.1/gdb/avr-tdep.c 2014-05-09 20:02:09.623703768 +0200 -@@ -1167,13 +1167,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s +--- gdb-7.8.50.20141228.orig/gdb/avr-tdep.c 2015-01-05 22:18:55.996023643 +0100 ++++ gdb-7.8.50.20141228/gdb/avr-tdep.c 2015-01-05 22:19:08.089078453 +0100 +@@ -1196,13 +1196,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s struct stack_item { @@ -329,7 +329,7 @@ Index: gdb-7.7.1/gdb/avr-tdep.c { struct stack_item *si; si = xmalloc (sizeof (struct stack_item)); -@@ -1262,12 +1263,12 @@ avr_push_dummy_call (struct gdbarch *gdb +@@ -1291,12 +1292,12 @@ avr_push_dummy_call (struct gdbarch *gdb for (i = 0; i < nargs; i++) { @@ -345,11 +345,11 @@ Index: gdb-7.7.1/gdb/avr-tdep.c /* Calculate the potential last register needed. */ last_regnum = regnum - (len + (len & 1)); -Index: gdb-7.7.1/gdb/bfin-tdep.c +Index: gdb-7.8.50.20141228/gdb/bfin-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/bfin-tdep.c 2014-05-09 19:24:18.686252771 +0200 -+++ gdb-7.7.1/gdb/bfin-tdep.c 2014-05-09 20:02:09.623703768 +0200 -@@ -506,7 +506,7 @@ bfin_push_dummy_call (struct gdbarch *gd +--- gdb-7.8.50.20141228.orig/gdb/bfin-tdep.c 2015-01-05 22:18:55.996023643 +0100 ++++ gdb-7.8.50.20141228/gdb/bfin-tdep.c 2015-01-05 22:19:08.090078458 +0100 +@@ -504,7 +504,7 @@ bfin_push_dummy_call (struct gdbarch *gd gdb_byte buf[4]; int i; long reg_r0, reg_r1, reg_r2; @@ -358,7 +358,7 @@ Index: gdb-7.7.1/gdb/bfin-tdep.c enum bfin_abi abi = bfin_abi (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -530,7 +530,7 @@ bfin_push_dummy_call (struct gdbarch *gd +@@ -528,7 +528,7 @@ bfin_push_dummy_call (struct gdbarch *gd { struct type *value_type = value_enclosing_type (args[i]); struct type *arg_type = check_typedef (value_type); @@ -367,11 +367,11 @@ Index: gdb-7.7.1/gdb/bfin-tdep.c sp -= container_len; write_memory (sp, value_contents_writeable (args[i]), container_len); -Index: gdb-7.7.1/gdb/cris-tdep.c +Index: gdb-7.8.50.20141228/gdb/cris-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/cris-tdep.c 2014-05-09 19:24:18.687252771 +0200 -+++ gdb-7.7.1/gdb/cris-tdep.c 2014-05-09 20:02:09.623703768 +0200 -@@ -665,13 +665,13 @@ static CORE_ADDR cris_unwind_sp (struct +--- gdb-7.8.50.20141228.orig/gdb/cris-tdep.c 2015-01-05 22:18:55.997023648 +0100 ++++ gdb-7.8.50.20141228/gdb/cris-tdep.c 2015-01-05 22:19:08.090078458 +0100 +@@ -663,13 +663,13 @@ static CORE_ADDR cris_unwind_sp (struct struct stack_item { @@ -387,7 +387,7 @@ Index: gdb-7.7.1/gdb/cris-tdep.c { struct stack_item *si; si = xmalloc (sizeof (struct stack_item)); -@@ -844,13 +844,13 @@ cris_push_dummy_call (struct gdbarch *gd +@@ -842,13 +842,13 @@ cris_push_dummy_call (struct gdbarch *gd for (argnum = 0; argnum < nargs; argnum++) { @@ -405,11 +405,11 @@ Index: gdb-7.7.1/gdb/cris-tdep.c /* How may registers worth of storage do we need for this argument? */ reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0); -Index: gdb-7.7.1/gdb/h8300-tdep.c +Index: gdb-7.8.50.20141228/gdb/h8300-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/h8300-tdep.c 2014-05-09 19:24:18.688252771 +0200 -+++ gdb-7.7.1/gdb/h8300-tdep.c 2014-05-09 20:02:09.624703768 +0200 -@@ -640,7 +640,7 @@ h8300_push_dummy_call (struct gdbarch *g +--- gdb-7.8.50.20141228.orig/gdb/h8300-tdep.c 2015-01-05 22:18:55.998023652 +0100 ++++ gdb-7.8.50.20141228/gdb/h8300-tdep.c 2015-01-05 22:19:08.091078463 +0100 +@@ -639,7 +639,7 @@ h8300_push_dummy_call (struct gdbarch *g int struct_return, CORE_ADDR struct_addr) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -418,7 +418,7 @@ Index: gdb-7.7.1/gdb/h8300-tdep.c int wordsize = BINWORD (gdbarch); int reg = E_ARG0_REGNUM; int argument; -@@ -667,11 +667,11 @@ h8300_push_dummy_call (struct gdbarch *g +@@ -666,11 +666,11 @@ h8300_push_dummy_call (struct gdbarch *g { struct cleanup *back_to; struct type *type = value_type (args[argument]); @@ -432,7 +432,7 @@ Index: gdb-7.7.1/gdb/h8300-tdep.c gdb_byte *padded = xmalloc (padded_len); back_to = make_cleanup (xfree, padded); -@@ -700,7 +700,7 @@ h8300_push_dummy_call (struct gdbarch *g +@@ -699,7 +699,7 @@ h8300_push_dummy_call (struct gdbarch *g /* Heavens to Betsy --- it's really going in registers! Note that on the h8/300s, there are gaps between the registers in the register file. */ @@ -441,11 +441,11 @@ Index: gdb-7.7.1/gdb/h8300-tdep.c for (offset = 0; offset < padded_len; offset += wordsize) { -Index: gdb-7.7.1/gdb/hppa-tdep.c +Index: gdb-7.8.50.20141228/gdb/hppa-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/hppa-tdep.c 2014-05-09 19:24:18.690252771 +0200 -+++ gdb-7.7.1/gdb/hppa-tdep.c 2014-05-09 20:02:09.624703768 +0200 -@@ -961,7 +961,7 @@ hppa64_push_dummy_call (struct gdbarch * +--- gdb-7.8.50.20141228.orig/gdb/hppa-tdep.c 2015-01-05 22:18:55.999023657 +0100 ++++ gdb-7.8.50.20141228/gdb/hppa-tdep.c 2015-01-05 22:19:08.091078463 +0100 +@@ -960,7 +960,7 @@ hppa64_push_dummy_call (struct gdbarch * { struct value *arg = args[i]; struct type *type = value_type (arg); @@ -454,7 +454,7 @@ Index: gdb-7.7.1/gdb/hppa-tdep.c const bfd_byte *valbuf; bfd_byte fptrbuf[8]; int regnum; -@@ -1156,7 +1156,7 @@ hppa64_return_value (struct gdbarch *gdb +@@ -1155,7 +1155,7 @@ hppa64_return_value (struct gdbarch *gdb struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { @@ -463,11 +463,11 @@ Index: gdb-7.7.1/gdb/hppa-tdep.c int regnum, offset; if (len > 16) -Index: gdb-7.7.1/gdb/i386-darwin-tdep.c +Index: gdb-7.8.50.20141228/gdb/i386-darwin-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/i386-darwin-tdep.c 2014-05-09 19:24:18.690252771 +0200 -+++ gdb-7.7.1/gdb/i386-darwin-tdep.c 2014-05-09 20:02:09.624703768 +0200 -@@ -164,7 +164,7 @@ i386_darwin_push_dummy_call (struct gdba +--- gdb-7.8.50.20141228.orig/gdb/i386-darwin-tdep.c 2015-01-05 22:18:55.999023657 +0100 ++++ gdb-7.8.50.20141228/gdb/i386-darwin-tdep.c 2015-01-05 22:19:08.091078463 +0100 +@@ -163,7 +163,7 @@ i386_darwin_push_dummy_call (struct gdba for (write_pass = 0; write_pass < 2; write_pass++) { @@ -476,11 +476,11 @@ Index: gdb-7.7.1/gdb/i386-darwin-tdep.c int num_m128 = 0; if (struct_return) -Index: gdb-7.7.1/gdb/i386-tdep.c +Index: gdb-7.8.50.20141228/gdb/i386-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/i386-tdep.c 2014-05-09 19:24:18.692252771 +0200 -+++ gdb-7.7.1/gdb/i386-tdep.c 2014-05-09 20:02:09.625703769 +0200 -@@ -2473,7 +2473,7 @@ i386_push_dummy_call (struct gdbarch *gd +--- gdb-7.8.50.20141228.orig/gdb/i386-tdep.c 2015-01-05 22:18:56.002023671 +0100 ++++ gdb-7.8.50.20141228/gdb/i386-tdep.c 2015-01-05 22:19:08.092078467 +0100 +@@ -2643,7 +2643,7 @@ i386_push_dummy_call (struct gdbarch *gd gdb_byte buf[4]; int i; int write_pass; @@ -489,7 +489,7 @@ Index: gdb-7.7.1/gdb/i386-tdep.c /* Determine the total space required for arguments and struct return address in a first pass (allowing for 16-byte-aligned -@@ -2481,7 +2481,7 @@ i386_push_dummy_call (struct gdbarch *gd +@@ -2651,7 +2651,7 @@ i386_push_dummy_call (struct gdbarch *gd for (write_pass = 0; write_pass < 2; write_pass++) { @@ -498,7 +498,7 @@ Index: gdb-7.7.1/gdb/i386-tdep.c if (struct_return) { -@@ -2498,7 +2498,7 @@ i386_push_dummy_call (struct gdbarch *gd +@@ -2668,7 +2668,7 @@ i386_push_dummy_call (struct gdbarch *gd for (i = 0; i < nargs; i++) { @@ -507,7 +507,7 @@ Index: gdb-7.7.1/gdb/i386-tdep.c if (write_pass) { -@@ -2705,7 +2705,7 @@ i386_reg_struct_return_p (struct gdbarch +@@ -2875,7 +2875,7 @@ i386_reg_struct_return_p (struct gdbarch { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); @@ -516,7 +516,7 @@ Index: gdb-7.7.1/gdb/i386-tdep.c gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION -@@ -3249,7 +3249,7 @@ static int +@@ -3621,7 +3621,7 @@ static int i386_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) { @@ -525,7 +525,7 @@ Index: gdb-7.7.1/gdb/i386-tdep.c /* Values may be spread across multiple registers. Most debugging formats aren't expressive enough to specify the locations, so -@@ -3282,7 +3282,7 @@ i386_register_to_value (struct frame_inf +@@ -3654,7 +3654,7 @@ i386_register_to_value (struct frame_inf int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -534,7 +534,7 @@ Index: gdb-7.7.1/gdb/i386-tdep.c if (i386_fp_regnum_p (gdbarch, regnum)) return i387_register_to_value (frame, regnum, type, to, -@@ -3318,7 +3318,7 @@ static void +@@ -3690,7 +3690,7 @@ static void i386_value_to_register (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *from) { @@ -543,28 +543,11 @@ Index: gdb-7.7.1/gdb/i386-tdep.c if (i386_fp_regnum_p (get_frame_arch (frame), regnum)) { -Index: gdb-7.7.1/gdb/ia64-tdep.c +Index: gdb-7.8.50.20141228/gdb/iq2000-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/ia64-tdep.c 2014-05-09 19:24:18.693252771 +0200 -+++ gdb-7.7.1/gdb/ia64-tdep.c 2014-05-09 20:02:09.626703769 +0200 -@@ -3851,8 +3851,10 @@ ia64_push_dummy_call (struct gdbarch *gd - int argno; - struct value *arg; - struct type *type; -- int len, argoffset; -- int nslots, rseslots, memslots, slotnum, nfuncargs; -+ LONGEST argoffset; -+ LONGEST len; -+ int rseslots, slotnum, nfuncargs; -+ LONGEST nslots, memslots; - int floatreg; - ULONGEST bsp; - CORE_ADDR funcdescaddr, pc, global_pointer; -Index: gdb-7.7.1/gdb/iq2000-tdep.c -=================================================================== ---- gdb-7.7.1.orig/gdb/iq2000-tdep.c 2014-05-09 19:24:18.693252771 +0200 -+++ gdb-7.7.1/gdb/iq2000-tdep.c 2014-05-09 20:02:09.626703769 +0200 -@@ -654,8 +654,9 @@ iq2000_push_dummy_call (struct gdbarch * +--- gdb-7.8.50.20141228.orig/gdb/iq2000-tdep.c 2015-01-05 22:18:56.003023675 +0100 ++++ gdb-7.8.50.20141228/gdb/iq2000-tdep.c 2015-01-05 22:19:08.092078467 +0100 +@@ -653,8 +653,9 @@ iq2000_push_dummy_call (struct gdbarch * const bfd_byte *val; bfd_byte buf[4]; struct type *type; @@ -576,11 +559,11 @@ Index: gdb-7.7.1/gdb/iq2000-tdep.c /* Used to copy struct arguments into the stack. */ CORE_ADDR struct_ptr; -Index: gdb-7.7.1/gdb/m32r-tdep.c +Index: gdb-7.8.50.20141228/gdb/m32r-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/m32r-tdep.c 2014-05-09 19:24:18.693252771 +0200 -+++ gdb-7.7.1/gdb/m32r-tdep.c 2014-05-09 20:02:09.626703769 +0200 -@@ -689,7 +689,7 @@ m32r_push_dummy_call (struct gdbarch *gd +--- gdb-7.8.50.20141228.orig/gdb/m32r-tdep.c 2015-01-05 22:18:56.003023675 +0100 ++++ gdb-7.8.50.20141228/gdb/m32r-tdep.c 2015-01-05 22:19:08.093078472 +0100 +@@ -687,7 +687,7 @@ m32r_push_dummy_call (struct gdbarch *gd CORE_ADDR regval; gdb_byte *val; gdb_byte valbuf[MAX_REGISTER_SIZE]; @@ -589,11 +572,11 @@ Index: gdb-7.7.1/gdb/m32r-tdep.c /* First force sp to a 4-byte alignment. */ sp = sp & ~3; -Index: gdb-7.7.1/gdb/m68k-tdep.c +Index: gdb-7.8.50.20141228/gdb/m68k-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/m68k-tdep.c 2014-05-09 19:24:18.694252771 +0200 -+++ gdb-7.7.1/gdb/m68k-tdep.c 2014-05-09 20:02:09.627703769 +0200 -@@ -384,7 +384,7 @@ m68k_reg_struct_return_p (struct gdbarch +--- gdb-7.8.50.20141228.orig/gdb/m68k-tdep.c 2015-01-05 22:18:56.003023675 +0100 ++++ gdb-7.8.50.20141228/gdb/m68k-tdep.c 2015-01-05 22:19:08.093078472 +0100 +@@ -382,7 +382,7 @@ m68k_reg_struct_return_p (struct gdbarch { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); @@ -602,7 +585,7 @@ Index: gdb-7.7.1/gdb/m68k-tdep.c gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION || code == TYPE_CODE_COMPLEX); -@@ -516,9 +516,9 @@ m68k_push_dummy_call (struct gdbarch *gd +@@ -514,9 +514,9 @@ m68k_push_dummy_call (struct gdbarch *gd for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -615,11 +598,11 @@ Index: gdb-7.7.1/gdb/m68k-tdep.c /* Non-scalars bigger than 4 bytes are left aligned, others are right aligned. */ -Index: gdb-7.7.1/gdb/m88k-tdep.c +Index: gdb-7.8.50.20141228/gdb/m88k-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/m88k-tdep.c 2014-05-09 19:24:18.694252771 +0200 -+++ gdb-7.7.1/gdb/m88k-tdep.c 2014-05-09 20:02:09.627703769 +0200 -@@ -260,13 +260,13 @@ m88k_store_arguments (struct regcache *r +--- gdb-7.8.50.20141228.orig/gdb/m88k-tdep.c 2015-01-05 22:18:56.004023680 +0100 ++++ gdb-7.8.50.20141228/gdb/m88k-tdep.c 2015-01-05 22:19:08.093078472 +0100 +@@ -257,13 +257,13 @@ m88k_store_arguments (struct regcache *r { struct gdbarch *gdbarch = get_regcache_arch (regcache); int num_register_words = 0; @@ -635,7 +618,7 @@ Index: gdb-7.7.1/gdb/m88k-tdep.c if (m88k_integral_or_pointer_p (type) && len < 4) { -@@ -308,8 +308,8 @@ m88k_store_arguments (struct regcache *r +@@ -305,8 +305,8 @@ m88k_store_arguments (struct regcache *r { const bfd_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); @@ -646,11 +629,11 @@ Index: gdb-7.7.1/gdb/m88k-tdep.c if (m88k_in_register_p (type)) { -Index: gdb-7.7.1/gdb/mep-tdep.c +Index: gdb-7.8.50.20141228/gdb/mep-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/mep-tdep.c 2014-05-09 19:24:18.695252772 +0200 -+++ gdb-7.7.1/gdb/mep-tdep.c 2014-05-09 20:02:09.627703769 +0200 -@@ -2272,7 +2272,7 @@ push_large_arguments (CORE_ADDR sp, int +--- gdb-7.8.50.20141228.orig/gdb/mep-tdep.c 2015-01-05 22:18:56.005023684 +0100 ++++ gdb-7.8.50.20141228/gdb/mep-tdep.c 2015-01-05 22:19:08.093078472 +0100 +@@ -2269,7 +2269,7 @@ push_large_arguments (CORE_ADDR sp, int for (i = 0; i < argc; i++) { @@ -659,11 +642,11 @@ Index: gdb-7.7.1/gdb/mep-tdep.c if (arg_len > MEP_GPR_SIZE) { -Index: gdb-7.7.1/gdb/mips-tdep.c +Index: gdb-7.8.50.20141228/gdb/mips-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/mips-tdep.c 2014-05-09 19:24:18.698252772 +0200 -+++ gdb-7.7.1/gdb/mips-tdep.c 2014-05-09 20:02:09.628703769 +0200 -@@ -402,7 +402,7 @@ static void +--- gdb-7.8.50.20141228.orig/gdb/mips-tdep.c 2015-01-05 22:18:56.009023702 +0100 ++++ gdb-7.8.50.20141228/gdb/mips-tdep.c 2015-01-05 22:19:08.095078481 +0100 +@@ -455,7 +455,7 @@ static void mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, int reg_num, int length, enum bfd_endian endian, gdb_byte *in, @@ -672,7 +655,7 @@ Index: gdb-7.7.1/gdb/mips-tdep.c { int reg_offset = 0; -@@ -425,8 +425,8 @@ mips_xfer_register (struct gdbarch *gdba +@@ -478,8 +478,8 @@ mips_xfer_register (struct gdbarch *gdba } if (mips_debug) fprintf_unfiltered (gdb_stderr, @@ -683,7 +666,7 @@ Index: gdb-7.7.1/gdb/mips-tdep.c if (mips_debug && out != NULL) { int i; -@@ -4345,13 +4345,13 @@ mips_eabi_push_dummy_call (struct gdbarc +@@ -4551,13 +4551,13 @@ mips_eabi_push_dummy_call (struct gdbarc gdb_byte valbuf[MAX_REGISTER_SIZE]; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -698,9 +681,9 @@ Index: gdb-7.7.1/gdb/mips-tdep.c + "mips_eabi_push_dummy_call: %d len=%s type=%d", + argnum + 1, plongest (len), (int) typecode); - /* Function pointer arguments to mips16 code need to be made into - mips16 pointers. */ -@@ -4636,7 +4636,7 @@ mips_eabi_return_value (struct gdbarch * + /* The EABI passes structures that do not fit in a register by + reference. */ +@@ -4826,7 +4826,7 @@ mips_eabi_return_value (struct gdbarch * static int mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type, @@ -709,7 +692,7 @@ Index: gdb-7.7.1/gdb/mips-tdep.c { int i; -@@ -4651,7 +4651,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbar +@@ -4841,7 +4841,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbar for (i = 0; i < TYPE_NFIELDS (arg_type); i++) { @@ -718,7 +701,7 @@ Index: gdb-7.7.1/gdb/mips-tdep.c struct type *field_type; /* We're only looking at normal fields. */ -@@ -4693,7 +4693,7 @@ mips_n32n64_push_dummy_call (struct gdba +@@ -4883,7 +4883,7 @@ mips_n32n64_push_dummy_call (struct gdba int argreg; int float_argreg; int argnum; @@ -727,7 +710,7 @@ Index: gdb-7.7.1/gdb/mips-tdep.c int stack_offset = 0; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5044,11 +5044,11 @@ mips_n32n64_return_value (struct gdbarch +@@ -5234,11 +5234,11 @@ mips_n32n64_return_value (struct gdbarch : MIPS_V0_REGNUM); field < TYPE_NFIELDS (type); field++, regnum += 2) { @@ -743,7 +726,7 @@ Index: gdb-7.7.1/gdb/mips-tdep.c if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16) { /* A 16-byte long double field goes in two consecutive -@@ -5090,8 +5090,8 @@ mips_n32n64_return_value (struct gdbarch +@@ -5280,8 +5280,8 @@ mips_n32n64_return_value (struct gdbarch if (offset + xfer > TYPE_LENGTH (type)) xfer = TYPE_LENGTH (type) - offset; if (mips_debug) @@ -754,7 +737,7 @@ Index: gdb-7.7.1/gdb/mips-tdep.c mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf, -@@ -5149,7 +5149,7 @@ mips_o32_push_dummy_call (struct gdbarch +@@ -5339,7 +5339,7 @@ mips_o32_push_dummy_call (struct gdbarch int argreg; int float_argreg; int argnum; @@ -763,7 +746,7 @@ Index: gdb-7.7.1/gdb/mips-tdep.c int stack_offset = 0; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5213,13 +5213,13 @@ mips_o32_push_dummy_call (struct gdbarch +@@ -5403,13 +5403,13 @@ mips_o32_push_dummy_call (struct gdbarch const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -780,7 +763,7 @@ Index: gdb-7.7.1/gdb/mips-tdep.c val = value_contents (arg); -@@ -5677,8 +5677,8 @@ mips_o64_push_dummy_call (struct gdbarch +@@ -5867,8 +5867,8 @@ mips_o64_push_dummy_call (struct gdbarch int argreg; int float_argreg; int argnum; @@ -791,8 +774,8 @@ Index: gdb-7.7.1/gdb/mips-tdep.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5739,13 +5739,13 @@ mips_o64_push_dummy_call (struct gdbarch - gdb_byte valbuf[MAX_REGISTER_SIZE]; +@@ -5928,13 +5928,13 @@ mips_o64_push_dummy_call (struct gdbarch + const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); - int len = TYPE_LENGTH (arg_type); @@ -808,11 +791,11 @@ Index: gdb-7.7.1/gdb/mips-tdep.c val = value_contents (arg); -Index: gdb-7.7.1/gdb/mn10300-tdep.c +Index: gdb-7.8.50.20141228/gdb/mn10300-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/mn10300-tdep.c 2014-05-09 19:24:18.698252772 +0200 -+++ gdb-7.7.1/gdb/mn10300-tdep.c 2014-05-09 20:02:09.629703770 +0200 -@@ -1227,7 +1227,7 @@ mn10300_push_dummy_call (struct gdbarch +--- gdb-7.8.50.20141228.orig/gdb/mn10300-tdep.c 2015-01-05 22:18:56.010023707 +0100 ++++ gdb-7.8.50.20141228/gdb/mn10300-tdep.c 2015-01-05 22:19:08.096078485 +0100 +@@ -1225,7 +1225,7 @@ mn10300_push_dummy_call (struct gdbarch enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); const int push_size = register_size (gdbarch, E_PC_REGNUM); int regs_used; @@ -821,11 +804,11 @@ Index: gdb-7.7.1/gdb/mn10300-tdep.c int stack_offset = 0; int argnum; const gdb_byte *val; -Index: gdb-7.7.1/gdb/mt-tdep.c +Index: gdb-7.8.50.20141228/gdb/mt-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/mt-tdep.c 2014-05-09 19:24:18.699252772 +0200 -+++ gdb-7.7.1/gdb/mt-tdep.c 2014-05-09 20:02:09.629703770 +0200 -@@ -783,9 +783,9 @@ mt_push_dummy_call (struct gdbarch *gdba +--- gdb-7.8.50.20141228.orig/gdb/mt-tdep.c 2015-01-05 22:18:56.010023707 +0100 ++++ gdb-7.8.50.20141228/gdb/mt-tdep.c 2015-01-05 22:19:08.096078485 +0100 +@@ -781,9 +781,9 @@ mt_push_dummy_call (struct gdbarch *gdba gdb_byte buf[MT_MAX_STRUCT_SIZE]; int argreg = MT_1ST_ARGREG; int split_param_len = 0; @@ -837,11 +820,11 @@ Index: gdb-7.7.1/gdb/mt-tdep.c int i, j; /* First handle however many args we can fit into MT_1ST_ARGREG thru -Index: gdb-7.7.1/gdb/ppc-sysv-tdep.c +Index: gdb-7.8.50.20141228/gdb/ppc-sysv-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/ppc-sysv-tdep.c 2014-05-09 19:24:18.699252772 +0200 -+++ gdb-7.7.1/gdb/ppc-sysv-tdep.c 2014-05-09 20:10:13.994807709 +0200 -@@ -68,7 +68,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb +--- gdb-7.8.50.20141228.orig/gdb/ppc-sysv-tdep.c 2015-01-05 22:18:56.011023711 +0100 ++++ gdb-7.8.50.20141228/gdb/ppc-sysv-tdep.c 2015-01-05 22:19:08.096078485 +0100 +@@ -66,7 +66,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function)); ULONGEST saved_sp; @@ -850,7 +833,7 @@ Index: gdb-7.7.1/gdb/ppc-sysv-tdep.c int write_pass; gdb_assert (tdep->wordsize == 4); -@@ -99,9 +99,9 @@ ppc_sysv_abi_push_dummy_call (struct gdb +@@ -97,9 +97,9 @@ ppc_sysv_abi_push_dummy_call (struct gdb /* Next available vector register for vector arguments. */ int vreg = 2; /* Arguments start above the "LR save word" and "Back chain". */ @@ -862,7 +845,7 @@ Index: gdb-7.7.1/gdb/ppc-sysv-tdep.c /* If the function is returning a `struct', then the first word (which will be passed in r3) is used for struct return -@@ -120,7 +120,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb +@@ -118,7 +118,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb { struct value *arg = args[argno]; struct type *type = check_typedef (value_type (arg)); @@ -871,7 +854,7 @@ Index: gdb-7.7.1/gdb/ppc-sysv-tdep.c const bfd_byte *val = value_contents (arg); if (TYPE_CODE (type) == TYPE_CODE_FLT && len <= 8 -@@ -1285,11 +1285,11 @@ struct ppc64_sysv_argpos +@@ -1283,11 +1283,11 @@ struct ppc64_sysv_argpos static void ppc64_sysv_abi_push_val (struct gdbarch *gdbarch, @@ -885,11 +868,11 @@ Index: gdb-7.7.1/gdb/ppc-sysv-tdep.c /* Enforce alignment of stack location, if requested. */ if (align > tdep->wordsize) -Index: gdb-7.7.1/gdb/rl78-tdep.c +Index: gdb-7.8.50.20141228/gdb/rl78-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/rl78-tdep.c 2014-05-09 19:24:18.700252772 +0200 -+++ gdb-7.7.1/gdb/rl78-tdep.c 2014-05-09 20:02:09.630703770 +0200 -@@ -1052,8 +1052,8 @@ rl78_push_dummy_call (struct gdbarch *gd +--- gdb-7.8.50.20141228.orig/gdb/rl78-tdep.c 2015-01-05 22:18:56.011023711 +0100 ++++ gdb-7.8.50.20141228/gdb/rl78-tdep.c 2015-01-05 22:19:08.096078485 +0100 +@@ -1251,8 +1251,8 @@ rl78_push_dummy_call (struct gdbarch *gd for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -900,11 +883,11 @@ Index: gdb-7.7.1/gdb/rl78-tdep.c sp -= container_len; write_memory (rl78_make_data_address (sp), -Index: gdb-7.7.1/gdb/rs6000-aix-tdep.c +Index: gdb-7.8.50.20141228/gdb/rs6000-aix-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/rs6000-aix-tdep.c 2014-05-09 19:24:18.700252772 +0200 -+++ gdb-7.7.1/gdb/rs6000-aix-tdep.c 2014-05-09 20:02:09.630703770 +0200 -@@ -196,9 +196,9 @@ rs6000_push_dummy_call (struct gdbarch * +--- gdb-7.8.50.20141228.orig/gdb/rs6000-aix-tdep.c 2015-01-05 22:18:56.012023716 +0100 ++++ gdb-7.8.50.20141228/gdb/rs6000-aix-tdep.c 2015-01-05 22:19:08.097078490 +0100 +@@ -186,9 +186,9 @@ rs6000_push_dummy_call (struct gdbarch * struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int ii; @@ -916,7 +899,7 @@ Index: gdb-7.7.1/gdb/rs6000-aix-tdep.c gdb_byte tmp_buffer[50]; int f_argno = 0; /* current floating point argno */ int wordsize = gdbarch_tdep (gdbarch)->wordsize; -@@ -331,7 +331,7 @@ ran_out_of_registers_for_arguments: +@@ -321,7 +321,7 @@ ran_out_of_registers_for_arguments: if ((argno < nargs) || argbytes) { @@ -925,11 +908,11 @@ Index: gdb-7.7.1/gdb/rs6000-aix-tdep.c if (argbytes) { -Index: gdb-7.7.1/gdb/s390-linux-tdep.c +Index: gdb-7.8.50.20141228/gdb/s390-linux-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/s390-linux-tdep.c 2014-05-09 19:24:18.701252772 +0200 -+++ gdb-7.7.1/gdb/s390-linux-tdep.c 2014-05-09 20:02:09.631703770 +0200 -@@ -2526,7 +2526,7 @@ is_float_like (struct type *type) +--- gdb-7.8.50.20141228.orig/gdb/s390-linux-tdep.c 2015-01-05 22:18:56.013023720 +0100 ++++ gdb-7.8.50.20141228/gdb/s390-linux-tdep.c 2015-01-05 22:19:08.097078490 +0100 +@@ -2334,7 +2334,7 @@ is_float_like (struct type *type) static int @@ -938,7 +921,7 @@ Index: gdb-7.7.1/gdb/s390-linux-tdep.c { return ((n & (n - 1)) == 0); } -@@ -2712,7 +2712,7 @@ s390_push_dummy_call (struct gdbarch *gd +@@ -2520,7 +2520,7 @@ s390_push_dummy_call (struct gdbarch *gd { struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); @@ -947,11 +930,11 @@ Index: gdb-7.7.1/gdb/s390-linux-tdep.c if (s390_function_arg_pass_by_reference (type)) { -Index: gdb-7.7.1/gdb/score-tdep.c +Index: gdb-7.8.50.20141228/gdb/score-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/score-tdep.c 2014-05-09 19:24:18.701252772 +0200 -+++ gdb-7.7.1/gdb/score-tdep.c 2014-05-09 20:02:09.631703770 +0200 -@@ -515,7 +515,7 @@ score_push_dummy_call (struct gdbarch *g +--- gdb-7.8.50.20141228.orig/gdb/score-tdep.c 2015-01-05 22:18:56.013023720 +0100 ++++ gdb-7.8.50.20141228/gdb/score-tdep.c 2015-01-05 22:19:08.097078490 +0100 +@@ -514,7 +514,7 @@ score_push_dummy_call (struct gdbarch *g enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argnum; int argreg; @@ -960,11 +943,11 @@ Index: gdb-7.7.1/gdb/score-tdep.c CORE_ADDR stack_offset = 0; CORE_ADDR addr = 0; -Index: gdb-7.7.1/gdb/sh-tdep.c +Index: gdb-7.8.50.20141228/gdb/sh-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/sh-tdep.c 2014-05-09 19:24:18.702252772 +0200 -+++ gdb-7.7.1/gdb/sh-tdep.c 2014-05-09 20:02:09.631703770 +0200 -@@ -807,7 +807,7 @@ sh_skip_prologue (struct gdbarch *gdbarc +--- gdb-7.8.50.20141228.orig/gdb/sh-tdep.c 2015-01-05 22:18:56.014023725 +0100 ++++ gdb-7.8.50.20141228/gdb/sh-tdep.c 2015-01-05 22:19:08.098078494 +0100 +@@ -805,7 +805,7 @@ sh_skip_prologue (struct gdbarch *gdbarc static int sh_use_struct_convention (int renesas_abi, struct type *type) { @@ -973,7 +956,7 @@ Index: gdb-7.7.1/gdb/sh-tdep.c int nelem = TYPE_NFIELDS (type); /* The Renesas ABI returns aggregate types always on stack. */ -@@ -909,7 +909,7 @@ sh_frame_align (struct gdbarch *ignore, +@@ -907,7 +907,7 @@ sh_frame_align (struct gdbarch *ignore, /* Helper function to justify value in register according to endianess. */ static const gdb_byte * @@ -982,7 +965,7 @@ Index: gdb-7.7.1/gdb/sh-tdep.c { static gdb_byte valbuf[4]; -@@ -1069,7 +1069,8 @@ sh_push_dummy_call_fpu (struct gdbarch * +@@ -1067,7 +1067,8 @@ sh_push_dummy_call_fpu (struct gdbarch * struct type *type; CORE_ADDR regval; const gdb_byte *val; @@ -992,7 +975,7 @@ Index: gdb-7.7.1/gdb/sh-tdep.c int pass_on_stack = 0; int treat_as_flt; int last_reg_arg = INT_MAX; -@@ -1210,7 +1211,8 @@ sh_push_dummy_call_nofpu (struct gdbarch +@@ -1208,7 +1209,8 @@ sh_push_dummy_call_nofpu (struct gdbarch struct type *type; CORE_ADDR regval; const gdb_byte *val; @@ -1002,11 +985,11 @@ Index: gdb-7.7.1/gdb/sh-tdep.c int pass_on_stack = 0; int last_reg_arg = INT_MAX; -Index: gdb-7.7.1/gdb/sh64-tdep.c +Index: gdb-7.8.50.20141228/gdb/sh64-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/sh64-tdep.c 2014-05-09 19:24:18.702252772 +0200 -+++ gdb-7.7.1/gdb/sh64-tdep.c 2014-05-09 20:02:09.632703771 +0200 -@@ -1058,7 +1058,7 @@ sh64_push_dummy_call (struct gdbarch *gd +--- gdb-7.8.50.20141228.orig/gdb/sh64-tdep.c 2015-01-05 22:18:56.015023729 +0100 ++++ gdb-7.8.50.20141228/gdb/sh64-tdep.c 2015-01-05 22:19:08.098078494 +0100 +@@ -1056,7 +1056,7 @@ sh64_push_dummy_call (struct gdbarch *gd CORE_ADDR struct_addr) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -1015,7 +998,7 @@ Index: gdb-7.7.1/gdb/sh64-tdep.c int int_argreg; int float_argreg; int double_argreg; -@@ -1069,7 +1069,7 @@ sh64_push_dummy_call (struct gdbarch *gd +@@ -1067,7 +1067,7 @@ sh64_push_dummy_call (struct gdbarch *gd CORE_ADDR regval; const gdb_byte *val; gdb_byte valbuf[8]; @@ -1024,11 +1007,11 @@ Index: gdb-7.7.1/gdb/sh64-tdep.c int argreg_size; int fp_args[12]; -Index: gdb-7.7.1/gdb/sparc-tdep.c +Index: gdb-7.8.50.20141228/gdb/sparc-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/sparc-tdep.c 2014-05-09 19:24:18.703252772 +0200 -+++ gdb-7.7.1/gdb/sparc-tdep.c 2014-05-09 20:02:09.632703771 +0200 -@@ -502,7 +502,7 @@ sparc32_store_arguments (struct regcache +--- gdb-7.8.50.20141228.orig/gdb/sparc-tdep.c 2015-01-05 22:18:56.016023734 +0100 ++++ gdb-7.8.50.20141228/gdb/sparc-tdep.c 2015-01-05 22:19:08.098078494 +0100 +@@ -525,7 +525,7 @@ sparc32_store_arguments (struct regcache for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -1037,11 +1020,11 @@ Index: gdb-7.7.1/gdb/sparc-tdep.c if (sparc_structure_or_union_p (type) || (sparc_floating_p (type) && len == 16) -Index: gdb-7.7.1/gdb/sparc64-tdep.c +Index: gdb-7.8.50.20141228/gdb/sparc64-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/sparc64-tdep.c 2014-05-09 19:24:18.704252773 +0200 -+++ gdb-7.7.1/gdb/sparc64-tdep.c 2014-05-09 20:02:09.632703771 +0200 -@@ -639,7 +639,8 @@ sparc64_16_byte_align_p (struct type *ty +--- gdb-7.8.50.20141228.orig/gdb/sparc64-tdep.c 2015-01-05 22:18:56.016023734 +0100 ++++ gdb-7.8.50.20141228/gdb/sparc64-tdep.c 2015-01-05 22:19:08.099078499 +0100 +@@ -636,7 +636,8 @@ sparc64_16_byte_align_p (struct type *ty static void sparc64_store_floating_fields (struct regcache *regcache, struct type *type, @@ -1051,7 +1034,7 @@ Index: gdb-7.7.1/gdb/sparc64-tdep.c { int len = TYPE_LENGTH (type); -@@ -681,7 +682,7 @@ sparc64_store_floating_fields (struct re +@@ -678,7 +679,7 @@ sparc64_store_floating_fields (struct re for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -1060,7 +1043,7 @@ Index: gdb-7.7.1/gdb/sparc64-tdep.c sparc64_store_floating_fields (regcache, subtype, valbuf, element, subpos); -@@ -713,7 +714,7 @@ sparc64_store_floating_fields (struct re +@@ -710,7 +711,7 @@ sparc64_store_floating_fields (struct re static void sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, @@ -1069,7 +1052,7 @@ Index: gdb-7.7.1/gdb/sparc64-tdep.c { if (sparc64_floating_p (type)) { -@@ -750,7 +751,7 @@ sparc64_extract_floating_fields (struct +@@ -747,7 +748,7 @@ sparc64_extract_floating_fields (struct for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -1078,7 +1061,7 @@ Index: gdb-7.7.1/gdb/sparc64-tdep.c sparc64_extract_floating_fields (regcache, subtype, valbuf, subpos); } -@@ -783,7 +784,7 @@ sparc64_store_arguments (struct regcache +@@ -780,7 +781,7 @@ sparc64_store_arguments (struct regcache for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -1087,7 +1070,7 @@ Index: gdb-7.7.1/gdb/sparc64-tdep.c if (sparc64_structure_or_union_p (type) || (sparc64_complex_floating_p (type) && len == 32)) -@@ -883,7 +884,7 @@ sparc64_store_arguments (struct regcache +@@ -880,7 +881,7 @@ sparc64_store_arguments (struct regcache { const gdb_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); @@ -1096,11 +1079,11 @@ Index: gdb-7.7.1/gdb/sparc64-tdep.c int regnum = -1; gdb_byte buf[16]; -Index: gdb-7.7.1/gdb/spu-tdep.c +Index: gdb-7.8.50.20141228/gdb/spu-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/spu-tdep.c 2014-05-09 19:24:18.704252773 +0200 -+++ gdb-7.7.1/gdb/spu-tdep.c 2014-05-09 20:02:09.633703771 +0200 -@@ -1376,7 +1376,7 @@ spu_push_dummy_call (struct gdbarch *gdb +--- gdb-7.8.50.20141228.orig/gdb/spu-tdep.c 2015-01-05 22:18:56.017023739 +0100 ++++ gdb-7.8.50.20141228/gdb/spu-tdep.c 2015-01-05 22:19:08.099078499 +0100 +@@ -1430,7 +1430,7 @@ spu_push_dummy_call (struct gdbarch *gdb struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); const gdb_byte *contents = value_contents (arg); @@ -1109,7 +1092,7 @@ Index: gdb-7.7.1/gdb/spu-tdep.c /* If the argument doesn't wholly fit into registers, it and all subsequent arguments go to the stack. */ -@@ -1408,7 +1408,7 @@ spu_push_dummy_call (struct gdbarch *gdb +@@ -1462,7 +1462,7 @@ spu_push_dummy_call (struct gdbarch *gdb { struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); @@ -1118,11 +1101,11 @@ Index: gdb-7.7.1/gdb/spu-tdep.c int preferred_slot; if (spu_scalar_value_p (type)) -Index: gdb-7.7.1/gdb/tic6x-tdep.c +Index: gdb-7.8.50.20141228/gdb/tic6x-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/tic6x-tdep.c 2014-05-09 19:24:18.705252773 +0200 -+++ gdb-7.7.1/gdb/tic6x-tdep.c 2014-05-09 20:02:09.633703771 +0200 -@@ -896,7 +896,7 @@ tic6x_push_dummy_call (struct gdbarch *g +--- gdb-7.8.50.20141228.orig/gdb/tic6x-tdep.c 2015-01-05 22:18:56.018023743 +0100 ++++ gdb-7.8.50.20141228/gdb/tic6x-tdep.c 2015-01-05 22:19:08.099078499 +0100 +@@ -895,7 +895,7 @@ tic6x_push_dummy_call (struct gdbarch *g int argreg = 0; int argnum; int stack_offset = 4; @@ -1131,7 +1114,7 @@ Index: gdb-7.7.1/gdb/tic6x-tdep.c CORE_ADDR func_addr = find_function_addr (function, NULL); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); struct type *func_type = value_type (function); -@@ -930,7 +930,7 @@ tic6x_push_dummy_call (struct gdbarch *g +@@ -929,7 +929,7 @@ tic6x_push_dummy_call (struct gdbarch *g /* Now make space on the stack for the args. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1140,7 +1123,7 @@ Index: gdb-7.7.1/gdb/tic6x-tdep.c if (argnum >= 10 - argreg) references_offset += len; stack_offset += len; -@@ -949,7 +949,7 @@ tic6x_push_dummy_call (struct gdbarch *g +@@ -948,7 +948,7 @@ tic6x_push_dummy_call (struct gdbarch *g const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1149,7 +1132,7 @@ Index: gdb-7.7.1/gdb/tic6x-tdep.c enum type_code typecode = TYPE_CODE (arg_type); val = value_contents (arg); -@@ -1109,7 +1109,8 @@ tic6x_push_dummy_call (struct gdbarch *g +@@ -1108,7 +1108,8 @@ tic6x_push_dummy_call (struct gdbarch *g } else internal_error (__FILE__, __LINE__, @@ -1159,11 +1142,11 @@ Index: gdb-7.7.1/gdb/tic6x-tdep.c addr = sp + stack_offset; write_memory (addr, val, len); -Index: gdb-7.7.1/gdb/tilegx-tdep.c +Index: gdb-7.8.50.20141228/gdb/tilegx-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/tilegx-tdep.c 2014-05-09 19:24:18.705252773 +0200 -+++ gdb-7.7.1/gdb/tilegx-tdep.c 2014-05-09 20:02:09.633703771 +0200 -@@ -290,7 +290,7 @@ tilegx_push_dummy_call (struct gdbarch * +--- gdb-7.8.50.20141228.orig/gdb/tilegx-tdep.c 2015-01-05 22:18:56.018023743 +0100 ++++ gdb-7.8.50.20141228/gdb/tilegx-tdep.c 2015-01-05 22:19:08.100078503 +0100 +@@ -288,7 +288,7 @@ tilegx_push_dummy_call (struct gdbarch * CORE_ADDR stack_dest = sp; int argreg = TILEGX_R0_REGNUM; int i, j; @@ -1172,11 +1155,11 @@ Index: gdb-7.7.1/gdb/tilegx-tdep.c static const gdb_byte four_zero_words[16] = { 0 }; /* If struct_return is 1, then the struct return address will -Index: gdb-7.7.1/gdb/v850-tdep.c +Index: gdb-7.8.50.20141228/gdb/v850-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/v850-tdep.c 2014-05-09 19:24:18.705252773 +0200 -+++ gdb-7.7.1/gdb/v850-tdep.c 2014-05-09 20:02:09.634703771 +0200 -@@ -1021,7 +1021,7 @@ v850_push_dummy_call (struct gdbarch *gd +--- gdb-7.8.50.20141228.orig/gdb/v850-tdep.c 2015-01-05 22:18:56.019023748 +0100 ++++ gdb-7.8.50.20141228/gdb/v850-tdep.c 2015-01-05 22:19:08.100078503 +0100 +@@ -1019,7 +1019,7 @@ v850_push_dummy_call (struct gdbarch *gd enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argreg; int argnum; @@ -1185,7 +1168,7 @@ Index: gdb-7.7.1/gdb/v850-tdep.c int stack_offset; if (gdbarch_tdep (gdbarch)->abi == V850_ABI_RH850) -@@ -1049,7 +1049,7 @@ v850_push_dummy_call (struct gdbarch *gd +@@ -1047,7 +1047,7 @@ v850_push_dummy_call (struct gdbarch *gd in four registers available. Loop thru args from first to last. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1194,11 +1177,11 @@ Index: gdb-7.7.1/gdb/v850-tdep.c gdb_byte *val; gdb_byte valbuf[v850_reg_size]; -Index: gdb-7.7.1/gdb/vax-tdep.c +Index: gdb-7.8.50.20141228/gdb/vax-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/vax-tdep.c 2014-05-09 19:24:18.706252773 +0200 -+++ gdb-7.7.1/gdb/vax-tdep.c 2014-05-09 20:02:09.634703771 +0200 -@@ -115,7 +115,7 @@ vax_store_arguments (struct regcache *re +--- gdb-7.8.50.20141228.orig/gdb/vax-tdep.c 2015-01-05 22:18:56.019023748 +0100 ++++ gdb-7.8.50.20141228/gdb/vax-tdep.c 2015-01-05 22:19:08.100078503 +0100 +@@ -111,7 +111,7 @@ vax_store_arguments (struct regcache *re struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); gdb_byte buf[4]; @@ -1207,7 +1190,7 @@ Index: gdb-7.7.1/gdb/vax-tdep.c int i; /* We create an argument list on the stack, and make the argument -@@ -124,7 +124,7 @@ vax_store_arguments (struct regcache *re +@@ -120,7 +120,7 @@ vax_store_arguments (struct regcache *re /* Push arguments in reverse order. */ for (i = nargs - 1; i >= 0; i--) { @@ -1216,11 +1199,11 @@ Index: gdb-7.7.1/gdb/vax-tdep.c sp -= (len + 3) & ~3; count += (len + 3) / 4; -Index: gdb-7.7.1/gdb/xstormy16-tdep.c +Index: gdb-7.8.50.20141228/gdb/xstormy16-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/xstormy16-tdep.c 2014-05-09 19:24:18.706252773 +0200 -+++ gdb-7.7.1/gdb/xstormy16-tdep.c 2014-05-09 20:02:09.634703771 +0200 -@@ -235,8 +235,9 @@ xstormy16_push_dummy_call (struct gdbarc +--- gdb-7.8.50.20141228.orig/gdb/xstormy16-tdep.c 2015-01-05 22:18:56.020023752 +0100 ++++ gdb-7.8.50.20141228/gdb/xstormy16-tdep.c 2015-01-05 22:19:08.100078503 +0100 +@@ -233,8 +233,9 @@ xstormy16_push_dummy_call (struct gdbarc enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR stack_dest = sp; int argreg = E_1ST_ARG_REGNUM; @@ -1232,11 +1215,11 @@ Index: gdb-7.7.1/gdb/xstormy16-tdep.c const gdb_byte *val; gdb_byte buf[xstormy16_pc_size]; -Index: gdb-7.7.1/gdb/xtensa-tdep.c +Index: gdb-7.8.50.20141228/gdb/xtensa-tdep.c =================================================================== ---- gdb-7.7.1.orig/gdb/xtensa-tdep.c 2014-05-09 19:24:18.707252773 +0200 -+++ gdb-7.7.1/gdb/xtensa-tdep.c 2014-05-09 20:02:09.634703771 +0200 -@@ -1652,8 +1652,7 @@ xtensa_store_return_value (struct type * +--- gdb-7.8.50.20141228.orig/gdb/xtensa-tdep.c 2015-01-05 22:18:56.021023757 +0100 ++++ gdb-7.8.50.20141228/gdb/xtensa-tdep.c 2015-01-05 22:19:08.101078508 +0100 +@@ -1646,8 +1646,7 @@ xtensa_store_return_value (struct type * if (len > (callsize > 8 ? 8 : 16)) internal_error (__FILE__, __LINE__, @@ -1246,7 +1229,7 @@ Index: gdb-7.7.1/gdb/xtensa-tdep.c areg = arreg_number (gdbarch, gdbarch_tdep (gdbarch)->a0_base + 2 + callsize, wb); -@@ -1727,18 +1726,18 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1721,18 +1720,18 @@ xtensa_push_dummy_call (struct gdbarch * { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -1268,7 +1251,7 @@ Index: gdb-7.7.1/gdb/xtensa-tdep.c int regno; /* regno if in register. */ } u; }; -@@ -1762,9 +1761,10 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1756,9 +1755,10 @@ xtensa_push_dummy_call (struct gdbarch * { struct value *arg = args[i]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1282,7 +1265,7 @@ Index: gdb-7.7.1/gdb/xtensa-tdep.c switch (TYPE_CODE (arg_type)) { case TYPE_CODE_INT: -@@ -1834,8 +1834,8 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1828,8 +1828,8 @@ xtensa_push_dummy_call (struct gdbarch * info->align = TYPE_LENGTH (builtin_type (gdbarch)->builtin_long); break; } @@ -1292,7 +1275,7 @@ Index: gdb-7.7.1/gdb/xtensa-tdep.c /* Align size and onstack_size. */ size = (size + info->align - 1) & ~(info->align - 1); -@@ -1880,7 +1880,7 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1874,7 +1874,7 @@ xtensa_push_dummy_call (struct gdbarch * if (info->onstack) { @@ -1301,7 +1284,7 @@ Index: gdb-7.7.1/gdb/xtensa-tdep.c CORE_ADDR offset = sp + info->u.offset; /* Odd-sized structs are aligned to the lower side of a memory -@@ -1896,7 +1896,7 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1890,7 +1890,7 @@ xtensa_push_dummy_call (struct gdbarch * } else { diff --git a/gdb-rhbz795424-bitpos-25of25.patch b/gdb-rhbz795424-bitpos-25of25.patch index 329bd01..f2c5c14 100644 --- a/gdb-rhbz795424-bitpos-25of25.patch +++ b/gdb-rhbz795424-bitpos-25of25.patch @@ -47,10 +47,10 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=f77-bounds.patch -Index: gdb-7.7.90.20140613/gdb/f-lang.h +Index: gdb-7.8.50.20141228/gdb/f-lang.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/f-lang.h 2014-06-16 22:45:00.404470944 +0200 -+++ gdb-7.7.90.20140613/gdb/f-lang.h 2014-06-16 22:45:10.352477761 +0200 +--- gdb-7.8.50.20141228.orig/gdb/f-lang.h 2015-01-06 22:46:31.620852996 +0100 ++++ gdb-7.8.50.20141228/gdb/f-lang.h 2015-01-06 22:46:34.190865466 +0100 @@ -62,9 +62,9 @@ struct common_block struct symbol *contents[1]; }; @@ -63,11 +63,11 @@ Index: gdb-7.7.90.20140613/gdb/f-lang.h extern void f77_get_dynamic_array_length (struct type *); -Index: gdb-7.7.90.20140613/gdb/f-typeprint.c +Index: gdb-7.8.50.20141228/gdb/f-typeprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/f-typeprint.c 2014-06-16 22:45:00.404470944 +0200 -+++ gdb-7.7.90.20140613/gdb/f-typeprint.c 2014-06-16 22:45:10.353477761 +0200 -@@ -161,7 +161,7 @@ f_type_print_varspec_suffix (struct type +--- gdb-7.8.50.20141228.orig/gdb/f-typeprint.c 2015-01-06 22:46:31.621853001 +0100 ++++ gdb-7.8.50.20141228/gdb/f-typeprint.c 2015-01-06 22:47:03.731008798 +0100 +@@ -158,7 +158,7 @@ f_type_print_varspec_suffix (struct type int show, int passed_a_ptr, int demangled_args, int arrayprint_recurse_level) { @@ -76,25 +76,25 @@ Index: gdb-7.7.90.20140613/gdb/f-typeprint.c /* No static variables are permitted as an error call may occur during execution of this function. */ -@@ -195,7 +195,7 @@ f_type_print_varspec_suffix (struct type +@@ -192,7 +192,7 @@ f_type_print_varspec_suffix (struct type lower_bound = f77_get_lowerbound (type); if (lower_bound != 1) /* Not the default. */ - fprintf_filtered (stream, "%d:", lower_bound); -+ fprintf_filtered (stream, "%s:", plongest (lower_bound)); ++ fprintf_filtered (stream, "%s:", plongest (lower_bound)); /* Make sure that, if we have an assumed size array, we print out a warning and print the upperbound as '*'. */ -@@ -205,7 +205,7 @@ f_type_print_varspec_suffix (struct type +@@ -202,7 +202,7 @@ f_type_print_varspec_suffix (struct type else { upper_bound = f77_get_upperbound (type); - fprintf_filtered (stream, "%d", upper_bound); -+ fprintf_filtered (stream, "%s", plongest (upper_bound)); ++ fprintf_filtered (stream, "%s", plongest (upper_bound)); } if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY) -@@ -274,7 +274,7 @@ void +@@ -271,7 +271,7 @@ void f_type_print_base (struct type *type, struct ui_file *stream, int show, int level) { @@ -103,7 +103,7 @@ Index: gdb-7.7.90.20140613/gdb/f-typeprint.c int index; QUIT; -@@ -356,7 +356,7 @@ f_type_print_base (struct type *type, st +@@ -353,7 +353,7 @@ f_type_print_base (struct type *type, st else { upper_bound = f77_get_upperbound (type); @@ -112,11 +112,11 @@ Index: gdb-7.7.90.20140613/gdb/f-typeprint.c } break; -Index: gdb-7.7.90.20140613/gdb/f-valprint.c +Index: gdb-7.8.50.20141228/gdb/f-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/f-valprint.c 2014-06-16 22:45:34.901495069 +0200 -+++ gdb-7.7.90.20140613/gdb/f-valprint.c 2014-06-16 22:45:44.933502067 +0200 -@@ -46,7 +46,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN +--- gdb-7.8.50.20141228.orig/gdb/f-valprint.c 2015-01-06 22:46:31.621853001 +0100 ++++ gdb-7.8.50.20141228/gdb/f-valprint.c 2015-01-06 22:46:34.191865471 +0100 +@@ -43,7 +43,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN /* Array which holds offsets to be applied to get a row's elements for a given array. Array also holds the size of each subarray. */ @@ -125,7 +125,7 @@ Index: gdb-7.7.90.20140613/gdb/f-valprint.c f77_get_lowerbound (struct type *type) { if (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED (type)) -@@ -55,7 +55,7 @@ f77_get_lowerbound (struct type *type) +@@ -52,7 +52,7 @@ f77_get_lowerbound (struct type *type) return TYPE_ARRAY_LOWER_BOUND_VALUE (type); } diff --git a/gdb-stale-frame_info.patch b/gdb-stale-frame_info.patch index 5b56ab3..a80859f 100644 --- a/gdb-stale-frame_info.patch +++ b/gdb-stale-frame_info.patch @@ -45,7 +45,7 @@ gdb/ - inf = find_inferior_for_program_space (pspace); + if (inf->pspace != pspace) + inf = find_inferior_for_program_space (pspace); - if (inf != NULL) + if (inf != NULL && inf->pid != 0) { - struct thread_info *tp; + struct thread_info *tp, *current_tp = NULL; diff --git a/gdb-upstream.patch b/gdb-upstream.patch index 8e94025..b735b8d 100644 --- a/gdb-upstream.patch +++ b/gdb-upstream.patch @@ -1,67 +1,53 @@ -http://sourceware.org/ml/gdb-patches/2014-07/msg00274.html -Subject: [obv] Fix false argv0-symlink.exp FAIL running under a very long directory name +commit 7a270e0c9ba0eb738a4c30258ab29c09963fcd4d +Author: Alexander Klimov +Date: Tue Jan 27 19:56:45 2015 +0200 -Hi, + 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 + , + the attached patch simply initializes sec with NULL. + + gdb/ChangeLog: + + * symfile.c (unmap_overlay_command): Initialize sec to NULL. + + Tested on x86_64-linux. -checked in as obvious: - -Starting program: /home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/gdb/testsuite/gdb.base/argv0-symlink-filelink ^M -[...] -(gdb) print argv[0]^M -$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-", 'f' ...^M -(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name - -after "set print repeats 10000": - -print argv[0]^M -$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"...^M -(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name - -after "set print elements 10000": - -print argv[0]^M -$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/gdb/testsuite/gdb.base/argv0-symlink-filelink"^M -(gdb) PASS: gdb.base/argv0-symlink.exp: kept file symbolic link name - -commit 218c2655603748b844dcaf103e34fd14d8ee8aef -Author: Jan Kratochvil -Date: Fri Jul 11 17:26:42 2014 +0200 - -diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog -index 74f7bce..253eeeb 100644 -### a/gdb/testsuite/ChangeLog -### b/gdb/testsuite/ChangeLog -## -1,3 +1,9 @@ -+2014-07-11 Jan Kratochvil +### a/gdb/ChangeLog +### b/gdb/ChangeLog +## -1,3 +1,7 @@ ++2015-01-29 Joel Brobecker (tiny patch) + -+ Fix false FAIL running under a very long directory name. -+ * gdb.base/argv0-symlink.exp: Add "set print repeats 10000" -+ and "set print elements 10000". Twice. ++ * symfile.c (unmap_overlay_command): Initialize sec to NULL. + - 2014-07-11 Yao Qi + 2015-01-27 Doug Evans - * gdb.base/exprs.exp: "set print symbol off". -diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp -index 0e0202d..d849b4c 100644 ---- a/gdb/testsuite/gdb.base/argv0-symlink.exp -+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp -@@ -36,6 +36,9 @@ if ![runto_main] { - return -1 - } + * 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; -+gdb_test_no_output "set print repeats 10000" -+gdb_test_no_output "set print elements 10000" -+ - gdb_test {print argv[0]} "/$filelink\"" $test - - # For a link named /PATH/TO/DIR/LINK, we want to check the output -@@ -67,6 +70,9 @@ if ![runto_main] { - return -1 - } - -+gdb_test_no_output "set print repeats 10000" -+gdb_test_no_output "set print elements 10000" -+ - # gdbserver does not have this issue. - if ![is_remote target] { - setup_kfail "*-*-*" gdb/15934 + if (!overlay_debugging) + error (_("Overlay debugging not enabled. " diff --git a/gdb-vla-intel-logical-not.patch b/gdb-vla-intel-logical-not.patch new file mode 100644 index 0000000..2bb4782 --- /dev/null +++ b/gdb-vla-intel-logical-not.patch @@ -0,0 +1,11 @@ +--- ./gdb/value.c-orig 2015-02-11 15:17:58.413241779 +0100 ++++ ./gdb/value.c 2015-02-11 15:19:42.068716949 +0100 +@@ -3074,7 +3074,7 @@ value_primitive_field (struct value *arg + } + + if (!TYPE_DATA_LOCATION (type) +- || !TYPE_DATA_LOCATION_KIND (type) == PROP_CONST) ++ || TYPE_DATA_LOCATION_KIND (type) != PROP_CONST) + v->offset = (value_offset (arg1) + offset + + value_embedded_offset (arg1)); + } diff --git a/gdb-vla-intel-stringbt-fix.patch b/gdb-vla-intel-stringbt-fix.patch index a994cd5..db3c2c0 100644 --- a/gdb-vla-intel-stringbt-fix.patch +++ b/gdb-vla-intel-stringbt-fix.patch @@ -31,11 +31,11 @@ Jan Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="vlastringonly.patch" -diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c -index 53cae2c..cf7ac26 100644 ---- a/gdb/gdbtypes.c -+++ b/gdb/gdbtypes.c -@@ -1659,6 +1659,7 @@ is_dynamic_type_internal (struct type *type, int top_level) +Index: gdb-7.8.50.20141228/gdb/gdbtypes.c +=================================================================== +--- gdb-7.8.50.20141228.orig/gdb/gdbtypes.c 2015-01-08 18:15:18.475682523 +0100 ++++ gdb-7.8.50.20141228/gdb/gdbtypes.c 2015-01-08 18:39:01.423134700 +0100 +@@ -1684,6 +1684,7 @@ is_dynamic_type_internal (struct type *t return !has_static_range (TYPE_RANGE_DATA (type)); case TYPE_CODE_ARRAY: @@ -43,11 +43,18 @@ index 53cae2c..cf7ac26 100644 { gdb_assert (TYPE_NFIELDS (type) == 1); -diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 -new file mode 100644 -index 0000000..261ce17 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 +@@ -1992,6 +1993,7 @@ resolve_dynamic_type_internal (struct ty + } + + case TYPE_CODE_ARRAY: ++ case TYPE_CODE_STRING: + resolved_type = resolve_dynamic_array (type, addr); + break; + +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 +=================================================================== +--- /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 @@ -0,0 +1,24 @@ +! Copyright 2010 Free Software Foundation, Inc. +! @@ -73,11 +80,10 @@ index 0000000..261ce17 + real :: dummy + dummy = 1 +end subroutine bar -diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp -new file mode 100644 -index 0000000..570a28c ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp +=================================================================== +--- /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 @@ -0,0 +1,39 @@ +# Copyright 2010 Free Software Foundation, Inc. + @@ -118,11 +124,10 @@ index 0000000..570a28c +} + +gdb_test "bt" {foo \(string='hello'.*} -diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 -new file mode 100644 -index 0000000..2bc637d ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 +Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 +=================================================================== +--- /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 @@ -0,0 +1,36 @@ +! Copyright 2010 Free Software Foundation, Inc. +! @@ -160,6 +165,3 @@ index 0000000..2bc637d + end interface + call foo ('hello') +end - ---FCuugMFkClbJLl1L-- - diff --git a/gdb-vla-intel.patch b/gdb-vla-intel.patch index 7a26374..304d200 100644 --- a/gdb-vla-intel.patch +++ b/gdb-vla-intel.patch @@ -6,25 +6,11 @@ GIT snapshot: commit 511bff520372ffc10fa2ff569c176bdf1e6e475d -diff --git a/gdb/NEWS b/gdb/NEWS -index d9a19ae..e6885d2 100644 -### a/gdb/NEWS -### b/gdb/NEWS -## -3,6 +3,9 @@ - - *** Changes since GDB 7.8 - -+* Fortran dynamic array support: It allows the user to evaluate -+ dynamic arrays like an ordinary static array. -+ - *** Changes in GDB 7.8 - - * New command line options -diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c -index f4694b0..8c45276 100644 ---- a/gdb/c-valprint.c -+++ b/gdb/c-valprint.c -@@ -538,7 +538,16 @@ c_value_print (struct value *val, struct ui_file *stream, +Index: gdb-7.8.90.20150126/gdb/c-valprint.c +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/c-valprint.c 2015-01-26 07:47:25.832758314 +0100 ++++ gdb-7.8.90.20150126/gdb/c-valprint.c 2015-01-26 07:47:42.394829861 +0100 +@@ -537,7 +537,16 @@ c_value_print (struct value *val, struct { /* normal case */ fprintf_filtered (stream, "("); @@ -42,237 +28,30 @@ index f4694b0..8c45276 100644 fprintf_filtered (stream, ") "); } } -diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c -index 36c9f66..274ba62 100644 ---- a/gdb/dwarf2expr.c -+++ b/gdb/dwarf2expr.c -@@ -1478,6 +1478,12 @@ execute_stack_op (struct dwarf_expr_context *ctx, - } - break; - -+ case DW_OP_push_object_address: -+ /* Return the address of the object we are currently observing. */ -+ result = (ctx->funcs->get_object_address) (ctx->baton); -+ result_val = value_from_ulongest (address_type, result); -+ break; -+ - default: - error (_("Unhandled dwarf expression opcode 0x%x"), op); - } -diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h -index 39dadf3..8cebbe8 100644 ---- a/gdb/dwarf2expr.h -+++ b/gdb/dwarf2expr.h -@@ -84,12 +84,8 @@ struct dwarf_expr_context_funcs - This can throw an exception if the index is out of range. */ - CORE_ADDR (*get_addr_index) (void *baton, unsigned int index); - --#if 0 -- /* Not yet implemented. */ -- - /* Return the `object address' for DW_OP_push_object_address. */ - CORE_ADDR (*get_object_address) (void *baton); --#endif - }; - - /* The location of a value. */ -diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c -index fcab9b9..a624dac 100644 ---- a/gdb/dwarf2loc.c -+++ b/gdb/dwarf2loc.c -@@ -306,6 +306,7 @@ struct dwarf_expr_baton - { - struct frame_info *frame; - struct dwarf2_per_cu_data *per_cu; -+ CORE_ADDR obj_address; - }; - - /* Helper functions for dwarf2_evaluate_loc_desc. */ -@@ -1209,6 +1210,7 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, - - baton_local.frame = caller_frame; - baton_local.per_cu = caller_per_cu; -+ baton_local.obj_address = 0; - - saved_ctx.gdbarch = ctx->gdbarch; - saved_ctx.addr_size = ctx->addr_size; -@@ -1238,6 +1240,22 @@ dwarf_expr_get_addr_index (void *baton, unsigned int index) - return dwarf2_read_addr_index (debaton->per_cu, index); - } - -+/* Callback function for get_object_address. Return the address of the VLA -+ object. */ -+ -+static CORE_ADDR -+dwarf_expr_get_obj_addr (void *baton) -+{ -+ struct dwarf_expr_baton *debaton = baton; -+ -+ gdb_assert (debaton != NULL); -+ -+ if (debaton->obj_address == 0) -+ error (_("Location address is not set.")); -+ -+ return debaton->obj_address; -+} -+ - /* VALUE must be of type lval_computed with entry_data_value_funcs. Perform - the indirect method on it, that is use its stored target value, the sole - purpose of entry_data_value_funcs.. */ -@@ -2202,7 +2220,8 @@ static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs = - dwarf_expr_dwarf_call, - dwarf_expr_get_base_type, - dwarf_expr_push_dwarf_reg_entry_value, -- dwarf_expr_get_addr_index -+ dwarf_expr_get_addr_index, -+ dwarf_expr_get_obj_addr - }; - - /* Evaluate a location description, starting at DATA and with length -@@ -2231,6 +2250,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, - - baton.frame = frame; - baton.per_cu = per_cu; -+ baton.obj_address = 0; - - ctx = new_dwarf_expr_context (); - old_chain = make_cleanup_free_dwarf_expr_context (ctx); -@@ -2326,6 +2346,11 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, - int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0); - - do_cleanups (value_chain); -+ -+ /* Select right frame to correctly evaluate VLA's during a backtrace. */ -+ if (is_dynamic_type (type)) -+ select_frame (frame); -+ - retval = value_at_lazy (type, address + byte_offset); - if (in_stack_memory) - set_value_stack (retval, 1); -@@ -2436,6 +2461,7 @@ dwarf2_evaluate_loc_desc (struct type *type, struct frame_info *frame, - - static int - dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, -+ CORE_ADDR addr, - CORE_ADDR *valp) - { - struct dwarf_expr_context *ctx; -@@ -2451,6 +2477,7 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, - - baton.frame = get_selected_frame (NULL); - baton.per_cu = dlbaton->per_cu; -+ baton.obj_address = addr; - - objfile = dwarf2_per_cu_objfile (dlbaton->per_cu); - -@@ -2491,7 +2518,8 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, - /* See dwarf2loc.h. */ - - int --dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR *value) -+dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR address, -+ CORE_ADDR *value) - { - if (prop == NULL) - return 0; -@@ -2502,7 +2530,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR *value) - { - const struct dwarf2_property_baton *baton = prop->data.baton; - -- if (dwarf2_locexpr_baton_eval (&baton->locexpr, value)) -+ if (dwarf2_locexpr_baton_eval (&baton->locexpr, address, value)) - { - if (baton->referenced_type) - { -@@ -2546,6 +2574,20 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR *value) - return 0; - } - -+/* See dwarf2loc.h. */ -+ -+int -+dwarf2_address_data_valid (const struct type *type) -+{ -+ if (TYPE_NOT_ASSOCIATED (type)) -+ return 0; -+ -+ if (TYPE_NOT_ALLOCATED (type)) -+ return 0; -+ -+ return 1; -+} -+ - - /* Helper functions and baton for dwarf2_loc_desc_needs_frame. */ - -@@ -2653,6 +2695,15 @@ needs_get_addr_index (void *baton, unsigned int index) - return 1; - } - -+/* DW_OP_push_object_address has a frame already passed through. */ -+ -+static CORE_ADDR -+needs_get_obj_addr (void *baton) -+{ -+ /* Nothing to do. */ -+ return 1; -+} -+ - /* Virtual method table for dwarf2_loc_desc_needs_frame below. */ - - static const struct dwarf_expr_context_funcs needs_frame_ctx_funcs = -@@ -2667,7 +2718,8 @@ static const struct dwarf_expr_context_funcs needs_frame_ctx_funcs = - needs_frame_dwarf_call, - NULL, /* get_base_type */ - needs_dwarf_reg_entry_value, -- needs_get_addr_index -+ needs_get_addr_index, -+ needs_get_obj_addr - }; - - /* Return non-zero iff the location expression at DATA (length SIZE) -@@ -3316,6 +3368,10 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc, - unimplemented (op); - break; - -+ case DW_OP_push_object_address: -+ unimplemented (op); -+ break; -+ - case DW_OP_skip: - offset = extract_signed_integer (op_ptr, 2, byte_order); - op_ptr += 2; -diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h -index 8ad5fa9..fb65c5c 100644 ---- a/gdb/dwarf2loc.h -+++ b/gdb/dwarf2loc.h -@@ -96,11 +96,18 @@ struct value *dwarf2_evaluate_loc_desc (struct type *type, - into VALUE, otherwise returns 0. */ - - int dwarf2_evaluate_property (const struct dynamic_prop *prop, -+ CORE_ADDR address, +Index: gdb-7.8.90.20150126/gdb/dwarf2loc.h +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/dwarf2loc.h 2015-01-26 07:47:25.832758314 +0100 ++++ gdb-7.8.90.20150126/gdb/dwarf2loc.h 2015-01-26 07:47:42.395829865 +0100 +@@ -111,6 +111,11 @@ int dwarf2_evaluate_property (const stru + CORE_ADDR address, CORE_ADDR *value); - CORE_ADDR dwarf2_read_addr_index (struct dwarf2_per_cu_data *per_cu, - unsigned int addr_index); - +/* Checks if a dwarf location definition is valid. + Returns 1 if valid; 0 otherwise. */ + +extern int dwarf2_address_data_valid (const struct type *type); + -+ - /* The symbol location baton types used by the DWARF-2 reader (i.e. - SYMBOL_LOCATION_BATON for a LOC_COMPUTED symbol). "struct - dwarf2_locexpr_baton" is for a symbol with a single location -diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index 276d2f1..fbf13ce 100644 ---- a/gdb/dwarf2read.c -+++ b/gdb/dwarf2read.c -@@ -1847,6 +1847,12 @@ static void free_dwo_file_cleanup (void *); - static void process_cu_includes (void); + /* A helper for the compiler interface that compiles a single dynamic + property to C code. +Index: gdb-7.8.90.20150126/gdb/dwarf2read.c +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/dwarf2read.c 2015-01-26 07:47:25.845758371 +0100 ++++ gdb-7.8.90.20150126/gdb/dwarf2read.c 2015-01-26 07:48:05.833931116 +0100 +@@ -1855,6 +1855,12 @@ static void process_cu_includes (void); static void check_producer (struct dwarf2_cu *cu); + + static void free_line_header_voidp (void *arg); + +static int +attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, @@ -282,16 +61,16 @@ index 276d2f1..fbf13ce 100644 /* Various complaints about symbol reading that don't abort the process. */ -@@ -14201,29 +14207,92 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14354,29 +14360,92 @@ read_tag_string_type (struct die_info *d struct gdbarch *gdbarch = get_objfile_arch (objfile); struct type *type, *range_type, *index_type, *char_type; struct attribute *attr; - unsigned int length; + unsigned int length = UINT_MAX; -+ + + index_type = objfile_type (objfile)->builtin_int; + range_type = create_static_range_type (NULL, index_type, 1, length); - ++ + /* If DW_AT_string_length is defined, the length is stored at some location + * in memory. */ attr = dwarf2_attr (die, DW_AT_string_length, cu); @@ -382,7 +161,7 @@ index 276d2f1..fbf13ce 100644 char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -14540,13 +14609,15 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14693,13 +14762,15 @@ read_base_type (struct die_info *die, st return set_die_type (die, type, cu); } @@ -399,7 +178,7 @@ index 276d2f1..fbf13ce 100644 { struct dwarf2_property_baton *baton; struct obstack *obstack = &cu->objfile->objfile_obstack; -@@ -14559,8 +14630,25 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -14712,8 +14783,25 @@ attr_to_dynamic_prop (const struct attri baton = obstack_alloc (obstack, sizeof (*baton)); baton->referenced_type = NULL; baton->locexpr.per_cu = cu->per_cu; @@ -427,7 +206,7 @@ index 276d2f1..fbf13ce 100644 prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -14590,8 +14678,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -14743,8 +14831,28 @@ attr_to_dynamic_prop (const struct attri baton = obstack_alloc (obstack, sizeof (*baton)); baton->referenced_type = die_type (target_die, target_cu); baton->locexpr.per_cu = cu->per_cu; @@ -458,7 +237,7 @@ index 276d2f1..fbf13ce 100644 prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -14626,7 +14734,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14779,7 +14887,7 @@ read_subrange_type (struct die_info *die struct type *base_type, *orig_base_type; struct type *range_type; struct attribute *attr; @@ -467,7 +246,7 @@ index 276d2f1..fbf13ce 100644 int low_default_is_valid; int high_bound_is_count = 0; const char *name; -@@ -14646,7 +14754,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14799,7 +14907,9 @@ read_subrange_type (struct die_info *die low.kind = PROP_CONST; high.kind = PROP_CONST; @@ -477,7 +256,7 @@ index 276d2f1..fbf13ce 100644 /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow omitting DW_AT_lower_bound. */ -@@ -14679,19 +14789,26 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14832,19 +14942,26 @@ read_subrange_type (struct die_info *die break; } @@ -507,7 +286,7 @@ index 276d2f1..fbf13ce 100644 { /* If bounds are constant do the final calculation here. */ if (low.kind == PROP_CONST && high.kind == PROP_CONST) -@@ -14755,7 +14872,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14908,7 +15025,7 @@ read_subrange_type (struct die_info *die && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask)) high.data.const_val |= negative_mask; @@ -516,19 +295,18 @@ index 276d2f1..fbf13ce 100644 if (high_bound_is_count) TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1; -@@ -21673,6 +21790,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) - { - struct dwarf2_per_cu_offset_and_type **slot, ofs; - struct objfile *objfile = cu->objfile; -+ struct attribute *attr; -+ struct dynamic_prop prop; - - /* For Ada types, make sure that the gnat-specific data is always - initialized (if not already set). There are a few types where -@@ -21687,6 +21806,43 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) - && !HAVE_GNAT_AUX_INFO (type)) - INIT_GNAT_SPECIFIC (type); +@@ -21994,7 +22111,44 @@ set_die_type (struct die_info *die, stru + /* 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. */ + attr = dwarf2_attr (die, DW_AT_allocated, cu); + if (attr_form_is_block (attr)) @@ -560,28 +338,22 @@ index 276d2f1..fbf13ce 100644 + /* 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, NULL, 0)) -+ { -+ TYPE_DATA_LOCATION (type) -+ = obstack_alloc (&objfile->objfile_obstack, sizeof (prop)); -+ *TYPE_DATA_LOCATION (type) = prop; -+ } -+ - if (dwarf2_per_objfile->die_type_hash == NULL) { - dwarf2_per_objfile->die_type_hash = -diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c -index 8356aab..69e67f4 100644 ---- a/gdb/f-typeprint.c -+++ b/gdb/f-typeprint.c + TYPE_DATA_LOCATION (type) + = obstack_alloc (&objfile->objfile_obstack, sizeof (prop)); +Index: gdb-7.8.90.20150126/gdb/f-typeprint.c +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/f-typeprint.c 2015-01-26 07:47:25.846758375 +0100 ++++ gdb-7.8.90.20150126/gdb/f-typeprint.c 2015-01-26 07:47:42.402829895 +0100 @@ -30,6 +30,7 @@ #include "gdbcore.h" #include "target.h" #include "f-lang.h" +#include "valprint.h" - #include - #include -@@ -56,6 +57,17 @@ f_print_type (struct type *type, const char *varstring, struct ui_file *stream, + #if 0 /* Currently unused. */ + static void f_type_print_args (struct type *, struct ui_file *); +@@ -53,6 +54,17 @@ f_print_type (struct type *type, const c enum type_code code; int demangled_args; @@ -599,7 +371,7 @@ index 8356aab..69e67f4 100644 f_type_print_base (type, stream, show, level); code = TYPE_CODE (type); if ((varstring != NULL && *varstring != '\0') -@@ -170,28 +182,36 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, +@@ -167,28 +179,36 @@ f_type_print_varspec_suffix (struct type if (arrayprint_recurse_level == 1) fprintf_filtered (stream, "("); @@ -657,11 +429,11 @@ index 8356aab..69e67f4 100644 if (arrayprint_recurse_level == 1) fprintf_filtered (stream, ")"); else -diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c -index 408c8cc..38f32e0 100644 ---- a/gdb/f-valprint.c -+++ b/gdb/f-valprint.c -@@ -39,8 +39,6 @@ +Index: gdb-7.8.90.20150126/gdb/f-valprint.c +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/f-valprint.c 2015-01-26 07:47:25.847758379 +0100 ++++ gdb-7.8.90.20150126/gdb/f-valprint.c 2015-01-26 07:47:42.403829900 +0100 +@@ -36,8 +36,6 @@ extern void _initialize_f_valprint (void); static void info_common_command (char *, int); @@ -670,7 +442,7 @@ index 408c8cc..38f32e0 100644 static void f77_get_dynamic_length_of_aggregate (struct type *); int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2]; -@@ -48,15 +46,6 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2]; +@@ -45,15 +43,6 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIM /* Array which holds offsets to be applied to get a row's elements for a given array. Array also holds the size of each subarray. */ @@ -686,7 +458,7 @@ index 408c8cc..38f32e0 100644 int f77_get_lowerbound (struct type *type) { -@@ -114,47 +103,6 @@ f77_get_dynamic_length_of_aggregate (struct type *type) +@@ -111,47 +100,6 @@ f77_get_dynamic_length_of_aggregate (str * TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type))); } @@ -734,7 +506,7 @@ index 408c8cc..38f32e0 100644 /* Actual function which prints out F77 arrays, Valaddr == address in the superior. Address == the address in the inferior. */ -@@ -167,41 +115,62 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type, +@@ -164,41 +112,62 @@ f77_print_array_1 (int nss, int ndimensi const struct value_print_options *options, int *elts) { @@ -813,7 +585,7 @@ index 408c8cc..38f32e0 100644 fprintf_filtered (stream, "..."); } } -@@ -228,12 +197,6 @@ f77_print_array (struct type *type, const gdb_byte *valaddr, +@@ -225,12 +194,6 @@ f77_print_array (struct type *type, cons Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"), ndimensions, MAX_FORTRAN_DIMS); @@ -826,7 +598,7 @@ index 408c8cc..38f32e0 100644 f77_print_array_1 (1, ndimensions, type, valaddr, embedded_offset, address, stream, recurse, val, options, &elts); } -@@ -378,12 +341,15 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, +@@ -375,12 +338,15 @@ f_val_print (struct type *type, const gd fprintf_filtered (stream, "( "); for (index = 0; index < TYPE_NFIELDS (type); index++) { @@ -847,11 +619,11 @@ index 408c8cc..38f32e0 100644 if (index != TYPE_NFIELDS (type) - 1) fputs_filtered (", ", stream); } -diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c -index e99a2f3..53cae2c 100644 ---- a/gdb/gdbtypes.c -+++ b/gdb/gdbtypes.c -@@ -805,7 +805,8 @@ allocate_stub_method (struct type *type) +Index: gdb-7.8.90.20150126/gdb/gdbtypes.c +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/gdbtypes.c 2015-01-26 07:47:25.850758392 +0100 ++++ gdb-7.8.90.20150126/gdb/gdbtypes.c 2015-01-26 07:47:42.404829904 +0100 +@@ -815,7 +815,8 @@ allocate_stub_method (struct type *type) struct type * create_range_type (struct type *result_type, struct type *index_type, const struct dynamic_prop *low_bound, @@ -861,7 +633,7 @@ index e99a2f3..53cae2c 100644 { if (result_type == NULL) result_type = alloc_type_copy (index_type); -@@ -820,6 +821,7 @@ create_range_type (struct type *result_type, struct type *index_type, +@@ -830,6 +831,7 @@ create_range_type (struct type *result_t TYPE_ZALLOC (result_type, sizeof (struct range_bounds)); TYPE_RANGE_DATA (result_type)->low = *low_bound; TYPE_RANGE_DATA (result_type)->high = *high_bound; @@ -869,7 +641,7 @@ index e99a2f3..53cae2c 100644 if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0) TYPE_UNSIGNED (result_type) = 1; -@@ -841,7 +843,7 @@ struct type * +@@ -858,7 +860,7 @@ struct type * create_static_range_type (struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound) { @@ -878,7 +650,7 @@ index e99a2f3..53cae2c 100644 low.kind = PROP_CONST; low.data.const_val = low_bound; -@@ -849,7 +851,11 @@ create_static_range_type (struct type *result_type, struct type *index_type, +@@ -866,7 +868,11 @@ create_static_range_type (struct type *r high.kind = PROP_CONST; high.data.const_val = high_bound; @@ -891,7 +663,7 @@ index e99a2f3..53cae2c 100644 return result_type; } -@@ -1003,18 +1009,24 @@ create_array_type_with_stride (struct type *result_type, +@@ -1020,18 +1026,24 @@ create_array_type_with_stride (struct ty TYPE_CODE (result_type) = TYPE_CODE_ARRAY; TYPE_TARGET_TYPE (result_type) = element_type; @@ -918,7 +690,7 @@ index e99a2f3..53cae2c 100644 else if (bit_stride > 0) TYPE_LENGTH (result_type) = (bit_stride * (high_bound - low_bound + 1) + 7) / 8; -@@ -1616,12 +1628,31 @@ stub_noname_complaint (void) +@@ -1630,12 +1642,31 @@ stub_noname_complaint (void) static int is_dynamic_type_internal (struct type *type, int top_level) { @@ -947,10 +719,10 @@ index e99a2f3..53cae2c 100644 + if (is_dynamic_type (TYPE_FIELD_TYPE (type, index))) + return 1; + - switch (TYPE_CODE (type)) - { - case TYPE_CODE_RANGE: -@@ -1631,11 +1662,19 @@ is_dynamic_type_internal (struct type *type, int top_level) + /* Types that have a dynamic TYPE_DATA_LOCATION are considered + dynamic, even if the type itself is statically defined. + From a user's point of view, this may appear counter-intuitive; +@@ -1656,11 +1687,19 @@ is_dynamic_type_internal (struct type *t { gdb_assert (TYPE_NFIELDS (type) == 1); @@ -973,7 +745,7 @@ index e99a2f3..53cae2c 100644 } case TYPE_CODE_STRUCT: -@@ -1648,6 +1687,17 @@ is_dynamic_type_internal (struct type *type, int top_level) +@@ -1673,6 +1712,17 @@ is_dynamic_type_internal (struct type *t && is_dynamic_type_internal (TYPE_FIELD_TYPE (type, i), 0)) return 1; } @@ -991,20 +763,7 @@ index e99a2f3..53cae2c 100644 break; } -@@ -1666,22 +1716,23 @@ static struct type *resolve_dynamic_type_internal (struct type *type, - CORE_ADDR addr, - int top_level); - --/* Given a dynamic range type (dyn_range_type), return a static version -- of that type. */ -+/* Given a dynamic range type (dyn_range_type) and address, -+ return a static version of that type. */ - - static struct type * --resolve_dynamic_range (struct type *dyn_range_type) -+resolve_dynamic_range (struct type *dyn_range_type, CORE_ADDR addr) - { - CORE_ADDR value; +@@ -1701,7 +1751,8 @@ resolve_dynamic_range (struct type *dyn_ struct type *static_range_type; const struct dynamic_prop *prop; const struct dwarf2_locexpr_baton *baton; @@ -1014,22 +773,7 @@ index e99a2f3..53cae2c 100644 gdb_assert (TYPE_CODE (dyn_range_type) == TYPE_CODE_RANGE); - prop = &TYPE_RANGE_DATA (dyn_range_type)->low; -- if (dwarf2_evaluate_property (prop, &value)) -+ if (dwarf2_evaluate_property (prop, addr, &value)) - { - low_bound.kind = PROP_CONST; - low_bound.data.const_val = value; -@@ -1693,7 +1744,7 @@ resolve_dynamic_range (struct type *dyn_range_type) - } - - prop = &TYPE_RANGE_DATA (dyn_range_type)->high; -- if (dwarf2_evaluate_property (prop, &value)) -+ if (dwarf2_evaluate_property (prop, addr, &value)) - { - high_bound.kind = PROP_CONST; - high_bound.data.const_val = value; -@@ -1707,10 +1758,17 @@ resolve_dynamic_range (struct type *dyn_range_type) +@@ -1732,10 +1783,17 @@ resolve_dynamic_range (struct type *dyn_ high_bound.kind = PROP_UNDEFINED; high_bound.data.const_val = 0; } @@ -1050,14 +794,7 @@ index e99a2f3..53cae2c 100644 TYPE_RANGE_DATA (static_range_type)->flag_bound_evaluated = 1; return static_range_type; } -@@ -1720,29 +1778,52 @@ resolve_dynamic_range (struct type *dyn_range_type) - of the associated array. */ - - static struct type * --resolve_dynamic_array (struct type *type) -+resolve_dynamic_array (struct type *type, CORE_ADDR addr) - { - CORE_ADDR value; +@@ -1751,23 +1809,46 @@ resolve_dynamic_array (struct type *type struct type *elt_type; struct type *range_type; struct type *ary_dim; @@ -1066,13 +803,12 @@ index e99a2f3..53cae2c 100644 - gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY); + gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY -+ || TYPE_CODE (type) == TYPE_CODE_STRING); ++ || TYPE_CODE (type) == TYPE_CODE_STRING); elt_type = type; range_type = check_typedef (TYPE_INDEX_TYPE (elt_type)); -- range_type = resolve_dynamic_range (range_type); -+ range_type = resolve_dynamic_range (range_type, addr); -+ + range_type = resolve_dynamic_range (range_type, addr); + + prop = TYPE_ALLOCATED_PROP (type); + if (dwarf2_evaluate_property (prop, addr, &value)) + { @@ -1086,11 +822,11 @@ index e99a2f3..53cae2c 100644 + TYPE_ASSOCIATED_PROP (copy)->kind = PROP_CONST; + TYPE_ASSOCIATED_PROP (copy)->data.const_val = value; + } - ++ ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type)); - if (ary_dim != NULL && TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY) -- elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (type)); +- elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (type), addr); + if (ary_dim != NULL && (TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY + || TYPE_CODE (ary_dim) == TYPE_CODE_STRING)) + elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (copy), addr); @@ -1102,42 +838,18 @@ index e99a2f3..53cae2c 100644 - range_type); + if (TYPE_CODE (type) == TYPE_CODE_STRING) + return create_string_type (copy, -+ elt_type, -+ range_type); ++ elt_type, ++ range_type); + else + return create_array_type (copy, -+ elt_type, -+ range_type); ++ elt_type, ++ range_type); } /* Resolve dynamic bounds of members of the union TYPE to static -@@ -1846,6 +1927,8 @@ resolve_dynamic_type_internal (struct type *type, CORE_ADDR addr, - { - struct type *real_type = check_typedef (type); - struct type *resolved_type = type; -+ const struct dynamic_prop *prop; -+ CORE_ADDR value; - - if (!is_dynamic_type_internal (real_type, top_level)) - return type; -@@ -1871,11 +1954,12 @@ resolve_dynamic_type_internal (struct type *type, CORE_ADDR addr, - } - - case TYPE_CODE_ARRAY: -- resolved_type = resolve_dynamic_array (type); -+ case TYPE_CODE_STRING: -+ resolved_type = resolve_dynamic_array (type, addr); - break; - - case TYPE_CODE_RANGE: -- resolved_type = resolve_dynamic_range (type); -+ resolved_type = resolve_dynamic_range (type, addr); - break; - - case TYPE_CODE_UNION: -@@ -1887,6 +1971,25 @@ resolve_dynamic_type_internal (struct type *type, CORE_ADDR addr, - break; - } +@@ -1938,6 +2019,25 @@ resolve_dynamic_type_internal (struct ty + else + TYPE_DATA_LOCATION (resolved_type) = NULL; + /* Resolve data_location attribute. */ + prop = TYPE_DATA_LOCATION (resolved_type); @@ -1161,8 +873,8 @@ index e99a2f3..53cae2c 100644 return resolved_type; } -@@ -4104,6 +4207,27 @@ copy_type_recursive (struct objfile *objfile, - *TYPE_RANGE_DATA (new_type) = *TYPE_RANGE_DATA (type); +@@ -4174,6 +4274,27 @@ copy_type_recursive (struct objfile *obj + sizeof (struct dynamic_prop)); } + /* Copy the data location information. */ @@ -1189,9 +901,9 @@ index e99a2f3..53cae2c 100644 /* Copy pointers to other types. */ if (TYPE_TARGET_TYPE (type)) TYPE_TARGET_TYPE (new_type) = -@@ -4150,6 +4274,44 @@ copy_type (const struct type *type) - memcpy (TYPE_MAIN_TYPE (new_type), TYPE_MAIN_TYPE (type), - sizeof (struct main_type)); +@@ -4227,6 +4348,44 @@ copy_type (const struct type *type) + sizeof (struct dynamic_prop)); + } + if (TYPE_ALLOCATED_PROP (type)) + { @@ -1234,11 +946,11 @@ index e99a2f3..53cae2c 100644 return new_type; } -diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h -index 5008ef4..436edf8 100644 ---- a/gdb/gdbtypes.h -+++ b/gdb/gdbtypes.h -@@ -669,6 +669,10 @@ struct main_type +Index: gdb-7.8.90.20150126/gdb/gdbtypes.h +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/gdbtypes.h 2015-01-26 07:47:25.852758401 +0100 ++++ gdb-7.8.90.20150126/gdb/gdbtypes.h 2015-01-26 07:47:42.405829908 +0100 +@@ -660,6 +660,10 @@ struct main_type struct dynamic_prop high; @@ -1249,15 +961,10 @@ index 5008ef4..436edf8 100644 /* True if HIGH range bound contains the number of elements in the subrange. This affects how the final hight bound is computed. */ -@@ -724,6 +728,23 @@ struct main_type +@@ -720,6 +724,18 @@ struct main_type + this field yields to the location of the data for an object. */ - struct func_type *func_stuff; - } type_specific; -+ -+ /* * Contains a location description value for the current type. Evaluating -+ this field yields to the location of the data for an object. */ -+ -+ struct dynamic_prop *data_location; + struct dynamic_prop *data_location; + + /* Structure for DW_AT_allocated. + The presence of this attribute indicates that the object of the type @@ -1273,7 +980,7 @@ index 5008ef4..436edf8 100644 }; /* * A ``struct type'' describes a particular instance of a type, with -@@ -1202,6 +1223,39 @@ extern void allocate_gnat_aux_type (struct type *); +@@ -1198,6 +1214,39 @@ extern void allocate_gnat_aux_type (stru TYPE_RANGE_DATA(range_type)->high.kind #define TYPE_LOW_BOUND_KIND(range_type) \ TYPE_RANGE_DATA(range_type)->low.kind @@ -1311,9 +1018,9 @@ index 5008ef4..436edf8 100644 + && TYPE_ASSOCIATED_PROP (t)->kind == PROP_CONST \ + && !TYPE_ASSOCIATED_PROP (t)->data.const_val) - /* Moto-specific stuff for FORTRAN arrays. */ - -@@ -1209,6 +1263,9 @@ extern void allocate_gnat_aux_type (struct type *); + /* Attribute accessors for the type data location. */ + #define TYPE_DATA_LOCATION(thistype) \ +@@ -1215,6 +1264,9 @@ extern void allocate_gnat_aux_type (stru TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) #define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \ TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) @@ -1323,7 +1030,7 @@ index 5008ef4..436edf8 100644 #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \ (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype)))) -@@ -1677,6 +1734,7 @@ extern struct type *create_array_type_with_stride +@@ -1685,6 +1737,7 @@ extern struct type *create_array_type_wi extern struct type *create_range_type (struct type *, struct type *, const struct dynamic_prop *, @@ -1331,11 +1038,10 @@ index 5008ef4..436edf8 100644 const struct dynamic_prop *); extern struct type *create_array_type (struct type *, struct type *, -diff --git a/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp b/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp -new file mode 100644 -index 0000000..20607c3 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp +=================================================================== +--- /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 @@ -0,0 +1,65 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -1402,11 +1108,10 @@ index 0000000..20607c3 +gdb_continue_to_breakpoint "vla2-deallocated" +gdb_test "print l" " = \\.FALSE\\." "print vla2 deallocated" +gdb_test "print vla2" " = " "print deallocated vla2" -diff --git a/gdb/testsuite/gdb.fortran/vla-datatypes.exp b/gdb/testsuite/gdb.fortran/vla-datatypes.exp -new file mode 100644 -index 0000000..20276d6 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-datatypes.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.exp +=================================================================== +--- /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 @@ -0,0 +1,82 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -1490,11 +1195,10 @@ index 0000000..20276d6 + "print logicalvla(5,5,5) (2nd)" +gdb_test "print charactervla(5,5,5)" " = 'X'" \ + "print charactervla(5,5,5) (2nd)" -diff --git a/gdb/testsuite/gdb.fortran/vla-datatypes.f90 b/gdb/testsuite/gdb.fortran/vla-datatypes.f90 -new file mode 100644 -index 0000000..b11879a ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-datatypes.f90 +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.f90 +=================================================================== +--- /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 @@ -0,0 +1,51 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -1547,11 +1251,10 @@ index 0000000..b11879a + ! dummy statement for bp + l = .FALSE. ! vlas-modified +end program vla_primitives -diff --git a/gdb/testsuite/gdb.fortran/vla-func.exp b/gdb/testsuite/gdb.fortran/vla-func.exp -new file mode 100644 -index 0000000..f0f236b ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-func.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.exp +=================================================================== +--- /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 @@ -0,0 +1,61 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -1614,11 +1317,10 @@ index 0000000..f0f236b + "print vla3 (after func2)" +gdb_test "ptype vla3" "type = integer\\\(kind=4\\\) \\\(10\\\)" \ + "ptype vla3 (after func2)" -diff --git a/gdb/testsuite/gdb.fortran/vla-func.f90 b/gdb/testsuite/gdb.fortran/vla-func.f90 -new file mode 100644 -index 0000000..4f45da1 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-func.f90 +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.f90 +=================================================================== +--- /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 @@ -0,0 +1,71 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -1691,11 +1393,10 @@ index 0000000..4f45da1 + + ret = .TRUE. ! func2-returned +end program vla_func -diff --git a/gdb/testsuite/gdb.fortran/vla-history.exp b/gdb/testsuite/gdb.fortran/vla-history.exp -new file mode 100644 -index 0000000..170e1eb ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-history.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-history.exp +=================================================================== +--- /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 @@ -0,0 +1,62 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -1759,11 +1460,10 @@ index 0000000..170e1eb +# Try to access history values for vla values. +gdb_test "print \$9" " = 1311" "print \$9" +gdb_test "print \$10" " = 1001" "print \$10" -diff --git a/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp b/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp -new file mode 100644 -index 0000000..2ee2914 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp +=================================================================== +--- /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 @@ -0,0 +1,87 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -1852,11 +1552,10 @@ index 0000000..2ee2914 + "ptype array1(100) (arbitrary length)" +gdb_test "ptype array2(4,100)" "type = integer\\\(kind=4\\\)" \ + "ptype array2(4,100) (arbitrary length)" -diff --git a/gdb/testsuite/gdb.fortran/vla-ptype.exp b/gdb/testsuite/gdb.fortran/vla-ptype.exp -new file mode 100644 -index 0000000..9267723 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-ptype.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype.exp +=================================================================== +--- /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 @@ -0,0 +1,96 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -1954,11 +1653,10 @@ index 0000000..9267723 +gdb_test "ptype vla2(5, 45, 20)" \ + "no such vector element because not allocated" \ + "ptype vla2(5, 45, 20) not allocated" -diff --git a/gdb/testsuite/gdb.fortran/vla-sizeof.exp b/gdb/testsuite/gdb.fortran/vla-sizeof.exp -new file mode 100644 -index 0000000..6053c17 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-sizeof.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sizeof.exp +=================================================================== +--- /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 @@ -0,0 +1,46 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -2006,11 +1704,10 @@ index 0000000..6053c17 +gdb_breakpoint [gdb_get_line_number "pvla-associated"] +gdb_continue_to_breakpoint "pvla-associated" +gdb_test "print sizeof(pvla)" " = 4000" "print sizeof associated pvla" -diff --git a/gdb/testsuite/gdb.fortran/vla-stride.exp b/gdb/testsuite/gdb.fortran/vla-stride.exp -new file mode 100644 -index 0000000..35f585d ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-stride.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.exp +=================================================================== +--- /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 @@ -0,0 +1,44 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -2056,11 +1753,10 @@ index 0000000..35f585d +gdb_continue_to_breakpoint "single-element" +gdb_test "print pvla" " = \\\(5\\\)" "print single-element" +gdb_test "print pvla(1)" " = 5" "print one single-element" -diff --git a/gdb/testsuite/gdb.fortran/vla-stride.f90 b/gdb/testsuite/gdb.fortran/vla-stride.f90 -new file mode 100644 -index 0000000..6aa4f2b ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-stride.f90 +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.f90 +=================================================================== +--- /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 @@ -0,0 +1,30 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -2092,11 +1788,10 @@ index 0000000..6aa4f2b + + pvla => null() ! single-element +end program vla_stride -diff --git a/gdb/testsuite/gdb.fortran/vla-strings.exp b/gdb/testsuite/gdb.fortran/vla-strings.exp -new file mode 100644 -index 0000000..7fc1734 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-strings.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.exp +=================================================================== +--- /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 @@ -0,0 +1,104 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -2202,11 +1897,10 @@ index 0000000..7fc1734 + "whatis var_char_p after associated" +gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \ + "ptype var_char_p after associated" -diff --git a/gdb/testsuite/gdb.fortran/vla-strings.f90 b/gdb/testsuite/gdb.fortran/vla-strings.f90 -new file mode 100644 -index 0000000..0a1d522 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-strings.f90 +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.f90 +=================================================================== +--- /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 @@ -0,0 +1,40 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -2248,11 +1942,10 @@ index 0000000..0a1d522 + var_char_p => null() + l = associated(var_char_p) ! var_char_p-not-associated +end program vla_strings -diff --git a/gdb/testsuite/gdb.fortran/vla-sub.f90 b/gdb/testsuite/gdb.fortran/vla-sub.f90 -new file mode 100644 -index 0000000..8c2c9ff ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-sub.f90 +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sub.f90 +=================================================================== +--- /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 @@ -0,0 +1,82 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -2336,11 +2029,10 @@ index 0000000..8c2c9ff + + call bar(sub_arr3, sub_arr1) +end program vla_sub -diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp -new file mode 100644 -index 0000000..fd11adb ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp +=================================================================== +--- /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 @@ -0,0 +1,35 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -2377,11 +2069,10 @@ index 0000000..fd11adb +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,100)" " = 1" "print arbitary array2(4,100)" -diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp -new file mode 100644 -index 0000000..a163617 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp +=================================================================== +--- /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 @@ -0,0 +1,49 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -2432,11 +2123,10 @@ index 0000000..a163617 +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" + -diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub.exp b/gdb/testsuite/gdb.fortran/vla-value-sub.exp -new file mode 100644 -index 0000000..848f9d7 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-value-sub.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub.exp +=================================================================== +--- /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 @@ -0,0 +1,90 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -2528,11 +2218,10 @@ index 0000000..848f9d7 + "set array(2,2,2) to 20 in subroutine (passed vla)" +gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \ + "print array2 in foo after it was mofified in debugger (passed vla)" -diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp -new file mode 100644 -index 0000000..d7b8a1e ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-value.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value.exp +=================================================================== +--- /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 @@ -0,0 +1,148 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -2682,11 +2371,10 @@ index 0000000..d7b8a1e +gdb_continue_to_breakpoint "pvla-deassociated" +gdb_test "print \$mypvar(1,3,8)" " = 1001" \ + "print \$mypvar(1,3,8) after deallocated" -diff --git a/gdb/testsuite/gdb.fortran/vla.f90 b/gdb/testsuite/gdb.fortran/vla.f90 -new file mode 100644 -index 0000000..73425f3 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla.f90 +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla.f90 +=================================================================== +--- /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 @@ -0,0 +1,56 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -2744,11 +2432,10 @@ index 0000000..73425f3 + allocate (vla3 (2,2)) ! vla2-deallocated + vla3(:,:) = 13 +end program vla -diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp -new file mode 100644 -index 0000000..72b0be2 ---- /dev/null -+++ b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/mi-vla-fortran.exp +=================================================================== +--- /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 @@ -0,0 +1,182 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -2932,11 +2619,10 @@ index 0000000..72b0be2 + +mi_gdb_exit +return 0 -diff --git a/gdb/testsuite/gdb.mi/vla.f90 b/gdb/testsuite/gdb.mi/vla.f90 -new file mode 100644 -index 0000000..46edad2 ---- /dev/null -+++ b/gdb/testsuite/gdb.mi/vla.f90 +Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/vla.f90 +=================================================================== +--- /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 @@ -0,0 +1,42 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -2980,11 +2666,11 @@ index 0000000..46edad2 + pvla2 => null() + l = associated(pvla2) ! pvla2-set-to-null +end program vla -diff --git a/gdb/typeprint.c b/gdb/typeprint.c -index 026f3a2..4c861ac 100644 ---- a/gdb/typeprint.c -+++ b/gdb/typeprint.c -@@ -459,6 +459,13 @@ whatis_exp (char *exp, int show) +Index: gdb-7.8.90.20150126/gdb/typeprint.c +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/typeprint.c 2015-01-26 07:47:25.856758418 +0100 ++++ gdb-7.8.90.20150126/gdb/typeprint.c 2015-01-26 07:47:42.409829926 +0100 +@@ -456,6 +456,13 @@ whatis_exp (char *exp, int show) type = value_type (val); @@ -2998,11 +2684,11 @@ index 026f3a2..4c861ac 100644 get_user_print_options (&opts); if (opts.objectprint) { -diff --git a/gdb/valarith.c b/gdb/valarith.c -index 4da41cb..fb9671b 100644 ---- a/gdb/valarith.c -+++ b/gdb/valarith.c -@@ -195,12 +195,31 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound) +Index: gdb-7.8.90.20150126/gdb/valarith.c +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/valarith.c 2015-01-26 07:47:25.857758422 +0100 ++++ gdb-7.8.90.20150126/gdb/valarith.c 2015-01-26 07:47:42.409829926 +0100 +@@ -193,12 +193,31 @@ value_subscripted_rvalue (struct value * struct type *array_type = check_typedef (value_type (array)); struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type)); unsigned int elt_size = TYPE_LENGTH (elt_type); @@ -3036,11 +2722,11 @@ index 4da41cb..fb9671b 100644 if (VALUE_LVAL (array) == lval_memory && value_lazy (array)) v = allocate_value_lazy (elt_type); -diff --git a/gdb/valprint.c b/gdb/valprint.c -index 8600b34..2f8eac1 100644 ---- a/gdb/valprint.c -+++ b/gdb/valprint.c -@@ -307,6 +307,18 @@ valprint_check_validity (struct ui_file *stream, +Index: gdb-7.8.90.20150126/gdb/valprint.c +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/valprint.c 2015-01-26 07:47:25.858758427 +0100 ++++ gdb-7.8.90.20150126/gdb/valprint.c 2015-01-26 07:47:42.410829930 +0100 +@@ -303,6 +303,18 @@ valprint_check_validity (struct ui_file { CHECK_TYPEDEF (type); @@ -3059,7 +2745,7 @@ index 8600b34..2f8eac1 100644 if (TYPE_CODE (type) != TYPE_CODE_UNION && TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_ARRAY) -@@ -362,6 +374,18 @@ val_print_invalid_address (struct ui_file *stream) +@@ -359,6 +371,18 @@ val_print_invalid_address (struct ui_fil fprintf_filtered (stream, _("")); } @@ -3078,7 +2764,7 @@ index 8600b34..2f8eac1 100644 /* A generic val_print that is suitable for use by language implementations of the la_val_print method. This function can handle most type codes, though not all, notably exception -@@ -803,12 +827,16 @@ static int +@@ -800,12 +824,16 @@ static int value_check_printable (struct value *val, struct ui_file *stream, const struct value_print_options *options) { @@ -3095,7 +2781,7 @@ index 8600b34..2f8eac1 100644 if (value_entirely_optimized_out (val)) { if (options->summary && !val_print_scalar_type_p (value_type (val))) -@@ -834,6 +862,18 @@ value_check_printable (struct value *val, struct ui_file *stream, +@@ -831,6 +859,18 @@ value_check_printable (struct value *val return 0; } @@ -3114,11 +2800,11 @@ index 8600b34..2f8eac1 100644 return 1; } -diff --git a/gdb/valprint.h b/gdb/valprint.h -index 6698247..7a415cf 100644 ---- a/gdb/valprint.h -+++ b/gdb/valprint.h -@@ -217,4 +217,8 @@ extern void output_command_const (const char *args, int from_tty); +Index: gdb-7.8.90.20150126/gdb/valprint.h +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/valprint.h 2015-01-26 07:47:25.859758431 +0100 ++++ gdb-7.8.90.20150126/gdb/valprint.h 2015-01-26 07:47:42.410829930 +0100 +@@ -217,4 +217,8 @@ extern void output_command_const (const extern int val_print_scalar_type_p (struct type *type); @@ -3127,11 +2813,11 @@ index 6698247..7a415cf 100644 +extern void val_print_not_associated (struct ui_file *stream); + #endif -diff --git a/gdb/value.c b/gdb/value.c -index 29abe5f..5efea89 100644 ---- a/gdb/value.c -+++ b/gdb/value.c -@@ -43,6 +43,7 @@ +Index: gdb-7.8.90.20150126/gdb/value.c +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/value.c 2015-01-26 07:47:25.860758435 +0100 ++++ gdb-7.8.90.20150126/gdb/value.c 2015-01-26 07:47:42.411829935 +0100 +@@ -40,6 +40,7 @@ #include "tracepoint.h" #include "cp-abi.h" #include "user-regs.h" @@ -3139,7 +2825,7 @@ index 29abe5f..5efea89 100644 /* Prototypes for exported functions. */ -@@ -1627,6 +1628,25 @@ set_value_component_location (struct value *component, +@@ -1755,6 +1756,25 @@ set_value_component_location (struct val if (funcs->copy_closure) component->location.computed.closure = funcs->copy_closure (whole); } @@ -3165,7 +2851,7 @@ index 29abe5f..5efea89 100644 } -@@ -2931,13 +2951,22 @@ value_primitive_field (struct value *arg1, int offset, +@@ -3041,13 +3061,22 @@ value_primitive_field (struct value *arg v = allocate_value_lazy (type); else { @@ -3194,7 +2880,7 @@ index 29abe5f..5efea89 100644 } set_value_component_location (v, arg1); VALUE_REGNUM (v) = VALUE_REGNUM (arg1); -@@ -3520,7 +3549,8 @@ readjust_indirect_value_type (struct value *value, struct type *enc_type, +@@ -3635,7 +3664,8 @@ readjust_indirect_value_type (struct val struct value *original_value) { /* Re-adjust type. */ @@ -3204,7 +2890,7 @@ index 29abe5f..5efea89 100644 /* Add embedding info. */ set_value_enclosing_type (value, enc_type); -@@ -3537,6 +3567,12 @@ coerce_ref (struct value *arg) +@@ -3652,6 +3682,12 @@ coerce_ref (struct value *arg) struct value *retval; struct type *enc_type; @@ -3217,7 +2903,7 @@ index 29abe5f..5efea89 100644 retval = coerce_ref_if_computed (arg); if (retval) return retval; -@@ -3680,8 +3716,14 @@ value_fetch_lazy (struct value *val) +@@ -3786,8 +3822,14 @@ value_fetch_lazy (struct value *val) } else if (VALUE_LVAL (val) == lval_memory) { @@ -3233,3 +2919,39 @@ index 29abe5f..5efea89 100644 if (TYPE_LENGTH (type)) read_value_memory (val, 0, value_stack (val), +Index: gdb-7.8.90.20150126/gdb/dwarf2loc.c +=================================================================== +--- gdb-7.8.90.20150126.orig/gdb/dwarf2loc.c 2015-01-26 07:47:25.862758444 +0100 ++++ gdb-7.8.90.20150126/gdb/dwarf2loc.c 2015-01-26 07:47:42.412829939 +0100 +@@ -2293,6 +2293,11 @@ dwarf2_evaluate_loc_desc_full (struct ty + int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0); + + do_cleanups (value_chain); ++ ++ /* Select right frame to correctly evaluate VLA's during a backtrace. */ ++ if (is_dynamic_type (type)) ++ select_frame (frame); ++ + retval = value_at_lazy (type, address + byte_offset); + if (in_stack_memory) + set_value_stack (retval, 1); +@@ -2552,6 +2557,19 @@ dwarf2_compile_property_to_c (struct ui_ + data, data + size, per_cu); + } + ++/* See dwarf2loc.h. */ ++ ++int ++dwarf2_address_data_valid (const struct type *type) ++{ ++ if (TYPE_NOT_ASSOCIATED (type)) ++ return 0; ++ ++ if (TYPE_NOT_ALLOCATED (type)) ++ return 0; ++ ++ return 1; ++} + + /* Helper functions and baton for dwarf2_loc_desc_needs_frame. */ + diff --git a/gdb.changes b/gdb.changes index 8dac029..a548c93 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,49 @@ +------------------------------------------------------------------- +Fri Feb 27 11:10:19 UTC 2015 - rguenther@suse.com + +- Strip date and runtimes from gdb-testsuite contents. + +------------------------------------------------------------------- +Wed Feb 25 13:08:27 UTC 2015 - rguenther@suse.com + +- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9. + The GDB 7.8 features are: + * Python Scripting + - You can now access frame registers from Python scripts. + - New attribute 'producer' for gdb.Symtab objects. + * New Python-based convenience functions: + - $_caller_is(name [, number_of_frames]) + - $_caller_matches(regexp [, number_of_frames]) + - $_any_caller_is(name [, number_of_frames]) + - $_any_caller_matches(regexp [, number_of_frames]) + * New commands + - queue-signal signal-name-or-number + Queue a signal to be delivered to the thread when it is resumed. + * On resume, GDB now always passes the signal the program had stopped + for to the thread the signal was sent to, even if the user changed + threads before resuming. Previously GDB would often (but not + always) deliver the signal to the thread that happens to be current + at resume time. + * Conversely, the "signal" command now consistently delivers the + requested signal to the current thread. GDB now asks for + confirmation if the program had stopped for a signal and the user + switched threads meanwhile. + * "breakpoint always-inserted" modes "off" and "auto" merged. + Now, when 'breakpoint always-inserted mode' is set to "off", GDB + won't remove breakpoints from the target until all threads stop, + even in non-stop mode. The "auto" mode has been removed, and "off" + is now the default mode. + * MI changes + - The -list-thread-groups command outputs an exit-code field for + inferiors that have exited. +- removed (upstream) gdb-async-stopped-on-pid-arg-1of2.patch, + gdb-async-stopped-on-pid-arg-testsuite.patch, + gdb-python-completer-1of2.patch, gdb-python-completer-2of2.patch + and gdb-readline-6.3.5.patch +- added gdb-jit-reader-multilib.patch, gdb-no-dg-extract-results-py.patch, + gdb-python-gil.patch, gdb-python3-py_hash_t-32bit.patch, + gdb-python3-testsuite.patch and gdb-vla-intel-logical-not.patch + ------------------------------------------------------------------- Mon Dec 15 07:33:31 UTC 2014 - cshorler@googlemail.com @@ -30,8 +76,8 @@ Wed Aug 13 07:54:35 UTC 2014 - rguenther@suse.com ------------------------------------------------------------------- Fri Aug 8 12:22:24 UTC 2014 - rguenther@suse.com -- Use patchlist.pl to merge with gdb-7.8-16.fc22, a rebase to FSF GDB 4.8. - The GDB 4.8 features are: +- Use patchlist.pl to merge with gdb-7.8-16.fc22, a rebase to FSF GDB 7.8. + The GDB 7.8 features are: * Guile scripting support. * Python scripting enhancements. * New commands: diff --git a/gdb.spec b/gdb.spec index 35657c8..afc24f7 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1,7 +1,7 @@ # # spec file for package gdb # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2012 RedHat # # All modifications and additions to the file contributed by third parties @@ -27,7 +27,7 @@ Name: gdb %global snap 20130731 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20121213 -Version: 7.8.1 +Version: 7.9 Release: 0 # The release always contains a leading reserved number, start it at 1. @@ -36,7 +36,7 @@ Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build # Do not provide URL for snapshots as the file lasts there only for 2 days. # ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.gz -Source: gdb-%{version}.tar.gz +Source: gdb-%{version}.tar.xz Url: http://gnu.org/software/gdb/ %if "%{scl}" == "devtoolset-1.1" @@ -92,125 +92,126 @@ Source13: gdb-rpmlintrc #Fedora Packages begin Patch1: gdb-6.3-rh-testversion-20041202.patch -Patch2: gdb-archer.patch -Patch3: gdb-upstream.patch +Patch2: gdb-upstream.patch +Patch3: gdb-archer.patch Patch4: gdb-vla-intel.patch -Patch5: gdb-vla-intel-04of23-fix.patch +Patch5: gdb-vla-intel-logical-not.patch Patch6: gdb-vla-intel-stringbt-fix.patch -Patch7: gdb-6.3-rh-dummykfail-20041202.patch -Patch8: gdb-6.3-ppc64syscall-20040622.patch -Patch9: gdb-6.3-ppc64displaysymbol-20041124.patch -Patch10: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch -Patch11: gdb-6.3-gstack-20050411.patch -Patch12: gdb-6.3-test-pie-20050107.patch -Patch13: gdb-6.3-test-self-20050110.patch -Patch14: gdb-6.3-test-dtorfix-20050121.patch -Patch15: gdb-6.3-test-movedir-20050125.patch -Patch16: gdb-6.3-threaded-watchpoints2-20050225.patch -Patch17: gdb-6.3-inferior-notification-20050721.patch -Patch18: gdb-6.3-inheritancetest-20050726.patch -Patch19: gdb-6.3-readnever-20050907.patch -Patch20: gdb-6.5-bz203661-emit-relocs.patch -Patch21: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch -Patch22: gdb-6.5-sharedlibrary-path.patch -Patch23: gdb-6.5-bz190810-gdbserver-arch-advice.patch -Patch24: gdb-6.5-BEA-testsuite.patch -Patch25: gdb-6.5-last-address-space-byte-test.patch -Patch26: gdb-6.5-readline-long-line-crash-test.patch -Patch27: gdb-6.5-bz216711-clone-is-outermost.patch -Patch28: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch -Patch29: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch -Patch30: gdb-6.5-bz109921-DW_AT_decl_file-test.patch -Patch31: gdb-6.3-bz140532-ppc-unwinding-test.patch -Patch32: gdb-6.3-bz202689-exec-from-pthread-test.patch -Patch33: gdb-6.6-bz230000-power6-disassembly-test.patch -Patch34: gdb-6.3-bz231832-obstack-2gb.patch -Patch35: gdb-6.6-bz229517-gcore-without-terminal.patch -Patch36: gdb-6.6-bz235197-fork-detach-info.patch -Patch37: gdb-6.6-testsuite-timeouts.patch -Patch38: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch -Patch39: gdb-6.6-scheduler_locking-step-is-default.patch -Patch40: gdb-6.3-attach-see-vdso-test.patch -Patch41: gdb-6.5-bz243845-stale-testing-zombie-test.patch -Patch42: gdb-6.6-buildid-locate.patch -Patch43: gdb-6.6-buildid-locate-solib-missing-ids.patch -Patch44: gdb-6.6-buildid-locate-rpm.patch -Patch45: gdb-6.7-charsign-test.patch -Patch46: gdb-6.7-ppc-clobbered-registers-O2-test.patch -Patch47: gdb-6.5-ia64-libunwind-leak-test.patch -Patch48: gdb-6.5-missed-trap-on-step-test.patch -Patch49: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch -Patch50: gdb-6.5-gcore-buffer-limit-test.patch -Patch51: gdb-6.6-threads-static-test.patch -Patch52: gdb-6.3-mapping-zero-inode-test.patch -Patch53: gdb-6.3-focus-cmd-prev-test.patch -Patch54: gdb-6.8-bz442765-threaded-exec-test.patch -Patch55: gdb-6.8-sparc64-silence-memcpy-check.patch -Patch56: gdb-6.5-section-num-fixup-test.patch -Patch57: gdb-6.8-bz436037-reg-no-longer-active.patch -Patch58: gdb-6.8-watchpoint-conditionals-test.patch -Patch59: gdb-6.8-bz466901-backtrace-full-prelinked.patch -Patch60: gdb-6.8-bz457187-largefile-test.patch -Patch61: gdb-simultaneous-step-resume-breakpoint-test.patch -Patch62: gdb-core-open-vdso-warning.patch -Patch63: gdb-x86_64-i386-syscall-restart.patch -Patch64: gdb-bz533176-fortran-omp-step.patch -Patch65: gdb-follow-child-stale-parent.patch -Patch66: gdb-ccache-workaround.patch -Patch67: gdb-archer-pie-addons.patch -Patch68: gdb-archer-pie-addons-keep-disabled.patch -Patch69: gdb-lineno-makeup-test.patch -Patch70: gdb-ppc-power7-test.patch -Patch71: gdb-bz541866-rwatch-before-run.patch -Patch72: gdb-moribund-utrace-workaround.patch -Patch73: gdb-archer-next-over-throw-cxx-exec.patch -Patch74: gdb-bz601887-dwarf4-rh-test.patch -Patch75: gdb-6.6-buildid-locate-core-as-arg.patch -Patch76: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch -Patch77: gdb-test-bt-cfi-without-die.patch -Patch78: gdb-gdb-add-index-script.patch -Patch79: gdb-bz568248-oom-is-error.patch -Patch80: gdb-bz634108-solib_address.patch -Patch81: gdb-test-pid0-core.patch -Patch82: gdb-test-dw2-aranges.patch -Patch83: gdb-test-expr-cumulative-archer.patch -Patch84: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch -Patch85: gdb-glibc-vdso-workaround.patch -Patch86: gdb-runtest-pie-override.patch -Patch87: gdb-attach-fail-reasons-5of5.patch -Patch88: gdb-stale-frame_info.patch -Patch89: gdb-glibc-strstr-workaround.patch -Patch90: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch -Patch91: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch -Patch92: gdb-rhbz795424-bitpos-20of25.patch -Patch93: gdb-rhbz795424-bitpos-21of25.patch -Patch94: gdb-rhbz795424-bitpos-22of25.patch -Patch95: gdb-rhbz795424-bitpos-23of25.patch -Patch96: gdb-rhbz795424-bitpos-25of25.patch -Patch97: gdb-rhbz795424-bitpos-25of25-test.patch -Patch98: gdb-rhbz795424-bitpos-lazyvalue.patch -Patch99: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch -Patch100: gdb-enable-count-crash.patch -Patch101: gdb-gnat-dwarf-crash-3of3.patch -Patch102: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch -Patch103: gdb-archer-vla-tests.patch -Patch104: gdb-readline-6.3.5.patch +Patch7: gdb-vla-intel-04of23-fix.patch +Patch8: gdb-6.3-rh-dummykfail-20041202.patch +Patch9: gdb-6.3-ppc64syscall-20040622.patch +Patch10: gdb-6.3-ppc64displaysymbol-20041124.patch +Patch11: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch +Patch12: gdb-6.3-gstack-20050411.patch +Patch13: gdb-6.3-test-pie-20050107.patch +Patch14: gdb-6.3-test-self-20050110.patch +Patch15: gdb-6.3-test-dtorfix-20050121.patch +Patch16: gdb-6.3-test-movedir-20050125.patch +Patch17: gdb-6.3-threaded-watchpoints2-20050225.patch +Patch18: gdb-6.3-inferior-notification-20050721.patch +Patch19: gdb-6.3-inheritancetest-20050726.patch +Patch20: gdb-6.3-readnever-20050907.patch +Patch21: gdb-6.5-bz203661-emit-relocs.patch +Patch22: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +Patch23: gdb-6.5-sharedlibrary-path.patch +Patch24: gdb-6.5-bz190810-gdbserver-arch-advice.patch +Patch25: gdb-6.5-BEA-testsuite.patch +Patch26: gdb-6.5-last-address-space-byte-test.patch +Patch27: gdb-6.5-readline-long-line-crash-test.patch +Patch28: gdb-6.5-bz216711-clone-is-outermost.patch +Patch29: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch +Patch30: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch +Patch31: gdb-6.5-bz109921-DW_AT_decl_file-test.patch +Patch32: gdb-6.3-bz140532-ppc-unwinding-test.patch +Patch33: gdb-6.3-bz202689-exec-from-pthread-test.patch +Patch34: gdb-6.6-bz230000-power6-disassembly-test.patch +Patch35: gdb-6.3-bz231832-obstack-2gb.patch +Patch36: gdb-6.6-bz229517-gcore-without-terminal.patch +Patch37: gdb-6.6-bz235197-fork-detach-info.patch +Patch38: gdb-6.6-testsuite-timeouts.patch +Patch39: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch +Patch40: gdb-6.6-scheduler_locking-step-is-default.patch +Patch41: gdb-6.3-attach-see-vdso-test.patch +Patch42: gdb-6.5-bz243845-stale-testing-zombie-test.patch +Patch43: gdb-6.6-buildid-locate.patch +Patch44: gdb-6.6-buildid-locate-solib-missing-ids.patch +Patch45: gdb-6.6-buildid-locate-rpm.patch +Patch46: gdb-6.7-charsign-test.patch +Patch47: gdb-6.7-ppc-clobbered-registers-O2-test.patch +Patch48: gdb-6.5-ia64-libunwind-leak-test.patch +Patch49: gdb-6.5-missed-trap-on-step-test.patch +Patch50: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch +Patch51: gdb-6.5-gcore-buffer-limit-test.patch +Patch52: gdb-6.6-threads-static-test.patch +Patch53: gdb-6.3-mapping-zero-inode-test.patch +Patch54: gdb-6.3-focus-cmd-prev-test.patch +Patch55: gdb-6.8-bz442765-threaded-exec-test.patch +Patch56: gdb-6.8-sparc64-silence-memcpy-check.patch +Patch57: gdb-6.5-section-num-fixup-test.patch +Patch58: gdb-6.8-bz436037-reg-no-longer-active.patch +Patch59: gdb-6.8-watchpoint-conditionals-test.patch +Patch60: gdb-6.8-bz466901-backtrace-full-prelinked.patch +Patch61: gdb-6.8-bz457187-largefile-test.patch +Patch62: gdb-simultaneous-step-resume-breakpoint-test.patch +Patch63: gdb-core-open-vdso-warning.patch +Patch64: gdb-x86_64-i386-syscall-restart.patch +Patch65: gdb-bz533176-fortran-omp-step.patch +Patch66: gdb-follow-child-stale-parent.patch +Patch67: gdb-ccache-workaround.patch +Patch68: gdb-archer-pie-addons.patch +Patch69: gdb-archer-pie-addons-keep-disabled.patch +Patch70: gdb-lineno-makeup-test.patch +Patch71: gdb-ppc-power7-test.patch +Patch72: gdb-bz541866-rwatch-before-run.patch +Patch73: gdb-moribund-utrace-workaround.patch +Patch74: gdb-archer-next-over-throw-cxx-exec.patch +Patch75: gdb-bz601887-dwarf4-rh-test.patch +Patch76: gdb-6.6-buildid-locate-core-as-arg.patch +Patch77: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +Patch78: gdb-test-bt-cfi-without-die.patch +Patch79: gdb-gdb-add-index-script.patch +Patch80: gdb-bz568248-oom-is-error.patch +Patch81: gdb-bz634108-solib_address.patch +Patch82: gdb-test-pid0-core.patch +Patch83: gdb-test-dw2-aranges.patch +Patch84: gdb-test-expr-cumulative-archer.patch +Patch85: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch +Patch86: gdb-glibc-vdso-workaround.patch +Patch87: gdb-runtest-pie-override.patch +Patch88: gdb-attach-fail-reasons-5of5.patch +Patch89: gdb-stale-frame_info.patch +Patch90: gdb-glibc-strstr-workaround.patch +Patch91: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch +Patch92: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch +Patch93: gdb-rhbz795424-bitpos-20of25.patch +Patch94: gdb-rhbz795424-bitpos-21of25.patch +Patch95: gdb-rhbz795424-bitpos-22of25.patch +Patch96: gdb-rhbz795424-bitpos-23of25.patch +Patch97: gdb-rhbz795424-bitpos-25of25.patch +Patch98: gdb-rhbz795424-bitpos-25of25-test.patch +Patch99: gdb-rhbz795424-bitpos-lazyvalue.patch +Patch100: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch +Patch101: gdb-enable-count-crash.patch +Patch102: gdb-gnat-dwarf-crash-3of3.patch +Patch103: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +Patch104: gdb-archer-vla-tests.patch Patch105: gdb-btrobust.patch -Patch106: gdb-python-completer-1of2.patch -Patch107: gdb-python-completer-2of2.patch -Patch108: gdb-fortran-frame-string.patch -Patch110: gdb-dts-rhel6-python-compat.patch -Patch111: gdb-6.6-buildid-locate-rpm-scl.patch -Patch112: gdb-readline62-ask-more-rh.patch -Patch113: gdb-6.8-attach-signalled-detach-stopped.patch -Patch114: gdb-6.8-quit-never-aborts.patch -Patch115: gdb-rhel5-compat.patch +Patch106: gdb-fortran-frame-string.patch +Patch107: gdb-python-gil.patch +Patch108: gdb-jit-reader-multilib.patch +Patch109: gdb-no-dg-extract-results-py.patch +Patch110: gdb-python3-py_hash_t-32bit.patch +Patch111: gdb-python3-testsuite.patch +Patch112: gdb-dts-rhel6-python-compat.patch +Patch113: gdb-6.6-buildid-locate-rpm-scl.patch +Patch114: gdb-readline62-ask-more-rh.patch +Patch115: gdb-6.8-attach-signalled-detach-stopped.patch +Patch116: gdb-6.8-quit-never-aborts.patch +Patch117: gdb-rhel5-compat.patch #Fedora Packages end # Upstream patch to fix gcc -Werror Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch -Patch1003: gdb-async-stopped-on-pid-arg-1of2.patch -Patch1005: gdb-async-stopped-on-pid-arg-testsuite.patch BuildRequires: bison BuildRequires: flex @@ -270,7 +271,7 @@ BuildRequires: gcc-objc %ifarch %{ix86} x86_64 ia64 ppc alpha BuildRequires: gcc-ada %endif -%if 0%{suse_version} > 1120 +%if 0%{suse_version} > 1110 %ifarch x86_64 ppc64 s390x BuildRequires: gcc-c++-32bit %endif @@ -453,23 +454,24 @@ find -name "*.info*"|xargs rm -f %patch106 -p1 %patch107 -p1 %patch108 -p1 +%patch109 -p1 %patch110 -p1 -%patch110 -p1 -R %patch111 -p1 -%patch111 -p1 -R %patch112 -p1 %patch112 -p1 -R %patch113 -p1 -%patch114 -p1 -%patch115 -p1 -%patch115 -p1 -R -%patch114 -p1 -R %patch113 -p1 -R +%patch114 -p1 +%patch114 -p1 -R +%patch115 -p1 +%patch116 -p1 +%patch117 -p1 +%patch117 -p1 -R +%patch116 -p1 -R +%patch115 -p1 -R #Fedora patching end %patch1002 -p1 -%patch1003 -p1 -%patch1005 -p1 find -name "*.orig" | xargs rm -f ! find -name "*.rej" # Should not happen. @@ -733,6 +735,8 @@ done # `tar | bzip2 | uuencode' may have some piping problems in Brew. #tar cjf gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}*.{sum,log} #uuencode gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}.tar.bz2 +# Strip dates and completion times from the log to make build-compare happy +sed -i -e '/Test Run By abuild on/d' -e 's/completed in [0-9]* seconds//' *.{sum,log} cd ../.. echo ====================TESTING END===================== %endif